From 5049950f23d8a84b1bb286cbc6bf1ab3e6944fb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 Mar 2013 15:40:28 +0000 Subject: crazy leaky piece of junk eliminated git-svn-id: http://svn.miranda-ng.org/main/trunk@4027 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/dllmain.cpp | 40 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'protocols/GTalkExt/src/dllmain.cpp') diff --git a/protocols/GTalkExt/src/dllmain.cpp b/protocols/GTalkExt/src/dllmain.cpp index e1097a3ea6..bcc54371fb 100644 --- a/protocols/GTalkExt/src/dllmain.cpp +++ b/protocols/GTalkExt/src/dllmain.cpp @@ -22,41 +22,27 @@ #include "stdafx.h" #include "notifications.h" #include "options.h" -#include "popups.h" HINSTANCE hInst = 0; DWORD itlsSettings = TLS_OUT_OF_INDEXES; DWORD itlsRecursion = TLS_OUT_OF_INDEXES; -DWORD itlsPopupHook = TLS_OUT_OF_INDEXES; -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) { - hInst = hinstDLL; - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - if (((itlsSettings = TlsAlloc()) == TLS_OUT_OF_INDEXES) || - ((itlsRecursion = TlsAlloc()) == TLS_OUT_OF_INDEXES) || - ((itlsPopupHook = TlsAlloc()) == TLS_OUT_OF_INDEXES)) - return FALSE; - break; - - case DLL_THREAD_ATTACH: - TlsSetValue(itlsPopupHook, - (PVOID)SetWindowsHookEx(WH_CALLWNDPROCRET, PopupHookProc, NULL, GetCurrentThreadId())); - break; - - case DLL_THREAD_DETACH: - UnhookWindowsHookEx((HHOOK)TlsGetValue(itlsPopupHook)); - break; - - case DLL_PROCESS_DETACH: - TlsFree(itlsSettings); - TlsFree(itlsRecursion); - TlsFree(itlsPopupHook); - break; - } + case DLL_PROCESS_ATTACH: + hInst = hinstDLL; + if (((itlsSettings = TlsAlloc()) == TLS_OUT_OF_INDEXES) || + ((itlsRecursion = TlsAlloc()) == TLS_OUT_OF_INDEXES)) + return FALSE; + break; + + case DLL_PROCESS_DETACH: + TlsFree(itlsSettings); + TlsFree(itlsRecursion); + break; + } return TRUE; } -- cgit v1.2.3