On 06/25/14 04:21, Shuai Meng wrote:
- hres = VariantChangeType(&dst, v, VARIANT_LOCALBOOL, VT_R8);
There's no need to pass VARIANT_LOCALBOOL flag here.
static HRESULT Global_Sgn(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) {
- FIXME("\n");
- return E_NOTIMPL;
- double v;
- HRESULT hres;
- TRACE("(%s)\n", debugstr_variant(arg));
- assert(args_cnt == 1);
- hres = to_double(arg, &v);
- if (FAILED(hres))
return S_OK;
- if(!res)
return DISP_E_BADVARTYPE;
This function should not return error if res is NULL. There's similar mistake in Abs implementation.
Cheers, Piotr
On 06/25/14 11:35, Piotr Caban wrote:
On 06/25/14 04:21, Shuai Meng wrote:
- hres = VariantChangeType(&dst, v, VARIANT_LOCALBOOL, VT_R8);
There's no need to pass VARIANT_LOCALBOOL flag here.
static HRESULT Global_Sgn(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) {
- FIXME("\n");
- return E_NOTIMPL;
- double v;
- HRESULT hres;
- TRACE("(%s)\n", debugstr_variant(arg));
- assert(args_cnt == 1);
- hres = to_double(arg, &v);
- if (FAILED(hres))
return S_OK;
I haven't seen it earlier, you should probably return hres here.
2014-06-25 17:37 GMT+08:00 Piotr Caban piotr.caban@gmail.com:
On 06/25/14 11:35, Piotr Caban wrote:
On 06/25/14 04:21, Shuai Meng wrote:
- hres = VariantChangeType(&dst, v, VARIANT_LOCALBOOL, VT_R8);
There's no need to pass VARIANT_LOCALBOOL flag here.
static HRESULT Global_Sgn(vbdisp_t *This, VARIANT *arg, unsigned
args_cnt, VARIANT *res) {
- FIXME("\n");
- return E_NOTIMPL;
- double v;
- HRESULT hres;
- TRACE("(%s)\n", debugstr_variant(arg));
- assert(args_cnt == 1);
- hres = to_double(arg, &v);
- if (FAILED(hres))
return S_OK;
I haven't seen it earlier, you should probably return hres here.
Yes, you are right, I made a mistake here. Thank you.