Function gpa::system::GetSymbolAddress

Function Documentation

void *gpa::system::GetSymbolAddress(void *moduleHandle, char const *symbolName, bool searchNextModule = true)

Resolve the symbol named @symbolName defined in the module referred to by moduleHandle, into its virtual address.

Note

If searchNextModule is true, and moduleHandle is NULL, then look in the "next" module(s) for the symbol name. If false and moduleHandle is NULL, then search in the "global" symbol space (all modules loaded into the process). If moduleHandle is not NULL, then searchNextModule is ignored.

Parameters
  • moduleHandle -- Handle to module obtained previously via @LoadModule or FindModuleHandle.

  • symbolName -- Name of the symbol defined in the module

  • searchNextModule -- Specify the symbol search behavior when @moduleHandle is NULL

Returns

Virtual address of the symbol in the process' virtual address space; NULL if symbol could not be found