Take the example here
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
int argc;
wchar_t **argv = CommandLineToArgvW(GetCommandLineW(), &argc);
if(!argv) {
MessageBoxA(NULL, "returned nullptr", "test", MB_OK | MB_ICONERROR);
}
else {
MessageBoxA(NULL, "success", "test", MB_OK);
}
return 0;
}
It always fails on 9x. I don't think it could be a real allocation problem because regular allocations with malloc() work just fine.
GetCommandLineW() seems to work correctly.
Tested on Windows 98 SE and Windows ME. I am using mingw32_686-msvcrt_win98-15.2.0-r7

Take the example here
It always fails on 9x. I don't think it could be a real allocation problem because regular allocations with malloc() work just fine.
GetCommandLineW()seems to work correctly.Tested on Windows 98 SE and Windows ME. I am using
mingw32_686-msvcrt_win98-15.2.0-r7