diff --git a/Cargo.toml b/Cargo.toml index 7125d85..d39e752 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "query-wmi" -version = "1.0.0" +version = "1.1.0" edition = "2021" authors = ["sn99 "] description = "A crate to query WMI classes in Windows OS" diff --git a/README.md b/README.md index b715891..38cbbbb 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,13 @@ https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page > Usage: ```rust +use query_wmi::{COMLibrary, Variant, WMIConnection}; use query_wmi::computer_hardware::{ - get_Win32_CDROMDrive, get_Win32_ComputerSystem, get_Win32_OperatingSystem, + get_Win32_CDROMDrive, get_Win32_ComputerSystem, get_Win32_PCMCIAController, get_Win32_PnPEntity, get_Win32_Processor, get_Win32_SystemEnclosure, get_Win32_TapeDrive, get_Win32_USBHub, }; -use wmi::COMLibrary; +use query_wmi::operating_systems::get_Win32_OperatingSystem; fn main() -> Result<(), Box> { let com_con = COMLibrary::new()?; diff --git a/src/lib.rs b/src/lib.rs index 794674c..93f589c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,17 +14,16 @@ //! Usage: //! //! ```ignore +//! use query_wmi::{COMLibrary, Variant, WMIConnection}; //! use query_wmi::computer_hardware::{ -//! get_Win32_CDROMDrive, get_Win32_ComputerSystem, get_Win32_OperatingSystem, +//! get_Win32_CDROMDrive, get_Win32_ComputerSystem, //! get_Win32_PCMCIAController, get_Win32_PnPEntity, get_Win32_Processor, //! get_Win32_SystemEnclosure, get_Win32_TapeDrive, get_Win32_USBHub, //! }; -//! -//! use wmi::COMLibrary; +//! use query_wmi::operating_systems::get_Win32_OperatingSystem; //! //! fn main() -> Result<(), Box> { //! let com_con = COMLibrary::new()?; -//! //! dbg!(get_Win32_OperatingSystem(com_con)?); //! dbg!(get_Win32_CDROMDrive(com_con)?); //! dbg!(get_Win32_ComputerSystem(com_con)?); @@ -34,7 +33,6 @@ //! dbg!(get_Win32_SystemEnclosure(com_con)?); //! dbg!(get_Win32_USBHub(com_con)?); //! dbg!(get_Win32_TapeDrive(com_con)?); -//! //! Ok(()) //! } //! ``` diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 594a8f6..0000000 --- a/src/main.rs +++ /dev/null @@ -1,11 +0,0 @@ -use query_wmi::services::{get_Win32_DependentService, get_Win32_Service}; -use query_wmi::COMLibrary; - -fn main() -> Result<(), Box> { - let com_con = COMLibrary::new()?; - - dbg!(get_Win32_Service(com_con)?); - dbg!(get_Win32_DependentService(com_con)?); - - Ok(()) -}