× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 8/4/07, tim <tim2006@xxxxxxxxxxx> wrote:
Hello,



I know this is off topic, but thought I would ask anyway.





I am writing my first C application which will be used to initiate a phone
call from my iseries application to a c++ pgm on the users pc. I want to
pass the phone number as a command argument, then pass that argument to the
dialer. My code is as follows:



int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine,
int nCmdShow ) {



WCHAR szAddressToCall[] = L"201";

if ( S_OK == MakeCall(szAddressToCall) )





Right now, I have cardcoded 201 as the number to dial. I would like to pass
lpCmdLine. I have no idea how to cast a LPSTR to a WCHAR.


here is the win32 way to do it:

http://msdn2.microsoft.com/en-us/library/ms776413.aspx

wchar_t wideCmdLine[9999] ;
int nLx = ::strlen(lpCmdLine) ;
::MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, lpCmdLine, nLx,
wideCmdLine, 9999 ) ;

but you really want to look at using C#. get the free languages, sdk
and visual studio express from MSFT. use the wizard to create a
console application. then use p-invoke to call from c# into your phone
dialing dll function.

-Steve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.