From: Vibhav Pant vibhavp@gmail.com
--- dlls/vccorlib140/tests/vccorlib.c | 12 ++++++------ dlls/vccorlib140/vccorlib.c | 13 +++++++++++-- 2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/dlls/vccorlib140/tests/vccorlib.c b/dlls/vccorlib140/tests/vccorlib.c index a6e78a7c387..890472f0b46 100644 --- a/dlls/vccorlib140/tests/vccorlib.c +++ b/dlls/vccorlib140/tests/vccorlib.c @@ -278,17 +278,17 @@ static void test_GetIidsFn(void) guids_dest = NULL; copied = 0xdeadbeef; hr = pGetIidsFn(0, &copied, NULL, &guids_dest); - todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); - todo_wine ok(copied == 0, "got copied %I32u\n", copied); - todo_wine ok(guids_dest != NULL, "got guids_dest %p\n", guids_dest); + ok(hr == S_OK, "got hr %#lx\n", hr); + ok(copied == 0, "got copied %I32u\n", copied); + ok(guids_dest != NULL, "got guids_dest %p\n", guids_dest); CoTaskMemFree(guids_dest);
guids_dest = NULL; copied = 0; hr = pGetIidsFn(ARRAY_SIZE(guids_src), &copied, guids_src, &guids_dest); - todo_wine ok(hr == S_OK, "got hr %#lx\n", hr); - todo_wine ok(copied == ARRAY_SIZE(guids_src), "got copied %I32u\n", copied); - todo_wine ok(guids_dest != NULL, "got guids_dest %p\n", guids_dest); + ok(hr == S_OK, "got hr %#lx\n", hr); + ok(copied == ARRAY_SIZE(guids_src), "got copied %I32u\n", copied); + ok(guids_dest != NULL, "got guids_dest %p\n", guids_dest); ok(!memcmp(guids_src, guids_dest, sizeof(*guids_dest) * copied), "unexpected guids_dest value.\n"); CoTaskMemFree(guids_dest); } diff --git a/dlls/vccorlib140/vccorlib.c b/dlls/vccorlib140/vccorlib.c index acbd140fa5b..23310ec542e 100644 --- a/dlls/vccorlib140/vccorlib.c +++ b/dlls/vccorlib140/vccorlib.c @@ -60,7 +60,16 @@ HRESULT WINAPI GetActivationFactoryByPCWSTR(const WCHAR *name, const GUID *iid,
HRESULT WINAPI GetIidsFn(unsigned int count, unsigned int *copied, const GUID *src, GUID **dest) { - FIXME("(%u, %p, %p, %p) stub\n", count, copied, src, dest); + TRACE("(%u, %p, %p, %p)\n", count, copied, src, dest);
- return E_NOTIMPL; + if (!(*dest = CoTaskMemAlloc(count * sizeof(*src)))) + { + *copied = 0; + return E_OUTOFMEMORY; + } + + *copied = count; + memcpy(*dest, src, count * sizeof(*src)); + + return S_OK; }