ole32/pointermoniker: Fix argument handling in RelativePathTo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19df4c56c4
commit
b7cab78974
|
@ -368,20 +368,16 @@ static HRESULT WINAPI PointerMonikerImpl_CommonPrefixWith(IMoniker *iface, IMoni
|
|||
return MK_E_NOPREFIX;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* PointerMoniker_RelativePathTo
|
||||
******************************************************************************/
|
||||
static HRESULT WINAPI
|
||||
PointerMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath)
|
||||
static HRESULT WINAPI PointerMonikerImpl_RelativePathTo(IMoniker *iface, IMoniker *other, IMoniker **result)
|
||||
{
|
||||
TRACE("(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
|
||||
TRACE("%p, %p, %p.\n", iface, other, result);
|
||||
|
||||
if (ppmkRelPath==NULL)
|
||||
return E_POINTER;
|
||||
if (!result)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppmkRelPath = NULL;
|
||||
*result = NULL;
|
||||
|
||||
return E_NOTIMPL;
|
||||
return other ? E_NOTIMPL : E_INVALIDARG;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -3497,7 +3497,7 @@ todo_wine
|
|||
|
||||
static void test_pointer_moniker(void)
|
||||
{
|
||||
IMoniker *moniker, *moniker2, *prefix, *inverse, *anti, *c;
|
||||
IMoniker *moniker, *moniker2, *moniker3, *prefix, *inverse, *anti, *c;
|
||||
struct test_factory factory;
|
||||
IEnumMoniker *enummoniker;
|
||||
DWORD hash, size;
|
||||
|
@ -3726,6 +3726,23 @@ todo_wine
|
|||
IMoniker_Release(moniker2);
|
||||
IMoniker_Release(c);
|
||||
|
||||
/* RelativePathTo() */
|
||||
hr = create_moniker_from_desc("I1", &moniker3);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
hr = IMoniker_RelativePathTo(moniker, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
moniker2 = (void *)0xdeadbeef;
|
||||
hr = IMoniker_RelativePathTo(moniker, NULL, &moniker2);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
ok(!moniker2, "Unexpected pointer.\n");
|
||||
hr = IMoniker_RelativePathTo(moniker, moniker3, NULL);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
moniker2 = (void *)0xdeadbeef;
|
||||
hr = IMoniker_RelativePathTo(moniker, moniker3, &moniker2);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
ok(!moniker2, "Unexpected pointer.\n");
|
||||
IMoniker_Release(moniker3);
|
||||
|
||||
IMoniker_Release(moniker);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue