tags:

views:

94

answers:

1

How would one pass a C# object via com? For example, say I have the following in a c# dll which is registered in the GAC and registry:

 public int Add(int a, int b)
    {
        return a + b;
    }

public int Add(NumberObject obj)
    {
        return obj.firstNumber + obj.SecondNumber;
    }

How is it possible to make the NumberObject comvisible so that the client, who is going to use this, can set its values? A c++ example would be great, is it even possible? Or are only native types like int, string etc passable by COM?

+2  A: 

a good tutorial.

tster
THanks, I couldn't find this by googling, maybe I was looking for the wrong thing.
David
FYI, my google search: http://www.google.com/search?q=C%23+make+object+COM+visible
tster