Dynamically calls NtProtectVirtualMemory. It will return the NTSTATUS value returned by the call.
(handle: HANDLE, base_address: *mut PVOID, size: *mut usize, new_protection: u32, old_protection: *mut u32)
| 657 | /// |
| 658 | /// It will return the NTSTATUS value returned by the call. |
| 659 | pub fn nt_protect_virtual_memory (handle: HANDLE, base_address: *mut PVOID, size: *mut usize, new_protection: u32, old_protection: *mut u32) -> i32 { |
| 660 | |
| 661 | unsafe |
| 662 | { |
| 663 | let ret; |
| 664 | let func_ptr: data::NtProtectVirtualMemory; |
| 665 | let ntdll = get_module_base_address(&lc!("ntdll.dll")); |
| 666 | dynamic_invoke!(ntdll,&lc!("NtProtectVirtualMemory"),func_ptr,ret,handle,base_address,size,new_protection,old_protection); |
| 667 | |
| 668 | match ret { |
| 669 | Some(x) => return x, |
| 670 | None => return -1, |
| 671 | } |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | /// Dynamically calls NtQueryInformationProcess. |
| 676 | /// |
nothing calls this directly
no test coverage detected