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.
精彩评论