c++创建进程执行文件
// ConsoleApplication3.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include#includeusing namespace std;int _tmain(int argc, _TCHAR* argv[]){ wstring szCmdLine = L"E:\\svn\\备份\\cefclient\\Release\\安装包\\科学阅读器 Setup.exe"; //wstring szCmdLine = L"C:\\Users\\Jin\\Documents\\Visual Studio 2013\\Projects\\Win32Project2\\Debug\\Win32Project2.exe"; STARTUPINFO si = { sizeof(si) }; PROCESS_INFORMATION pi; si.wShowWindow = 1; //si.dwFlags = STARTF_USESHOWWINDOW; BOOL ret = ::CreateProcessW( NULL, &szCmdLine[0], NULL, NULL, 0, 0, NULL, NULL, &si, &pi); if(ret){ ::CloseHandle(pi.hProcess); ::CloseHandle(pi.hThread); std::cout<<"新进程的id:"<
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
暂时没有评论,来抢沙发吧~