rpcss: When registering a moniker that is already registered in the ROT another ROT entry should still be created and a distinct cookie returned.
This commit is contained in:
parent
8580198dc8
commit
b9f8a81d8c
|
@ -690,7 +690,6 @@ static void test_ROT_multiple_entries(void)
|
||||||
hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&Test_ClassFactory, pMoniker, &dwCookie2);
|
hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&Test_ClassFactory, pMoniker, &dwCookie2);
|
||||||
ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08x\n", hr);
|
ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08x\n", hr);
|
||||||
|
|
||||||
todo_wine
|
|
||||||
ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1);
|
ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1);
|
||||||
|
|
||||||
hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject);
|
hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject);
|
||||||
|
|
|
@ -137,24 +137,14 @@ HRESULT IrotRegister(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hr == S_OK)
|
list_add_tail(&RunningObjectTable, &rot_entry->entry);
|
||||||
{
|
|
||||||
list_add_tail(&RunningObjectTable, &rot_entry->entry);
|
|
||||||
/* gives a registration identifier to the registered object*/
|
|
||||||
*cookie = rot_entry->cookie = InterlockedIncrement(&last_cookie);
|
|
||||||
*ctxt_handle = rot_entry;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rot_entry_release(rot_entry);
|
|
||||||
*cookie = existing_rot_entry->cookie;
|
|
||||||
InterlockedIncrement(&existing_rot_entry->refs);
|
|
||||||
*ctxt_handle = existing_rot_entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LeaveCriticalSection(&csRunningObjectTable);
|
LeaveCriticalSection(&csRunningObjectTable);
|
||||||
|
|
||||||
|
/* gives a registration identifier to the registered object*/
|
||||||
|
*cookie = rot_entry->cookie = InterlockedIncrement(&last_cookie);
|
||||||
|
*ctxt_handle = rot_entry;
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue