windows-syscall 0.0.11

Windows inline syscalls for Rust
Documentation
windows-syscall-0.0.11 has been yanked.

Windows syscalls for Rust

windows-syscall GitHub Actions windows-syscall on crates.io windows-syscall on docs.rs

The syscall! macro provides a type-safe way to invoke a Windows system service.

This crate only implements calls to ntoskrnl services, if you require win32k services please create an issue and let me know.

This crate only implements x86_64 arch, if you need x86 (32-bit) implemented create an issue and let me know.

Example

extern "C" {
    pub fn NtClose(Handle: HANDLE) -> NTSTATUS;
}

fn main() {
   assert_eq!(syscall!(NtClose(HANDLE::new(0xvalid))), STATUS_SUCCESS);
   assert_eq!(syscall!(NtClose(HANDLE::default())), STATUS_INVALID_HANDLE);
}

crate version: 0.0.x aka work-in-progress.