From 5a2d38a501a776344754a48a4602ceeb31f97660 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Mar 2013 12:58:29 +0000 Subject: unneeded code removed git-svn-id: http://svn.miranda-ng.org/main/trunk@3833 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/VersionInfo/src/hooked_events.cpp | 17 ++--------------- plugins/VersionInfo/src/hooked_events.h | 1 - plugins/VersionInfo/src/main.cpp | 2 -- plugins/VersionInfo/src/services.cpp | 18 +++--------------- 4 files changed, 5 insertions(+), 33 deletions(-) (limited to 'plugins') diff --git a/plugins/VersionInfo/src/hooked_events.cpp b/plugins/VersionInfo/src/hooked_events.cpp index 71fb4e649c..717aa6dda9 100644 --- a/plugins/VersionInfo/src/hooked_events.cpp +++ b/plugins/VersionInfo/src/hooked_events.cpp @@ -21,9 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "common.h" #include "hooked_events.h" -HANDLE hModulesLoaded; -HANDLE hOptionsInitialize; - #define HOST "http://eblis.tla.ro/projects" #define VERSIONINFO_VERSION_URL HOST "/miranda/VersionInfo/updater/VersionInfo.html" @@ -32,18 +29,8 @@ HANDLE hOptionsInitialize; int HookEvents() { - hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); - hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise); - //hPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); - - return 0; -} - -int UnhookEvents() -{ - UnhookEvent(hModulesLoaded); - UnhookEvent(hOptionsInitialize); - + HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise); return 0; } diff --git a/plugins/VersionInfo/src/hooked_events.h b/plugins/VersionInfo/src/hooked_events.h index b75b5e59a8..e63d138998 100644 --- a/plugins/VersionInfo/src/hooked_events.h +++ b/plugins/VersionInfo/src/hooked_events.h @@ -25,7 +25,6 @@ extern HANDLE hModulesLoaded; extern HANDLE hOptionsInitialise; int HookEvents(); -int UnhookEvents(); int OnModulesLoaded(WPARAM wParam, LPARAM lParam); int OnOptionsInitialise(WPARAM wParam, LPARAM lParam); diff --git a/plugins/VersionInfo/src/main.cpp b/plugins/VersionInfo/src/main.cpp index 7a5810917d..f9143d34c7 100644 --- a/plugins/VersionInfo/src/main.cpp +++ b/plugins/VersionInfo/src/main.cpp @@ -104,7 +104,5 @@ extern "C" int __declspec(dllexport) Load(void) extern "C" int __declspec(dllexport) Unload(void) { - UnhookEvents(); - DestroyServices(); return 0; } \ No newline at end of file diff --git a/plugins/VersionInfo/src/services.cpp b/plugins/VersionInfo/src/services.cpp index 0efdb387f4..d78810637a 100644 --- a/plugins/VersionInfo/src/services.cpp +++ b/plugins/VersionInfo/src/services.cpp @@ -21,25 +21,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "common.h" #include "services.h" -HANDLE hsMenuCommand; -HANDLE hsGetInfo; -HANDLE hsServiceMode; - int bServiceMode = 0; //true only if plugin is running in service mode int InitServices() { - hsMenuCommand = CreateServiceFunction(MS_VERSIONINFO_MENU_COMMAND, PluginMenuCommand); - hsGetInfo = CreateServiceFunction(MS_VERSIONINFO_GETINFO, GetInfoService); - hsServiceMode = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeService); - return 0; -} - -int DestroyServices() -{ - DestroyServiceFunction(hsMenuCommand); - DestroyServiceFunction(hsGetInfo); - DestroyServiceFunction(hsServiceMode); + CreateServiceFunction(MS_VERSIONINFO_MENU_COMMAND, PluginMenuCommand); + CreateServiceFunction(MS_VERSIONINFO_GETINFO, GetInfoService); + CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceModeService); return 0; } -- cgit v1.2.3