#ifndef _WATCHDOG_CBTHUNKCTRLHANDLER_HPP_ #define _HOOKPROC_CBTHUNKCTRLHANDLER_HPP_ #ifndef _HOOKPROC_APIENTRY_HPP_ #include #endif #ifndef _HOOKPROC_PROCADDRESS_HPP_ #include #endif class CBThunkCtrlHandler; typedef ProcAddress CBThunkCtrlHandlerProc; class CBThunkCtrlHandler : protected APIEntry, private CBThunkCtrlHandlerProc { public: typedef void (WINAPI *LPFNCONTROLHANDLER)(DWORD control); CBThunkCtrlHandler(void); virtual ~CBThunkCtrlHandler(); DWORD getAddress(void); protected: virtual void controlHandler(DWORD control); private: enum {ParamLength=4}; CBThunkCtrlHandler &operator=(const CBThunkCtrlHandler &cbThunkSvcMain); void entryProc(DWORD control); }; inline CBThunkCtrlHandler::CBThunkCtrlHandler(void) : APIEntry(ParamLength,(DWORD)this,getProcAddress((ProcAddress::LPFNMETHODVOID)&CBThunkCtrlHandler::entryProc)) { } inline CBThunkCtrlHandler &CBThunkCtrlHandler::operator=(const CBThunkCtrlHandler &CBThunkCtrlHandler) { // no implementation return *this; } inline DWORD CBThunkCtrlHandler::getAddress(void) { return codeBase(); } #endif