itunes_com/sys/
mod.rs

1//! Raw bindings over iTunes COM API
2//!
3//! ## Where to find them?
4//! Some resources online (e.g. [here](https://www.joshkunz.com/iTunesControl/main.html) or [there](https://documentation.help/iTunesCOM/main.html))
5//! expose the documentation generated from IDL files.<br/>
6//! They do not tell in which order they are defined, which is meaningful.
7//!
8//! Opening iTunes.exe in oleview.exe (File > View TypeLib, then open iTunes.exe) generates (pseudo)IDL files that are suitable to correctly define bindings.
9//! That's then a matter of finding-and-replacing IDL patterns with Rust patterns and hope the bindings are eventually correct.
10
11mod com_interfaces;
12mod com_enums;
13
14pub use com_interfaces::*;
15pub use com_enums::*;
16
17/// The GUID used to create an instance of [`crate::sys::IiTunes`].
18pub const ITUNES_APP_COM_GUID: windows::core::GUID = windows::core::GUID::from_u128(0xDC0C2640_1415_4644_875C_6F4D769839BA);
19
20// These types are part of the public API and must be re-exported so that users can use them in their right version.
21/// Re-exported type from windows-rs.
22pub use windows::{
23    core::{BSTR, HRESULT},
24    Win32::System::Com::VARIANT,
25    Win32::Foundation::VARIANT_BOOL,
26    Win32::System::Ole::IEnumVARIANT,
27};
28
29/// Convenience constant
30pub const TRUE: crate::sys::VARIANT_BOOL = crate::sys::VARIANT_BOOL(-1);
31/// Convenience constant
32pub const FALSE: crate::sys::VARIANT_BOOL = crate::sys::VARIANT_BOOL(0);