summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbintf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintf.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbintf.cpp28
1 files changed, 6 insertions, 22 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp
index 0888e8c7f9..caaa1e5a74 100644
--- a/plugins/Db3x_mmap/src/dbintf.cpp
+++ b/plugins/Db3x_mmap/src/dbintf.cpp
@@ -58,7 +58,7 @@ CDb3Base::CDb3Base(const TCHAR *tszFileName) :
m_ChunkSize = sinf.dwAllocationGranularity;
m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- m_hModHeap = HeapCreate(0,0,0);
+ m_hModHeap = HeapCreate(0, 0, 0);
}
CDb3Base::~CDb3Base()
@@ -71,12 +71,15 @@ CDb3Base::~CDb3Base()
m_lOfs.destroy();
// destroy map
- KillTimer(NULL,m_flushBuffersTimerId);
+ KillTimer(NULL, m_flushBuffersTimerId);
if (m_pDbCache) {
FlushViewOfFile(m_pDbCache, 0);
UnmapViewOfFile(m_pDbCache);
}
+ if (m_crypto)
+ m_crypto->destroy();
+
if (m_hMap)
CloseHandle(m_hMap);
@@ -114,6 +117,7 @@ int CDb3Base::Load(bool bSkipInit)
if ( !bSkipInit) {
if (InitCache()) return 1;
if (InitModuleNames()) return 1;
+ if (InitCrypt()) return 1;
m_bReadOnly = false;
@@ -142,26 +146,6 @@ STDMETHODIMP_(void) CDb3Base::SetCacheSafetyMode(BOOL bIsSet)
DBFlush(1);
}
-void CDb3Base::EncodeCopyMemory(void *dst, void *src, size_t size)
-{
- MoveMemory(dst, src, size);
-}
-
-void CDb3Base::DecodeCopyMemory(void *dst, void *src, size_t size)
-{
- MoveMemory(dst, src, size);
-}
-
-void CDb3Base::EncodeDBWrite(DWORD ofs, void *src, int size)
-{
- DBWrite(ofs, src, size);
-}
-
-void CDb3Base::DecodeDBWrite(DWORD ofs, void *src, int size)
-{
- DBWrite(ofs, src, size);
-}
-
///////////////////////////////////////////////////////////////////////////////
// MIDatabaseChecker