shell32: Do not interpret the direction in IDataObject::EnumFormatEtc().
This commit is contained in:
parent
b6128bbb51
commit
0344f3aa85
2 changed files with 7 additions and 16 deletions
|
@ -368,21 +368,15 @@ static HRESULT WINAPI IDataObject_fnSetData(IDataObject *iface, LPFORMATETC pfor
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDataObject_fnEnumFormatEtc(IDataObject *iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
|
||||
static HRESULT WINAPI IDataObject_fnEnumFormatEtc(IDataObject *iface, DWORD direction, IEnumFORMATETC **out)
|
||||
{
|
||||
IDataObjectImpl *This = impl_from_IDataObject(iface);
|
||||
IDataObjectImpl *obj = impl_from_IDataObject(iface);
|
||||
|
||||
TRACE("(%p)->()\n", This);
|
||||
*ppenumFormatEtc=NULL;
|
||||
TRACE("iface %p, direction %#lx, out %p.\n", iface, direction, out);
|
||||
|
||||
/* only get data */
|
||||
if (DATADIR_GET == dwDirection)
|
||||
{
|
||||
*ppenumFormatEtc = IEnumFORMATETC_Constructor(MAX_FORMATS, This->pFormatEtc);
|
||||
return (*ppenumFormatEtc) ? S_OK : E_FAIL;
|
||||
}
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (!(*out = IEnumFORMATETC_Constructor(MAX_FORMATS, obj->pFormatEtc)))
|
||||
return E_OUTOFMEMORY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDataObject_fnDAdvise(IDataObject *iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
||||
|
|
|
@ -5478,10 +5478,7 @@ static void test_DataObject(void)
|
|||
for (unsigned int i = 0; i < ARRAY_SIZE(enum_directions); ++i)
|
||||
{
|
||||
hr = IDataObject_EnumFormatEtc(data_obj, enum_directions[i], &enum_format);
|
||||
todo_wine_if (enum_directions[i] == DATADIR_SET)
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
if (hr != S_OK)
|
||||
continue;
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
memset(&fmt, 0xcc, sizeof(fmt));
|
||||
hr = IEnumFORMATETC_Next(enum_format, 1, &fmt, NULL);
|
||||
|
|
Loading…
Add table
Reference in a new issue