ole32: Respond to CLSID in item moniker interface query.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b06281c25b
commit
9d2d367f3d
|
@ -140,21 +140,23 @@ static HRESULT set_container_lock(IOleItemContainer *container, IBindCtx *pbc)
|
|||
/*******************************************************************************
|
||||
* ItemMoniker_QueryInterface
|
||||
*******************************************************************************/
|
||||
static HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
|
||||
static HRESULT WINAPI ItemMonikerImpl_QueryInterface(IMoniker *iface, REFIID riid, void **ppvObject)
|
||||
{
|
||||
ItemMonikerImpl *This = impl_from_IMoniker(iface);
|
||||
|
||||
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject);
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), ppvObject);
|
||||
|
||||
if (!ppvObject)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* Compare the riid with the interface IDs implemented by this object.*/
|
||||
if (IsEqualIID(&IID_IUnknown, riid) ||
|
||||
IsEqualIID(&IID_IPersist, riid) ||
|
||||
IsEqualIID(&IID_IPersistStream, riid) ||
|
||||
IsEqualIID(&IID_IMoniker, riid))
|
||||
IsEqualIID(&IID_IMoniker, riid) ||
|
||||
IsEqualGUID(&CLSID_ItemMoniker, riid))
|
||||
{
|
||||
*ppvObject = iface;
|
||||
}
|
||||
else if (IsEqualIID(&IID_IROTData, riid))
|
||||
*ppvObject = &This->IROTData_iface;
|
||||
else if (IsEqualIID(&IID_IMarshal, riid))
|
||||
|
|
|
@ -2087,13 +2087,9 @@ static void test_item_moniker(void)
|
|||
ok(hr == S_OK, "Failed to create item moniker, hr %#x.\n", hr);
|
||||
|
||||
hr = IMoniker_QueryInterface(moniker, &CLSID_ItemMoniker, (void **)&unknown);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n");
|
||||
IUnknown_Release(unknown);
|
||||
}
|
||||
ok(unknown == (IUnknown *)moniker, "Unexpected interface.\n");
|
||||
IUnknown_Release(unknown);
|
||||
|
||||
test_moniker("item moniker 2", moniker,
|
||||
expected_item_moniker_marshal_data2, sizeof(expected_item_moniker_marshal_data2),
|
||||
|
|
Loading…
Reference in New Issue