MCPcopy Create free account
hub / github.com/Kudaes/Dumpy / nt_duplicate_object

Function nt_duplicate_object

dumpy/dinvoke/src/lib.rs:793–807  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

791///
792/// It will return the NTSTATUS value returned by the call.
793pub 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///

Callers 1

dumpFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected