ole32: fix return value for IDataObject_GetData
Nikolay Sivov
bunglehead at gmail.com
Sat Dec 20 03:53:09 CST 2008
This fixes remaining todo test in ole32:clipboard
Changelog:
- Fix return value for IDataObject_GetData
>From 3afe7e8f586c1c6902e4fac94fc395cf746b97bc Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sat, 20 Dec 2008 12:43:36 +0300
Subject: Fix return value for IDataObject_GetData
---
dlls/ole32/clipboard.c | 3 ++-
dlls/ole32/tests/clipboard.c | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 762afc7..9b290bb 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -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;
/*
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index 7e3809e..8445f8b 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -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)
{
--
1.4.4.4
More information about the wine-patches
mailing list