diff --git a/Cargo.lock b/Cargo.lock index f67add10..8bca7147 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2157,7 +2157,7 @@ dependencies = [ "uuid", "which 7.0.1", "wholesym", - "windows 0.58.0", + "windows 0.59.0", "winver", ] @@ -2980,63 +2980,29 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1" dependencies = [ - "windows-core 0.59.0", + "windows-core", "windows-targets 0.53.0", ] -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" dependencies = [ - "windows-implement 0.59.0", - "windows-interface 0.59.0", + "windows-implement", + "windows-interface", "windows-result 0.3.0", "windows-strings 0.3.0", "windows-targets 0.53.0", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "windows-implement" version = "0.59.0" @@ -3048,17 +3014,6 @@ dependencies = [ "syn", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "windows-interface" version = "0.59.0" diff --git a/samply/Cargo.toml b/samply/Cargo.toml index 34da9dba..47d841cc 100644 --- a/samply/Cargo.toml +++ b/samply/Cargo.toml @@ -88,7 +88,7 @@ etw-reader = { path = "../etw-reader" } # linux-perf-data = "0.10.1" [target.'cfg(windows)'.dependencies.windows] -version = "0.58" +version = "0.59" features = ["Win32", "Win32_Foundation", "Win32_Security", diff --git a/samply/src/windows/winutils.rs b/samply/src/windows/winutils.rs index f15569b4..50d8a185 100644 --- a/samply/src/windows/winutils.rs +++ b/samply/src/windows/winutils.rs @@ -5,7 +5,7 @@ use std::os::windows::ffi::{OsStrExt, OsStringExt}; use std::ptr::null_mut; use windows::core::{PCWSTR, PWSTR}; -use windows::Win32::Foundation::{CloseHandle, GetLastError, FALSE, HANDLE, LUID, MAX_PATH}; +use windows::Win32::Foundation::{CloseHandle, GetLastError, HANDLE, LUID, MAX_PATH}; use windows::Win32::Security::{ AdjustTokenPrivileges, GetTokenInformation, LookupPrivilegeValueW, TokenElevation, SE_PRIVILEGE_ENABLED, TOKEN_ADJUST_PRIVILEGES, TOKEN_ELEVATION, TOKEN_PRIVILEGES, TOKEN_QUERY, @@ -75,7 +75,7 @@ pub fn enable_debug_privilege() { if AdjustTokenPrivileges( h_token, - FALSE, + false, Some(&tp), std::mem::size_of::() as u32, None,