Hello i did one small console application for example
1 2 3 4 5 6 7 8 9 10 11 12
|
int argc, wchar_t* argv[]{
assert(argc > 1);
// build command line
wchar_t commandLine[MAX_PATH * 2];
::lstrcpyW(commandLine, argv[1]);
if (argc > 2) {
::lstrcatW(commandLine, L" ");
::lstrcatW(commandLine, argv[2]);
}
}
|
But now i want to use winmain.. like..
1 2 3 4 5 6 7 8 9 10
|
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdParam,
int nCmdShow)
{
// DeclaraciĆ³n:
// InicializaciĆ³n:
// Bucle de mensajes:
return Message.wParam;
}
|
How i can read these arguments again? argc and argv. Searching i found that the only way possible is using getcommandline
Last edited on