From eb93c9842bc5dae03d6cc6df7bef86b620329196 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 28 Sep 2012 11:50:04 +0000 Subject: NotifyFastHook - new core function to call event hooks in the same thread, it never switches to the main thread to execute event's hooks git-svn-id: http://svn.miranda-ng.org/main/trunk@1704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/modules.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mir_core/modules.cpp') diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp index 4e9a518d26..7ab515e469 100644 --- a/src/mir_core/modules.cpp +++ b/src/mir_core/modules.cpp @@ -275,6 +275,16 @@ MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam) return item->result; } +MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam, LPARAM lParam) +{ + switch ( checkHook((THook*)hEvent)) { + case hookInvalid: return -1; + case hookEmpty: return 0; + } + + return CallHookSubscribers((THook*)hEvent, wParam, lParam); +} + extern "C" MIR_CORE_DLL(int) GetSubscribersCount(THook* pHook) { switch ( checkHook(pHook)) { -- cgit v1.2.3