Kernel32VirtualAlloc Method

Overload List

VirtualAlloc(IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

VirtualAlloc(IntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

VirtualAlloc(UIntPtr, UIntPtr, MemoryAllocationType, MemoryProtectionOptions) Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process.

Memory allocated by this function is automatically initialized to zero.

To allocate memory in the address space of another process, use the VirtualAllocEx(IntPtr, IntPtr, IntPtr, MemoryAllocationType, MemoryProtectionOptions) function.

See Also