Skip to content

Commit

Permalink
Merge pull request #2 from sn99/master
Browse files Browse the repository at this point in the history
update examples mad remove main.rs
  • Loading branch information
sn99 authored Feb 21, 2023
2 parents af4d288 + 7f445ce commit df4238a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "query-wmi"
version = "1.0.0"
version = "1.1.0"
edition = "2021"
authors = ["sn99 <siddharthn.099@gmail.com>"]
description = "A crate to query WMI classes in Windows OS"
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>> {
let com_con = COMLibrary::new()?;
Expand Down
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>> {
//! let com_con = COMLibrary::new()?;
//!
//! dbg!(get_Win32_OperatingSystem(com_con)?);
//! dbg!(get_Win32_CDROMDrive(com_con)?);
//! dbg!(get_Win32_ComputerSystem(com_con)?);
Expand All @@ -34,7 +33,6 @@
//! dbg!(get_Win32_SystemEnclosure(com_con)?);
//! dbg!(get_Win32_USBHub(com_con)?);
//! dbg!(get_Win32_TapeDrive(com_con)?);
//!
//! Ok(())
//! }
//! ```
Expand Down
11 changes: 0 additions & 11 deletions src/main.rs

This file was deleted.

0 comments on commit df4238a

Please sign in to comment.