> Brad Johnson <Brad.Johnson <at> ballardtech.com> writes:
> 
> I have successfully used the PyCom_PyObjectFromIUnknown function to get
> a
> PyIDispatch object from a raw IDispatch pointer.
> 
> My next goal is to get an early bound class instance from that pointer
> (using a
> class generated from makepy).

Just pass the Dispatch wrapper to gencache.EnsureDispatch() - it will run
makepy and turn your object into a Dispatch backed by the makepy file.  Note
however that this relies on the IDispatch pointer providing type-info which
identifies it - if it doesn't then somehow your code needs to know the
typelib ID and jump through some extra hoops.

Cheers,

Mark

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to