Hi,
Can't find the library which contains IDispatchEx interface. I want to implement this interface, but can't find it. Does anyone knows where it is?
Thanks, Paul.
Hi,
Can't find the library which contains IDispatchEx interface. I want to implement this interface, but can't find it. Does anyone knows where it is?
Thanks, Paul.
What exactly do you want to do? Is this for use inside C#? Or from outside (COM)?
If you just want browser support, then perhaps host in WebBrowser
and set the ObjectForScripting
.
You can sort of add methods to a type in C# 3.0 with extension methods:
public static void Bar(this Foo foo, int someArg) {...}
....
Foo foo = ...
foo.Bar(123);
But this is still static-typed. C# 4.0 introduces dynamic
for true dynamic objects inside the CLR/DLR, but you'd implement IDynamicObject
. And it isn't trivial.
If you want to write a managed class that implements the IDispatchEx interface you will first need to define this interface because it does not exist in .NET. Here's a link to its definition. IMHO implementing this interface won't be a trivial task.