vc调用EXE文件,并且等待其执行完毕.

 

SHELLEXECUTEINFO ShExecinfo={};

ShExecinfo.cbSize=sizeof(SHELLEXECUTEINFO);

ShExecinfo.fMask=SEE_MASK_NOCLOSEPROCESS;

ShExecinfo.hwnd=NULL;

ShExecinfo.lpVerb=NULL;

ShExecinfo.lpFile=_T(".//res/NET.exe");

ShExecinfo.lpDirectory=NULL;

ShExecinfo.nShow=SW_SHOW;

ShExecinfo.hInstApp=NULL;

ShExecuteEx(&ShExecinfo);

WaitForSingObject(ShExecinfo,hProcess,INFINITE);

你可能感兴趣的:(exe)