#pragma once #include "RegistryConfig.h" #include #include namespace hook { class ProcessLauncher { public: ProcessLauncher() = default; ~ProcessLauncher(); ProcessLauncher(const ProcessLauncher&) = delete; ProcessLauncher& operator=(const ProcessLauncher&) = delete; bool Start(const LaunchConfig& config, bool loggingEnabled, const std::wstring& sourceName); void Stop(bool loggingEnabled, const std::wstring& sourceName = L"Programm"); void Detach(bool loggingEnabled, const std::wstring& sourceName = L"Programm"); bool IsRunning(); private: HANDLE process_ = nullptr; DWORD processId_ = 0; void CleanupExitedProcess(); }; }