[PATCH 2/4] comsvcs: Add Enum() for "new" moniker.
Nikolay Sivov
nsivov at codeweavers.com
Tue Nov 5 04:09:28 CST 2019
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/comsvcs/main.c | 9 +++++++--
dlls/comsvcs/tests/comsvcs.c | 8 ++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/comsvcs/main.c b/dlls/comsvcs/main.c
index ee75893561..58a5f26823 100644
--- a/dlls/comsvcs/main.c
+++ b/dlls/comsvcs/main.c
@@ -543,9 +543,14 @@ static HRESULT WINAPI new_moniker_ComposeWith(IMoniker *iface, IMoniker *mkRight
static HRESULT WINAPI new_moniker_Enum(IMoniker *iface, BOOL forward, IEnumMoniker **enum_moniker)
{
- FIXME("%p, %d, %p.\n", iface, forward, enum_moniker);
+ TRACE("%p, %d, %p.\n", iface, forward, enum_moniker);
- return E_NOTIMPL;
+ if (!enum_moniker)
+ return E_POINTER;
+
+ *enum_moniker = NULL;
+
+ return S_OK;
}
static HRESULT WINAPI new_moniker_IsEqual(IMoniker *iface, IMoniker *other_moniker)
diff --git a/dlls/comsvcs/tests/comsvcs.c b/dlls/comsvcs/tests/comsvcs.c
index bdb817a144..8e59abc52b 100644
--- a/dlls/comsvcs/tests/comsvcs.c
+++ b/dlls/comsvcs/tests/comsvcs.c
@@ -364,6 +364,14 @@ todo_wine
ok(moniker_type == MKSYS_ANTIMONIKER, "Unexpected moniker type %d.\n", moniker_type);
IMoniker_Release(inverse);
+ hr = IMoniker_Enum(moniker, FALSE, NULL);
+ ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+
+ obj = (IUnknown *)moniker;
+ hr = IMoniker_Enum(moniker, FALSE, (IEnumMoniker **)&obj);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(obj == NULL, "Unexpected return value.\n");
+
IMoniker_Release(moniker);
IBindCtx_Release(bindctx);
}
--
2.24.0.rc1
More information about the wine-devel
mailing list