Cleanup part 3: Strip old stuff, unnecessary library
This commit is contained in:
@@ -6,7 +6,6 @@ use std::{
|
||||
use crate::{
|
||||
device_notification_client::DeviceNotificationClient, session_notification::SessionNotification,
|
||||
};
|
||||
use widestring::U16CStr;
|
||||
use windows::{
|
||||
core::{Interface, PCWSTR},
|
||||
Win32::{
|
||||
@@ -105,11 +104,8 @@ impl SMSessionNotifier {
|
||||
(self.notification_function)(session);
|
||||
}
|
||||
let prop_store = device.OpenPropertyStore(STGM_READ)?;
|
||||
// this definition isn't in windows-rs yet apparently :(
|
||||
let prop_var = prop_store.GetValue(&PKEY_Device_FriendlyName)?;
|
||||
let str = U16CStr::from_ptr_str(prop_var.Anonymous.Anonymous.Anonymous.pwszVal.0)
|
||||
.to_string_lossy();
|
||||
println!("Device Added: {} Existing Sessions: {}", str, session_count);
|
||||
println!("Device Added: {} Existing Sessions: {}", prop_var.Anonymous.Anonymous.Anonymous.pwszVal.to_string()?, session_count);
|
||||
self.session_managers.push(sm);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user