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/SplashScreen/src/main.cpp | |
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/SplashScreen/src/main.cpp')
-rw-r--r-- | plugins/SplashScreen/src/main.cpp | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 4ae218f6b4..4a09734466 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -37,7 +37,6 @@ BOOL png2dibavail = true; // can we use png2dib service? TCHAR szDllName[MAX_PATH], szSplashFile[MAX_PATH], szSoundFile[MAX_PATH], szhAdvaimgPath[MAX_PATH], szPrefix[128], inBuf[80];
TCHAR * szMirDir;
char szVersion[MAX_PATH];
-HANDLE hShowSplashService, hTestService;
#ifdef _DEBUG
TCHAR szLogFile[MAX_PATH];
#endif
@@ -46,7 +45,7 @@ HWND hwndSplash; BOOL (WINAPI *MyUpdateLayeredWindow)
(HWND hwnd, HDC hdcDST, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc,
COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags);
-HANDLE hSplashThread, hModulesLoaded, hPlugDisableHook, hOptInit, hSystemOKToExit;
+HANDLE hSplashThread;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
@@ -255,22 +254,6 @@ void SplashMain() bstartup = false;
}
-int onSystemOKToExit(WPARAM wParam,LPARAM lParam)
-{
- // Hooked events need to be unhooked
- UnhookEvent(hModulesLoaded);
- UnhookEvent(hSystemOKToExit);
- UnhookEvent(hPlugDisableHook);
- UnhookEvent(hOptInit);
-
- DestroyServiceFunction(hShowSplashService);
- #ifdef _DEBUG
- DestroyServiceFunction(hTestService);
- #endif
-
- return 0;
-}
-
int PlugDisableHook(WPARAM wParam, LPARAM lParam)
{
#ifdef _DEBUG
@@ -323,15 +306,14 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) }
// Options initialize hook
- hOptInit = HookEvent(ME_OPT_INITIALISE, OptInit);
-
- hPlugDisableHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, PlugDisableHook);
+ HookEvent(ME_OPT_INITIALISE, OptInit);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, PlugDisableHook);
// Service to call splash
- hShowSplashService = CreateServiceFunction(MS_SHOWSPLASH, ShowSplashService);
+ CreateServiceFunction(MS_SHOWSPLASH, ShowSplashService);
#ifdef _DEBUG
- hTestService = CreateServiceFunction("Splash/Test", TestService);
+ CreateServiceFunction("Splash/Test", TestService);
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_TCHAR;
@@ -357,11 +339,9 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda extern "C" int __declspec(dllexport) Load(void)
{
-
mir_getLP(&pluginInfo);
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
- hSystemOKToExit = HookEvent(ME_SYSTEM_OKTOEXIT,onSystemOKToExit);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
SplashMain();
mir_free(szMirDir);
@@ -384,4 +364,4 @@ extern "C" int __declspec(dllexport) Unload(void) #endif
return 0;
-}
\ No newline at end of file +}
|