#define INCL_DOSPROCESS USHORT rc = DosBeep(Frequency, Duration); USHORT Frequency; /* Hertz (Hz) */ USHORT Duration; /* Length of sound */ USHORT rc; /* return code */
Example
This example generates a beep for 1 second (1,000 milliseconds) at a frequency of 1,380.
#define INCL_DOSPROCESS #define BEEP_FREQUENCY 1380 #define BEEP_DURATION 1000 USHORT rc; rc = DosBeep(BEEP_FREQUENCY, BEEP_DURATION);