Dynamically calls NtAllocateVirtualMemory. It will return the NTSTATUS value returned by the call.
(handle: HANDLE, base_address: *mut PVOID, zero_bits: usize, size: *mut usize, allocation_type: u32, protection: u32)
| 692 | /// |
| 693 | /// It will return the NTSTATUS value returned by the call. |
| 694 | pub fn nt_allocate_virtual_memory (handle: HANDLE, base_address: *mut PVOID, zero_bits: usize, size: *mut usize, allocation_type: u32, protection: u32) -> i32 { |
| 695 | |
| 696 | unsafe |
| 697 | { |
| 698 | let ret; |
| 699 | let func_ptr: data::NtAllocateVirtualMemory; |
| 700 | let ntdll = get_module_base_address(&lc!("ntdll.dll")); |
| 701 | dynamic_invoke!(ntdll,&lc!("NtAllocateVirtualMemory"),func_ptr,ret,handle,base_address,zero_bits,size,allocation_type,protection); |
| 702 | |
| 703 | match ret { |
| 704 | Some(x) => return x, |
| 705 | None => return -1, |
| 706 | } |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | /// Dynamically calls NtProtectVirtualMemory. |
| 711 | /// |
no test coverage detected