Function VirtualAlloc [src]
Prototype
pub fn VirtualAlloc(addr: ?LPVOID, size: usize, alloc_type: DWORD, flProtect: DWORD) VirtualAllocError!LPVOID
Parameters
addr: ?LPVOID
size: usize
alloc_type: DWORD
flProtect: DWORD
Possible Errors
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),
}
};
}