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 e518d9e125e..b70ac80319a 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 f58a38252aa..f45d2184cb9 100644 --- a/dlls/vccorlib140/vccorlib.c +++ b/dlls/vccorlib140/vccorlib.c @@ -60,7 +60,16 @@ HRESULT WINAPI GetActivationFactoryByPCWSTR(const WCHAR *name, REFIID iid, void
HRESULT WINAPI GetIidsFn(UINT32 len, UINT32 *copied, const GUID *src, GUID **dest) { - FIXME("(%I32u, %p, %p, %p) stub\n", len, copied, src, dest); + TRACE("(%I32u, %p, %p, %p)\n", len, copied, src, dest);
- return E_NOTIMPL; + if (!(*dest = CoTaskMemAlloc(len * sizeof(*src)))) + { + *copied = 0; + return E_OUTOFMEMORY; + } + + *copied = len; + memcpy(*dest, src, len * sizeof(*src)); + + return S_OK; }