Easily call NT System Calls from rust.
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.
To use ntcall-rs
, first add this to your Cargo.toml
:
[dependencies]
ntcall = "0.1"
Shutting down your PC with a System Call.
use ntcall::NtShutdownSystem;
const ShutdownPowerOff: u32 = 2;
unsafe { NtShutdownSystem(ShutdownPowerOff); }
This project is licensed under the MIT license.
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.