MCPcopy Create free account
hub / github.com/Kudaes/Split / get_syscall_id

Function get_syscall_id

dinvoke/src/lib.rs:445–459  ·  view source on GitHub ↗

Returns the syscall id that correspond to the function specified. This functions will return -1 in case that the syscall id of the specified function could not be retrieved. # Examples ``` let ntdll = dinvoke::get_module_base_address("ntdll.dll"); if ntdll != 0 { let eat = dinvoke::get_ntdll_eat(ntdll); let id = dinvoke::get_syscall_id(eat, "NtCreateThreadEx"); if id != -1 { println!("The sys

(eat:EAT, function_name: &str)

Source from the content-addressed store, hash-verified

443/// }
444/// ```
445pub fn get_syscall_id(eat:EAT, function_name: &str) -> i32 {
446
447 let mut i = 0;
448 for (_a,b) in eat.iter()
449 {
450 if b == function_name
451 {
452 return i;
453 }
454
455 i = i + 1;
456 }
457
458 -1
459}
460
461/// Calls the module's entry point with the option DLL_ATTACH_PROCESS.
462///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected