trisquel-icecat/icecat/third_party/dump_syms/vendor/windows-targets-0.52.6
2025-10-06 02:35:48 -06:00
..
src icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00
.cargo-checksum.json icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00
Cargo.toml icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00
license-apache-2.0 icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00
license-mit icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00
readme.md icecat: add release 140.3.1-1gnu1 2025-10-06 02:35:48 -06:00

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.windows-targets]
version = "0.52"

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

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

fn main() {
    unsafe {
        SetLastError(1234);
        assert_eq!(GetLastError(), 1234);
    }
}