ole32/tests: Add a test for IBindCtx::GetRunningObjectTable().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-09-20 13:08:44 +03:00 committed by Alexandre Julliard
parent 9253ef3963
commit dd18a63b52
1 changed files with 13 additions and 0 deletions

View File

@ -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");