OSDN Git Service
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.