diff --git a/.gitignore b/.gitignore
index fbfae2dd..ccfba2e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ src/bin/vld.ini
/src/tests/vld_ComTest/ComTest_p.c
/src/tests/vld_ComTest/ComTest_i.c
*.VC.opendb
+*.VC.db
diff --git a/CHANGES.txt b/CHANGES.txt
index e897af89..0a820a8a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,18 @@
-Visual Leak Detector (VLD) Version 2.5.0
+Visual Leak Detector (VLD) Version 2.5.1
Change Log / Release Notes
+2.5.1 (30 January 2017)
+----------------------------
+ Enhancements:
+ + PDB added to installer.
+
+ Bugs Fixed:
+ + Fix ntdll loader patch for Windows 10 (1607) Anniversary Update causing crashes (thanks to ioannis-e).
+ + Vld dll loading order fixed with MFC.
+ + Supressible msgboxes in setup with cmdline /silent /suppressmsgboxes.
+
2.5 (09 January 2016)
----------------------------
Enhancements:
diff --git a/README.md b/README.md
index 7bbfb3cd..592aa1a3 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ We encourage developers who've added their own features, or fixed bugs they've f
* [Source code at Codeplex](http://vld.codeplex.com/SourceControl/BrowseLatest)
* [Source code at GitHub](https://github.com/KindDragon/vld)
-Copyright © 2005-2016 VLD Team
+Copyright © 2005-2017 VLD Team
[1]: http://vld.codeplex.com/discussions
[2]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=N3QTYHP9LH6UY&lc=GB&item_name=Visual%20Leak%20Detector¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
diff --git a/setup/version.h b/setup/version.h
index 9d7149f4..ef96d44f 100644
--- a/setup/version.h
+++ b/setup/version.h
@@ -1,9 +1,9 @@
-#define VLDVERSION L"2.5"
-#define VERSION_NUMBER 2,5,0,0
-#define VERSION_STRING "2.5.0.0"
-#define VERSION_COPYRIGHT "Copyright (C) 2005-2016"
+#define VLDVERSION L"2.5.1"
+#define VERSION_NUMBER 2,5,1,0
+#define VERSION_STRING "2.5.1.0"
+#define VERSION_COPYRIGHT "Copyright (C) 2005-2017"
#ifndef __FILE__
-!define VLD_VERSION "2.5" // NSIS Script
+!define VLD_VERSION "2.5.1" // NSIS Script
#endif
diff --git a/src/vld.cpp b/src/vld.cpp
index a0103bea..d19295ff 100644
--- a/src/vld.cpp
+++ b/src/vld.cpp
@@ -351,27 +351,27 @@ VisualLeakDetector::VisualLeakDetector ()
wcsncpy_s(m_reportFilePath, MAX_PATH, VLD_DEFAULT_REPORT_FILE_NAME, _TRUNCATE);
m_status = 0x0;
- HMODULE ntdll = GetModuleHandleW(L"ntdll.dll");
- if (ntdll)
- {
- if (!IsWindows8OrGreater())
- {
- LdrLoadDll = (LdrLoadDll_t)GetProcAddress(ntdll, "LdrLoadDll");
- } else
- {
- LdrLoadDllWin8 = (LdrLoadDllWin8_t)GetProcAddress(ntdll, "LdrLoadDll");
- ldrLoadDllPatch[0].replacement = _LdrLoadDllWin8;
- }
- RtlAllocateHeap = (RtlAllocateHeap_t)GetProcAddress(ntdll, "RtlAllocateHeap");
- RtlFreeHeap = (RtlFreeHeap_t)GetProcAddress(ntdll, "RtlFreeHeap");
- RtlReAllocateHeap = (RtlReAllocateHeap_t)GetProcAddress(ntdll, "RtlReAllocateHeap");
-
- LdrGetDllHandle = (LdrGetDllHandle_t)GetProcAddress(ntdll, "LdrGetDllHandle");
- LdrGetProcedureAddress = (LdrGetProcedureAddress_t)GetProcAddress(ntdll, "LdrGetProcedureAddress");
- LdrUnloadDll = (LdrUnloadDll_t)GetProcAddress(ntdll, "LdrUnloadDll");
- LdrLockLoaderLock = (LdrLockLoaderLock_t)GetProcAddress(ntdll, "LdrLockLoaderLock");
- LdrUnlockLoaderLock = (LdrUnlockLoaderLock_t)GetProcAddress(ntdll, "LdrUnlockLoaderLock");
- }
+ HMODULE ntdll = GetModuleHandleW(L"ntdll.dll");
+ if (ntdll)
+ {
+ if (!IsWindows8OrGreater())
+ {
+ LdrLoadDll = (LdrLoadDll_t)GetProcAddress(ntdll, "LdrLoadDll");
+ } else
+ {
+ LdrLoadDllWin8 = (LdrLoadDllWin8_t)GetProcAddress(ntdll, "LdrLoadDll");
+ ldrLoadDllPatch[0].replacement = _LdrLoadDllWin8;
+ }
+ RtlAllocateHeap = (RtlAllocateHeap_t)GetProcAddress(ntdll, "RtlAllocateHeap");
+ RtlFreeHeap = (RtlFreeHeap_t)GetProcAddress(ntdll, "RtlFreeHeap");
+ RtlReAllocateHeap = (RtlReAllocateHeap_t)GetProcAddress(ntdll, "RtlReAllocateHeap");
+
+ LdrGetDllHandle = (LdrGetDllHandle_t)GetProcAddress(ntdll, "LdrGetDllHandle");
+ LdrGetProcedureAddress = (LdrGetProcedureAddress_t)GetProcAddress(ntdll, "LdrGetProcedureAddress");
+ LdrUnloadDll = (LdrUnloadDll_t)GetProcAddress(ntdll, "LdrUnloadDll");
+ LdrLockLoaderLock = (LdrLockLoaderLock_t)GetProcAddress(ntdll, "LdrLockLoaderLock");
+ LdrUnlockLoaderLock = (LdrUnlockLoaderLock_t)GetProcAddress(ntdll, "LdrUnlockLoaderLock");
+ }
// Load configuration options.
configure();
@@ -390,11 +390,11 @@ VisualLeakDetector::VisualLeakDetector ()
}
else
{
- if (kernelBase)
- {
- m_GetProcAddress = (GetProcAddress_t)GetProcAddress(kernelBase, "GetProcAddress");
- m_GetProcAddressForCaller = (GetProcAddressForCaller_t)GetProcAddress(kernelBase, "GetProcAddressForCaller");
- }
+ if (kernelBase)
+ {
+ m_GetProcAddress = (GetProcAddress_t)GetProcAddress(kernelBase, "GetProcAddress");
+ m_GetProcAddressForCaller = (GetProcAddressForCaller_t)GetProcAddress(kernelBase, "GetProcAddressForCaller");
+ }
assert(m_patchTable[0].patchTable == m_kernelbasePatch);
m_patchTable[0].exportModuleName = "kernelbase.dll";
}
@@ -2168,7 +2168,7 @@ FARPROC VisualLeakDetector::_GetProcAddress (HMODULE module, LPCSTR procname)
FARPROC VisualLeakDetector::_RGetProcAddress(HMODULE module, LPCSTR procname)
{
- return m_GetProcAddress(module, procname);
+ return m_GetProcAddress(module, procname);
}
// _GetProcAddress - Calls to GetProcAddress are patched through to this
@@ -2237,7 +2237,7 @@ FARPROC VisualLeakDetector::_GetProcAddressForCaller(HMODULE module, LPCSTR proc
FARPROC VisualLeakDetector::_RGetProcAddressForCaller(HMODULE module, LPCSTR procname, LPVOID caller)
{
- return m_GetProcAddressForCaller(module, procname, caller);
+ return m_GetProcAddressForCaller(module, procname, caller);
}
// _LdrLoadDll - Calls to LdrLoadDll are patched through to this function. This
diff --git a/src/vld.vcxproj b/src/vld.vcxproj
index 166a9c2d..37727b1b 100644
--- a/src/vld.vcxproj
+++ b/src/vld.vcxproj
@@ -42,6 +42,7 @@
$(ProjectDir)obj\$(Platform)\$(Configuration)-v$(PlatformToolsetVersion)\$(ProjectName)\
NativeRecommendedRules.ruleset
$(ProjectName)_$(NumericPlatform)
+ false
false
diff --git a/vld.ini b/vld.ini
index d62b4d28..fa501129 100644
--- a/vld.ini
+++ b/vld.ini
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Visual Leak Detector - Initialization/Configuration File
-;; Copyright (c) 2005-2016 VLD Team
+;; Copyright (c) 2005-2017 VLD Team
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public