One customer wants to consume our .NET DLLs from VB6. They are designed to support reverse interop and all works fine... except: There are two separate VB6 programs in two different directories. It seems it's necessary to do one of:
- Copy the .NET DLL into both directories, or
- Install the .NET DLL in the GAC
This is the customer's observation and also supported by the RegAsm documentation:
After registering an assembly using Regasm.exe, you can install it in the global assembly cache so that it can be activated from any COM client. If the assembly is only going to be activated by a single application, you can place it in that application's directory.
I'm confused on this point.
First point of confusion:
As far as I understand, the COM runtime locates the DLL using the Prog ID / Class ID. When I look in the registry at the Class ID entry, I see the full path to the .NET DLL in the CodeBase key. Why is it that a COM program using the Prog ID / Class ID doesn't locate the .NET DLL using the CodeBase?
Second point of confusion:
The GAC is specific to .NET. How is it involved in resolving COM references?