首页 > 代码库 > 打开当前目录的其他exe

打开当前目录的其他exe

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);    }

 

打开当前目录的其他exe