The command line parameters obtained by the sub-process created with CreateProcess have the following cases: 1. In the child process, the third parameter of the WinMain function removes the application path, file name, and strings such as the parameters and spaces separated by the parameters in the command line parameters represented by the WinMain function. For example, parent processes: CreateProcess (NULL, "C: //test.exe -p", NULL, NULL, FALSE, 0, NULL, NULL, & SI, & PI); in child processes, LPCMDLINE parameters are -p, pay attention to no double Quotation marks 2. If you view the command line parameters through the lpcmdline parameter, then when the parent process creates a child process, you need to add a space number in the subroutine and parameters. For example: parent processes: CreateProcess ("C: //test.exe", "-p", null, null, false, 0, null, null, & si, & pi), in child processes, the LPCMDLINE parameter is -p, no Space. 3. If you want to get the full command line parameter of the child process, call the getCommandLine function. The command line parameters usually obtained via the getcommandline function are the full parameters when the parent process is called. CreateProcess (NULL, "C: //test.exe -p", NULL, NULL, FALSE, 0, NULL, NULL, & SI, & PI), in the child process, the parameter returned by getcommandline is c: //test.exe - p, pay attention to the following cases below the Call the getCommandLine function to get the command line parameter 4. CreateProcess First parameter is NULL, the second parameter specifies the sub-application and command line parameters, then the command line parameter of the child process is the second parameter, without double quotes. For example: parent processes: CreateProcess (NULL, "C: //test.exe -p", NULL, NULL, FALSE, 0, NULL, NULL, & SI, & PI); In the process, the command line parameters obtained by getcommandline are c. : //test.exe -p 5. CREATEPROCESS The first parameter specifies the sub-application path and file name, the second parameter is null, then the sub-process command line parameter is the first parameter, with dual quotes. For example: Parent Process: CreateProcess ("C: //Test.exe", Null, Null, NULL, FALSE, 0, NULL, NULL, & SI, & PI), in child processes, the command line parameters obtained by getcommandline are "C: //test.exe "6. CREATEPROCESS The first parameter specifies the sub-application path and the file name, the second parameter is the parameter passed to the child process, then the command line parameter of the child process is the second parameter, without double quotes. For example: Parent Process: CreateProcess ("C: //Test.exe", "-p", NULL, NULL, FALSE, 0, NULL, NULL, & SI, & PI); in child processes, getcommandline acquired command line parameters is -p. Pay attention to the second point, if you view the command line parameters with lpcmdline, there is no. But change "-p" to "-p", use the parameter is -p, is it very confusing?