Reserves or commits a region of pages in the virtual address space of the calling process
#include <Memory.au3>
_MemVirtualAlloc ( $pAddress, $iSize, $iAllocation, $iProtect )
$pAddress | Specifies the desired starting address of the region to allocate |
$iSize | Specifies the size, in bytes, of th region |
$iAllocation | Specifies the type of allocation: $MEM_COMMIT - Allocates physical storage in memory or in the paging file on disk for the specified region of pages. $MEM_RESERVE - Reserves a range of the process's virtual address space without allocating any physical storage. $MEM_TOP_DOWN - Allocates memory at the highest possible address |
$iProtect | Type of access protection: $PAGE_READONLY - Enables read access to the committed region of pages $PAGE_READWRITE - Enables read and write access to the committed region $PAGE_EXECUTE - Enables execute access to the committed region $PAGE_EXECUTE_READ - Enables execute and read access to the committed region $PAGE_EXECUTE_READWRITE - Enables execute, read, and write access to the committed region of pages $PAGE_GUARD - Pages in the region become guard pages $PAGE_NOACCESS - Disables all access to the committed region of pages $PAGE_NOCACHE - Allows no caching of the committed regions of pages |
Success: | a memory address pointer. |
Failure: | 0. |
_MemGlobalAlloc, _MemVirtualFree
Search VirtualAlloc in MSDN Library.