/*********************************************************************** * NdrDllGetClassObject [RPCRT4.@] */ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, const ProxyFileInfo **pProxyFileList, 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) init_psfactory( pPSFactoryBuffer, pProxyFileList ); if (pclsid && IsEqualGUID(rclsid, pclsid)) return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); 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; } }
/*********************************************************************** * DllGetClassObject [OLE32.@] */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) { *ppv = NULL; if (IsEqualIID(rclsid, &CLSID_PSFactoryBuffer)) return IPSFactoryBuffer_QueryInterface((IPSFactoryBuffer *)&lppsfac, iid, ppv); if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&( IsEqualIID(iid,&IID_IClassFactory) || IsEqualIID(iid,&IID_IUnknown) ) ) return MARSHAL_GetStandardMarshalCF(ppv); if (IsEqualIID(rclsid,&CLSID_StdGlobalInterfaceTable) && (IsEqualIID(iid,&IID_IClassFactory) || IsEqualIID(iid,&IID_IUnknown))) return StdGlobalInterfaceTable_GetFactory(ppv); if (IsEqualCLSID(rclsid, &CLSID_FileMoniker)) return FileMonikerCF_Create(iid, ppv); if (IsEqualCLSID(rclsid, &CLSID_ItemMoniker)) return ItemMonikerCF_Create(iid, ppv); if (IsEqualCLSID(rclsid, &CLSID_AntiMoniker)) return AntiMonikerCF_Create(iid, ppv); if (IsEqualCLSID(rclsid, &CLSID_CompositeMoniker)) return CompositeMonikerCF_Create(iid, ppv); if (IsEqualCLSID(rclsid, &CLSID_ClassMoniker)) return ClassMonikerCF_Create(iid, ppv); FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); return CLASS_E_CLASSNOTAVAILABLE; }
/*********************************************************************** * NdrDllGetClassObject [RPCRT4.@] */ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, const ProxyFileInfo **pProxyFileList, 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) { const ProxyFileInfo **pProxyFileList2; pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl; pPSFactoryBuffer->RefCount = 0; pPSFactoryBuffer->pProxyFileList = pProxyFileList; for (pProxyFileList2 = pProxyFileList; *pProxyFileList2; pProxyFileList2++) { int i; for (i = 0; i < (*pProxyFileList2)->TableSize; i++) { /* FIXME: i think that different vtables should be copied for * async interfaces */ void * const *pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Vtbl; void **pRpcStubVtbl = (void **)&(*pProxyFileList2)->pStubVtblList[i]->Vtbl; int j; for (j = 0; j < sizeof(IRpcStubBufferVtbl)/sizeof(void *); j++) if (!pRpcStubVtbl[j]) pRpcStubVtbl[j] = pSrcRpcStubVtbl[j]; } } } if (IsEqualGUID(rclsid, pclsid)) return IPSFactoryBuffer_QueryInterface((LPPSFACTORYBUFFER)pPSFactoryBuffer, iid, ppv); 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; } }