Alexandre Julliard : Revert "oleaut32: Implement TLB dependencies lookup in resources."
Alexandre Julliard
julliard at winehq.org
Tue Nov 16 16:32:27 CST 2021
Module: wine
Branch: master
Commit: f0f985b38c66a525ce543fe2adc0658b246a9481
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f0f985b38c66a525ce543fe2adc0658b246a9481
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Nov 16 10:12:40 2021 +0100
Revert "oleaut32: Implement TLB dependencies lookup in resources."
This reverts commit 9e4590ff671f7357c7574599ca163fed5e180661.
The tests don't confirm it. The real issue is probably addressed by
the typelib cache.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/oleaut32/typelib.c | 55 -------------------------------------------------
1 file changed, 55 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index e050726a4ee..97b6786feff 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -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)¶ms);
- if(params.pTLib)
- {
- pTLib = params.pTLib;
- result = S_OK;
- }
- }
-
if (!pTLib)
{
BSTR libnam;
More information about the wine-cvs
mailing list