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
d2f24ed8
Commit
d2f24ed8
authored
Mar 15, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use QueryPathOfRegTypeLib in ICreateTypeInfo2_AddRefTypeInfo.
parent
d62534d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
23 deletions
+8
-23
typelib2.c
dlls/oleaut32/typelib2.c
+8
-23
No files found.
dlls/oleaut32/typelib2.c
View file @
d2f24ed8
...
...
@@ -1566,20 +1566,13 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo(
/* Process locally defined TypeInfo */
*
phRefType
=
This
->
typelib
->
typelib_typeinfo_offsets
[
index
];
}
else
{
static
const
WCHAR
regkey
[]
=
{
'T'
,
'y'
,
'p'
,
'e'
,
'L'
,
'i'
,
'b'
,
'\\'
,
'{'
,
'%'
,
'0'
,
'8'
,
'x'
,
'-'
,
'%'
,
'0'
,
'4'
,
'x'
,
'-'
,
'%'
,
'0'
,
'4'
,
'x'
,
'-'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'-'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'}'
,
'\\'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'\\'
,
'0'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'3'
,
'2'
,
0
};
WCHAR
name
[
MAX_PATH
],
*
p
;
BSTR
name
;
TLIBATTR
*
tlibattr
;
TYPEATTR
*
typeattr
;
TYPEKIND
typekind
;
MSFT_GuidEntry
guid
,
*
check_guid
;
MSFT_ImpInfo
impinfo
;
int
guid_offset
,
import_offset
;
DWORD
len
;
HRESULT
hres
;
/* Allocate container GUID */
...
...
@@ -1605,27 +1598,19 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo(
This
->
typelib
->
typelib_guids
++
;
/* Get import file name */
/* Check HKEY_CLASSES_ROOT\TypeLib\{GUID}\{Ver}\0\win32 */
len
=
MAX_PATH
;
sprintfW
(
name
,
regkey
,
guid
.
guid
.
Data1
,
guid
.
guid
.
Data2
,
guid
.
guid
.
Data3
,
guid
.
guid
.
Data4
[
0
],
guid
.
guid
.
Data4
[
1
],
guid
.
guid
.
Data4
[
2
],
guid
.
guid
.
Data4
[
3
],
guid
.
guid
.
Data4
[
4
],
guid
.
guid
.
Data4
[
5
],
guid
.
guid
.
Data4
[
6
],
guid
.
guid
.
Data4
[
7
],
tlibattr
->
wMajorVerNum
,
tlibattr
->
wMinorVerNum
);
if
(
RegGetValueW
(
HKEY_CLASSES_ROOT
,
name
,
NULL
,
RRF_RT_REG_SZ
,
NULL
,
name
,
&
len
)
!=
ERROR_SUCCESS
||
(
p
=
strrchrW
(
name
,
'\\'
))
==
NULL
)
{
ERR
(
"Error guessing typelib filename
\n
"
);
hres
=
QueryPathOfRegTypeLib
(
&
guid
.
guid
,
tlibattr
->
wMajorVerNum
,
tlibattr
->
wMinorVerNum
,
tlibattr
->
lcid
,
&
name
);
if
(
FAILED
(
hres
))
{
ITypeLib_ReleaseTLibAttr
(
container
,
tlibattr
);
ITypeLib_Release
(
container
);
return
E_NOTIMPL
;
return
hres
;
}
memmove
(
name
,
p
+
1
,
strlenW
(
p
)
*
sizeof
(
WCHAR
));
/* Import file */
import_offset
=
ctl2_alloc_importfile
(
This
->
typelib
,
guid_offset
,
tlibattr
->
lcid
,
tlibattr
->
wMajorVerNum
,
tlibattr
->
wMinorVerNum
,
name
);
import_offset
=
ctl2_alloc_importfile
(
This
->
typelib
,
guid_offset
,
tlibattr
->
lcid
,
tlibattr
->
wMajorVerNum
,
tlibattr
->
wMinorVerNum
,
strrchrW
(
name
,
'\\'
)
+
1
);
ITypeLib_ReleaseTLibAttr
(
container
,
tlibattr
);
SysFreeString
(
name
);
if
(
import_offset
==
-
1
)
{
ITypeLib_Release
(
container
);
...
...
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