Piotr Caban : ole32: Change DataObjectImpl_GetData return value to show more implementation problems.
Alexandre Julliard
julliard at winehq.org
Thu Sep 27 18:25:13 CDT 2018
Module: wine
Branch: master
Commit: 0196eee8a884f8293da250d1bfb418a69527ea2a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0196eee8a884f8293da250d1bfb418a69527ea2a
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Sep 26 14:52:35 2018 +0200
ole32: Change DataObjectImpl_GetData return value to show more implementation problems.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/tests/clipboard.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index ee8bbe9..dc3ce5a 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -267,7 +267,6 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor
{
DataObjectImpl *This = impl_from_IDataObject(iface);
UINT i;
- BOOL foundFormat = FALSE;
trace("getdata: %s\n", dump_fmtetc(pformatetc));
@@ -284,7 +283,6 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor
{
if(This->fmtetc[i].cfFormat == pformatetc->cfFormat)
{
- foundFormat = TRUE;
if(This->fmtetc[i].tymed & pformatetc->tymed)
{
pmedium->pUnkForRelease = (LPUNKNOWN)iface;
@@ -317,7 +315,7 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor
}
}
- return foundFormat ? DV_E_TYMED : DV_E_FORMATETC;
+ return E_FAIL;
}
static HRESULT WINAPI DataObjectImpl_GetDataHere(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium)
@@ -588,12 +586,12 @@ static void test_get_clipboard(void)
InitFormatEtc(fmtetc, CF_RIFF, TYMED_HGLOBAL);
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
- ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr);
+ todo_wine ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr);
if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_TEXT, TYMED_FILE);
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
- ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr);
+ todo_wine ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr);
if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
ok(DataObjectImpl_GetData_calls == 6, "DataObjectImpl_GetData should have been called 6 times instead of %d times\n", DataObjectImpl_GetData_calls);
@@ -880,7 +878,7 @@ static void test_complex_get_clipboard(void)
InitFormatEtc(fmtetc, CF_METAFILEPICT, TYMED_HGLOBAL);
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
- ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08x\n", hr);
+ todo_wine ok(hr == DV_E_TYMED, "IDataObject_GetData failed with error 0x%08x\n", hr);
if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
InitFormatEtc(fmtetc, CF_ENHMETAFILE, TYMED_HGLOBAL);
More information about the wine-cvs
mailing list