diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-14 15:40:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-14 15:40:28 +0000 |
commit | 5049950f23d8a84b1bb286cbc6bf1ab3e6944fb0 (patch) | |
tree | 5356966724f7f66334bf89690dc36618cb5dd711 /protocols/GTalkExt/src/dllmain.cpp | |
parent | d6b7f083ef11b88282290370988aa7cb60a53345 (diff) |
crazy leaky piece of junk eliminated
git-svn-id: http://svn.miranda-ng.org/main/trunk@4027 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/dllmain.cpp')
-rw-r--r-- | protocols/GTalkExt/src/dllmain.cpp | 40 |
1 files changed, 13 insertions, 27 deletions
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;
}
|