createprocess创建进程失败
STARTUPINFOsi={sizeof(si)};PROCESS_INFORMATIONpi;si.dwFlags=STARTF_USESHOWWINDOW;si.w...
STARTUPINFO si = { sizeof(si) };
PROCESS_INFORMATION pi;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = TRUE;
BOOL bRet = ::CreateProcess (
NULL, "./MVTMonitor.exe", NULL,
NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &si,
&pi);
if(bRet)
{
::CloseHandle (pi.hThread);
::CloseHandle (pi.hProcess);
}
else
{
MessageBox(NULL,"程序启动失败!","警告",MB_OK);
return FALSE;
}
怎么老是显示程序启动失败? 展开
PROCESS_INFORMATION pi;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = TRUE;
BOOL bRet = ::CreateProcess (
NULL, "./MVTMonitor.exe", NULL,
NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &si,
&pi);
if(bRet)
{
::CloseHandle (pi.hThread);
::CloseHandle (pi.hProcess);
}
else
{
MessageBox(NULL,"程序启动失败!","警告",MB_OK);
return FALSE;
}
怎么老是显示程序启动失败? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询