ole32: Fix return codes returned by IBindCtx::RegisterObjectBound and IBindCtx::RevokeObjectBound when used on NULL objects.
This commit is contained in:
parent
ba3ceaa4b8
commit
c4727fde17
|
@ -158,7 +158,7 @@ BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk)
|
|||
TRACE("(%p,%p)\n",This,punk);
|
||||
|
||||
if (punk==NULL)
|
||||
return E_POINTER;
|
||||
return S_OK;
|
||||
|
||||
IUnknown_AddRef(punk);
|
||||
|
||||
|
@ -197,6 +197,9 @@ BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk)
|
|||
|
||||
TRACE("(%p,%p)\n",This,punk);
|
||||
|
||||
if (!punk)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* check if the object was registered or not */
|
||||
if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE)
|
||||
return MK_E_NOTBOUND;
|
||||
|
|
|
@ -1510,11 +1510,9 @@ static void test_bind_context(void)
|
|||
ok(!pEnumString, "pEnumString should be NULL\n");
|
||||
|
||||
hr = IBindCtx_RegisterObjectBound(pBindCtx, NULL);
|
||||
todo_wine
|
||||
ok_ole_success(hr, "IBindCtx_RegisterObjectBound(NULL)");
|
||||
|
||||
hr = IBindCtx_RevokeObjectBound(pBindCtx, NULL);
|
||||
todo_wine
|
||||
ok(hr == E_INVALIDARG, "IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
|
||||
unknown2 = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown));
|
||||
|
|
Loading…
Reference in New Issue