From dd18a63b520b949259444d174c54b81f264432e6 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 20 Sep 2021 13:08:44 +0300 Subject: [PATCH] ole32/tests: Add a test for IBindCtx::GetRunningObjectTable(). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/ole32/tests/moniker.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 550ba802cfa..df4b5c7bc88 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -3240,6 +3240,7 @@ static void test_pointer_moniker(void) static void test_bind_context(void) { + IRunningObjectTable *rot, *rot2; HRESULT hr; IBindCtx *pBindCtx; IEnumString *pEnumString; @@ -3260,6 +3261,18 @@ static void test_bind_context(void) hr = CreateBindCtx(0, &pBindCtx); ok_ole_success(hr, "CreateBindCtx"); + hr = IBindCtx_GetRunningObjectTable(pBindCtx, NULL); + ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + + hr = IBindCtx_GetRunningObjectTable(pBindCtx, &rot); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = GetRunningObjectTable(0, &rot2); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(rot == rot2, "Unexpected ROT instance.\n"); + IRunningObjectTable_Release(rot); + IRunningObjectTable_Release(rot2); + bind_opts.cbStruct = -1; hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); ok_ole_success(hr, "IBindCtx_GetBindOptions");