Commit 1341e9ae authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

Fix processing of the command line.

parent 16cd8619
......@@ -30,19 +30,19 @@ void launch(const char *what)
exit(0);
}
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc)
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszCmdLine, INT nCmdShow)
{
char szParams[255];
lstrcpy(szParams, szParam);
lstrcpy(szParams, lpszCmdLine);
CharUpper(szParams);
switch (argc) {
case 0: /* no parameters - pop up whole "Control Panel" by default */
/* no parameters - pop up whole "Control Panel" by default */
if (!*szParams) {
launch("");
break;
return 0;
}
case 1: /* check for optional parameter */
/* check for optional parameter */
if (!strcmp(szParams,szP_DESKTOP))
launch(szC_DESKTOP);
if (!strcmp(szParams,szP_COLOR))
......@@ -64,9 +64,5 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, CHAR *szParam, INT argc)
/* try to launch if a .cpl file is given directly */
launch(szParams);
break;
default: printf("Syntax error.");
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment