Where can I find the list of interfaces supported

2019-10-06 08:35发布

Where can I find the list of interfaces supported by the WPF WebBrowser.Document (namespace system.windows.controls) from C#?

Moreover, where can I find the official documentation from Microsoft web site? The document from MS http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.document%28v=vs.110%29.aspx only state this:

Remarks

The Document object needs to be cast to the COM interface you are expecting.

But I cannot find the list of interfaces that I can expect from this object.

2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-10-06 08:52

You can try invoking wb.Document.GetType().GUID on the .NET RCW object and see if it's of an expected COM coclass. You can also try wb.Document.GetType().GetInterfaces().

This might work for HTML, Office and any other component with a type library, but it might not work for objects that don't provide type information, such as C++ components that are not implemented on top of a type library, i.e. they use pre-compiled standard marshaling instead.

查看更多
地球回转人心会变
3楼-- · 2019-10-06 08:59

You can include an reference to Microsoft.mshtml to your project.

Then you can use the mshtml namespace with the interfaces IHTMLDocument, IHTMLDocument or IHTMLDocument[2...5]. Dont know why there are so many.

They all are implemented by the HTMLDocumentClass. You can get additional info here.

查看更多
登录 后发表回答