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
7d7586d3
Commit
7d7586d3
authored
Aug 19, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Try both SYS_WIN64 and SYS_WIN32 syskind in QueryPathOfRegTypeLib on win64.
parent
703ab02b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
typelib.c
dlls/oleaut32/tests/typelib.c
+15
-11
typelib.c
dlls/oleaut32/typelib.c
+5
-0
No files found.
dlls/oleaut32/tests/typelib.c
View file @
7d7586d3
...
...
@@ -692,10 +692,10 @@ cleanup:
return
ret
;
}
static
BOOL
do_typelib_reg_key
(
GUID
*
uid
,
WORD
maj
,
WORD
min
,
LPCWSTR
base
,
BOOL
remove
)
static
BOOL
do_typelib_reg_key
(
GUID
*
uid
,
WORD
maj
,
WORD
min
,
DWORD
arch
,
LPCWSTR
base
,
BOOL
remove
)
{
static
const
WCHAR
typelibW
[]
=
{
'T'
,
'y'
,
'p'
,
'e'
,
'l'
,
'i'
,
'b'
,
'\\'
,
0
};
static
const
WCHAR
formatW
[]
=
{
'\\'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'\\'
,
'0'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'
3'
,
'2
'
,
0
};
static
const
WCHAR
formatW
[]
=
{
'\\'
,
'%'
,
'u'
,
'.'
,
'%'
,
'u'
,
'\\'
,
'0'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'
%'
,
'u
'
,
0
};
static
const
WCHAR
format2W
[]
=
{
'%'
,
's'
,
'_'
,
'%'
,
'u'
,
'_'
,
'%'
,
'u'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
WCHAR
buf
[
128
];
HKEY
hkey
;
...
...
@@ -711,7 +711,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL
return
TRUE
;
}
wsprintfW
(
buf
+
lstrlenW
(
buf
),
formatW
,
maj
,
min
);
wsprintfW
(
buf
+
lstrlenW
(
buf
),
formatW
,
maj
,
min
,
arch
);
SetLastError
(
0xdeadbeef
);
res
=
RegCreateKeyExW
(
HKEY_CLASSES_ROOT
,
buf
,
0
,
NULL
,
0
,
...
...
@@ -724,7 +724,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL
if
(
res
!=
ERROR_SUCCESS
)
{
trace
(
"RegCreateKeyExW failed
\n
"
);
trace
(
"RegCreateKeyExW failed
: %u
\n
"
,
res
);
return
FALSE
;
}
...
...
@@ -739,7 +739,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL
return
ret
;
}
static
void
test_QueryPathOfRegTypeLib
(
void
)
static
void
test_QueryPathOfRegTypeLib
(
DWORD
arch
)
{
static
const
struct
test_data
{
...
...
@@ -760,6 +760,7 @@ static void test_QueryPathOfRegTypeLib(void)
{
4
,
0
,
TYPE_E_LIBNOTREGISTERED
,
{
0
}
}
};
static
const
WCHAR
base
[]
=
{
'f'
,
'a'
,
'k'
,
'e'
,
0
};
static
const
WCHAR
wrongW
[]
=
{
'w'
,
'r'
,
'o'
,
'n'
,
'g'
,
0
};
UINT
i
;
RPC_STATUS
status
;
GUID
uid
;
...
...
@@ -773,10 +774,11 @@ static void test_QueryPathOfRegTypeLib(void)
StringFromGUID2
(
&
uid
,
uid_str
,
40
);
/*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
0
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
1
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
37
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
5
,
37
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
0
,
arch
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
1
,
arch
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
3
,
37
,
arch
,
base
,
0
))
return
;
if
(
!
do_typelib_reg_key
(
&
uid
,
5
,
37
,
arch
,
base
,
0
))
return
;
if
(
arch
==
64
&&
!
do_typelib_reg_key
(
&
uid
,
5
,
37
,
32
,
wrongW
,
0
))
return
;
for
(
i
=
0
;
i
<
sizeof
(
td
)
/
sizeof
(
td
[
0
]);
i
++
)
{
...
...
@@ -789,7 +791,7 @@ static void test_QueryPathOfRegTypeLib(void)
}
}
do_typelib_reg_key
(
&
uid
,
0
,
0
,
NULL
,
1
);
do_typelib_reg_key
(
&
uid
,
0
,
0
,
arch
,
NULL
,
1
);
}
static
void
test_inheritance
(
void
)
...
...
@@ -2340,7 +2342,9 @@ START_TEST(typelib)
test_TypeComp
();
test_CreateDispTypeInfo
();
test_TypeInfo
();
test_QueryPathOfRegTypeLib
();
test_QueryPathOfRegTypeLib
(
32
);
if
(
sizeof
(
void
*
)
==
8
)
test_QueryPathOfRegTypeLib
(
64
);
test_inheritance
();
test_CreateTypeLib
();
...
...
dlls/oleaut32/typelib.c
View file @
7d7586d3
...
...
@@ -367,6 +367,11 @@ static HRESULT query_typelib_path( REFGUID guid, WORD wMaj, WORD wMin,
*/
HRESULT
WINAPI
QueryPathOfRegTypeLib
(
REFGUID
guid
,
WORD
wMaj
,
WORD
wMin
,
LCID
lcid
,
LPBSTR
path
)
{
#ifdef _WIN64
HRESULT
hres
=
query_typelib_path
(
guid
,
wMaj
,
wMin
,
SYS_WIN64
,
lcid
,
path
);
if
(
SUCCEEDED
(
hres
))
return
hres
;
#endif
return
query_typelib_path
(
guid
,
wMaj
,
wMin
,
SYS_WIN32
,
lcid
,
path
);
}
...
...
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