O'Reilly logo

Microsoft® .NET Compact Framework (Core Reference) by Mark Sutton, Rory MacLoed, Robert Burbidge, Stephen Wheelwright, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calling the Windows CE API

To call functions in the Windows CE API, you use the same P/Invoke mechanisms as have been discussed thus far. The key difference is that the Windows CE API is packaged in prewritten DLL files, rather than custom files created using tools such as eMbedded Visual C++.

The following example shows how a simple Windows CE API call can be made from managed code. The MessageBeep API function accepts a single 32-bit integer (for our purposes, this value can always be zero) and returns no value to the caller. As the name suggests, it sounds a short beep using the Windows CE sound system. This API function is found in the coredll.dll library.

Tip

Much of the Windows CE API is found in the coredll.dll library. Developers who are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required