Add the module bit analysis

This commit is contained in:
CORP\zengquan
2022-04-27 18:04:17 +08:00
parent f710715e81
commit 7f6b32201e
16 changed files with 317 additions and 59 deletions
+3 -1
View File
@@ -5,6 +5,7 @@
#include <ImageHlp.h>
#include "Helpers.h"
#pragma comment(lib,"imagehlp")
using namespace WinSys;
@@ -15,7 +16,7 @@ struct ProcessModuleTracker::Impl {
DWORD _pid;
wil::unique_handle _handle;
BOOL _isWow64;
explicit Impl(DWORD pid) :_pid(pid) {
_handle.reset(::OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | SYNCHRONIZE, FALSE, pid));
if (_handle)
@@ -74,6 +75,7 @@ struct ProcessModuleTracker::Impl {
}
mi->Base = mbi.AllocationBase;
mi->Type = mbi.Type == MEM_MAPPED ? MapType::Data : MapType::Image;
return mi;
}