Group: Error Handling - Library: kernel32
Generates simple tones on the speaker. The function is synchronous; it does not return control to its caller until the sound finishes.
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Controlling master audio volume by sending WM_APPCOMMAND messages
BOOL Beep(
DWORD dwFreq, // sound frequency
DWORD dwDuration // sound duration
); DECLARE INTEGER Beep IN kernel32;
INTEGER dwFreq,;
INTEGER dwDuration
dwFreq [in] Specifies the frequency, in hertz, of the sound.
dwDuration [in] Specifies the duration, in milliseconds, of the sound.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Windows 95/98/Me: On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep. I"ve never seen such computer in years.
Home