Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dc96f63f
Commit
dc96f63f
authored
Feb 10, 2020
by
Kevin Puetz
Committed by
Alexandre Julliard
Feb 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Search cache for requested typeinfo in GetRefTypeInfo.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f7e357aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
10 deletions
+38
-10
typelib.c
dlls/oleaut32/typelib.c
+38
-10
No files found.
dlls/oleaut32/typelib.c
View file @
dc96f63f
...
...
@@ -7981,21 +7981,49 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
ITypeLib_AddRef
(
pTLib
);
result
=
S_OK
;
}
else
{
static
const
WCHAR
TYPELIBW
[]
=
{
'T'
,
'Y'
,
'P'
,
'E'
,
'L'
,
'I'
,
'B'
,
0
};
struct
search_res_tlb_params
params
;
BSTR
libnam
;
/* Search in cached typelibs */
ITypeLibImpl
*
entry
;
TRACE
(
"typeinfo in imported typelib that isn't already loaded
\n
"
);
EnterCriticalSection
(
&
cache_section
);
LIST_FOR_EACH_ENTRY
(
entry
,
&
tlb_cache
,
ITypeLibImpl
,
entry
)
{
if
(
entry
->
guid
&&
IsEqualIID
(
&
entry
->
guid
->
guid
,
TLB_get_guid_null
(
ref_type
->
pImpTLInfo
->
guid
))
&&
entry
->
ver_major
==
ref_type
->
pImpTLInfo
->
wVersionMajor
&&
entry
->
ver_minor
==
ref_type
->
pImpTLInfo
->
wVersionMinor
&&
entry
->
set_lcid
==
ref_type
->
pImpTLInfo
->
lcid
)
{
TRACE
(
"got cached %p
\n
"
,
entry
);
pTLib
=
(
ITypeLib
*
)
&
entry
->
ITypeLib2_iface
;
ITypeLib_AddRef
(
pTLib
);
result
=
S_OK
;
break
;
}
}
LeaveCriticalSection
(
&
cache_section
);
/* Search in resource table */
params
.
guid
=
TLB_get_guid_null
(
ref_type
->
pImpTLInfo
->
guid
);
params
.
pTLib
=
NULL
;
EnumResourceNamesW
(
NULL
,
TYPELIBW
,
search_res_tlb
,
(
LONG_PTR
)
&
params
);
pTLib
=
params
.
pTLib
;
result
=
S_OK
;
if
(
!
pTLib
)
{
static
const
WCHAR
TYPELIBW
[]
=
{
'T'
,
'Y'
,
'P'
,
'E'
,
'L'
,
'I'
,
'B'
,
0
};
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
,
TYPELIBW
,
search_res_tlb
,
(
LONG_PTR
)
&
params
);
if
(
params
.
pTLib
)
{
pTLib
=
params
.
pTLib
;
result
=
S_OK
;
}
}
if
(
!
pTLib
)
{
BSTR
libnam
;
/* Search on disk */
result
=
query_typelib_path
(
TLB_get_guid_null
(
ref_type
->
pImpTLInfo
->
guid
),
ref_type
->
pImpTLInfo
->
wVersionMajor
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment