title: How Does a COM Program Locate a .NET DLL Registered for COM Interop?
body: <p>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:</p>
  
  <ol>
  <li>Copy the .NET DLL into both directories, or</li>
  <li>Install the .NET DLL in the GAC</li>
  </ol>
  
  <p>This is the customer's observation and also supported by the <a href="http://msdn.microsoft.com/en-us/library/tzat5yw6(VS.80).aspx" rel="noreferrer">RegAsm documentation</a>:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>I'm confused on this point.</p>
  
  <p>First point of confusion:</p>
  
  <p>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?</p>
  
  <p>Second point of confusion:</p>
  
  <p>The GAC is specific to .NET.  How is it involved in resolving COM references?</p>