再问有关外部程序的调用?
HANDLE hProcess;
STARTUPINFO startInfo;
ZeroMemory(&startInfo,sizeof(startInfo));
startInfo.cb = sizeof(STARTUPINFO);
startInfo.lpReserved = NULL;
startInfo.lpTitle = NULL;
startInfo.lpDesktop = NULL;
startInfo.dwX = 0;
startInfo.dwY = 0;
startInfo.dwXSize = 0;
startInfo.dwYSize = 0;
startInfo.dwXCountChars = 0;
startInfo.dwYCountChars = 0;
startInfo.dwFlags = STARTF_USESTDHANDLES;
startInfo.wShowWindow = 0;
startInfo.lpReserved2 = NULL;
startInfo.cbReserved2 = 0;
startInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
startInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
startInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
int soundserve;
PROCESS_INFORMATION procinfoserve;
ZeroMemory(&procinfoserve,sizeof(procinfoserve));
soundserve=CreateProcess(NULL,"..\..\CCIR\EPDM.EXE",NULL,NULL,TRUE,0,NULL,NULL,&startInfo,&procinfoserve);
if (soundserve>0)
{
DWORD dPids = procinfoserve.dwProcessId;
hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,dPids);
}
方法一(上)
方法二(下)
//ShellExecute(NULL, "open", "你的文件,带路径", NULL, NULL, SW_NORMAL);
//ShellExecute("open", NULL, "EPDM.EXE", NULL, "..\..\CCIR", SW_SHOWNORMAL);
*/
ShellExecute(NULL, "open", "D:\PROGRAM\CCIR\EPDM.EXE", NULL, NULL, SW_SHOWNORMAL);
}
为什么都没有反应??