OSDN Git Service

Mostly for Powerpoint: monkey patch comtypes.automation.VARIANT so that fetching...
authorMichael Curran <mick@kulgan.net>
Thu, 10 Jan 2013 05:08:24 +0000 (15:08 +1000)
committerMichael Curran <mick@kulgan.net>
Thu, 10 Jan 2013 05:08:24 +0000 (15:08 +1000)
commit8984f3549be7dc56ca3b2f89cf7370341107f1bf
treed6b25f05d62fd5a69822886f8acdaca8792f5807
parenta17a221f548ae99296613f731440e4ba1526e861
Mostly for Powerpoint: monkey patch comtypes.automation.VARIANT so that fetching its value when its a VT_DISPATCH does not use GetBestInterface, rather just dynamic.Dispatch. Variants already got some support for dynamic, but its currently not used for IDispatch_Invoke on comtypes COM server COM objects, which is annoying for PowerPoint. If we were to change comtypes, we could keep this change specifically inside IDispatch_Invoke for COM servers, but monky patching this is not as easy. If we see any regressions from this change, we can either: manually QueryInterface to a suitable interface where needed, or try again at monkey patching further, or of course, patch comtypes itself.
source/comtypesMonkeyPatches.py