struct ProcessInfo DWORD processId; std::string processName; DWORD threadCount; DWORD parentProcessId; ;
#include "gameprocesswatcher.h" #include <windows.h> #include <tlhelp32.h> #include <algorithm> #include <cstring> gameprocesswatcher.cpp
HANDLE m_hProcess; DWORD m_processId; std::atomic<bool> m_isWatching; int m_checkInterval; std::thread m_watchThread; mutable std::mutex m_mutex; std::function<void(DWORD)> m_onProcessExit; mutable std::string m_lastError; ; struct ProcessInfo DWORD processId