
.NET Compact Framework Differences
To call managed .NET Compact Framework functions from native code, you must first use the runtime to marshal a managed interface or a delegate down to native code. This means you must always start out in managed code (with a managed executable) in order to expose managed components to native code.
The following interoperability with native code is not supported by the .NET Compact Framework:
Using an assembly registration tool, such as Regasm.exe, for COM clients to use a managed component as a COM class.
Activating managed types from COM.
Hosting the runtime from native code.
Hosting ActiveX controls. The .NET Compact Framework does not support the AxHost class and you cannot use Microsoft Visual Studio 2005 and the designer to parent an ActiveX control to your managed form. However, given the COM interop support in .Net Compact Framework, the infrastructure exists to build your own ActiveX container host.
Initializing COM to use single-threaded apartments.
Auto generating class interfaces. You must wrap the functionality you’d like to expose to native code in an explicit interface.
Auto generating GUIDs. You must give each interface an explicit guid in order to expose it to native code.