Rob Shearman : ole32:
Remove an unnecessary QueryInterface in CoRegisterClassObject that
CoMarshalInterface will already do .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed May 2 08:14:58 CDT 2007
Module: wine
Branch: master
Commit: c582136d0bea0e0aaf533397db2e86937611b7a1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c582136d0bea0e0aaf533397db2e86937611b7a1
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed May 2 13:21:22 2007 +0100
ole32: Remove an unnecessary QueryInterface in CoRegisterClassObject that CoMarshalInterface will already do.
---
dlls/ole32/compobj.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index af43074..3e3eef7 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -1724,29 +1724,19 @@ HRESULT WINAPI CoRegisterClassObject(
*lpdwRegister = newClass->dwCookie;
if (dwClsContext & CLSCTX_LOCAL_SERVER) {
- IClassFactory *classfac;
-
- hr = IUnknown_QueryInterface(newClass->classObject, &IID_IClassFactory,
- (LPVOID*)&classfac);
- if (hr) return hr;
-
hr = CreateStreamOnHGlobal(0, TRUE, &newClass->pMarshaledData);
if (hr) {
FIXME("Failed to create stream on hglobal, %x\n", hr);
- IUnknown_Release(classfac);
return hr;
}
hr = CoMarshalInterface(newClass->pMarshaledData, &IID_IClassFactory,
- (LPVOID)classfac, MSHCTX_LOCAL, NULL,
+ newClass->classObject, MSHCTX_LOCAL, NULL,
MSHLFLAGS_TABLESTRONG);
if (hr) {
FIXME("CoMarshalInterface failed, %x!\n",hr);
- IUnknown_Release(classfac);
return hr;
}
- IUnknown_Release(classfac);
-
hr = RPC_StartLocalServer(&newClass->classIdentifier,
newClass->pMarshaledData,
flags & (REGCLS_MULTIPLEUSE|REGCLS_MULTI_SEPARATE),
More information about the wine-cvs
mailing list