寻找一个例子:
最佳答案
像这样:
STARTUPINFO info={sizeof(info)};
PROCESS_INFORMATION processInfo;
if (CreateProcess(path, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo))
{
WaitForSingleObject(processInfo.hProcess, INFINITE);
CloseHandle(processInfo.hProcess);
CloseHandle(processInfo.hThread);
}
关于c++ - 如何在C++中调用:: CreateProcess来启动Windows可执行文件?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42531/