我正在尝试以编程方式启动 explorer.exe,但我没有任何运气。
这是我的代码:
cout << pName << "died, lets restart it." << endl;
STARTUPINFO startupInfo = {0};
startupInfo.cb = sizeof(startupInfo);
PROCESS_INFORMATION processInformation;
if(CreateProcess(pName, NULL, NULL, NULL, false, NORMAL_PRIORITY_CLASS, NULL, NULL, &startupInfo, &processInformation) == 0){
cout << "Error starting " << pName << ": " << GetLastError() << endl;
}
pName 是 explorer.exe
有人可以告诉我我做错了什么吗?我收到错误代码“2”,即ERROR_FILE_NOT_FOUND