Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Although the Compact Framework contains a rich set of support classes, you can not accomplish everything in managed code that you can in native code. There are times when you will need to step outside the Compact Framework and call existing APIs or access some pre-existing library.
Features that are not Exposed to Managed APIs
The following functionality can only be programmatically accessed via native code.
Feature | Scenario | Description |
---|---|---|
GDI Graphics |
Working with sprites. |
In the .NET Compact Framework, the Graphics object is a wrapper around the GDI+ API, and it does not wrap the particular DrawImage overloads that handle composing an image with a real Alpha Channel (for Partial Transparency) onto an underlying image. |
Menu Extensibility |
Adding custom context menus. |
It is currently not possible to add custom menus to the Pocket Outlook applications using managed code. |
Ink |
Collecting user input in the form of electronic ink. |
There is no support for the Ink controls as part of the .NET Compact Framework; however the third-party OpenCF.org library does include a wrapper. |
Sound |
Playing back sound files. |
The .NET Compact Framework does not include media playback features in its current release. To replay sound, it is necessary to write a wrapper for the native PlaySound API. |
Today/Home Screen |
Creating a custom Today or Home screen component requires native code to create the necessary plug-in. |
Although native code is required, it is possible to call into
managed code to perform specific actions. Although technically
possible, this is not the recommend way to create Today screen
plug-ins. Nevertheless, the dedicated will find the following topic
helpful:
|
Messaging |
Advanced features. |
CEMAPI interfaces do not implement QueryInterface, which means you can not call native methods by using PInvoke. This will limit the development of advanced features such as custom transports. |
GPS |
Determining device location. |
Although the .NET Compact Framework does not include specific support for GPS, sample code is provided as part of the SDK for using GPS data in your managed applications. For more information, see Using the GPS Intermediate Driver from Managed Code. |
Limitations and Constraints
This section details some of the caveats associated with managed code development.
Database Applications
When developing a database application in native code,
you have access to the onboard EDB database via the EDB APIs. For
more information, see
EDB
Reference. When developing a database application in managed
code though, you must use an alternate set of database APIs—the
SQL Server 2005 Compact Edition is a lightweight
version of