Click or drag to resize
Xcalibur Systems LLC Logo

MemoryHelperVirtualAllocEx Method

Reserves, commits, or changes the state of a region of memory within the virtual address space of a specified process. The function initializes the memory it allocates to zero.

VirtualAllocEx function


Namespace: Xcalibur.NativeMethods.V2.Memory
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll", ExactSpelling = true, SetLastError = true)]
public static IntPtr VirtualAllocEx(
	IntPtr processHandle,
	IntPtr address,
	IntPtr size,
	MemoryAllocationTypes allocationType,
	MemoryProtections protect
)

Parameters

processHandle  IntPtr
The handle to a process. The function allocates memory within the virtual address space of this process.
address  IntPtr
The pointer that specifies a desired starting address for the region of pages that you want to allocate.
size  IntPtr
The size of the region of memory to allocate, in bytes.
allocationType  MemoryAllocationTypes
The type of memory allocation.
protect  MemoryProtections
The memory protection for the region of pages to be allocated.

Return Value

IntPtr
See Also