atl: Implement AtlModuleLoadTypeLib.

This commit is contained in:
Andrey Turkin 2006-11-11 00:06:53 +03:00 committed by Alexandre Julliard
parent 19c2b0bb6a
commit 8141b99d11

View file

@ -100,8 +100,25 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE
HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex,
BSTR *pbstrPath, ITypeLib **ppTypeLib)
{
FIXME("(%p, %s, %p, %p): stub\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
return E_FAIL;
HRESULT hRes;
OLECHAR path[MAX_PATH+8]; /* leave some space for index */
TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib);
if (!pM)
return E_INVALIDARG;
GetModuleFileNameW(pM->m_hInstTypeLib, path, MAX_PATH);
if (lpszIndex)
lstrcatW(path, lpszIndex);
hRes = LoadTypeLib(path, ppTypeLib);
if (FAILED(hRes))
return hRes;
*pbstrPath = SysAllocString(path);
return S_OK;
}
HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM)