Hi Mark, Tim,
thanks for the prompt responses.

Tim,
  the code you suggest does not help me in this context, as it is not able to 
'see' the HWND of the modal popup as an IE (ShellWindow) one. In fact, that 
code is only able to get the main IE app window.

Mark,
  I tried what you suggest, two ways (following my previous code):

pIServiceProvider.QueryService(IWebBrowserApp._iid_, 
GUID(pythoncom.IID_IDispatch))

win32com.client.Dispatch(pIServiceProvider.QueryService(IWebBrowserApp._iid_, 
GUID(pythoncom.IID_IDispatch)))

  Still I get the 'No such interface supported'.

Now, I start to think that somehow I am not (in the class structure) in the 
place I think I am, but I am not too sure of how to know that. Will the 'type' 
on an object be reliable in these cases? Or will it just reflect what the 
variable has been defined as (which would be my guess)?

In other words, how will I be able to debug this?

I am somehow new to both python and COM, so sorry if some questions will be 
silly...


thanks a lot!
.salvo



--- Gio 10/7/08, Mark Hammond <[EMAIL PROTECTED]> ha scritto:

> Da: Mark Hammond <[EMAIL PROTECTED]>
> Oggetto: RE: [python-win32] How to get IWebBrowser2 from a HWND
> A: "'salvatore ventura'" <[EMAIL PROTECTED]>, python-win32@python.org
> Data: Giovedì 10 luglio 2008, 23:53
> > # ... 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
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to