win7 下createprocess 出线1813错误 为什么呼唤大大
char* strProc = new char[256];
strcpy(strProc,ExtractFileDir(AExe.c_str()).c_str());
BOOL fRet = ::CreateProcess(AExe.c_str(), // LPCTSTR lpApplicationName,
NULL, //LPTSTR lpCommandLine,
NULL, //LPSECURITY_ATTRIBUTES lpProcessAttributes。
NULL, //LPSECURITY_ATTRIBUTES lpThreadAttributes,
true,// BOOL bInheritHandles,
// NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE, //DWORD dwCreationFlags,
NORMAL_PRIORITY_CLASS,
NULL, //LPVOID lpEnvironment,
NULL,//strProc, //LPCTSTR lpCurrentDirectory,
&si, //LPSTARTUPINFO lpStartupInfo,
&pi //LPPROCESS_INFORMATION lpProcessInformation
);
if( !fRet || GetLastError() != 0 )
{
ShowMessage(GetLastError());
ShowMessage("CreateError" );
return;
}
代码如上急
------解决方案--------------------
1813错误时什么啊?