ole32: Fix return value for IDataObject_GetData.

This commit is contained in:
Nikolay Sivov 2008-12-20 12:43:36 +03:00 committed by Alexandre Julliard
parent 0b3b6e67ea
commit 55658d061c
2 changed files with 3 additions and 3 deletions

View File

@ -1246,7 +1246,8 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_GetData(
}
if ( pformatetcIn->lindex != -1 )
return DV_E_LINDEX;
return DV_E_FORMATETC;
if ( (pformatetcIn->tymed & TYMED_HGLOBAL) != TYMED_HGLOBAL )
return DV_E_TYMED;
/*

View File

@ -200,7 +200,7 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor
DataObjectImpl_GetData_calls++;
if(pformatetc->lindex != -1)
return DV_E_LINDEX;
return DV_E_FORMATETC;
if(!(pformatetc->tymed & TYMED_HGLOBAL))
return DV_E_TYMED;
@ -400,7 +400,6 @@ static void test_get_clipboard(void)
InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL);
fmtetc.lindex = 256;
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
todo_wine
ok(hr == DV_E_FORMATETC || broken(hr == S_OK), "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr);
if (hr == S_OK)
{