MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / RunProg

Function RunProg

sourcecommon/utils.cpp:864–895  ·  view source on GitHub ↗

--------------------------------------------------------------------------- CmdLine - ������ ��������� ������

Source from the content-addressed store, hash-verified

862//---------------------------------------------------------------------------
863// CmdLine - ������ ��������� ������
864bool RunProg(char * CmdLine, WORD wShowWindow, bool bWait,
865 DWORD * pExitCode, char * szCurDir, DWORD * pdwProcessId)
866{
867 bool RetVal;
868 STARTUPINFO si;
869 PROCESS_INFORMATION pi;
870 GetStartupInfo(&si);
871 si.wShowWindow = wShowWindow;
872
873 RetVal = CreateProcess(NULL, CmdLine, NULL, NULL, FALSE,
874 NORMAL_PRIORITY_CLASS, NULL, szCurDir, &si, &pi);
875
876 if( RetVal )
877 {
878 if( bWait )
879 WaitForSingleObject(pi.hProcess, INFINITE);
880
881 if( pExitCode )
882 GetExitCodeProcess(pi.hProcess, pExitCode);
883 }
884 else
885 {
886 if( pExitCode )
887 *pExitCode = GetLastError();
888 }
889
890 CloseHandle(pi.hProcess);
891 CloseHandle(pi.hThread);
892 if( pdwProcessId )
893 *pdwProcessId = pi.dwProcessId;
894 return RetVal;
895}
896//---------------------------------------------------------------------------
897#if !defined(DANFOSS)
898bool RunTelnet(AnsiString params)

Callers 4

RunTelnetFunction · 0.85
RunPaintFunction · 0.85
aPingExecuteMethod · 0.85
ProcessMessageRulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected