I Call CreateProcess() ,it failed,the Errorcode is 299,why?
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I call CreateProcess() to Start another exe,but it fail, I use GetLastError() ,the ErrorCode is 299; my code is: CString strUninstallProc = "c:\\1.exe"; char buffer[20]; CString strCommandLine = " /n "; strCommandLine += " /p 873w "; strCommandLine += strPartCmdLine; PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo; ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION)); ZeroMemory(&siStartInfo, sizeof(STARTUPINFO) ); siStartInfo.cb = sizeof(STARTUPINFO); BOOL bCreation = CreateProcess(strUninstallProc, strCommandLine.GetBuffer(strCommandLine.GetLength()), NULL, NULL, TRUE, 0, NULL, NULL, &siStartInfo, &piProcInfo); strCommandLine.ReleaseBuffer(); if (bCreation) {} else {} thanks