title: C# COM Class - DISP_E_UNKNOWNNAME
body: <p>I have declared a COM visible class in C#. The code is as follows:</p>
  
  <pre><code>[ComVisible(true)]
  public class AComVisibleClass : TheParentClass
  {
      public bool SomeFunc(string id)
      {
          return true;
      }
  
  }
  </code></pre>
  
  <p>This class is instantiated by a factory class, also COM accessible.</p>
  
  <p>But if I try to access in a VB script file, a <code>DISP_E_UNKNOWNNAME</code> exception is thrown.</p>
  
  <p>This is a new class on a pre-existent library we have here at work. All other classes are accessible through COM. The whole library is compiled into a single assembly file. I have registered the new assembly using <code>regasm</code>, but I still get this exception.</p>
  
  <p>I've tried to debug the COM call using VS2008. The factory class seems to be able to instantiate the <code>AComVisibleClass</code>. The aforementioned exception is thrown only when the factory tries to execute <code>SomeFunc</code>.</p>
  
  <p>I know this may sound a little(?) bit vague, but I cannot expose the real code here. If someone need more information, please ask me.</p>