views:

152

answers:

2

I basically need to expose a C API from a .NET assembly. On the PC, I can use C++/CLI and that works perfectly for what I need. On Windows CE, however, it doesn't look like C++/CLI is supported. Is there any way to do this?

+3  A: 

You can't do it. What is required is called "EE Hosting" meaning that native code must be able to spin up and host the managed execution engine inside the DLL. The Compact Framework doesn't support this. There is no backdoor workaround for it either.

ctacke
Yikes, that's bad news. Do you know of somewhere (MSDN or elsewhere) that makes this clear? Not that I don't believe you, I'm just going to need to ammo to go back to my boss with...
Jason
I also know for a fact they're not there and I've argued with the CF team management specifically about it on many occasions. There's no definitive "it's not there" declaration that I can find, but the fact that there is no definition for any of the CLR Hosting APIs (http://msdn.microsoft.com/en-us/magazine/cc163567.aspx) for the CF is indicative.
ctacke
A: 

Refer this page: http://msdn.microsoft.com/en-us/library/aa446497.aspx is says "Unlike in the full .NET Framework, the .Net Compact Framework 2.0 does not support hosting the runtime from native code."

Mahantesh