I use the GetCommandLine function to obtain parameters send to my exe file. It works very well in W95 but in WinNT in doesn't. Here is the declaration:
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String
What happens when I call this function in WinNT: Program error occurs(GPF). I tried to change the declaration from <Alias "GetCommandLineA" () As String> to :
<Alias "GetCommandLineW" () As String> but in that case the function returns only the first character of the command line string.
What's the problem and how to avoid it?
I use WinNT 4.0 and VB 5.0 EE