Hello,
Welcome to Microsoft Q&A!
Can we get the event of disabling microphone from device manager
Sure, you could use DeviceWatcher to detect this, if you disable microphone device , DeviceWatcher Removed
event will be triggered.
For example
var watcher = DeviceInformation.CreateWatcher(DeviceClass.AudioCapture);
watcher.Updated += Watcher_Updated;
watcher.Added += Watcher_Added;
watcher.Removed += Watcher_Removed;
watcher.Start();
private void Watcher_Removed(DeviceWatcher sender, DeviceInformationUpdate args)
{
// will be triggered when disable audio capture device.
}
private void Watcher_Added(DeviceWatcher sender, DeviceInformation args)
{
}
Nico
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.