In the original source code of BOCOLE there is a bug that remains to the current OWLNext version of BOCOLE. In the source "bolepict.cpp (sourceforge.net)", in function member BOlePicture::Invoke:
if ( !(wFlags & DISPATCH_PROPERTYGET|DISPATCH_PROPERTYPUT))
return ResultFromScode(E_INVALIDARG);
This will evaluate first wFlags & DISPATCH_PROPERTYGET and the result will be logically or'ed with DISPATCH_PROPERTYPUT (which has the value 0x4, see "...\include\windows\rtl\sysvari.h"). So this sub-expression will always be true (and later will be logically negated).
The correct expression is:
if ( !(wFlags & (DISPATCH_PROPERTYGET|DISPATCH_PROPERTYPUT)))
return ResultFromScode(E_INVALIDARG);
Further info: https://docs.microsoft.com/en-us/cpp/c-language/precedence-and-order-of-evaluation?view=msvc-160
Bugs: #501
Feature Requests: #184
Wiki: OWLNext_Roadmap_and_Prereleases
Good catch!
Diff:
Added link to the source code.
Last edit: Vidar Hasfjord 2021-06-25
This issue was fixed in [r5531] on the 6.44 branch.
TODO: This fix should be merged to the trunk and to the 7.0 branch, as well. Then post a comment here, documenting the completion of the fix, and set the ticket status to "pending" for review and release.
Related
Commit: [r5531]
This fix has now been merged to the trunk in [r5581] and temporarily undone on the 6.44 branch [r5584]. When the current work on BOCOLE is complete, the fix should be merged to the relevant supported release branches (currently 6.44 and 7.0), and this ticket status should be set to "pending" for review and release.
Related
Commit: [r5581]
Commit: [r5584]