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

Function nt_query_system_information

dumpy/dinvoke/src/lib.rs:716–730  ·  view source on GitHub ↗

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

(system_information_class: u32, system_information: PVOID, length: u32, return_length: *mut u32)

Source from the content-addressed store, hash-verified

714///
715/// It will return the NTSTATUS value returned by the call.
716pub fn nt_query_system_information(system_information_class: u32, system_information: PVOID, length: u32, return_length: *mut u32) -> i32 {
717
718 unsafe
719 {
720 let ret;
721 let func_ptr: data::NtQuerySystemInformation;
722 let ntdll = get_module_base_address(&lc!("ntdll.dll"));
723 dynamic_invoke!(ntdll,&lc!("NtQuerySystemInformation"),func_ptr,ret,system_information_class,system_information,length,return_length);
724
725 match ret {
726 Some(x) => return x,
727 None => return -1,
728 }
729 }
730}
731
732/// Dynamically calls NtQueryInformationThread.
733///

Callers 1

dumpFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected