| Crates.io | winpty-rs-windows-targets |
| lib.rs | winpty-rs-windows-targets |
| version | 0.53.2 |
| created_at | 2025-08-04 20:29:04.571897+00 |
| updated_at | 2025-08-04 20:29:04.571897+00 |
| description | Import libs for Windows |
| homepage | |
| repository | https://github.com/microsoft/windows-rs |
| max_upload_size | |
| id | 1781127 |
| size | 21,374 |
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);
}