#ifndef _HOOKPROC_ENUMWINDOWSHOOK_HPP_ #define _HOOKPROC_ENUMWINDOWSHOOK_HPP_ #ifndef _HOOKPROC_APIENTRY_HPP_ #include #endif #ifndef _HOOKPROC_PROCADDRESS_HPP_ #include #endif class EnumWindowsHook; typedef ProcAddress EnumWindowsHookProc; class EnumWindowsHook : protected APIEntry, private EnumWindowsHookProc { public: typedef int (__stdcall *LPFNENUMWINDOWPROC)(HWND hWnd,LPARAM lParam); EnumWindowsHook(void); virtual ~EnumWindowsHook(); DWORD getHookAddress(void); protected: virtual bool enumWindowsProc(HWND hWnd,LPARAM lParam); private: enum {ParamLength=8}; EnumWindowsHook &operator=(const EnumWindowsHook &someEnumWindowsHook); bool entryProc(HWND hWnd,LPARAM lParam); }; inline EnumWindowsHook::EnumWindowsHook(void) : APIEntry(ParamLength,(DWORD)this,getProcAddress((ProcAddress::LPFNMETHODVOID)&EnumWindowsHook::entryProc)) { } inline EnumWindowsHook &EnumWindowsHook::operator=(const EnumWindowsHook &someEnumWindowsHook) { // no implementation return *this; } inline DWORD EnumWindowsHook::getHookAddress(void) { return codeBase(); } #endif