I have an application written in C++ and MFC (VS 2008 SP1) which is running on Windows Mobile 6.1. Now I need to integrate functionalities into this application which is only available through a .NET library from a third-party supplier.
My idea was to create my own wrapper/facade .NET assembly around this .NET library which exposes the functions I need for my project and to make this assembly COM-visible for my C++/MFC project.
When setting up a project in VS 2008 for this wrapper library (C#, "Smart Device" project type, type "class library", target framework .NET 2.0 (or 3.5), target platform "Windows Mobile 6 Professional SDK") I noticed that the options in the project properties to make the assembly COM-visible and to register for COM-Interop are disabled (grayed out in the dialog masks in VS).
(When I create a "normal" (not for Smart Device) class library project for framework 2.0 the options are available.)
Questions:
Thank you very much for help in advance!
You cannot create a managed COM object in the CF because Hosting is not supported.
The only way to call into managed code from native (aside from callbacks, etc initiated from the managed side) is to create a separate managed executable running in its own process and use IPC.