Link to home
Start Free TrialLog in
Avatar of polygon
polygon

asked on

GetCommmandLine Problem

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
ASKER CERTIFIED SOLUTION
Avatar of mrmick
mrmick

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial