aboutsummaryrefslogtreecommitdiff
path: root/MemDriverLib
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-09-26 09:00:19 +0200
committerToni Uhlig <matzeton@googlemail.com>2019-09-26 09:00:19 +0200
commit25bf52435cb7297531bfc3538a9c2c0f06b9f8aa (patch)
treefe400c5bee4aba1338eb9f5a7c290a2fbff94a03 /MemDriverLib
parent77380f34cd3c48cdabcbc6482929c922fb24d778 (diff)
map_file_* callbacks are now static
Diffstat (limited to 'MemDriverLib')
-rw-r--r--MemDriverLib/PatternScanner.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/MemDriverLib/PatternScanner.cpp b/MemDriverLib/PatternScanner.cpp
index 29ea7f9..1b2a493 100644
--- a/MemDriverLib/PatternScanner.cpp
+++ b/MemDriverLib/PatternScanner.cpp
@@ -11,6 +11,15 @@
#include <Windows.h>
+static bool map_file_loadlib(MODULE_DATA& module, PVOID * const buffer,
+ SIZE_T * const size, PVOID const user_ptr);
+static bool map_file_loadlib_cleanup(MODULE_DATA& module, PVOID buffer,
+ PVOID const user_ptr);
+static bool map_file_kmem(MODULE_DATA& module, PVOID * const buffer,
+ SIZE_T * const size, PVOID const user_ptr);
+static bool map_file_kmem_cleanup(MODULE_DATA& module, PVOID buffer,
+ PVOID const user_ptr);
+
const struct map_file_data map_loadlib = {
map_file_loadlib, map_file_loadlib_cleanup, true
};
@@ -46,10 +55,11 @@ bool map_file_loadlib(MODULE_DATA& module, PVOID * const buffer,
if (user_data) {
if (dir_cookies.size() > 1) {
SetDllDirectoryA("");
- } else
- for (auto& searchDir : dir_cookies) {
- RemoveDllDirectory(searchDir);
}
+ else
+ for (auto& searchDir : dir_cookies) {
+ RemoveDllDirectory(searchDir);
+ }
}
if (!hMod) {