The CLSID can be substituted by an IID present in one of the proxy

file infos in NdrDllGetClassObject.
This commit is contained in:
Robert Shearman 2005-11-29 10:41:55 +01:00 committed by Alexandre Julliard
parent 96a8f8edda
commit 4a76473965
1 changed files with 15 additions and 1 deletions

View File

@ -133,6 +133,10 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv,
const CLSID *pclsid, const CLSID *pclsid,
CStdPSFactoryBuffer *pPSFactoryBuffer) CStdPSFactoryBuffer *pPSFactoryBuffer)
{ {
TRACE("(%s, %s, %p, %p, %s, %p)\n", debugstr_guid(rclsid),
debugstr_guid(iid), ppv, pProxyFileList, debugstr_guid(pclsid),
pPSFactoryBuffer);
*ppv = NULL; *ppv = NULL;
if (!pPSFactoryBuffer->lpVtbl) { if (!pPSFactoryBuffer->lpVtbl) {
pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl; pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl;
@ -141,7 +145,17 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv,
} }
if (IsEqualGUID(rclsid, pclsid)) if (IsEqualGUID(rclsid, pclsid))
return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); 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;
}
} }
/*********************************************************************** /***********************************************************************