How to call buzzer sound of device on windows embedded 7?

61 views Asked by At

My device does not support the WAV or MP3 file formats. I want to play a buzzer sound on my Windows Embedded 7 system. Is it possible to achieve this using C++ or C#? Can anyone suggest how to proceed with this? i new programmer for windows ce help me pls. Thank you.

1

There are 1 answers

0
josef On

If the device is able to play system sounds you may use this API:

 using System.Runtime.InteropServices;
 [DllImport("coredll.dll")]
 internal static extern void MessageBeep(MB type);
 internal enum MB
 {
   ICONHAND = 0x00000010,
   ICONQUESTION  = 0x00000020,
   ICONEXCLAMATION = 0x00000030,
   ICONASTERISK = 0x00000040,
 }

The code is already wrapped for C#. You then call a beep using

 MessageBeep(MB.ICONHAND);

Let us know, if that works for you.