Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

beep in WinCE , it possible ?

is it possible to make beep in WinCE ?

i try and i get an error

like image 817
Gold Avatar asked Jan 24 '09 16:01

Gold


1 Answers

The .net framework methods for beeing are not available in the CF version of the framework. The best way to get a beep sound is to PInvoke into the MessageBeep function. The PInvoke signature for this method is pretty straight forward

[DllImport("CoreDll.dll")]
public static extern void MessageBeep(int code);

public static void MessageBeep() {
  MessageBeep(-1);  // Default beep code is -1
}

This blog post has an excellent more thorough example: http://blog.digitforge.com/?p=4 (on archive.org)

like image 86
JaredPar Avatar answered Sep 23 '22 07:09

JaredPar