Microsoft® .NET Compact Framework (Core Reference)
by Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access