From d327f242e0d775e97db591a8fc6ec38297791d3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 13 Mar 2014 14:56:55 +0000 Subject: dbchecker creates two Database menu entries, if Miranda launched from it git-svn-id: http://svn.miranda-ng.org/main/trunk@8594 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbintf.cpp | 3 +++ plugins/Db3x_mmap/src/dbintf.h | 1 + plugins/Db3x_mmap/src/ui.cpp | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/Db3x_mmap') diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index c17fdd0e05..888d47e1d3 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -78,6 +78,9 @@ CDb3Mmap::~CDb3Mmap() UnmapViewOfFile(m_pDbCache); } + DestroyServiceFunction(hService); + UnhookEvent(hHook); + if (m_crypto) m_crypto->destroy(); diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index f2793e3c7c..bc9bd220da 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -303,6 +303,7 @@ protected: // settings int m_codePage; + HANDLE hService, hHook; //////////////////////////////////////////////////////////////////////////// // contacts diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 60067a6b8f..2df3cedaf4 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -335,6 +335,6 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM) void CDb3Mmap::InitDialogs() { - CreateServiceFunctionObj(MS_DB_CHANGEPASSWORD, ChangePassword, this); - HookEventObj(ME_SYSTEM_MODULESLOADED, OnModulesLoaded, this); + hService = CreateServiceFunctionObj(MS_DB_CHANGEPASSWORD, ChangePassword, this); + hHook = HookEventObj(ME_SYSTEM_MODULESLOADED, OnModulesLoaded, this); } -- cgit v1.2.3