Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Register for COM interop disabled in VS 2008

126 views
Skip to first unread message

Timothy Dean

unread,
Nov 14, 2008, 11:07:35 AM11/14/08
to
When I create a new Class Library project in Visual Studio 2008, go in to
the project settings under build at the bottom, the "Register for COM
Interop" check box is disabled. If I go into Application settings, and
check the output type, it is Class Library. If I do the same thing in VS
2005, the "Register for COM Interop" check box is enabled. What am I
missing?

Can I create a C# COM server using the compact framework that I can call
from C++ through COM? Thanks.

Timothy Dean


Chris Tacke, eMVP

unread,
Nov 15, 2008, 5:10:25 PM11/15/08
to
EE hosting is not supported, so you cannot create a managed COM component
with the Compact Framework in any tool.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"Timothy Dean" <my_e...@this.com> wrote in message
news:eYAXYMnR...@TK2MSFTNGP02.phx.gbl...

Timothy Dean

unread,
Nov 17, 2008, 11:29:13 AM11/17/08
to
What is EE hosting? When I create a smart device project using VS 2005,
create a class library, and go to build settings, the "Register for COM
interop" is enabled. Any idea why? I have no problem creating a C++ COM
server that I can call from a C# smart device project. What I need to do
now is create a C# COM dll that I can call from C++ on the device. This is
not possible? Thanks.

Timothy Dean


"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:uwxtl72R...@TK2MSFTNGP03.phx.gbl...

Chris Tacke, eMVP

unread,
Nov 17, 2008, 11:43:56 AM11/17/08
to
EE Hosting is the ability of a native assembly to start up thge execution
ngine under which the managed component would run. This doesn't exist in
the CF and never has - it's one of the major limitations remaining.

Why you could select "register for COM interop" on device projects in VS '05
would simply be a bug. I guarantee that you never could actually have used
the generated object for COM.

Until the CF team sees fit to give us Hosting, this is just not a use case
that can be done. There's not even a hack or kludge to get it to work.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Timothy Dean" <my_e...@this.com> wrote in message

news:O%23tmdGNS...@TK2MSFTNGP05.phx.gbl...

Timothy Dean

unread,
Nov 18, 2008, 7:56:29 PM11/18/08
to
Wow, that is a limitation. I have a mobile application in C++ that supports
many barcode scanners. If I run into a manufacturer that only provides a
.NET API, I am in trouble, right? Any ideas on how to do that without COM?
That means you can't write an activeX control in .NET either, right?
Thanks.

Timothy Dean


"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message

news:%23q%23wbONS...@TK2MSFTNGP02.phx.gbl...

Chris Tacke, eMVP

unread,
Nov 18, 2008, 9:22:11 PM11/18/08
to
> That means you can't write an activeX control in .NET either, right?
> Thanks.

Correct. Native code in the CF simply cannot call into managed code unless
the managed code is in a process started by a managed application. So you
can pass a managed callback to a native DLL and it can make the call, or a
native app can post a message or queue an item and the managed side can get
it, but there is simply no way to host a managed assembly in a native app.

If an OEM provides a .NET-only API (unlikey I would suspect) you're probably
not sunk. There's no way they're writing a driver, and unlikely they're
doing any hardware access in native code (for the very same reason you can't
do this), so they'll likey have a native shim that they're calling in to.

0 new messages