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

Function nt_query_object

dumpy/dinvoke/src/lib.rs:812–826  ·  view source on GitHub ↗

Dynamically calls NtQueryObject. It will return the NTSTATUS value returned by the call.

(handle: HANDLE, object_information_class: u32, object_information: PVOID, length: u32, return_length: *mut u32)

Source from the content-addressed store, hash-verified

810///
811/// It will return the NTSTATUS value returned by the call.
812pub fn nt_query_object(handle: HANDLE, object_information_class: u32, object_information: PVOID, length: u32, return_length: *mut u32) -> i32 {
813
814 unsafe
815 {
816 let ret;
817 let func_ptr: data::NtQueryObject;
818 let ntdll = get_module_base_address(&lc!("ntdll.dll"));
819 dynamic_invoke!(ntdll,&lc!("NtQueryObject"),func_ptr,ret,handle,object_information_class,object_information,length,return_length);
820
821 match ret {
822 Some(x) => return x,
823 None => return -1,
824 }
825 }
826}
827
828/// Dynamically calls an exported function from the specified module.
829///

Callers 1

dumpFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected