
SND_SYNC = 0x0000 ,/* Play synchronously (default) */ There are different parameter flags used, defined in a C# Enum. Otherwise we have to send the file path to the method. The registry key, which defines the sound event, is the verb we need to send to PlaySound method. But it also supports playing sound events from registry. The PlaySound method supports the playing of normal wave files stored on the disk. All we have to do is create some registry keys at the right position. We're also able to add our own sound events to registry.


With this knowledge, we can rebuild the control panel view of the system sounds.

Windows supports Sections, this means every application can create/use it's own section. So the settings can be found under HKEY_CURRENT_USER. The sound events are stored in the registry, this is done by user. Private static extern int PlaySound( String pszSound, int hmod, int falgs)
