diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-29 16:41:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-29 16:41:17 +0000 |
commit | 451c98173d83ee1618d7923890e803dd7067de40 (patch) | |
tree | b747494401925ec184b45a6d22d24683d8b3e38f /plugins/StatusPlugins/KeepStatus | |
parent | 82637f50c80f6b9b7dad3d3d49535bab277596aa (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/KeepStatus')
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 024b2c5f40..d2f58536bb 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -30,9 +30,6 @@ struct TimerInfo { static CRITICAL_SECTION GenTimerCS, GenStatusCS, CheckContinueslyCS;
-static HANDLE hOptionsHook = NULL;
-static HANDLE hShutdownHook = NULL;
-static HANDLE hAccChangeHook = NULL;
static HANDLE hProtoAckHook = NULL;
static HANDLE hStatusChangeHook = NULL;
static HANDLE hCSStatusChangeHook = NULL;
@@ -92,8 +89,6 @@ static INT_PTR ShowPopup(TCHAR *msg, HICON hIcon); LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-static int Exit(WPARAM wParam, LPARAM lParam);
-
// options.c
extern int OptionsInit(WPARAM wparam,LPARAM);
extern int InitCommonStatus();
@@ -1229,27 +1224,8 @@ int OnAccChanged(WPARAM wParam,LPARAM lParam) // =============== init stuff =================
-int CSModuleLoaded(WPARAM,LPARAM)
-{
- InitializeCriticalSection(&GenTimerCS);
- InitializeCriticalSection(&GenStatusCS);
- InitializeCriticalSection(&CheckContinueslyCS);
-
- protoList = ( OBJLIST<PROTOCOLSETTINGEX>* )&connectionSettings;
-
- hMessageWindow = NULL;
- LoadMainOptions();
- hOptionsHook = HookEvent(ME_OPT_INITIALISE, OptionsInit);
- hShutdownHook = HookEvent(ME_SYSTEM_OKTOEXIT, Exit);
- hAccChangeHook = HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
- return 0;
-}
-
-static int Exit(WPARAM,LPARAM)
+static int onShutdown(WPARAM,LPARAM)
{
- UnhookEvent(hOptionsHook);
- UnhookEvent(hShutdownHook);
- UnhookEvent(hAccChangeHook);
UnhookEvent(hStatusChangeHook);
UnhookEvent(hProtoAckHook);
UnhookEvent(hCSStatusChangeHook);
@@ -1266,3 +1242,20 @@ static int Exit(WPARAM,LPARAM) DeleteCriticalSection(&CheckContinueslyCS);
return 0;
}
+
+int CSModuleLoaded(WPARAM,LPARAM)
+{
+ InitializeCriticalSection(&GenTimerCS);
+ InitializeCriticalSection(&GenStatusCS);
+ InitializeCriticalSection(&CheckContinueslyCS);
+
+ protoList = ( OBJLIST<PROTOCOLSETTINGEX>* )&connectionSettings;
+
+ hMessageWindow = NULL;
+ LoadMainOptions();
+
+ HookEvent(ME_OPT_INITIALISE, OptionsInit);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, onShutdown);
+ HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
+ return 0;
+}
|