packager: Implement IOleObject::GetMiscStatus.

This commit is contained in:
Andrew Eikum 2014-06-18 14:57:45 -05:00 committed by Alexandre Julliard
parent 07e9d33f39
commit 04b6fc9d5e
2 changed files with 19 additions and 3 deletions

View File

@ -256,8 +256,15 @@ static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **pp
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
{
struct Package *This = impl_from_IOleObject(iface);
FIXME("(%p)->(%d, %p)\n", This, dwAspect, pdwStatus);
return E_NOTIMPL;
TRACE("(%p)->(%d, %p)\n", This, dwAspect, pdwStatus);
if(!pdwStatus)
return E_INVALIDARG;
*pdwStatus = OLEMISC_ONLYICONIC;
return S_OK;
}
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)

View File

@ -410,7 +410,7 @@ static void test_packager(void)
{
IOleObject *oleobj;
IPersistStorage *persist;
DWORD len, bytes_read;
DWORD len, bytes_read, status;
HRESULT hr;
HANDLE file;
WCHAR filename[MAX_PATH];
@ -441,6 +441,15 @@ static void test_packager(void)
hr = IOleObject_SetClientSite(oleobj, &clientsite);
ok(hr == S_OK, "SetClientSite failed: %08x\n", hr);
hr = IOleObject_GetMiscStatus(oleobj, DVASPECT_CONTENT, NULL);
ok(hr == E_INVALIDARG, "GetMiscStatus failed: %08x\n", hr);
hr = IOleObject_GetMiscStatus(oleobj, DVASPECT_CONTENT, &status);
ok(hr == S_OK, "GetMiscStatus failed: %08x\n", hr);
ok(status == OLEMISC_ONLYICONIC ||
status == OLEMISC_CANTLINKINSIDE /* winxp */,
"Got wrong DVASPECT_CONTENT status: 0x%x\n", status);
hr = IOleObject_QueryInterface(oleobj, &IID_IPersistStorage, (void**)&persist);
ok(hr == S_OK, "QueryInterface(IPersistStorage) failed: %08x\n", hr);