Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 8, 2024
1 parent 9ded9c2 commit 069fe82
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 28 deletions.
54 changes: 32 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -49,7 +49,7 @@ serde = { version = "^1.0.190", optional = true }

[target.'cfg(windows)'.dependencies]
ntapi = "0.4"
windows = { version = "0.52", features = [
windows = { version = "0.54", features = [
"Wdk_System_SystemInformation",
"Wdk_System_SystemServices",
"Wdk_System_Threading",
Expand Down
8 changes: 4 additions & 4 deletions src/windows/component.rs
Expand Up @@ -2,7 +2,7 @@

use crate::Component;

use windows::core::w;
use windows::core::{VARIANT, w};
use windows::Win32::Foundation::{SysAllocString, SysFreeString};
use windows::Win32::Security::PSECURITY_DESCRIPTOR;
use windows::Win32::System::Com::{
Expand All @@ -11,7 +11,7 @@ use windows::Win32::System::Com::{
RPC_C_IMP_LEVEL_IMPERSONATE,
};
use windows::Win32::System::Rpc::{RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE};
use windows::Win32::System::Variant::{VariantClear, VARIANT};
use windows::Win32::System::Variant::VariantClear;
use windows::Win32::System::Wmi::{
IEnumWbemClassObject, IWbemLocator, IWbemServices, WbemLocator, WBEM_FLAG_FORWARD_ONLY,
WBEM_FLAG_NONSYSTEM_ONLY, WBEM_FLAG_RETURN_IMMEDIATELY, WBEM_INFINITE,
Expand Down Expand Up @@ -276,7 +276,7 @@ impl Connection {
let mut variant = variant.assume_init();

// temperature is given in tenth of degrees Kelvin
let temp = (variant.Anonymous.decVal.Anonymous2.Lo64 / 10) as f32 - 273.15;
let temp = (variant.as_raw().Anonymous.decVal.Anonymous2.Lo64 / 10) as f32 - 273.15;
let _r = VariantClear(&mut variant);

let mut critical = None;
Expand All @@ -286,7 +286,7 @@ impl Connection {
.ok()?;

// temperature is given in tenth of degrees Kelvin
critical = Some((variant.Anonymous.decVal.Anonymous2.Lo64 / 10) as f32 - 273.15);
critical = Some((variant.as_raw().Anonymous.decVal.Anonymous2.Lo64 / 10) as f32 - 273.15);
let _r = VariantClear(&mut variant);
}

Expand Down
2 changes: 2 additions & 0 deletions src/windows/system.rs
Expand Up @@ -315,6 +315,8 @@ impl SystemInner {
} else {
None
};
// Not sure why we need to make this
let process_list: &Wrap<UnsafeCell<&mut HashMap<Pid, Process>>> = &process_list;
if let Some(proc_) = (*process_list.0.get()).get_mut(&pid) {
let proc_ = &mut proc_.inner;
if proc_
Expand Down
2 changes: 1 addition & 1 deletion src/windows/utils.rs
Expand Up @@ -79,7 +79,7 @@ impl RegKey {
Some(&mut buf_type),
Some(buf.as_mut_ptr()),
Some(buf_len),
)
).ok()
}
}

Expand Down

0 comments on commit 069fe82

Please sign in to comment.