But there are more flag options available. The second parameter is a handle to the executable program that contains the sound data. This pointer is null if the sound is to come from a file, or if it is referenced in the registry or win.ini. The filename parameter is an alias in the registry or win.ini. Specifies whether the filename parameter is a predefined sound identifier.
Sounds are to be stopped for the calling task.
If filename is not NULL, all instances of the specified sound are stopped. If filename is NULL, all sounds that are playing on behalf of the calling task are stopped. At this point, it is easier to learn by doing, so the following sections will rely heavily on code examples. Getting sounds from .wav files. This is where the functions and constants we need are found.