--- Alexandre Julliard julliard@winehq.com wrote:
No, the interesting case is what happens with CreateProcess. Launching the app from cmd.exe doesn't tell you anything, because you don't know exactly what arguments cmd.exe passed to CreateProcess.
You're right, as usual :)
I created another test case: #include <windows.h> #include <stdio.h>
int main(int argc, const char *argv[]) { if (argc <= 1) { PROCESS_INFORMATION procInfo; STARTUPINFO startInfo;
memset(&startInfo, 0, sizeof(startInfo)); startInfo.cb = sizeof(startInfo); if (CreateProcessA(NULL, "cmdlinetest.exe 1", NULL, NULL, FALSE, 0, NULL, NULL, &startInfo, &procInfo)) { CloseHandle(procInfo.hProcess); CloseHandle(procInfo.hThread); } } else { LPCSTR cmd;
printf("argv[0] is %s\n", argv[0]); cmd = GetCommandLineA(); printf("GetCommandLine returns %s\n", cmd); } return 0; }
With this, the output under win9x is: argv[0] is cmdlinetest.exe GetCommandLine returns cmdlinetest.exe 1
So, Frank, sorry, this isn't the way GetCommandLine actually behaves under Win9x. --Juan
__________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html