Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use COM visible .NET classes with registration free COM?

We're developing a ClickOnce application with a mixture of .NET components and legacy C++ COM components.

Currently we're adding the C++ COM components to the user's machine using an MSI (this is a prerequisite to installing our ClickOnce app) which means we can register the COM objects on the user's machine beforehand.

We can still push out updates to the rest of the application written in C# via ClickOnce, but updating the components installed by the MSI requires manual intervention.

However, we are trying to figure out if it is possible to install the C++ COM components via registration free COM, i.e. they're all in the same directory, and each component has a manifest file specifying the clsid for each COM object and interface. This would mean we can get rid of the MSI entirely.

This link has been a good introduction to the topic.

I've been able to get a .NET component to load a C++ COM object, but not the other way around.

Does anyone know if this is possible?

like image 931
John Sibly Avatar asked Feb 10 '10 16:02

John Sibly


1 Answers

Yes, that's possible. You'll need to use the <clrClass> element in the manifest. There's a decent how-to located here. The SDK docs are otherwise pretty miserable, you'll need Junfeng Zhang's blog to get better background info.

like image 130
Hans Passant Avatar answered Oct 04 '22 20:10

Hans Passant