ole32/antimoniker: Fix Enum() return error code.

This commit is contained in:
Nikolay Sivov 2023-05-27 10:39:15 +02:00 committed by Alexandre Julliard
parent 8e4b95e43e
commit d4cb70107d
2 changed files with 6 additions and 8 deletions

View file

@ -294,16 +294,12 @@ AntiMonikerImpl_ComposeWith(IMoniker* iface, IMoniker* pmkRight,
return CreateGenericComposite(iface,pmkRight,ppmkComposite);
}
/******************************************************************************
* AntiMoniker_Enum
******************************************************************************/
static HRESULT WINAPI
AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker)
static HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker *iface, BOOL forward, IEnumMoniker **ppenumMoniker)
{
TRACE("(%p,%d,%p)\n",iface,fForward,ppenumMoniker);
TRACE("%p, %d, %p.\n", iface, forward, ppenumMoniker);
if (ppenumMoniker == NULL)
return E_POINTER;
return E_INVALIDARG;
*ppenumMoniker = NULL;

View file

@ -3037,7 +3037,9 @@ static void test_anti_moniker(void)
ok(!enummoniker, "Unexpected pointer.\n");
hr = IMoniker_Enum(moniker, FALSE, NULL);
todo_wine
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMoniker_Enum(moniker, TRUE, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* CommonPrefixWith() */