David
David

Reputation: 2243

How would you pass an C# object via com?

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?

Upvotes: 0

Views: 286

Answers (1)

tster
tster

Reputation: 18257

a good tutorial.

Upvotes: 2

Related Questions