STARTUPINFO si; PROCESS_INFORMATION pi; memset(&si, 0, sizeof(si)); si.cb = sizeof(STARTUPINFO); //路径不能写死 CString str; str.Format(_T("Test.exe")); LPWSTR pointer; pointer = (LPWSTR)(LPCTSTR)str; if (CreateProcess(NULL, pointer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { //m_dwProcessId = pi.dwProcessId; CloseHandle(pi.hProcess); CloseHandle(pi.hThread); }