summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-13 14:56:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-13 14:56:55 +0000
commitd327f242e0d775e97db591a8fc6ec38297791d3a (patch)
treeafd63f3944885418f18f0ca1def42afd9d4cbe5e /plugins/Db3x_mmap/src
parent0bb008ece12fe4e261330a3f680e2f481bfd3e91 (diff)
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
Diffstat (limited to 'plugins/Db3x_mmap/src')
-rw-r--r--plugins/Db3x_mmap/src/dbintf.cpp3
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h1
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp4
3 files changed, 6 insertions, 2 deletions
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);
}