ChangeSet ID: 21520 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/29 05:04:58
Modified files: dlls/rpcrt4 : cpsf.c
Log message: Robert Shearman rob@codeweavers.com The CLSID can be substituted by an IID present in one of the proxy file infos in NdrDllGetClassObject.
Patch: http://cvs.winehq.org/patch.py?id=21520
Old revision New revision Changes Path 1.14 1.15 +15 -1 wine/dlls/rpcrt4/cpsf.c
Index: wine/dlls/rpcrt4/cpsf.c diff -u -p wine/dlls/rpcrt4/cpsf.c:1.14 wine/dlls/rpcrt4/cpsf.c:1.15 --- wine/dlls/rpcrt4/cpsf.c:1.14 29 Nov 2005 11: 4:58 -0000 +++ wine/dlls/rpcrt4/cpsf.c 29 Nov 2005 11: 4:58 -0000 @@ -133,6 +133,10 @@ HRESULT WINAPI NdrDllGetClassObject(REFC const CLSID *pclsid, CStdPSFactoryBuffer *pPSFactoryBuffer) { + TRACE("(%s, %s, %p, %p, %s, %p)\n", debugstr_guid(rclsid), + debugstr_guid(iid), ppv, pProxyFileList, debugstr_guid(pclsid), + pPSFactoryBuffer); + *ppv = NULL; if (!pPSFactoryBuffer->lpVtbl) { pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl; @@ -141,7 +145,17 @@ HRESULT WINAPI NdrDllGetClassObject(REFC } if (IsEqualGUID(rclsid, pclsid)) return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); - return CLASS_E_CLASSNOTAVAILABLE; + else { + const ProxyFileInfo *info; + int index; + /* otherwise, the dll may be using the iid as the clsid, so + * search for it in the proxy file list */ + if (FindProxyInfo(pProxyFileList, rclsid, &info, &index)) + return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); + + WARN("class %s not available\n", debugstr_guid(rclsid)); + return CLASS_E_CLASSNOTAVAILABLE; + } }
/***********************************************************************