Don't fail in CoRegisterClassObject if the class already exists and

the REGCLS_MULTIPLEUSE flag is specified.
This commit is contained in:
Robert Shearman 2005-09-23 10:08:11 +00:00 committed by Alexandre Julliard
parent 625f5862a5
commit 044ccc40f3
1 changed files with 7 additions and 0 deletions

View File

@ -1389,7 +1389,14 @@ HRESULT WINAPI CoRegisterClassObject(
*/
hr = COM_GetRegisteredClassObject(rclsid, dwClsContext, &foundObject);
if (hr == S_OK) {
if (flags & REGCLS_MULTIPLEUSE) {
if (dwClsContext & CLSCTX_LOCAL_SERVER)
hr = CoLockObjectExternal(foundObject, TRUE, FALSE);
IUnknown_Release(foundObject);
return hr;
}
IUnknown_Release(foundObject);
ERR("object already registered for class %s\n", debugstr_guid(rclsid));
return CO_E_OBJISREG;
}