
Zitat von
Delphi Hilfe:
The sndPlaySound function plays a waveform sound specified either by a filename or by an entry in the registry or the WIN.INI file. This function offers a subset of the functionality of the PlaySound function; sndPlaySound is being maintained for backward compatibility.
sndPlaySound ist halt etwas älter und aus kompatibilitätsgründen noch vorhanden. Bei der PlaySound function kann man direct ein Recourcenhandle angeben.
Delphi-Quellcode:
// Wavedatei aus Resource laden und abspielen
PlaySound('WaveRes', hInstance, SND_RESOURCE or SND_ASYNC);