Function NtAllocateVirtualMemory [src]

Prototype

pub fn NtAllocateVirtualMemory(hProcess: HANDLE, addr: ?*PVOID, zero_bits: ULONG_PTR, size: ?*SIZE_T, alloc_type: ULONG, protect: ULONG) NtAllocateVirtualMemoryError!void

Parameters

hProcess: HANDLEaddr: ?*PVOIDzero_bits: ULONG_PTRsize: ?*SIZE_Talloc_type: ULONGprotect: ULONG

Possible Errors

AccessDenied
InvalidParameter
NoMemory
Unexpected

Source

pub fn NtAllocateVirtualMemory(hProcess: HANDLE, addr: ?*PVOID, zero_bits: ULONG_PTR, size: ?*SIZE_T, alloc_type: ULONG, protect: ULONG) NtAllocateVirtualMemoryError!void { return switch (ntdll.NtAllocateVirtualMemory(hProcess, addr, zero_bits, size, alloc_type, protect)) { .SUCCESS => return, .ACCESS_DENIED => NtAllocateVirtualMemoryError.AccessDenied, .INVALID_PARAMETER => NtAllocateVirtualMemoryError.InvalidParameter, .NO_MEMORY => NtAllocateVirtualMemoryError.NoMemory, else => |st| unexpectedStatus(st), }; }