<p>How do I find out which sound files the user has configured in the control panel?</p>

<p>Example: I want to play the sound for "Device connected".</p>

<p>Which API can be used to query the control panel sound settings?</p>

<p>I see that there are some custom entries made by third party programs in the control panel dialog, so there has to be a way for these programs to communicate with the global sound settings.</p>

<p>Edit: Thank you. I did not know that PlaySound also just played appropriate sound file when specifying the name of the registry entry.</p>

<p>To play the "Device Conntected" sound:</p>

<pre><code>::PlaySound( TEXT("DeviceConnect"), NULL, SND_ALIAS|SND_ASYNC );
</code></pre>

```
PlaySound
```
is the API.
Also see
Play System Sounds
.