| 388 | |
| 389 | |
| 390 | uintptr_t PlatformWindows::GetModuleBase(const char* const ModuleName) |
| 391 | { |
| 392 | if (ModuleName == nullptr) |
| 393 | return reinterpret_cast<uintptr_t>(GetPEB()->ImageBaseAddress); |
| 394 | |
| 395 | const LDR_DATA_TABLE_ENTRY* Entry = GetModuleLdrTableEntry(ModuleName); //This can return nullptr. |
| 396 | if (!Entry) |
| 397 | return 0x0; |
| 398 | |
| 399 | return reinterpret_cast<uintptr_t>(Entry->DllBase); |
| 400 | } |
| 401 | |
| 402 | uintptr_t PlatformWindows::GetOffset(const uintptr_t Address, const char* const ModuleName) |
| 403 | { |
nothing calls this directly
no test coverage detected