diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-29 09:38:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-29 09:38:03 +0000 |
commit | 5c1a2b328f0f75669de0f7660e8425199ba89d6b (patch) | |
tree | b2dd79e36856a898a917a3cde251f6afe3b945fd /plugins/Mir_core/miranda.cpp | |
parent | eeac55c3eea2af3b4af704378d7feb20edab950d (diff) |
- eliminated crash in Punto Switcher's dll during exit;
- removed references to the callee's local thread data in QueueUserAPC;
git-svn-id: http://svn.miranda-ng.org/main/trunk@683 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Mir_core/miranda.cpp')
-rw-r--r-- | plugins/Mir_core/miranda.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/Mir_core/miranda.cpp b/plugins/Mir_core/miranda.cpp index 83abfb3acd..910b204292 100644 --- a/plugins/Mir_core/miranda.cpp +++ b/plugins/Mir_core/miranda.cpp @@ -350,6 +350,9 @@ MIR_CORE_DLL(INT_PTR) Thread_Pop() return 1;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// module init
+
static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (msg == WM_NULL) SleepEx(0, TRUE);
@@ -358,10 +361,7 @@ static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return DefWindowProc(hwnd, msg, wParam, lParam);
}
-/////////////////////////////////////////////////////////////////////////////////////////
-// module init
-
-static void LoadSystemModule(void)
+static void LoadCoreModule(void)
{
INITCOMMONCONTROLSEX icce = {0};
icce.dwSize = sizeof(icce);
@@ -390,7 +390,7 @@ static void LoadSystemModule(void) InitialiseModularEngine();
}
-static void UnloadSystemModule(void)
+MIR_CORE_DLL(void) UnloadCoreModule(void)
{
DestroyWindow(hAPCWindow);
CloseHandle(hStackMutex);
@@ -406,9 +406,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
hInst = hinstDLL;
- LoadSystemModule();
+ LoadCoreModule();
}
- else if(fdwReason == DLL_PROCESS_DETACH)
- UnloadSystemModule();
return TRUE;
}
|