ComObj - Calling a property setter via late binding or DispID may fail.
## Summary
Calling a property setter via late binding or DispID may fail for some properties. If you pass a Variant by reference or a Variant containing a Dispatch, the flag passed to IDispatch.Invoke changes from DISPATCH_PROPERTYPUT to DISPATCH_PROPERTYPUTREF. However, some property setters require DISPATCH_PROPERTYPUT. The solution is to pass the flag as the sum of these values.
## System Information
- **Operating system:** Windows
## Example Project
I've included an example that demonstrates this issue using MSXML.
[test.zip](/uploads/79f211b924d13b3f7bd81bc78f87724e/test.zip)
## Possible fixes
The solution is to pass flag as sum of DISPATCH_PROPERTYPUTREF and DISPATCH_PROPERTYPUT.
Patch attached.
[comobj_propsetfail.patch](/uploads/1cff8c90fcad2286801061b21e25a206/comobj_propsetfail.patch)
issue