Dynamically calls NtDuplicateObject. It will return the NTSTATUS value returned by the call.
(source_phandle: HANDLE, source_handle:HANDLE, target_phandle: HANDLE, target_handle: *mut HANDLE, desired_access: u32, attributes: u32, options: u32)
| 791 | /// |
| 792 | /// It will return the NTSTATUS value returned by the call. |
| 793 | pub fn nt_duplicate_object(source_phandle: HANDLE, source_handle:HANDLE, target_phandle: HANDLE, target_handle: *mut HANDLE, desired_access: u32, attributes: u32, options: u32) -> i32 { |
| 794 | |
| 795 | unsafe |
| 796 | { |
| 797 | let ret; |
| 798 | let func_ptr: data::NtDuplicateObject; |
| 799 | let ntdll = get_module_base_address(&lc!("ntdll.dll")); |
| 800 | dynamic_invoke!(ntdll,&lc!("NtDuplicateObject"),func_ptr,ret,source_phandle,source_handle,target_phandle,target_handle,desired_access,attributes,options); |
| 801 | |
| 802 | match ret { |
| 803 | Some(x) => return x, |
| 804 | None => return -1, |
| 805 | } |
| 806 | } |
| 807 | } |
| 808 | |
| 809 | /// Dynamically calls NtQueryObject. |
| 810 | /// |
no test coverage detected