summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/StartupStatus
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-29 16:41:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-29 16:41:17 +0000
commit451c98173d83ee1618d7923890e803dd7067de40 (patch)
treeb747494401925ec184b45a6d22d24683d8b3e38f /plugins/StatusPlugins/StartupStatus
parent82637f50c80f6b9b7dad3d3d49535bab277596aa (diff)
resource clearance moved to ME_SYSTEM_PRESHUTDOWN instead of ME_SYSTEM_OKTOEXIT
git-svn-id: http://svn.miranda-ng.org/main/trunk@5527 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus')
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
index 6ed4a8b9f1..c5c167f0c4 100644
--- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
@@ -74,9 +74,6 @@ TSSSetting::~TSSSetting()
/////////////////////////////////////////////////////////////////////////////////////////
static HANDLE
- hOptionsHook,
- hShutdownHook,
- hAccChangeHook,
hProtoAckHook,
hCSStatusChangeHook,
hStatusChangeHook;
@@ -282,12 +279,9 @@ static VOID CALLBACK SetStatusTimed(HWND hwnd,UINT message, UINT_PTR idEvent,DWO
CallService(MS_CS_SETSTATUSEX, (WPARAM)&startupSettings, 0);
}
-static int Exit(WPARAM wParam, LPARAM lParam)
+static int OnShutdown(WPARAM wParam, LPARAM lParam)
{
DeinitProfilesModule();
- UnhookEvent(hOptionsHook);
- UnhookEvent(hShutdownHook);
- UnhookEvent(hAccChangeHook);
// save last protocolstatus
int count;
@@ -371,7 +365,7 @@ static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
log_debugA("WM_ENDSESSION");
if (wParam) {
log_debugA("WM_ENDSESSION: calling exit");
- Exit(0, 0);
+ OnShutdown(0, 0);
log_debugA("WM_ENDSESSION: exit called");
}
break;
@@ -386,11 +380,11 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam)
InitProfileModule();
- hAccChangeHook = HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
- hOptionsHook = HookEvent(ME_OPT_INITIALISE, OptionsInit);
+ HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
+ HookEvent(ME_OPT_INITIALISE, OptionsInit);
/* shutdown hook for normal shutdown */
- hShutdownHook = HookEvent(ME_SYSTEM_OKTOEXIT, Exit);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
/* message window for poweroff */
hMessageWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc);