callcomapi_macros-0.1.0 has been yanked.
callcomapi_macros
callcomapi_macros is a Rust procedural macro crate that simplifies calling COM APIs. It reduces the boilerplate for Windows COM initialization and cleanup.
This crate is intended for Rust projects that need to call Windows COM APIs frequently.
Usage
Add callcomapi_macros as a dependency in your Cargo.toml,
Then you can use the provided macros in your Rust code.
use ;
// 1. Automatically initialize COM and ensure cleanup when the function returns
// 2. Convert a synchronous or asynchronous function to run on a dedicated
// background COM thread that stays alive and is reused.
示例
You can check the examples folder for more usage details:
- with_com.rs: demonstrates scoping COM lifetime within a function.
- com_thread.rs: demonstrates using a persistent background thread to call COM.