On 10/01/2009 12:27 AM, Ben Gordon wrote: Try something like:
#Now, the "cast" mod = gencache.GetModuleForTypelib(typelibB_CLSID,0x0,1,0) pB = mod.InterfaceB(pA)
> pB = mod.InterfaceB(pA.QueryInterface(IID_B, pythoncom.IID_IDispatch)) > "CastTo" fails because "The interface does not
appear in the same library as the object."
It might also be worth seeing if we can fix that somehow - eg, maybe an optional param allowing the interface and the object itself to be in those different typelibs.
Cheers, Mark _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32