TlbImp2: Why are TypeLibs generated from .NET Dlls blocked?

Nov 4, 2009 at 2:27 PM

The Application I'm currently working on is basically a .NET Application acting as an COM EXE-Server (localserver32) which exposes its Object Model and an ActiveX-Control to COM. The Exe is written in ATL and implements the Application Class of the Object Model (The Exe don't really do much, it is basically a loader for the much larger .NET part). The rest of the Object Model is implemented in a seperate c# DLL which is COM-Visible and its TypeLib is generated by tlbexp (and registered together with the Exe, not with regasm).

Everything works fine in Access or VB6, but tlbimp.exe and TlbImp2.exe don't allow the creation of interop DLLs from a TypeLibs generated from a c# DLLs. So the Object Model could not be used in an .NET App.

It doesn't make sense to use a TypeLib from a .NET DLL in an in-process scenario, but in an out-of-process scenario it is the only way.

Is there an other way to solve this problem?