Consider the command line argument:
D:\work\test.exe -a -p
My C++ application's main() receives the arguments as follows:
Windows 10
argc = 3 argv[0] = "D:\work\test.exe" argv[1] = "-a" argv[2] = "-p"
Windows XP
argv = 3 argv[0] = "test.exe" argv[1] = "-a" argv[2] = "-p"
The argument argv[0] is being parsed differently.
My application needs them to be same.
Is there any way to get the entire path in Windows XP as well?
I have tried both main and winmain and the result is the same.