Commit 01feab9e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/pointermoniker: Fix argument check in GetDisplayName().

parent e12947c0
......@@ -380,19 +380,17 @@ static HRESULT WINAPI PointerMonikerImpl_RelativePathTo(IMoniker *iface, IMonike
return other ? E_NOTIMPL : E_INVALIDARG;
}
/******************************************************************************
* PointerMoniker_GetDisplayName
******************************************************************************/
static HRESULT WINAPI
PointerMonikerImpl_GetDisplayName(IMoniker* iface, IBindCtx* pbc,
IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName)
static HRESULT WINAPI PointerMonikerImpl_GetDisplayName(IMoniker *iface, IBindCtx *pbc,
IMoniker *toleft, LPOLESTR *name)
{
TRACE("(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
TRACE("%p, %p, %p, %p.\n", iface, pbc, toleft, name);
if (ppszDisplayName==NULL)
return E_POINTER;
if (!name || !pbc)
{
if (name) *name = NULL;
return E_INVALIDARG;
}
*ppszDisplayName = NULL;
return E_NOTIMPL;
}
......
......@@ -3689,9 +3689,13 @@ todo_wine
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name);
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
display_name = (void *)0xdeadbeef;
hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &display_name);
todo_wine
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
ok(!display_name, "Unexpected pointer.\n");
IBindCtx_Release(bindctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment