我在 MFC 中创建了应用程序(说 App1)。从 app1,我从 app1 调用了另一个应用程序 app2。我叫作
CString szCmdline = "app2.exe";
BOOL ret= CreateProcess( NULL,
szCmdline.GetBuffer(szCmdline.GetLength()), // application name with parameter
NULL, // process security attributes
NULL, // primary thread security attributes
TRUE, // handles are inherited
0, //DETACHED_PROCESS, // creation flags
NULL, // use parent's environment
NULL, // use parent's current directory
&siStartInfo, // STARTUPINFO pointer
&piProcInfo); // receives PROCESS_INFORMATION
if(ret)
{
return;
} else
{
return;
}
}
我希望应用程序 app1 退出而不让 App2 返回;