I am implementing a memory management tool by hooking into memory APIs, when i come to NtAllocateVirtualMemoryEx, i tried to find its definition on google but found nothing, however NtAllocateVirtualMemory is clearly defined at https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntallocatevirtualmemory, is there anyone knowing its details?
ZwAllocateVirtualMemoryEx defined in ntifs.h
MEM_EXTENDED_PARAMETERand all api by fact have the same usage asVirtualAlloc2. theVirtualAlloc2is only thin shell overZwAllocateVirtualMemoryExinteresting that
VirtualAlloc2defined inmemoryapi.hunder conditionbut
ZwAllocateVirtualMemoryExdeclared with conditionhowever howminimum one of this condition is mistake - because
VirtualAlloc2callZwAllocateVirtualMemoryEx- ifVirtualAlloc2available -ZwAllocateVirtualMemoryExavailable too.also was mistake in msdn:
really
VirtualAlloc2not exported by kernel32.dll and not defined in kernel32.libneed use mincore.lib or mmos.lib which import this api from api-ms-win-core-memory-l1-1-6.dll (resolved to kernelbase.dll now)