pywin32 access to non-IDispatch interface under pywin.mfc.activex?

David Bolen db3l at fitlinxx.com
Tue Mar 9 01:18:51 CET 2004


I was wondering if anyone else has ever had a need or been able to retrieve
some interface other than IDispatch from a COM control hosted with the
pywin.mfc.activex support from the pywin32 package?

I'm working with an embedded IE browser under Windows (using wxPython,
which wraps it using pywin.mfc.activex), and somehow I need to work my
way over to the IOleInPlaceActiveObject interface.  I can issue the
QueryInterface on the underlying object but it will only let me query
for IUnknown.

The wxPython wrapper uses the generated CoClass from win32com.client's
gen_py file as part of the wrapper, so I'm guessing that I may already
have a problem since the wrapper itself has instantiated an IDispatch
version of the object.  I guess I was hoping that it would be the same
underlying object and that using the IUnknown interface I could
QueryInterface my way to the other interface, but it doesn't seem to
work.

Any suggestions or pointers to get me moving in the right direction
would be much appreciated.

-- David



More information about the Python-list mailing list