From 579404053a550f96f01526579519fc4d581afe56 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 14 Jan 2014 20:42:27 +0000 Subject: fix for the event handles' clash git-svn-id: http://svn.miranda-ng.org/main/trunk@7657 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/chat.h | 1 - src/modules/chat/chat_svc.cpp | 9 ++++----- src/modules/chat/tools.cpp | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src/modules/chat') diff --git a/src/modules/chat/chat.h b/src/modules/chat/chat.h index 5b3b799d94..ec52412a5a 100644 --- a/src/modules/chat/chat.h +++ b/src/modules/chat/chat.h @@ -33,7 +33,6 @@ struct GCPTRS }; extern HGENMENU hJoinMenuItem, hLeaveMenuItem; -extern HANDLE hChatSendEvent; extern BOOL PopupInstalled; // log.c diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index 4532c7030b..0157e0c181 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -27,7 +27,6 @@ INT_PTR SvcGetChatManager(WPARAM, LPARAM); #include "chat.h" BOOL SmileyAddInstalled, PopupInstalled, IEviewInstalled; -HANDLE hChatSendEvent, hBuildMenuEvent; HGENMENU hJoinMenuItem, hLeaveMenuItem; CRITICAL_SECTION cs; @@ -611,8 +610,8 @@ void LoadChatModule(void) CreateServiceFunction("GChat/JoinChat", JoinChat); CreateServiceFunction("GChat/LeaveChat", LeaveChat); - hChatSendEvent = CreateHookableEvent(ME_GC_EVENT); - hBuildMenuEvent = CreateHookableEvent(ME_GC_BUILDMENU); + ci.hSendEvent = CreateHookableEvent(ME_GC_EVENT); + ci.hBuildMenuEvent = CreateHookableEvent(ME_GC_BUILDMENU); bInited = true; } @@ -624,6 +623,6 @@ void UnloadChatModule(void) OptionsUnInit(); DeleteCriticalSection(&cs); - DestroyHookableEvent(hChatSendEvent); - DestroyHookableEvent(hBuildMenuEvent); + DestroyHookableEvent(ci.hSendEvent); + DestroyHookableEvent(ci.hBuildMenuEvent); } diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index 216798a3a2..9c8de54419 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -703,7 +703,7 @@ BOOL DoEventHook(const TCHAR *pszID, const char* pszModule, int iType, const TCH gch.ptszText = (LPTSTR)pszText; gch.dwData = dwItem; gch.pDest = &gcd; - NotifyEventHooks(hChatSendEvent, 0, (WPARAM)&gch); + NotifyEventHooks(ci.hSendEvent, 0, (WPARAM)&gch); return TRUE; } -- cgit v1.2.3