Lua:enumMemoryRegions

From Cheat Engine
Jump to navigation Jump to search
<> Function

function enumMemoryRegions() : table

Returns a table containing the memory layout with information about each memory region.

Function Parameters

<none>

Returns

Table — A table with the following fields:

  • BaseAddress — Integer representing the base address of the region
  • AllocationBase — Integer representing the base address of the range
  • AllocationProtect — Integer representing the protection when the region was initially allocated
  • RegionSize — Integer representing the size of the region
  • State — Integer representing the state of the pages in the region
  • Protect — Integer representing the protection of the pages in the region
  • Type — Integer representing type of pages in the region

See MSDN MEMORY_BASIC_INFORMATION

Examples

for i, region in ipairs(enumMemoryRegions()) do
  print(string.format("%X, %X", region.BaseAddress, region.RegionSize))
end

See also

Lua
Script Engine

Related Functions

createProcess
openProcess
onOpenProcess
getForegroundProcess
getOpenedProcessID
getProcessIDFromProcessName
openFileAsProcess
saveOpenedFile
setPointerSize
setAssemblerMode
getProcesslist
getWindowlist
pause
unpause
targetIs64Bit
enumModules
closeRemoteHandle