On 11/01/2009 5:34 PM, Ben Gordon wrote:
Mark,

MH> pB = mod.InterfaceB(pA.QueryInterface(IID_B, pythoncom.IID_IDispatch))

Thanks so much for the suggestion. I tried it, but it appears that pA
does not provide a QueryInterface method.

oops - try pA._oleobj_.QueryInterface(...)

I'm not sure what magic is involved behind the scenes, but this type of
cast seems to be comparatively convenient and nearly transparent in
VBA/VB (VB requires an explicit CType call), without the need to lookup
CLSIDs/IIDs.

Yeah - its a little tricky to make it seamless in Python, but the code to CastTo isn't *that* long or hairy, so it should be possible to see what is happening and why.

Cheers,

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

Reply via email to