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

Function get_file_size

dumpy/dinvoke/src/lib.rs:495–509  ·  view source on GitHub ↗

Dynamically calls GetFileSize.

(handle: HANDLE, size: *mut u32)

Source from the content-addressed store, hash-verified

493/// Dynamically calls GetFileSize.
494///
495pub fn get_file_size(handle: HANDLE, size: *mut u32) -> u32 {
496
497 unsafe
498 {
499 let ret: Option<u32>;
500 let func_ptr: data::GetFileSize;
501 let kernel32 = get_module_base_address(&lc!("kernel32.dll"));
502 dynamic_invoke!(kernel32,&lc!("GetFileSize"),func_ptr,ret,handle,size);
503
504 match ret {
505 Some(x) => return x,
506 None => return 0,
507 }
508 }
509}
510
511/// Dynamically calls CreateFileMappingW.
512///

Callers 1

dumpFunction · 0.85

Calls 1

get_module_base_addressFunction · 0.85

Tested by

no test coverage detected