[python-win32] How to get IWebBrowser2 from a HWND
Mark Hammond
mhammond at skippinet.com.au
Fri Jul 11 08:53:04 CEST 2008
> # ... and the IWebBrowser2:
> ie = pIServiceProvider.QueryService(IWebBrowserApp._iid_,
> IWebBrowser2._iid_)
>
> # which - of course - fails.
>
>
> Error returned:
> Traceback (most recent call last):
> File "<interactive input>", line 1, in <module>
> COMError: (-2147467262, 'No such interface supported', (None, None,
> None, 0, None))
Its possible that you could specify IDispatch as the second IID, then wrap
the resulting object using win32com.client.Dispatch() (or the equivalent
using ctypes).
Cheers,
Mark
More information about the python-win32
mailing list