Search code examples
c++windowsapiwindows-server-2008win64

MessageBeep() not working on 64-bit Server2008


I recently found that in a 32-bit windows application running on Server 2008 R2 64-bit, the notification sound (produced via a C++ call to MessageBeep( MB_ICONEXCLAMATION )) no longer produces a sound. Sounds in general work and the profile has been loaded with default windows sound settings in the Control Panel. Works fine on Win7 64-bit, so I assume its something server specific. Any suggestions for narrowing it down?


Solution

  • Usable workaround:

    #include <MMSystem.h>
    PlaySound( (LPCTSTR) SND_ALIAS_SYSTEMEXCLAMATION, NULL, SND_ALIAS_ID );