![Xcalibur Systems LLC Logo](../icons/logo.png) |
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.MemoryAssembly: 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
)
<DllImportAttribute("kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function VirtualAllocEx (
processHandle As IntPtr,
address As IntPtr,
size As IntPtr,
allocationType As MemoryAllocationTypes,
protect As MemoryProtections
) As IntPtr
public:
[DllImportAttribute(L"kernel32.dll", ExactSpelling = true, SetLastError = true)]
static IntPtr VirtualAllocEx(
IntPtr processHandle,
IntPtr address,
IntPtr size,
MemoryAllocationTypes allocationType,
MemoryProtections protect
)
[<DllImportAttribute("kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member VirtualAllocEx :
processHandle : IntPtr *
address : IntPtr *
size : IntPtr *
allocationType : MemoryAllocationTypes *
protect : MemoryProtections -> IntPtr
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