views:

15

answers:

1

I need to get list of sounds registered for applications. For instance I need to play sound for Visual Studio in case build failed. How to do it?

+1  A: 

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.

AakashM