#pragma once namespace WinSys { struct HandleEntryInfo { HANDLE HandleValue; uint16_t ObjectTypeIndex; bool operator==(const HandleEntryInfo& other) const; }; class ProcessHandleTracker { public: ProcessHandleTracker(uint32_t pid); ProcessHandleTracker(HANDLE hProcess); ~ProcessHandleTracker(); bool IsValid() const; uint32_t EnumHandles(bool clearHistory = false); const std::vector& GetNewHandles() const; const std::vector& GetClosedHandles() const; private: struct Impl; std::unique_ptr _impl; }; }