Dynamically calls RtlAdjustPrivilege. It will return the NTSTATUS value returned by the call.
(privilege: u32, enable: u8, current_thread: u8, enabled: *mut u8)
| 695 | /// |
| 696 | /// It will return the NTSTATUS value returned by the call. |
| 697 | pub fn rtl_adjust_privilege(privilege: u32, enable: u8, current_thread: u8, enabled: *mut u8) -> i32 { |
| 698 | |
| 699 | unsafe |
| 700 | { |
| 701 | let ret; |
| 702 | let func_ptr: data::RtlAdjustPrivilege; |
| 703 | let ntdll = get_module_base_address(&lc!("ntdll.dll")); |
| 704 | dynamic_invoke!(ntdll,&lc!("RtlAdjustPrivilege"),func_ptr,ret,privilege,enable,current_thread,enabled); |
| 705 | |
| 706 | match ret { |
| 707 | Some(x) => return x, |
| 708 | None => return -1, |
| 709 | } |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | /// Dynamically calls NtQuerySystemInformation. |
| 714 | /// |
no test coverage detected