Commit d963e97f authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Objects registered as local servers don't need to support IClassFactory.

parent 377159c4
...@@ -2130,7 +2130,7 @@ HRESULT WINAPI CoRegisterClassObject( ...@@ -2130,7 +2130,7 @@ HRESULT WINAPI CoRegisterClassObject(
FIXME("Failed to create stream on hglobal, %x\n", hr); FIXME("Failed to create stream on hglobal, %x\n", hr);
return hr; return hr;
} }
hr = CoMarshalInterface(newClass->pMarshaledData, &IID_IClassFactory, hr = CoMarshalInterface(newClass->pMarshaledData, &IID_IUnknown,
newClass->classObject, MSHCTX_LOCAL, NULL, newClass->classObject, MSHCTX_LOCAL, NULL,
MSHLFLAGS_TABLESTRONG); MSHLFLAGS_TABLESTRONG);
if (hr) { if (hr) {
......
...@@ -837,6 +837,14 @@ static void test_CoRegisterClassObject(void) ...@@ -837,6 +837,14 @@ static void test_CoRegisterClassObject(void)
hr = CoRevokeClassObject(cookie); hr = CoRevokeClassObject(cookie);
ok_ole_success(hr, "CoRevokeClassObject"); ok_ole_success(hr, "CoRevokeClassObject");
/* test whether an object that doesn't support IClassFactory can be
* registered for CLSCTX_LOCAL_SERVER */
hr = CoRegisterClassObject(&CLSID_WineOOPTest, &Test_Unknown,
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie);
ok_ole_success(hr, "CoRegisterClassObject");
hr = CoRevokeClassObject(cookie);
ok_ole_success(hr, "CoRevokeClassObject");
/* test whether registered class becomes invalid when apartment is destroyed */ /* test whether registered class becomes invalid when apartment is destroyed */
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory,
CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment