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

Function nt_query_information_file

dumpy/dinvoke/src/lib.rs:754–768  ·  view source on GitHub ↗

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

(handle: HANDLE, io: *mut IO_STATUS_BLOCK, file_information: PVOID, length: u32,file_information_class: u32)

Source from the content-addressed store, hash-verified

752///
753/// It will return the NTSTATUS value returned by the call.
754pub fn nt_query_information_file(handle: HANDLE, io: *mut IO_STATUS_BLOCK, file_information: PVOID, length: u32,file_information_class: u32) -> i32 {
755
756 unsafe
757 {
758 let ret;
759 let func_ptr: data::NtQueryInformationFile;
760 let ntdll = get_module_base_address(&lc!("ntdll.dll"));
761 dynamic_invoke!(ntdll,&lc!("NtQueryInformationFile"),func_ptr,ret,handle,io,file_information,length,file_information_class);
762
763 match ret {
764 Some(x) => return x,
765 None => return -1,
766 }
767 }
768}
769
770
771/// Dynamically calls NtOpenProcess.

Callers 1

get_pid_from_image_pathFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected