macro_rules! do_syscall {
($ssn:expr, $addr:expr $(, $arg:expr)* $(,)?) => { ... };
}Available on x86-64 only.
Expand description
Low-level escape hatch when you already have a resolved (ssn, addr).
Skips resolution entirely. Useful for caching SSNs at init or for
resolving via a non-default mechanism (e.g. a hand-rolled SSDT walker
or a remote-process resolver). Returns *mut c_void directly, no
Result wrapping. Convert to NTSTATUS with as i32.
Every argument is cast as usize and then transmuted to *mut c_void
so the call site stays uniform with syscall!, spoof!, and
spoof_syscall!.
§Examples
ⓘ
use dyncvoke_core::{do_syscall, resolve_syscall};
let (ssn, addr) = resolve_syscall("NtClose").unwrap();
// later, possibly thousands of times, with no per-call resolution cost:
let status = do_syscall!(ssn, addr, handle) as i32;