Alexandre Julliard : atl: Fix the Registrar class factory implementation.
Alexandre Julliard
julliard at winehq.org
Fri Nov 12 11:22:34 CST 2010
Module: wine
Branch: master
Commit: 696b83259f3fdf0e767d8da2c204537028cf7992
URL: http://source.winehq.org/git/wine.git/?a=commit;h=696b83259f3fdf0e767d8da2c204537028cf7992
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Nov 12 11:55:28 2010 +0100
atl: Fix the Registrar class factory implementation.
---
dlls/atl/registrar.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c
index a54860f..c9d7e6c 100644
--- a/dlls/atl/registrar.c
+++ b/dlls/atl/registrar.c
@@ -687,8 +687,9 @@ static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID ri
{
TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);
- if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IRegistrar, riid)) {
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
*ppvObject = iface;
+ IClassFactory_AddRef( iface );
return S_OK;
}
@@ -743,10 +744,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
{
TRACE("(%s %s %p)\n", debugstr_guid(clsid), debugstr_guid(riid), ppvObject);
- if(IsEqualGUID(&CLSID_Registrar, clsid)) {
- *ppvObject = &RegistrarCF;
- return S_OK;
- }
+ if(IsEqualGUID(&CLSID_Registrar, clsid))
+ return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
FIXME("Not supported class %s\n", debugstr_guid(clsid));
return CLASS_E_CLASSNOTAVAILABLE;
More information about the wine-cvs
mailing list