Function VirtualAlloc [src]

Prototype

pub fn VirtualAlloc(addr: ?LPVOID, size: usize, alloc_type: DWORD, flProtect: DWORD) VirtualAllocError!LPVOID

Parameters

addr: ?LPVOIDsize: usizealloc_type: DWORDflProtect: DWORD

Possible Errors

Unexpected

Source

pub fn VirtualAlloc(addr: ?LPVOID, size: usize, alloc_type: DWORD, flProtect: DWORD) VirtualAllocError!LPVOID { return kernel32.VirtualAlloc(addr, size, alloc_type, flProtect) orelse { switch (GetLastError()) { else => |err| return unexpectedError(err), } }; }