Free some additional structures from winapi properly

This commit is contained in:
Your Name
2023-02-23 22:47:33 -05:00
parent 847631d94e
commit a647fc5186
6 changed files with 122 additions and 94 deletions

View File

@@ -1,18 +1,12 @@
use windows::{
Win32::{
Media::Audio::{
IMMNotificationClient, IMMNotificationClient_Impl,
},
},
};
use windows::Win32::Media::Audio::{IMMNotificationClient, IMMNotificationClient_Impl};
pub trait DeviceNotificationObserver {
fn add_device(&self, device_id : &windows::core::PCWSTR);
fn add_device(&self, device_id: &windows::core::PCWSTR);
}
#[windows::core::implement(IMMNotificationClient)]
pub(crate) struct DeviceNotificationClient {
pub observer: Box<dyn DeviceNotificationObserver>
pub observer: Box<dyn DeviceNotificationObserver>,
}
impl IMMNotificationClient_Impl for DeviceNotificationClient {