Files
guba-indicator/target/x86_64-pc-windows-gnu/release/deps/libwindows_link-ae0258d74547f8ea.rmeta

34 lines
4.7 KiB
Plaintext
Raw Normal View History

2026-03-23 17:30:20 +08:00
rust
L#rustc 1.93.1 (01f6ddf75 2026-02-11)<29><02>`<60>%;x<><78><EFBFBD><EFBFBD>"<22><>s<EFBFBD>-571ffe4b09576bf0<66><02>4<><34><11><><EFBFBD><EFBFBD><><E9BBB6>-5cb0b40fe52aab6a<36><01><02> $<24><02>\r<02>,<2C><00>r<02> $<24><02><<3C>L<><02><02> <02><02> $<24><04><00><02> <00>## Linking for Windows\n\nThe [windows-link](https://crates.io/crates/windows-link) crate provides the `link` macro that simplifies linking. The `link` macro is much the same as the one provided by [windows-targets](https://crates.io/crates/windows-targets) but uses `raw-dylib` and thus does not require import lib files.\n\n* [Getting started](https://kennykerr.ca/rust-getting-started/)\n* [Samples](https://github.com/microsoft/windows-rs/tree/master/crates/samples)\n* [Releases](https://github.com/microsoft/windows-rs/releases)\n\nStart by adding the following to your Cargo.toml file:\n\n```toml\n[dependencies.windows-link]\nversion = \"0.2\"\n```\n\nUse the `link` macro to define the external functions you wish to call:\n\n```rust\nwindows_link::link!(\"kernel32.dll\" \"system\" fn SetLastError(code: u32));\nwindows_link::link!(\"kernel32.dll\" \"system\" fn GetLastError() -> u32);\n\nunsafe {\n SetLastError(1234);\n assert_eq!(GetLastError(), 1234);\n}\n```\n<><00>## Linking for Windows
The [windows-link](https://crates.io/crates/windows-link) crate provides the `link` macro that simplifies linking. The `link` macro is much the same as the one provided by [windows-targets](https://crates.io/crates/windows-targets) but uses `raw-dylib` and thus does not require import lib files.
* [Getting started](https://kennykerr.ca/rust-getting-started/)
* [Samples](https://github.com/microsoft/windows-rs/tree/master/crates/samples)
* [Releases](https://github.com/microsoft/windows-rs/releases)
Start by adding the following to your Cargo.toml file:
```toml
[dependencies.windows-link]
version = "0.2"
```
Use the `link` macro to define the external functions you wish to call:
```rust
windows_link::link!("kernel32.dll" "system" fn SetLastError(code: u32));
windows_link::link!("kernel32.dll" "system" fn GetLastError() -> u32);
unsafe {
SetLastError(1234);
assert_eq!(GetLastError(), 1234);
}
```
<EFBFBD><00><00><01>&<02> <0B><02> <0B> <0B> <0B> ֌<><00><>+( Defines an external function to import.<2E><02><1C> <0C> <0C>8<02><1C> <0C> <0C>8<02><<3C>$ <0C>8<02> <1C> <0C> <0C>8<02>\<5C> <0C>7<02>,<2C><00><>.&|<7C> <0B> <0C> <0C> <0C> <0C>, <0C>8library<72><<3C>& <0C>8<02> <<3C>, <0C>8<02><1C>& <0C>8<02> <<3C>, <0C> <0C> <0C>, <0C>8<02> L<>& <0C>8<02> <<3C>- <0C>8 <14>, <0C> <0C> <0C>, <0C>8function<6F>D<>& <0C>8<02><14> <0C>*<14> <0C> <0C>+ <0C> <0C> <0C>8<02> $<24> <0C> <0C> 8<02>
$<24> <0C>, <0C>8<01><<3C>$ <0C>8<02> $<24> <0C>7<02> \<5C>$ <0C>8<02>
L<> <0C>7 +verbatim<69>\<5C>8
4<>, <0C>8<02><1C> <0C> <0C> , <0C> <0C> <0C>+ <0C> <0C> <0C>8<02> L<> <0C>, <0C>8<02> L<>- <0C>8<1C>8 <14>, <0C> <0C> <0C>, <0C>8<01>D<> <0C>% <0C>Samples<65>Bhttps://github.com/microsoft/windows-rs/tree/master/crates/samples<65>Releases<65>0https://github.com/microsoft/windows-rs/releases<65> windows-link<6E>%https://crates.io/crates/windows-link<6E>windows-targets<74>(https://crates.io/crates/windows-targets<74>Getting started<65>*https://kennykerr.ca/rust-getting-started/<2F><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><01>+<2B><03>Ʀs<C6A6><73>$Q<><51><EFBFBD><18>S<EFBFBD><53>*\vK*p<><70>K<EFBFBD>D<EFBFBD><44><EFBFBD><08><00><08>)<29><00> <09><00><08><08><00><00> <09><08><><EFBFBD><EFBFBD><00> <09> "%<02> +<2B><03>Ʀs<C6A6><73>X<EFBFBD><58><EFBFBD>W<EFBFBD><57><02><00> Š<>Z<01><01>+<2B><03>Ʀsỷ<73>~x2:<02><a,Q<0E><0E>ODHT <02><><00>$Q<><51><EFBFBD><18>+<2B><03>Ʀs<C6A6>p<><70>K<EFBFBD>D<EFBFBD><44>S<><53>*\vK*B<><42><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><15><><EFBFBD>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><15><><EFBFBD>`C:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-link-0.2.1\src\lib.rs<72> <20><>5<68><C494>&<26><05>\<5C><><00><08>'' ,*Tp("
,/TN("
,T"
<00><>t<EFBFBD><74><EFBFBD><EFBFBD>><3E>M<EFBFBD>F<EFBFBD><46>'<27>fC:\Users\dxzq\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-link-0.2.1\src\../readme.md<6D> <20><>3<EFBFBD><05>1<EFBFBD><31><08>'<27><1D><00><07>)@P?7HIG &<00><>j<EFBFBD><6A><EFBFBD><EFBFBD><12><>_<EFBFBD><5F>$<24>j<00>px86_64-pc-windows-gnu<6E><06><><EFBFBD><14>&[<5B> <0C><>ޏ windows_link<6E>-ae0258d74547f8ea<65>+<2B><03>Ʀs<C6A6><02>"R<00>  <04><02>rust-end-file