summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src
diff options
context:
space:
mode:
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);
}