Go to the documentation of this file.00001 #pragma once
00002
00003 namespace AppSecInc
00004 {
00005 namespace File
00006 {
00008 class Process
00009 {
00010 private:
00011 std::string _buffer;
00012 STARTUPINFO _si;
00013 PROCESS_INFORMATION _pi;
00014 HANDLE _stdout_read;
00015 HANDLE _stdout_write;
00016 public:
00017 Process();
00018 virtual ~Process();
00020 void Create(const std::wstring& commandline, const std::wstring directory = L"");
00022 void CreateWithRedirectedOutput(const std::wstring& commandline, const std::wstring directory = L"");
00024 void Wait(DWORD dwMilliseconds = INFINITE);
00026 DWORD GetExitCode();
00028 std::string ReadLine(bool& finished);
00030 static DWORD Execute(const std::wstring commandline, const std::wstring& directory = L"");
00031 };
00032 }
00033 }