Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
21d09ffb
Commit
21d09ffb
authored
Jul 22, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Fix test failures on wow64.
parent
d8b7a209
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
msi.c
dlls/msi/tests/msi.c
+0
-0
package.c
dlls/msi/tests/package.c
+22
-6
source.c
dlls/msi/tests/source.c
+0
-0
No files found.
dlls/msi/tests/msi.c
View file @
21d09ffb
This diff is collapsed.
Click to expand it.
dlls/msi/tests/package.c
View file @
21d09ffb
...
...
@@ -36,6 +36,8 @@ char CURR_DIR[MAX_PATH];
static
UINT
(
WINAPI
*
pMsiApplyMultiplePatchesA
)(
LPCSTR
,
LPCSTR
,
LPCSTR
);
static
BOOL
(
WINAPI
*
pConvertSidToStringSidA
)(
PSID
,
LPSTR
*
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExA
)(
HKEY
,
LPCSTR
,
REGSAM
,
DWORD
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
PBOOL
);
static
BOOL
(
WINAPI
*
pSRRemoveRestorePoint
)(
DWORD
);
static
BOOL
(
WINAPI
*
pSRSetRestorePointA
)(
RESTOREPOINTINFOA
*
,
STATEMGRSTATUS
*
);
...
...
@@ -44,6 +46,7 @@ static void init_functionpointers(void)
{
HMODULE
hmsi
=
GetModuleHandleA
(
"msi.dll"
);
HMODULE
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
HMODULE
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
HMODULE
hsrclient
;
#define GET_PROC(mod, func) \
...
...
@@ -52,6 +55,8 @@ static void init_functionpointers(void)
GET_PROC
(
hmsi
,
MsiApplyMultiplePatchesA
);
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
);
GET_PROC
(
hadvapi32
,
RegDeleteKeyExA
)
GET_PROC
(
hkernel32
,
IsWow64Process
)
hsrclient
=
LoadLibraryA
(
"srclient.dll"
);
GET_PROC
(
hsrclient
,
SRRemoveRestorePoint
);
...
...
@@ -59,6 +64,12 @@ static void init_functionpointers(void)
#undef GET_PROC
}
static
LONG
delete_key
(
HKEY
key
,
LPCSTR
subkey
,
REGSAM
access
)
{
if
(
pRegDeleteKeyExA
)
return
pRegDeleteKeyExA
(
key
,
subkey
,
access
,
0
);
return
RegDeleteKeyA
(
key
,
subkey
);
}
static
LPSTR
get_user_sid
(
LPSTR
*
usersid
)
{
...
...
@@ -11559,6 +11570,8 @@ static void test_MsiGetProductProperty(void)
LONG
res
;
UINT
r
;
SC_HANDLE
scm
;
REGSAM
access
=
KEY_ALL_ACCESS
;
BOOL
wow64
;
scm
=
OpenSCManager
(
NULL
,
NULL
,
SC_MANAGER_CONNECT
);
if
(
!
scm
&&
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
))
...
...
@@ -11573,6 +11586,9 @@ static void test_MsiGetProductProperty(void)
create_test_guid
(
prodcode
,
prod_squashed
);
if
(
pIsWow64Process
&&
pIsWow64Process
(
GetCurrentProcess
(),
&
wow64
)
&&
wow64
)
access
|=
KEY_WOW64_64KEY
;
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -11611,14 +11627,14 @@ static void test_MsiGetProductProperty(void)
lstrcpyA
(
keypath
,
"Software
\\
Classes
\\
Installer
\\
Products
\\
"
);
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKey
A
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
prodkey
);
res
=
RegCreateKey
ExA
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
NULL
,
0
,
access
,
NULL
,
&
prodkey
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
lstrcpyA
(
keypath
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
"
);
lstrcatA
(
keypath
,
"Installer
\\
UserData
\\
S-1-5-18
\\
Products
\\
"
);
lstrcatA
(
keypath
,
prod_squashed
);
res
=
RegCreateKey
A
(
HKEY_LOCAL_MACHINE
,
keypath
,
&
userkey
);
res
=
RegCreateKey
ExA
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
NULL
,
0
,
access
,
NULL
,
&
userkey
,
NULL
);
if
(
res
==
ERROR_ACCESS_DENIED
)
{
skip
(
"Not enough rights to perform tests
\n
"
);
...
...
@@ -11628,7 +11644,7 @@ static void test_MsiGetProductProperty(void)
}
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegCreateKey
A
(
userkey
,
"InstallProperties"
,
&
props
);
res
=
RegCreateKey
ExA
(
userkey
,
"InstallProperties"
,
0
,
NULL
,
0
,
access
,
NULL
,
&
props
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
lstrcpyA
(
val
,
path
);
...
...
@@ -11763,11 +11779,11 @@ static void test_MsiGetProductProperty(void)
MsiCloseHandle
(
hprod
);
RegDeleteValueA
(
props
,
"LocalPackage"
);
RegDeleteKeyA
(
props
,
""
);
delete_key
(
props
,
""
,
access
);
RegCloseKey
(
props
);
RegDeleteKeyA
(
userkey
,
""
);
delete_key
(
userkey
,
""
,
access
);
RegCloseKey
(
userkey
);
RegDeleteKeyA
(
prodkey
,
""
);
delete_key
(
prodkey
,
""
,
access
);
RegCloseKey
(
prodkey
);
DeleteFileA
(
msifile
);
}
...
...
dlls/msi/tests/source.c
View file @
21d09ffb
This diff is collapsed.
Click to expand it.
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