Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Mixed Inheritance and LoadTypeLib()...

Hey all,

I have a set of .NET objects that derive from COM objects
using .NET Interop mixed inheritance. These objects need
to be loaded dynamically at runtime in two different applications, one is a .NET app and the other is a native C++ app.

Now, here's where it gets interesting. In the native app,
I only need access to the unmanaged interfaces in each object  and I can't use the CLR.  What I would like to do is be able to do is treat the .NET assemblies as native dlls so I only have to create one dll per object. Right now I have two dll's per object one that's a managed assembly and one that's a native COM dll.  I was forced to do this because when I tried to do the usual LoadTypeLib routine on the .NET assemblies in native C++, it wouldn't load them.

I know someone makes a product that allows you to treat
a .NET assembly like a COM dll but I forgot their name.

Any suggestions?

Thanks

btag
Wednesday, January 21, 2004

"I know someone makes a product that allows you to treat
a .NET assembly like a COM dll but I forgot their name."

The company is called Microsoft. You decorate the class with [ComVisible(true)], then after it's built, register it (Visual Studio can do it as a part of your build).

Brad Wilson (dotnetguy.techieswithcats.com)
Wednesday, January 21, 2004

oooooo, *burn*!


Friday, January 23, 2004

*  Recent Topics

*  Fog Creek Home