Play Windows Error sound in Powerbuilder application

To implement windows sound in a Powerbuilder application, we have to refer winmm.dll in PB application. Below is a test script for it.

//Declare as Global External Function
Function Boolean sndPlaySound(ref String lpszSound , Long fuSound )&
                                                Library "Winmm.dll" alias for "sndPlaySoundW"


//Write the script where we need to play sound
string ls_path1
ls_path1= "C:\Windows\Media\tada.wav"

Constant Long SND_SYNC = 0

sndPlaySound(ls_path2 , SND_SYNC)

No comments:

Post a Comment