Commit 9648b824 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

oleaut32: Implement setting of the hPal property in IPictureDisp::Invoke.

Remove some validation code that is already handled by a more generic case at the end of the function.
parent e0e7d96e
......@@ -2084,11 +2084,6 @@ static HRESULT WINAPI OLEPictureImpl_Invoke(
return DISP_E_BADPARAMCOUNT;
}
}
else
{
ERR("one of DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT must be specified\n");
return DISP_E_MEMBERNOTFOUND;
}
switch (dispIdMember)
{
......@@ -2107,6 +2102,22 @@ static HRESULT WINAPI OLEPictureImpl_Invoke(
V_VT(pVarResult) = VT_I4;
return IPicture_get_hPal((IPicture *)&This->lpVtbl, &V_UINT(pVarResult));
}
else if (wFlags & DISPATCH_PROPERTYPUT)
{
VARIANTARG vararg;
HRESULT hr;
TRACE("DISPID_PICT_HPAL\n");
VariantInit(&vararg);
hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_I4);
if (FAILED(hr))
return hr;
hr = IPicture_set_hPal((IPicture *)&This->lpVtbl, V_I4(&vararg));
VariantClear(&vararg);
return hr;
}
break;
case DISPID_PICT_TYPE:
if (wFlags & DISPATCH_PROPERTYGET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment