Beep

  BOOL Beep(dwFreq, dwDuration)    
  DWORD dwFreq; /* sound frequency in hertz */
  DWORD dwDuration; /* sound duration in milliseconds */

The Beep function generates simple tones on the speaker.

Parameters

dwFreq

Specifies the frequency of the sound in hertz. This parameter must be between 37 (25 hex) and 32767 (07FFF hex).

dwDuration

Specifies the duration of the sound in milliseconds.

Return Value

The return value is TRUE if the function was successful. Otherwise it is FALSE. Use the GetLastError function to obtain extended error information.

Comments

This function returns immediately to the application, and does not wait for the sound to complete. If the application makes another call to Beep while a previous sound is still in progress, the previous sound is stopped and the new sound is started.