winpty-rs-windows-targets

Crates.iowinpty-rs-windows-targets
lib.rswinpty-rs-windows-targets
version0.53.2
created_at2025-08-04 20:29:04.571897+00
updated_at2025-08-04 20:29:04.571897+00
descriptionImport libs for Windows
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1781127
size21,374
Edgar Andrés Margffoy Tuay (andfoy)

documentation

README

Import libs for Windows

The windows-targets crate includes import libs, supports semantic versioning, and optional support for raw-dylib.

Start by adding the following to your Cargo.toml file:

[dependencies.winpty-rs-windows-targets]
version = "0.53"

Use the link macro to define the external functions you wish to call:

winpty_rs_windows_targets::link!("kernel32.dll" "system" fn SetLastError(code: u32));
winpty_rs_windows_targets::link!("kernel32.dll" "system" fn GetLastError() -> u32);

unsafe {
    SetLastError(1234);
    assert_eq!(GetLastError(), 1234);
}
Commit count: 1734

cargo fmt