wshom.ocx: Fix WshShell instance QI behaviour.
This commit is contained in:
parent
c633cadb4f
commit
366aa9e74e
|
@ -817,9 +817,11 @@ static HRESULT WINAPI WshShell3_QueryInterface(IWshShell3 *iface, REFIID riid, v
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
if (IsEqualGUID(riid, &IID_IDispatch) ||
|
||||||
IsEqualGUID(riid, &IID_IDispatch) ||
|
IsEqualGUID(riid, &IID_IWshShell3) ||
|
||||||
IsEqualGUID(riid, &IID_IWshShell3))
|
IsEqualGUID(riid, &IID_IWshShell2) ||
|
||||||
|
IsEqualGUID(riid, &IID_IWshShell) ||
|
||||||
|
IsEqualGUID(riid, &IID_IUnknown))
|
||||||
{
|
{
|
||||||
*ppv = iface;
|
*ppv = iface;
|
||||||
}
|
}
|
||||||
|
@ -829,7 +831,7 @@ static HRESULT WINAPI WshShell3_QueryInterface(IWshShell3 *iface, REFIID riid, v
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME("Unknown iface %s\n", debugstr_guid(riid));
|
WARN("unknown iface %s\n", debugstr_guid(riid));
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ static void test_wshshell(void)
|
||||||
IDispatchEx *dispex;
|
IDispatchEx *dispex;
|
||||||
IWshCollection *coll;
|
IWshCollection *coll;
|
||||||
IDispatch *disp, *shortcut;
|
IDispatch *disp, *shortcut;
|
||||||
IUnknown *shell;
|
IUnknown *shell, *unk;
|
||||||
IFolderCollection *folders;
|
IFolderCollection *folders;
|
||||||
IWshShortcut *shcut;
|
IWshShortcut *shcut;
|
||||||
ITypeInfo *ti;
|
ITypeInfo *ti;
|
||||||
|
@ -71,6 +71,17 @@ static void test_wshshell(void)
|
||||||
hr = IUnknown_QueryInterface(shell, &IID_IWshShell3, (void**)&sh3);
|
hr = IUnknown_QueryInterface(shell, &IID_IWshShell3, (void**)&sh3);
|
||||||
EXPECT_HR(hr, S_OK);
|
EXPECT_HR(hr, S_OK);
|
||||||
|
|
||||||
|
hr = IWshShell3_QueryInterface(sh3, &IID_IObjectWithSite, (void**)&unk);
|
||||||
|
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||||
|
|
||||||
|
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell, (void**)&unk);
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
IUnknown_Release(unk);
|
||||||
|
|
||||||
|
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell2, (void**)&unk);
|
||||||
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
|
IUnknown_Release(unk);
|
||||||
|
|
||||||
hr = IWshShell3_get_SpecialFolders(sh3, &coll);
|
hr = IWshShell3_get_SpecialFolders(sh3, &coll);
|
||||||
EXPECT_HR(hr, S_OK);
|
EXPECT_HR(hr, S_OK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue