CreateProcess函式使用

2021-06-12 09:17:01 字數 814 閱讀 4151

startupinfo infostart;

process_information infoprocess;

memset(&infostart,0,sizeof(infostart));

infostart.cb = sizeof(startupinfo);

infostart.dwflags = startf_useshowwindow;

infostart.wshowwindow = sw_hide;

int i=createprocess(null,"c:\\windows\\1.exe",null,null,false,normal_priority_class,null,null,&infostart,&infoprocess);

process_information pi;

startupinfo si;

memset(&si,0,sizeof(si));

si.cb=sizeof(si);

si.wshowwindow=sw_show; //sw_hide

si.dwflags=startf_useshowwindow;

bool fret=createprocess(null,"c:\\programfiles\\internetexplorer\\iexplore.exe ",null,null,false,normal_priority_class|create_new_console,null,null,&si,&pi);

if(!fret)

else

使用CreateProcess函式執行其他程式

其引數含義如下。以下 是使用win32process.createprocess函式執行記事本程式。import win32process win32process.createprocess c windows notepad.exe none none 0 win32process.create...

CreateProcess 終止程序

最近需要用到,稍微研究了下。1.供createprocess啟動的程序test.exe,只是列印出引數而已。include stdafx.h include include include using namespace std int main int argc,char argv 程式 incl...

建立程序 CreateProcess

下面來分享一下如何用c 建立程序 開發環境建議vs2017 宇宙第一ide 以下為建立新的程序,以拉起記事本為例 include include using namespace std int main startupinfo 結構體初始化 process information pi proces...