#pragma once #include namespace fk { struct WinHandle { public: WinHandle(HANDLE handle, BOOL(__stdcall* closeProc)(HANDLE)); ~WinHandle(); operator bool() { return _handle; } operator HANDLE() { return _handle; } private: HANDLE _handle; BOOL(__stdcall* _closeProc)(HANDLE); }; }