ole32/pointermoniker: Fix argument check in GetDisplayName().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e12947c022
commit
01feab9ef4
|
@ -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,10 +3689,14 @@ todo_wine
|
|||
hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &display_name);
|
||||
todo_wine
|
||||
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);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
ok(!display_name, "Unexpected pointer.\n");
|
||||
|
||||
IBindCtx_Release(bindctx);
|
||||
|
||||
hr = IMoniker_IsDirty(moniker);
|
||||
|
|
Loading…
Reference in New Issue