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
ae5c7c2a
Commit
ae5c7c2a
authored
Oct 15, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Prepare automation.c for the switch to -D__WINESRC__.
parent
0e8b5ac5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
automation.c
dlls/msi/tests/automation.c
+11
-12
No files found.
dlls/msi/tests/automation.c
View file @
ae5c7c2a
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <msidefs.h>
#include <msidefs.h>
#include <msi.h>
#include <msi.h>
#include <fci.h>
#include <fci.h>
#include <oaidl.h>
#include "wine/test.h"
#include "wine/test.h"
...
@@ -237,9 +238,8 @@ static void write_file(const CHAR *filename, const char *data, int data_size)
...
@@ -237,9 +238,8 @@ static void write_file(const CHAR *filename, const char *data, int data_size)
{
{
DWORD
size
;
DWORD
size
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
HANDLE
hf
=
CreateFileA
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
WriteFile
(
hf
,
data
,
data_size
,
&
size
,
NULL
);
WriteFile
(
hf
,
data
,
data_size
,
&
size
,
NULL
);
CloseHandle
(
hf
);
CloseHandle
(
hf
);
}
}
...
@@ -333,13 +333,12 @@ static BOOL get_program_files_dir(LPSTR buf)
...
@@ -333,13 +333,12 @@ static BOOL get_program_files_dir(LPSTR buf)
HKEY
hkey
;
HKEY
hkey
;
DWORD
type
=
REG_EXPAND_SZ
,
size
;
DWORD
type
=
REG_EXPAND_SZ
,
size
;
if
(
RegOpenKey
(
HKEY_LOCAL_MACHINE
,
if
(
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion"
,
&
hkey
))
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion"
,
&
hkey
))
return
FALSE
;
return
FALSE
;
size
=
MAX_PATH
;
size
=
MAX_PATH
;
if
(
RegQueryValueEx
(
hkey
,
"ProgramFilesDir (x86)"
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
size
)
&&
if
(
RegQueryValueEx
A
(
hkey
,
"ProgramFilesDir (x86)"
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
size
)
&&
RegQueryValueEx
(
hkey
,
"ProgramFilesDir"
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
size
))
RegQueryValueEx
A
(
hkey
,
"ProgramFilesDir"
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
size
))
return
FALSE
;
return
FALSE
;
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
...
@@ -356,7 +355,7 @@ static void create_file(const CHAR *name, DWORD size)
...
@@ -356,7 +355,7 @@ static void create_file(const CHAR *name, DWORD size)
WriteFile
(
file
,
name
,
strlen
(
name
),
&
written
,
NULL
);
WriteFile
(
file
,
name
,
strlen
(
name
),
&
written
,
NULL
);
WriteFile
(
file
,
"
\n
"
,
strlen
(
"
\n
"
),
&
written
,
NULL
);
WriteFile
(
file
,
"
\n
"
,
strlen
(
"
\n
"
),
&
written
,
NULL
);
left
=
size
-
lstrlen
(
name
)
-
1
;
left
=
size
-
lstrlen
A
(
name
)
-
1
;
SetFilePointer
(
file
,
left
,
NULL
,
FILE_CURRENT
);
SetFilePointer
(
file
,
left
,
NULL
,
FILE_CURRENT
);
SetEndOfFile
(
file
);
SetEndOfFile
(
file
);
...
@@ -2321,7 +2320,7 @@ static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
...
@@ -2321,7 +2320,7 @@ static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
HKEY
hkey
;
HKEY
hkey
;
DWORD
dwSize
;
DWORD
dwSize
;
ret
=
RegOpenKeyEx
(
hkeyParent
,
subkey
,
0
,
access
,
&
hkey
);
ret
=
RegOpenKeyEx
A
(
hkeyParent
,
subkey
,
0
,
access
,
&
hkey
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
ret
=
RegQueryInfoKeyA
(
hkey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ret
=
RegQueryInfoKeyA
(
hkey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
...
@@ -2348,7 +2347,7 @@ static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, RE
...
@@ -2348,7 +2347,7 @@ static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, RE
*
phkey
=
0
;
*
phkey
=
0
;
ret
=
RegOpenKeyEx
(
hkeyParent
,
subkey
,
0
,
access
,
&
hkey
);
ret
=
RegOpenKeyEx
A
(
hkeyParent
,
subkey
,
0
,
access
,
&
hkey
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
ret
=
RegQueryInfoKeyA
(
hkey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ret
=
RegQueryInfoKeyA
(
hkey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
...
@@ -2525,7 +2524,7 @@ static void test_Installer_InstallProduct(void)
...
@@ -2525,7 +2524,7 @@ static void test_Installer_InstallProduct(void)
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
/* Remove registry keys written by PublishProduct standard action */
/* Remove registry keys written by PublishProduct standard action */
res
=
RegOpenKey
(
HKEY_CURRENT_USER
,
"SOFTWARE
\\
Microsoft
\\
Installer"
,
&
hkey
);
res
=
RegOpenKey
A
(
HKEY_CURRENT_USER
,
"SOFTWARE
\\
Microsoft
\\
Installer"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
delete_registry_key
(
hkey
,
"Products
\\
af054738b93a8cb43b12803b397f483b"
,
KEY_ALL_ACCESS
);
res
=
delete_registry_key
(
hkey
,
"Products
\\
af054738b93a8cb43b12803b397f483b"
,
KEY_ALL_ACCESS
);
...
@@ -2685,7 +2684,7 @@ START_TEST(automation)
...
@@ -2685,7 +2684,7 @@ START_TEST(automation)
GetSystemTimeAsFileTime
(
&
systemtime
);
GetSystemTimeAsFileTime
(
&
systemtime
);
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_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