On 04/28/14 17:26, Shuai Meng wrote:
<mailto:jacek@codeweavers.com>>:
������ ������ Hi Shuai,
������ ������ On 04/21/14 03:45, Shuai Meng wrote:
������ ������ ������> -
������ ������ ������> - ������ ������return return_bool(res, val);
������ ������ ������> + ������ ������V_VT(res) = VT_EMPTY;
������ ������ ������> + ������ ������return VariantChangeType(res, arg, VARIANT_LOCALBOOL, VT_BOOL);
������ ������ You can't assume that res is not NULL. If result of the function is not
������ ������ used, it will be NULL. A simple test case is like this:
������ ������ call CBool(0)
������ ������ Also, are you sure we want VARIANT_LOCALBOOL here? Did you test it
������ ������ (probably by running tests on localized Windows with translated string
������ ������ "False")?
������ I don't quite understand what this parameter means, in fact I just
copy it from to_string(). If not VARIANT_LOCALBOOL, waht esle should be
filled here?
I've checked what happens on non-english locale and CStr(True) = "True". So the flag is used incorrectly in CStr implementation. CBool is also failing when localized string is passed.
You can use 0 as flag in VariantChangeType.