BELL( cWaveFileName [, lSynchronous ] )This is the code:
******************************************************************************** FUNCTION BELL( tcWaveFile, tlSynchronous ) ******************************************************************************** * OVERVIEW Sounds the .Wav or other sound file specified in tcWaveFile. * * If the .Wav file cannot be found, sounds the system event * default sound. If the sound file cannot be found and the * system event default sound is not defined, no sound is made and * .F. is returned. If the sound file or system default sound * is played, returns .T. * * PARAMETERS * * tcWaveFile A fully qualified path to a .Wav or other sound file * compatable with the default sound player. * * tlSynchronous If true, plays the sound synchronously. If false, or omitted * play the cound asynchronously. * LOCAL laDLLs[ 1 ], lnInt SET TALK OFF laDLLs[ 1 ] = '' ADLLS( laDLLs ) * If the sndPlaySound function has not yet been declared, declare it * now. IF ASCAN( laDLLs, 'sndPlaySound', 1, ALEN( laDLLs, 1 ), 1, 11 ) = 0 DECLARE ; INTEGER sndPlaySound IN WinMM.DLL ; STRING cSoundName, ; INTEGER uFlags ENDIF * Send 0x00 as the second parameter to play the sound synchronously. * Send 0x01 to play asynchronously. We want asynchronous sound * ( plays in the background without halting processing processing. ) * unless tlSynchronous is true. IF !EMPTY( tlSynchronous ) lnInt = 0x00 ELSE lnInt = 0x01 ENDIF RETURN SndPlaySound( tcWaveFile , lnInt ) ENDFUNC && BELL()