Link to home
Start Free TrialLog in
Avatar of 1agallen
1agallen

asked on

argv[0] For Winmain?

Is it possible to obtain argv[0] information (program full path and name) using a win32 compiler such as Borland c++ 5?
Winmain's lpCmdParam argument does not contain this info.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of papirus
papirus

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
Avatar of BudVVeezer
BudVVeezer

If you want to get all of the arguments, you can use GetCommandLine()  This returns a string, which is the full command line, path, file and args included.

~Aaron
The easiest way for Borland compiler is to use _argc and _argv global variables. They are fully identical main(int argc,char* argv[]). They are work for GUI and console.