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.
This commit is contained in:
Robert Shearman 2006-07-28 01:25:23 +01:00 committed by Alexandre Julliard
parent e0e7d96ee6
commit 9648b824a1

View File

@ -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)