Tom Hyland wrote:

> I am having a problem invoking static methods on a .NET class via COM.

I can't answer the question, but I thought I would suggest how I do
this.  In order to alleviate all that hideous goo you need to invoke a
static member, I create wrappers that delegate, like so:

[ComVisible(false)]
public class MyClass
{
   public static void MyMethod() {}
}

[ComVisible(true)]
[Guid(?)]
[ProgId(?)]
public class MyClassComWrapper
{
   public MyClassComWrapper() {}

   public void MyMethod()
   {
      return MyClass.MyMethod
   }
}



I think this is much easier, but there's probably a reason you need to
do things the other way.


--
Steve Johnson

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to