Commit fae22c7c authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

packager: Implement IOleObject::Close.

parent 7c6899ba
......@@ -142,8 +142,14 @@ static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szCont
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
{
struct Package *This = impl_from_IOleObject(iface);
FIXME("(%p)->(0x%x)\n", This, dwSaveOption);
return E_NOTIMPL;
TRACE("(%p)->(0x%x)\n", This, dwSaveOption);
if(dwSaveOption == OLECLOSE_SAVEIFDIRTY ||
dwSaveOption == OLECLOSE_PROMPTSAVE)
WARN("Saving unsupported\n");
return S_OK;
}
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
......
......@@ -473,8 +473,24 @@ static void test_packager(void)
CloseHandle(file);
}
hr = IOleObject_Close(oleobj, OLECLOSE_NOSAVE);
ok(hr == S_OK, "Close failed: %08x\n", hr);
if(extended){
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(file != INVALID_HANDLE_VALUE, "Temporary file shouldn't be deleted\n");
CloseHandle(file);
}
IPersistStorage_Release(persist);
IOleObject_Release(oleobj);
if(extended){
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(file == INVALID_HANDLE_VALUE, "Temporary file should be deleted\n");
}
}
START_TEST(oleobj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment