[python-win32] Re: Utilizing a raw IDispatch Pointer from Python

Roger Upole rwupole at msn.com
Wed Aug 1 02:38:48 CEST 2007


Brad Johnson wrote:
>I have a C++ application that creates a collection of COM objects. I am
> embedding a Python interpreter that will have access to Automation objects
> written in C++.
> 
> I would like to give the Python interpreter access to the IDispatch interface on
> these objects.
> 
> Stated another way, how can I have Python consume a IDispatch pointer from C++
> and wrap it with one of those nice Python classes (IPyDispatch?) automatically?
> 
> Thanks in advance.


PyCom_PyObjectFromIUnknown can be used to wrap an IDispatch pointer in a
PyIDispatch object.

        Roger






More information about the Python-win32 mailing list