MessageBeep function
Applies to: desktop apps only
Plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.
Syntax
BOOL WINAPI MessageBeep( __in UINT uType );
Parameters
- uType [in]
-
The sound to be played. The sounds are set by the user through the Sound control panel application, and then stored in the registry.
This parameter can be one of the following values.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously.
If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker.
The user can disable the warning beep by using the Sound control panel application.
Terminal Services: To send a beep to a client, use the Beep function. The Beep function is redirected to the client, whereas MessageBeep is not.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012
[DllImport("user32", CharSet=CharSet.Unicode, SetLastError = true)]
internal static extern int MessageBeep(int uType);
- 5/4/2009
- dmex
- 10/22/2009
- Thomas Lee