I have known that a class like blow will auto implement IDispatch
interface:
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public class Test
{
}
Now my need is to override the Invoke
function, how can I do this?
Supplement:
I have a class Test
and then I want to make a wrapper to make the Test
seems has more function:
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
public class TestWrapper
{
public void NewFunc()
{
}
private Test _test;
}
I cannot make TestWrapper
to inherit from Test class, so I need override the IDispatch.GetIDsOfNames
to expose test's interface. How can I do this?