Commit f0f985b3 authored by Alexandre Julliard's avatar Alexandre Julliard

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

This reverts commit 9e4590ff. The tests don't confirm it. The real issue is probably addressed by the typelib cache. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 5f8e3a0c
......@@ -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
......@@ -8035,23 +7997,6 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
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;
/* Search on disk */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment