Convert PyIDispatch object to struct IDispatch*

Huayang Xia huayang.xia at
Fri Apr 11 15:37:23 CEST 2008

On Apr 11, 12:15 am, "Gabriel Genellina" <gagsl-... at>
> En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia <huayang.... at>
> escribió:
> > I am trying to use ctypes to call dll functions. One of the functions
> > requires argument "struct IDispatch* ". I do have a PyIDispatch object
> > in python. How can I convert this "PyIDispatch object" to "struct
> > IDispatch* "?
> I think a PyIDispatch object is an IDispatch* itself.
> But you'll get better answers from the python-win32 list:
> --
> Gabriel Genellina

Thanks for the info.

To call a dll function, it needs a C style IDispatch*. PyIDispatch is
a python wrapped one. I found a reference from:

which shows how to convert C style to python style. Unfortunately i
need the reversed version.

I will post the question to python-win32.

More information about the Python-list mailing list