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.
Asked
Active
Viewed 24 times
0
-
Does the device have a speaker? Does it play any sound when it boots or if there is an error? – josef Jun 16 '23 at 17:54
1 Answers
0
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.

josef
- 5,951
- 1
- 13
- 24