ole32: Objects registered as local servers don't need to support IClassFactory.
This commit is contained in:
parent
377159c4a7
commit
d963e97f32
|
@ -2130,7 +2130,7 @@ HRESULT WINAPI CoRegisterClassObject(
|
|||
FIXME("Failed to create stream on hglobal, %x\n", hr);
|
||||
return hr;
|
||||
}
|
||||
hr = CoMarshalInterface(newClass->pMarshaledData, &IID_IClassFactory,
|
||||
hr = CoMarshalInterface(newClass->pMarshaledData, &IID_IUnknown,
|
||||
newClass->classObject, MSHCTX_LOCAL, NULL,
|
||||
MSHLFLAGS_TABLESTRONG);
|
||||
if (hr) {
|
||||
|
|
|
@ -837,6 +837,14 @@ static void test_CoRegisterClassObject(void)
|
|||
hr = CoRevokeClassObject(cookie);
|
||||
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 */
|
||||
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory,
|
||||
CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie);
|
||||
|
|
Loading…
Reference in New Issue