开发者

How to detect when an audio device has been unplugged (windows vista) in C#

开发者 https://www.devze.com 2022-12-18 09:16 出处:网络
Id like to know how to detect when a device has been plugged in开发者_高级运维,and unplugged, and then mute / unmute the laptops internal speakersIn unmanaged code you would listen for WM_DEVICECHANGE

Id like to know how to detect when a device has been plugged in开发者_高级运维, and unplugged, and then mute / unmute the laptops internal speakers


In unmanaged code you would listen for WM_DEVICECHANGE in your top level windowproc.

That appears to be the only way to do it in managed code as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消