Hi Dmitry,
On 09/02/15 07:44, Dmitry Timoshkov wrote:
- if (member == DISPID_HTTPREQUEST_OPTION)
Why can't we use standard, ITypeInfo-based implementation here?
- {
VARIANT ret_value, option;
UINT err_pos;
if (!result) result = &ret_value;
if (!arg_err) arg_err = &err_pos;
VariantInit( &option );
VariantInit( result );
if (flags == DISPATCH_PROPERTYPUT)
{
hr = DispGetParam( params, 0, VT_I4, &option, arg_err );
if (FAILED(hr)) return hr;
hr = IWinHttpRequest_put_Option( &request->IWinHttpRequest_iface, V_I4( &option ), params->rgvarg[0] );
if (FAILED(hr))
WARN("put_Option(%d) failed: %x\n", V_I4( &option ), hr);
return hr;
}
else if (flags & (DISPATCH_PROPERTYGET | DISPATCH_METHOD))
{
hr = DispGetParam( params, 0, VT_I4, &option, arg_err );
if (FAILED(hr)) return hr;
hr = IWinHttpRequest_get_Option( &request->IWinHttpRequest_iface, V_I4( &option ), result );
if (FAILED(hr))
WARN("get_Option(%d) failed: %x\n", V_I4( &option ), hr);
return hr;
}
return S_OK;
I don't think silently returning S_OK is right for not handled flags.
Thanks, Jacek