开发者

How to enumerate sounds registered for applications?

开发者 https://www.devze.com 2022-12-21 07:31 出处:网络
I need to get list of sounds registered for applicati开发者_如何学Pythonons. For instance I need to play sound for Visual Studio in case build failed. How to do it?I think you mean that you want to fi

I need to get list of sounds registered for applicati开发者_如何学Pythonons. For instance I need to play sound for Visual Studio in case build failed. How to do it?


I think you mean that you want to find out what sound has been set (in Control Panel | Sounds) as the sound for the Visual Studio Build Failed event, and play it.

If that's correct, then this question tells me you need to read the registry under HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default for the appropriate subkey (set up a sound and then check to see where it has been put), and then use call PlaySound (further details in the linked question) to play it.

0

精彩评论

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