| 395 | } |
| 396 | |
| 397 | bool CFunctions::IsInModuleRange(HMODULE hModule, DWORD_PTR dwAddress) |
| 398 | { |
| 399 | bool bRet = false; |
| 400 | |
| 401 | MODULEINFO mi = { 0 }; |
| 402 | if (g_winapiApiTable->GetModuleInformation(NtCurrentProcess, hModule, &mi, sizeof(mi))) |
| 403 | { |
| 404 | auto dwBase = reinterpret_cast<DWORD_PTR>(mi.lpBaseOfDll); |
| 405 | auto dwHi = reinterpret_cast<DWORD_PTR>(mi.lpBaseOfDll) + mi.SizeOfImage; |
| 406 | |
| 407 | bRet = (dwAddress >= dwBase && dwAddress <= dwHi); |
| 408 | } |
| 409 | return bRet; |
| 410 | } |
| 411 | |
| 412 | bool CFunctions::IsInModuleRange(const char* c_szModuleName, DWORD_PTR dwAddress) |
| 413 | { |
nothing calls this directly
no outgoing calls
no test coverage detected