wmp: Return success in IPersistStreamInit::InitNew.
This commit is contained in:
parent
2b04a5e3ff
commit
b0f4ed187b
|
@ -744,8 +744,15 @@ static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface,
|
|||
static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
|
||||
{
|
||||
WindowsMediaPlayer *This = impl_from_IPersistStreamInit(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
if(!This->client_site)
|
||||
return E_FAIL;
|
||||
|
||||
/* Nothing to do, yet. */
|
||||
get_container_hwnd(This);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
|
||||
|
|
|
@ -877,6 +877,9 @@ static void test_wmp(void)
|
|||
hres = IOleObject_QueryInterface(oleobj, &IID_IOleInPlaceObject, (void**)&ipobj);
|
||||
ok(hres == S_OK, "Could not get IOleInPlaceObject iface: %08x\n", hres);
|
||||
|
||||
hres = IPersistStreamInit_InitNew(psi);
|
||||
ok(hres == E_FAIL || broken(hres == S_OK /* Old WMP */), "InitNew failed: %08x\n", hres);
|
||||
|
||||
SET_EXPECT(GetContainer);
|
||||
SET_EXPECT(GetExtendedControl);
|
||||
SET_EXPECT(GetWindow);
|
||||
|
@ -893,6 +896,11 @@ static void test_wmp(void)
|
|||
ok(hres == S_OK, "GetClientSite failed: %08x\n", hres);
|
||||
ok(client_site == &ClientSite, "client_site != ClientSite\n");
|
||||
|
||||
SET_EXPECT(GetWindow);
|
||||
hres = IPersistStreamInit_InitNew(psi);
|
||||
ok(hres == S_OK, "InitNew failed: %08x\n", hres);
|
||||
CHECK_CALLED(GetWindow);
|
||||
|
||||
hwnd = (HWND)0xdeadbeef;
|
||||
hres = IOleInPlaceObject_GetWindow(ipobj, &hwnd);
|
||||
ok(hres == E_UNEXPECTED, "GetWindow failed: %08x\n", hres);
|
||||
|
|
Loading…
Reference in New Issue