summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-03-09 20:20:02 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-03-09 20:20:02 +0000
commit00cb26d023cfdc6e372ffbd37ef733eced4f9172 (patch)
tree1f948d3ee369718a4680cbbae90c81c094de43c1
parent9cc6c4eb999274cf85330b182c4c56bc6149b894 (diff)
oopps..revert needed code
git-svn-id: http://svn.miranda-ng.org/main/trunk@3948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/SMS/src/main.cpp16
1 files changed, 15 insertions, 1 deletions
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;
}