From 88ec2ae53ddc811d08763b2fb3a0073b571a321c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 4 Jul 2012 12:37:38 +0000 Subject: these fixes aren't needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@755 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_tree/Compatibility.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'plugins/Dbx_tree') diff --git a/plugins/Dbx_tree/Compatibility.cpp b/plugins/Dbx_tree/Compatibility.cpp index e0c34c8feb..38b8f92383 100644 --- a/plugins/Dbx_tree/Compatibility.cpp +++ b/plugins/Dbx_tree/Compatibility.cpp @@ -807,21 +807,8 @@ INT_PTR CompGetProfilePath(WPARAM cbBytes, LPARAM pszName) return gDataBase->getProfilePath(cbBytes, reinterpret_cast(pszName)); } -int OnPreShutdown(WPARAM, LPARAM) -{ - DestroyHookableEvent(hEventDeletedEvent); - DestroyHookableEvent(hEventAddedEvent); - DestroyHookableEvent(hEventFilterAddedEvent); - DestroyHookableEvent(hSettingChangeEvent); - DestroyHookableEvent(hContactDeletedEvent); - DestroyHookableEvent(hContactAddedEvent); - return 0; -} - bool CompatibilityRegister() { - HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); - gCompServices[ 0] = CreateServiceFunction(MS_DB_CONTACT_GETCOUNT, CompGetContactCount); gCompServices[ 1] = CreateServiceFunction(MS_DB_CONTACT_FINDFIRST, CompFindFirstContact); gCompServices[ 2] = CreateServiceFunction(MS_DB_CONTACT_FINDNEXT, CompFindNextContact); @@ -868,11 +855,12 @@ bool CompatibilityRegister() hContactAddedEvent = CreateHookableEvent(ME_DB_CONTACT_ADDED); return true; } - bool CompatibilityUnRegister() { - for (int i = 0; i < SIZEOF(gCompServices); ++i) + int i; + for (i = 0; i < sizeof(gCompServices) / sizeof(gCompServices[0]); ++i) + { DestroyServiceFunction(gCompServices[i]); - + } return true; } -- cgit v1.2.3