Misc fixes for QueryPathOfRegTypeLib, TLB_ReadTypeLib,

ITypeInfo_fnGetContainingTypeLib.
This commit is contained in:
Gerard Patel 2000-12-19 03:37:44 +00:00 committed by Alexandre Julliard
parent 565ba5899c
commit 53d198cc00
1 changed files with 5 additions and 2 deletions

View File

@ -156,7 +156,7 @@ QueryPathOfRegTypeLib(
/* try with sub-langid */
myLCID = SUBLANGID(lcid);
}
else if (myLCID == SUBLANGID(lcid))
else if ((myLCID == SUBLANGID(lcid)) && myLCID)
{
/* try with system langid */
myLCID = 0;
@ -1296,6 +1296,7 @@ int TLB_ReadTypeLib(LPSTR pszFileName, ITypeLib2 **ppTypeLib)
strncpy(pszDllName, pszFileName, nMemToAlloc);
/* move index string pointer pass the backslash */
while (*pszTypeLibIndex == '\\')
++pszTypeLibIndex;
}
else
@ -2733,6 +2734,8 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( ITypeInfo2 *iface,
ITypeLib * *ppTLib, UINT *pIndex)
{
ICOM_THIS( ITypeInfoImpl, iface);
if (!pIndex)
return E_INVALIDARG;
*ppTLib=(LPTYPELIB )(This->pTypeLib);
*pIndex=This->index;
ITypeLib2_AddRef(*ppTLib);