atl: Implement AtlModuleGetClassObject.

This commit is contained in:
Robert Shearman 2006-06-12 01:34:53 +01:00 committed by Alexandre Julliard
parent 79b2742120
commit be35acf02e
1 changed files with 21 additions and 1 deletions

View File

@ -299,7 +299,27 @@ HRESULT WINAPI AtlUnmarshalPtr(IStream *stm, const IID *iid, IUnknown **ppUnk)
HRESULT WINAPI AtlModuleGetClassObject(_ATL_MODULEW *pm, REFCLSID rclsid,
REFIID riid, LPVOID *ppv)
{
FIXME("%p %p %p %p\n", pm, rclsid, riid, ppv);
int i;
TRACE("%p %s %s %p\n", pm, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if (pm == NULL)
return E_INVALIDARG;
for (i = 0; pm->m_pObjMap[i].pclsid != NULL; i++)
{
if (IsEqualCLSID(pm->m_pObjMap[i].pclsid, rclsid))
{
_ATL_OBJMAP_ENTRYW *obj = &pm->m_pObjMap[i];
TRACE("found object %i\n", i);
if (obj->pfnGetClassObject)
return obj->pfnGetClassObject(obj->pfnCreateInstance, riid, ppv);
}
}
WARN("no class object found for %s\n", debugstr_guid(rclsid));
return E_FAIL;
}