The sndPlaySound function plays a waveform sound specified either by a filename or by an entry in the registry or the WIN.INI file.
Parameters lpszSound A string that specifies the sound to play.
This parameter can be either an entry in the registry or in WIN.INI that identifies a system sound, or it can be the name of a waveform-audio file. If this parameter is NULL, any currently playing sound is stopped. The parameter specified by lpszSoundName points to an image of a waveform sound in memory. If the sound cannot be found, the function returns silently without playing the default sound. The sound is played synchronously and the function does not return until the sound ends.