ole32: Return OLE_E_NOTRUNNING on a cache-miss when the object isn't running.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4fcc5fec57
commit
e4ec89f2b0
|
@ -1021,8 +1021,17 @@ static HRESULT WINAPI DefaultHandler_GetData(
|
|||
|
||||
IDataObject_Release(cacheDataObject);
|
||||
|
||||
if (FAILED(hres) && object_is_running( This ))
|
||||
if (hres == S_OK) return hres;
|
||||
|
||||
if (object_is_running( This ))
|
||||
{
|
||||
hres = IDataObject_GetData(This->pDataDelegate, pformatetcIn, pmedium);
|
||||
if (hres == S_OK) return hres;
|
||||
}
|
||||
|
||||
/* Query running state again, as the object may have closed during _GetData call */
|
||||
if (!object_is_running( This ))
|
||||
hres = OLE_E_NOTRUNNING;
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
@ -1067,8 +1076,17 @@ static HRESULT WINAPI DefaultHandler_QueryGetData(
|
|||
|
||||
IDataObject_Release(cacheDataObject);
|
||||
|
||||
if (FAILED(hres) && object_is_running( This ))
|
||||
if (hres == S_OK) return hres;
|
||||
|
||||
if (object_is_running( This ))
|
||||
{
|
||||
hres = IDataObject_QueryGetData(This->pDataDelegate, pformatetc);
|
||||
if (hres == S_OK) return hres;
|
||||
}
|
||||
|
||||
/* Query running state again, as the object may have closed during _QueryGetData call */
|
||||
if (!object_is_running( This ))
|
||||
hres = OLE_E_NOTRUNNING;
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
|
|
@ -1933,7 +1933,6 @@ static void test_default_handler(void)
|
|||
fmtetc.lindex = -1;
|
||||
fmtetc.tymed = TYMED_ENHMF;
|
||||
hr = IDataObject_QueryGetData(pDataObject, &fmtetc);
|
||||
todo_wine
|
||||
ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr);
|
||||
|
||||
fmtetc.cfFormat = CF_TEXT;
|
||||
|
@ -1942,7 +1941,6 @@ static void test_default_handler(void)
|
|||
fmtetc.lindex = -1;
|
||||
fmtetc.tymed = TYMED_NULL;
|
||||
hr = IDataObject_QueryGetData(pDataObject, &fmtetc);
|
||||
todo_wine
|
||||
ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr);
|
||||
|
||||
hr = IOleObject_QueryInterface(pObject, &IID_IRunnableObject, (void **)&pRunnableObject);
|
||||
|
|
Loading…
Reference in New Issue