bool CEventHandler::UnhookEvent(IUnknown* pSource) { #if defined(__USE_ADDBACK_DUAL) AtlUnadvise(pSource, __uuidof(IAddBackEvents), cookie_); #elif defined(__USE_ADDBACK_DISPATCH) DispEventUnadvise(pSource, &__uuidof(_IAddBackEvents)); #elif defined(__USE_ADDBACK_BYATTRIB_DISPATCH) __unhook(&_IAddBackEvents::ChangedAddEnd, pSource, &CEventHandler::onChangedAddEnd); __unhook(&_IAddBackEvents::ChangedSum, pSource, &CEventHandler::onChangedSum); #endif return true; }
HRESULT C_ICoBrokerEvents::EventUnadvise(void) { TRY_CATCH CComPtr<IUnknown> unkn=m_unkn; m_unkn.Release(); return __unhook(_ICoBrokerEvents,unkn); CATCH_THROW() }
Engine::~Engine() { if (initialized) { ScriptEngine::ShutDown(); SceneManager::ShutDown(); RenderManager::ShutDown(); __unhook(&EngineController::CheckForLiveUpdates, engineController, &ResourceManager::CheckForLiveUpdates, ResourceManager::Get()); ResourceManager::ShutDown(); GraphicsManager::ShutDown(); SoundManager::ShutDown(); InputManager::ShutDown(); EventManager::ShutDown(); Logger::ShutDown(); TimeManager::ShutDown(); } }
STDMETHODIMP CXMLBuilder::Unadvise(IUnknown* pStrategy) { try { IMWStrategyPtr spStrategy = pStrategy; __unhook(_IMWStrategyEvents, spStrategy); } catch(Workshare::Exception const& e) { return Error(e.Message, __uuidof(this), e.ErrorCode); } catch(...) { return ProcessUnhandledException(); } return S_OK; }
virtual ~CNdasDeviceHeartbeatHandler() { __unhook(m_pHeartbeater); }
void Module::Unload() { if (!IsActive()) return; // Unhook all events __unhook(&ModuleManager::OnDraw, BH::moduleManager, &Module::OnDraw, this); __unhook(&ModuleManager::OnAutomapDraw, BH::moduleManager, &Module::OnAutomapDraw, this); __unhook(&ModuleManager::OnOOGDraw, BH::moduleManager, &Module::OnOOGDraw, this); __unhook(&ModuleManager::OnGameJoin, BH::moduleManager, &Module::OnGameJoin, this); __unhook(&ModuleManager::OnGameExit, BH::moduleManager, &Module::OnGameExit, this); __unhook(&ModuleManager::OnLoop, BH::moduleManager, &Module::OnLoop, this); __unhook(&ModuleManager::OnLeftClick, BH::moduleManager, &Module::OnLeftClick, this); __unhook(&ModuleManager::OnRightClick, BH::moduleManager, &Module::OnRightClick, this); __unhook(&ModuleManager::OnKey, BH::moduleManager, &Module::OnKey, this); __unhook(&ModuleManager::OnChatPacketRecv, BH::moduleManager, &Module::OnChatPacketRecv, this); __unhook(&ModuleManager::OnRealmPacketRecv, BH::moduleManager, &Module::OnRealmPacketRecv, this); __unhook(&ModuleManager::OnGamePacketRecv, BH::moduleManager, &Module::OnGamePacketRecv, this); __unhook(&ModuleManager::OnChatMsg, BH::moduleManager, &Module::OnChatMsg, this); __unhook(&Module::UserInput, this, &Module::OnUserInput, this); active = false; OnUnload(); }
void GestureReceiver::unhookEvent(GestureSource* pSource) { __unhook(&GestureSource::MyEvent, pSource, &GestureReceiver::MyHandler1); __unhook(&GestureSource::MyEvent, pSource, &GestureReceiver::MyHandler2); __unhook(&GestureSource::MyEvent2, pSource, &GestureReceiver::MyHandler3); __unhook(&GestureSource::GestureRecognised, pSource, &GestureReceiver::ExecutionAfterDetection); }
CTestAPIDlg::~CTestAPIDlg() { __unhook(&ServerGenesis::GotDebug,tl,&CTestAPIDlg::status); delete tl; }
void UnHookAll(IBase* pS) { __unhook(pS); }
void UnHook(IBase* pS) { __unhook(IEvent2, pS); __unhook(&IEvent::event1, pS, &CSink::f3); __unhook(&IEvent::event2, pS, &CSink::f4); __unhook(&N::IJW::event1, pS, &CSink::f2); }
void CNCaptureView::_EventUnHook() { CNCaptureDoc* pDoc = CNCaptureApplication::Instance()->GetDocument(); FTLASSERT( NULL != pDoc ); __unhook(&CNCaptureDoc::OnCaptureImageChanged, pDoc, &CNCaptureView::OnCaptureImageChanged, this ); }
void unhookEvent(KeyHandler* pSource) { __unhook(&KeyHandler::Rotate, pSource, &Uebung1::Rotate); }