Revert "oleaut32: Implement TLB dependencies lookup in resources."

This reverts commit 9e4590ff67.
The tests don't confirm it. The real issue is probably addressed by
the typelib cache.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-11-16 10:12:40 +01:00
parent 5f8e3a0c74
commit f0f985b38c
1 changed files with 0 additions and 55 deletions

View File

@ -7878,44 +7878,6 @@ static HRESULT ITypeInfoImpl_GetDispatchRefTypeInfo( ITypeInfo *iface,
return E_FAIL;
}
struct search_res_tlb_params
{
const GUID *guid;
ITypeLib *pTLib;
};
static BOOL CALLBACK search_res_tlb(HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LONG_PTR lParam)
{
struct search_res_tlb_params *params = (LPVOID)lParam;
WCHAR szPath[MAX_PATH+1];
ITypeLib *pTLib = NULL;
HRESULT ret;
DWORD len;
if (IS_INTRESOURCE(lpszName) == FALSE)
return TRUE;
if (!(len = GetModuleFileNameW(hModule, szPath, MAX_PATH)))
return TRUE;
if (swprintf(szPath + len, ARRAY_SIZE(szPath) - len, L"\\%d", LOWORD(lpszName)) < 0)
return TRUE;
ret = LoadTypeLibEx(szPath, REGKIND_NONE, &pTLib);
if (SUCCEEDED(ret))
{
ITypeLibImpl *impl = impl_from_ITypeLib(pTLib);
if (IsEqualGUID(params->guid, impl->guid))
{
params->pTLib = pTLib;
return FALSE; /* stop enumeration */
}
ITypeLib_Release(pTLib);
}
return TRUE;
}
/* ITypeInfo::GetRefTypeInfo
*
* If a type description references other type descriptions, it retrieves
@ -8033,23 +7995,6 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
}
LeaveCriticalSection(&cache_section);
if (!pTLib)
{
struct search_res_tlb_params params;
TRACE("typeinfo in imported typelib that isn't already loaded\n");
/* Search in resource table */
params.guid = TLB_get_guid_null(ref_type->pImpTLInfo->guid);
params.pTLib = NULL;
EnumResourceNamesW(NULL, L"TYPELIB", search_res_tlb, (LONG_PTR)&params);
if(params.pTLib)
{
pTLib = params.pTLib;
result = S_OK;
}
}
if (!pTLib)
{
BSTR libnam;