From 00cb26d023cfdc6e372ffbd37ef733eced4f9172 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 9 Mar 2013 20:20:02 +0000 Subject: oopps..revert needed code git-svn-id: http://svn.miranda-ng.org/main/trunk@3948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SMS/src/main.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp index bd13654fb8..0d8d9de589 100644 --- a/plugins/SMS/src/main.cpp +++ b/plugins/SMS/src/main.cpp @@ -58,7 +58,21 @@ void VersionConversions(); BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved) { - hInst = hInstance; + switch(dwReason) { + case DLL_PROCESS_ATTACH: + ZeroMemory(&ssSMSSettings, sizeof(ssSMSSettings)); + ssSMSSettings.hInstance = hInstance; + ssSMSSettings.hHeap = HeapCreate(0, 0, 0); + DisableThreadLibraryCalls((HMODULE)hInstance); + break; + case DLL_PROCESS_DETACH: + HeapDestroy(ssSMSSettings.hHeap); + ssSMSSettings.hHeap = NULL; + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; + } + return TRUE; } -- cgit v1.2.3