The reason I'm posting the question here is because I know for a fact that the Empeg folks have gotten this working for Emplode and I wanna know how they did it. So, question for the Empeg guys or anyone else who can answer:

I can use the Windows PlaySound API function to play (via alias) one of the system sounds that you find in the control panel. You know, things like "critical stop" and "exit windows" and "new mail notification". That's not a problem.

But as soon as I try to play a sound that's associated with an application, I get nothing. I can only seem to be able to play the windows default sounds.

For instance, I have no problem playing the Windows "Menu Popup" sound:
apiPlaySound "MenuPopup", Null, &H10000 Or &H1
But when I try to do the same thing for an application-specific sound such as the Emplode download success sound:
apiPlaySound "emplodeDownloadSuccess", Null, &H10000 Or &H1
it doesn't work.

(Note: I'm not talking about playing a .WAV file directly from the disk, that's easy. I need to know how to play an alias of a sound that the user defines in the control panel.)

I've tried several different values for the parameter, including these...
'Const SND_APPLICATION = &H80 ' look for application specific association
'Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
'Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds] entry identifier

to no avail...

What am I doing wrong? If I have to format the string to indicate the application also, what is the format? For example I've tried "emplode\emplodeDownloadSuccess" and "emplode:\emplodeDownloadSuccess" and those didn't work.

I dug through my MSDN library CD, and they only give examples of the stuff I can already do. Nowhere is an example given of playing an app-specific sound, only the Windows sounds.

So how is it done?

(PS: Code examples above are in VB format, but the same question applies regardless of the language since I'm just calling the Windows API directly here.)

___________
Tony Fabris
_________________________
Tony Fabris