summaryrefslogtreecommitdiff
path: root/src/mir_core/miranda.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-23 15:44:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-23 15:44:06 +0000
commit6923945a269905e5990d2f66dfa1bbb445e60f70 (patch)
tree30790d1cdd40398d50106bbc58377ad8cb2609b9 /src/mir_core/miranda.cpp
parentfbd49cdebcf274f8a1a1bb08317bd10992a77030 (diff)
minor improvement for async calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@1126 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/miranda.cpp')
-rw-r--r--src/mir_core/miranda.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir_core/miranda.cpp b/src/mir_core/miranda.cpp
index 61b14ced06..9a3719f845 100644
--- a/src/mir_core/miranda.cpp
+++ b/src/mir_core/miranda.cpp
@@ -33,6 +33,7 @@ int hLangpack = 0;
HINSTANCE hInst = 0;
HANDLE hStackMutex, hThreadQueueEmpty;
+DWORD mir_tls = 0;
/////////////////////////////////////////////////////////////////////////////////////////
// module init
@@ -80,6 +81,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void)
DestroyWindow(hAPCWindow);
CloseHandle(hStackMutex);
CloseHandle(hThreadQueueEmpty);
+ TlsFree(mir_tls);
DestroyModularEngine();
UnloadLangPackModule();
@@ -92,6 +94,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH) {
hInst = hinstDLL;
+ mir_tls = TlsAlloc();
LoadCoreModule();
}
return TRUE;