<<<Win32Api.TXT>>> 
Author Message
 <<<Win32Api.TXT>>>

Karl,


:Cool.  BTW, I just updated this call this morning...
:
:   Private Declare Function GetCommandLine Lib "kernel32" Alias
"GetCommandLineW" ()
:As Long
[...]

Why does it have to be As Long? From all my documentation, GetCommandLine
returns a LPTSTR (char* in ANSI, wchar_t in Unicode).

Hold on.... I *think* I see it now.

[Return Values]
The return value is a pointer to the command-line string for the current
process.

Is that why?
--
Damit Senanayake
Microsoft MVP - Visual Basic
ICQ#: 6930718
http://www.*-*-*.com/ , for now



Sun, 25 Mar 2001 03:00:00 GMT  
 <<<Win32Api.TXT>>>
Damit --

Quote:
>:   Private Declare Function GetCommandLine Lib "kernel32" Alias
>"GetCommandLineW" ()
>:As Long
>[...]

>Why does it have to be As Long? From all my documentation, GetCommandLine
>returns a LPTSTR (char* in ANSI, wchar_t in Unicode).

>Hold on.... I *think* I see it now.

>[Return Values]
>The return value is a pointer to the command-line string for the current
>process.

>Is that why?

Bingo.  It returns a pointer.  No API returns a String directly (afaik).

Later...   Karl



Sun, 25 Mar 2001 03:00:00 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 
 

 
Powered by phpBB® Forum Software