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_PARAMETER
and all api by fact have the same usage asVirtualAlloc2
. theVirtualAlloc2
is only thin shell overZwAllocateVirtualMemoryEx
interesting that
VirtualAlloc2
defined inmemoryapi.h
under conditionbut
ZwAllocateVirtualMemoryEx
declared with conditionhowever howminimum one of this condition is mistake - because
VirtualAlloc2
callZwAllocateVirtualMemoryEx
- ifVirtualAlloc2
available -ZwAllocateVirtualMemoryEx
available too.also was mistake in msdn:
really
VirtualAlloc2
not 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)