해당 함수는 사용자가 설정한 폴더 경로에 있는 exe프로그램...을 실행시킨다.
bool cSessionEx::ProgramRerun(wchar_t Directory[], wchar_t Process_name[])
{
bool bRet = false;
SHELLEXECUTEINFO ShExecInfo = { 0 };
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_FLAG_NO_UI;// SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = 실행파일//_T("Sentinel.exe");
ShExecInfo.lpParameters = _T("");
ShExecInfo.lpDirectory = 유저지정 경로 //_T("D:\\[02]ProjectK\\Server\\trunk\\Output");
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
bRet = ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
return bRet;
}
'Game Programming > C++' 카테고리의 다른 글
| 패턴 - 3. 옵저버 패턴(Observer Pattern) (0) | 2016.09.18 |
|---|---|
| cUrl 사용 push (0) | 2014.06.18 |
| Port OpenCheck (0) | 2014.06.18 |
| Process Search (0) | 2014.06.18 |
| Process Kill (0) | 2014.06.18 |