#syscalls #windows #ntapi

no-std ntcall

Crate for calling NT System Calls easily

2 releases

0.1.1 Jan 21, 2022
0.1.0 Jan 21, 2022

#335 in No standard library

34 downloads per month

Custom license

97KB
2.5K SLoC

ntcall-rs

Easily call NT System Calls from rust.

Crates.io

Documentation

Usage

To use ntcall-rs, first add this to your Cargo.toml:

[dependencies]
ntcall = "0.1"

See documentation for more details.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in ntcall-rs by you, shall be licensed as MIT, without any additional terms or conditions.


lib.rs:

A library containg NT System Call definitions.

All System Call ID's are dumped at compile-time. To get started just import the function you would like to use and call it just like with winapi/ntapi.

Example

Add the following to your code to shutdown your system:

use ntcall::NtShutdownSystem;

const ShutdownPowerOff: u32 = 2;

unsafe { NtShutdownSystem(ShutdownPowerOff); }

Dependencies

~0.7–2.3MB
~52K SLoC