MCPcopy Create free account
hub / github.com/AlSch092/UltimateAntiCheat / GetModuleSize

Method GetModuleSize

Process/Process.cpp:471–487  ·  view source on GitHub ↗

GetModuleSize - get size of a module at address `hModule` returns the size of hModule, and 0 if hModule is invalid or error occurs */

Source from the content-addressed store, hash-verified

469 returns the size of hModule, and 0 if hModule is invalid or error occurs
470*/
471DWORD Process::GetModuleSize(__in const HMODULE hModule)
472{
473 if (hModule == NULL)
474 {
475 return 0;
476 }
477
478 MODULEINFO moduleInfo;
479
480 if (!GetModuleInformation(GetCurrentProcess(), hModule, &moduleInfo, sizeof(moduleInfo)))
481 {
482 return 0;
483 }
484
485 DWORD moduleSize = moduleInfo.SizeOfImage;
486 return moduleSize;
487}
488
489/*
490 FillModuleList - fills the `ModuleList` class member with a list of module information

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected