Registry / other / ntapi
library0.4.3rscratesunverified

FFI bindings for the Windows Native API (NTAPI).

# Cargo.toml [dependencies] ntapi = "0.4.3"
INSTALL
IMPORT
SIG · NTAPI
N
ntapi
otherrustv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RtlGetVersion
use ntapi::ntapi::ntrtl::RtlGetVersion;

Getting Windows OS version using NT API.

use ntapi::ntapi::ntrtl::RtlGetVersion; use ntapi::ntapi::ntrtl::RTL_OSVERSIONINFOW; fn main() { let mut info = RTL_OSVERSIONINFOW::default(); unsafe { RtlGetVersion(&mut info); } println!("Version: {}.{}", info.dwMajorVersion, info.dwMinorVersion); }
Debug
Known issues
gotchaUnsafe FFI; requires Windows target.
fix
Only compile on Windows with cfg(target_os = "windows").
affects: >=0.4.0
Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
ntapi — cargo add ntapi · libregistry