Passing COM IDispatch from C to PythonCOM

Steve Holden sholden at holdenweb.com
Wed Nov 27 15:52:41 EST 2002


"Jon Redgrave" <jredgrave at capisco.com> wrote in message
news:mu9F9.205$bV3.31 at news-binary.blueyonder.co.uk...
> I have a C program that has an IDispatch pointer to a COM object.
> I want to run an embedded python script that uses this IDispatch pointer
> (using Mark Hammond's excellent win32all), but do not know how to pass it
to
> the script.
>
> PythonCOM appears to wrap IDispatch's in PyIDispatch object, How do I wrap
> it, or can I somehow pass it another way (as an int??) and wrap it in
> Python?
>
> Many thanks for your help
>

Well, you could use win32com.server.util.wrap(), I suppose?

regards
-----------------------------------------------------------------------
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Previous .sig file retired to                    www.homeforoldsigs.com
-----------------------------------------------------------------------






More information about the Python-list mailing list