Sha256: 3805aa45992af730c0a8c72de717f505c316fb3cf491c9e928c70e7d17845103

Contents?: true

Size: 859 Bytes

Versions: 8

Compression:

Stored size: 859 Bytes

Contents

## Import libs for Windows

The [windows-targets](https://crates.io/crates/windows-targets) crate includes import libs, supports semantic versioning, and optional support for raw-dylib. 

* [Getting started](https://kennykerr.ca/rust-getting-started/)
* [Samples](https://github.com/microsoft/windows-rs/tree/0.58.0/crates/samples)
* [Releases](https://github.com/microsoft/windows-rs/releases)

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

```toml
[dependencies.windows-targets]
version = "0.52"
```

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

```rust,no_run
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);
    }
}
```

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-28.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-27.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-26.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-25.0.2 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-25.0.1 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-25.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md
wasmtime-24.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/readme.md