[cpp] view plain copy
- HDESK hDesk = CreateDesktop(_T("MyDesk"), NULL, NULL, 0, GENERIC_ALL, NULL);
- ASSERT(hDesk);
- STARTUPINFO si = {sizeof(si)};
- si.lpDesktop = _T("MyDesk");
- si.dwFlags = STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- PROCESS_INFORMATION pi = {0};
- TCHAR szApp[MAX_PATH] = {_T("F://11.exe")};
- if(CreateProcess(NULL, szApp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
- {
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- }
http://blog.csdn.net/visualeleven/article/details/6025210
时间: 2024-10-11 06:16:54