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
1d124f88
Commit
1d124f88
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: Compile with -D__WINESRC__.
parent
0354af64
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
182 additions
and
128 deletions
+182
-128
Makefile.in
dlls/msi/tests/Makefile.in
+0
-1
action.c
dlls/msi/tests/action.c
+8
-2
automation.c
dlls/msi/tests/automation.c
+8
-2
db.c
dlls/msi/tests/db.c
+70
-69
format.c
dlls/msi/tests/format.c
+10
-2
install.c
dlls/msi/tests/install.c
+36
-23
msi.c
dlls/msi/tests/msi.c
+9
-3
package.c
dlls/msi/tests/package.c
+18
-12
patch.c
dlls/msi/tests/patch.c
+20
-11
record.c
dlls/msi/tests/record.c
+1
-1
suminfo.c
dlls/msi/tests/suminfo.c
+2
-2
No files found.
dlls/msi/tests/Makefile.in
View file @
1d124f88
TESTDLL
=
msi.dll
IMPORTS
=
cabinet msi shell32 ole32 oleaut32 user32 advapi32 version
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
action.c
\
...
...
dlls/msi/tests/action.c
View file @
1d124f88
...
...
@@ -2443,9 +2443,14 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
{
MSIHANDLE
db
;
UINT
r
;
int
j
;
WCHAR
*
nameW
;
int
j
,
len
;
r
=
MsiOpenDatabaseA
(
name
,
MSIDBOPEN_CREATE
,
&
db
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
NULL
,
0
);
if
(
!
(
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
;
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
nameW
,
len
);
r
=
MsiOpenDatabaseW
(
nameW
,
MSIDBOPEN_CREATE
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* import the tables into the database */
...
...
@@ -2467,6 +2472,7 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
db
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
}
static
BOOL
notify_system_change
(
DWORD
event_type
,
STATEMGRSTATUS
*
status
)
...
...
dlls/msi/tests/automation.c
View file @
1d124f88
...
...
@@ -275,9 +275,14 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
{
MSIHANDLE
db
;
UINT
r
;
int
j
;
WCHAR
*
nameW
;
int
j
,
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
NULL
,
0
);
if
(
!
(
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
;
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
nameW
,
len
);
r
=
MsiOpenDatabase
A
(
name
,
MSIDBOPEN_CREATE
,
&
db
);
r
=
MsiOpenDatabase
W
(
nameW
,
MSIDBOPEN_CREATE
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* import the tables into the database */
...
...
@@ -299,6 +304,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
db
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
}
static
BOOL
create_package
(
LPWSTR
path
)
...
...
dlls/msi/tests/db.c
View file @
1d124f88
...
...
@@ -41,19 +41,19 @@ static void test_msidatabase(void)
MSIHANDLE
hdb
=
0
,
hdb2
=
0
;
UINT
res
;
DeleteFile
A
(
msifile
);
DeleteFile
W
(
msifileW
);
res
=
MsiOpenDatabase
A
(
msifile
,
msifile2
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
msifile2W
,
&
hdb
);
ok
(
res
==
ERROR_OPEN_FAILED
,
"expected failure
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
(
LP
STR
)
0xff
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
(
LPW
STR
)
0xff
,
&
hdb
);
ok
(
res
==
ERROR_INVALID_PARAMETER
,
"expected failure
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
res
=
MsiDatabaseCommit
(
hdb
);
...
...
@@ -63,7 +63,7 @@ static void test_msidatabase(void)
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
msifile2
,
&
hdb2
);
res
=
MsiOpenDatabase
W
(
msifileW
,
msifile2W
,
&
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
ok
(
GetFileAttributesA
(
msifile2
)
!=
INVALID_FILE_ATTRIBUTES
,
"database should exist
\n
"
);
...
...
@@ -74,7 +74,7 @@ static void test_msidatabase(void)
res
=
MsiCloseHandle
(
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
msifile2
,
&
hdb2
);
res
=
MsiOpenDatabase
W
(
msifileW
,
msifile2W
,
&
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb2
);
...
...
@@ -82,7 +82,7 @@ static void test_msidatabase(void)
ok
(
GetFileAttributesA
(
msifile2
)
==
INVALID_FILE_ATTRIBUTES
,
"uncommitted database should not exist
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
msifile2
,
&
hdb2
);
res
=
MsiOpenDatabase
W
(
msifileW
,
msifile2W
,
&
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiDatabaseCommit
(
hdb2
);
...
...
@@ -93,7 +93,7 @@ static void test_msidatabase(void)
ok
(
GetFileAttributesA
(
msifile2
)
!=
INVALID_FILE_ATTRIBUTES
,
"committed database should exist
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiDatabaseCommit
(
hdb
);
...
...
@@ -102,13 +102,13 @@ static void test_msidatabase(void)
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
...
...
@@ -116,7 +116,7 @@ static void test_msidatabase(void)
ok
(
GetFileAttributesA
(
msifile
)
!=
INVALID_FILE_ATTRIBUTES
,
"database should exist
\n
"
);
/* MSIDBOPEN_CREATE deletes the database if MsiCommitDatabase isn't called */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
ok
(
GetFileAttributesA
(
msifile
)
!=
INVALID_FILE_ATTRIBUTES
,
"database should exist
\n
"
);
...
...
@@ -126,7 +126,7 @@ static void test_msidatabase(void)
ok
(
GetFileAttributesA
(
msifile
)
==
INVALID_FILE_ATTRIBUTES
,
"database should exist
\n
"
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiDatabaseCommit
(
hdb
);
...
...
@@ -306,7 +306,7 @@ static void test_msiinsert(void)
DeleteFileA
(
msifile
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
/* create a table */
...
...
@@ -574,7 +574,7 @@ static void test_msibadqueries(void)
DeleteFileA
(
msifile
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiDatabaseCommit
(
hdb
);
...
...
@@ -584,7 +584,7 @@ static void test_msibadqueries(void)
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
/* open it readonly */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database r/o
\n
"
);
/* add a table to it */
...
...
@@ -595,7 +595,7 @@ static void test_msibadqueries(void)
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close database r/o
\n
"
);
/* open it read/write */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database r/w
\n
"
);
/* a bunch of test queries that fail with the native MSI */
...
...
@@ -797,7 +797,7 @@ static void test_viewmodify(void)
DeleteFileA
(
msifile
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `phone` ( "
...
...
@@ -1140,10 +1140,10 @@ static MSIHANDLE create_db(void)
MSIHANDLE
hdb
=
0
;
UINT
res
;
DeleteFile
A
(
msifile
);
DeleteFile
W
(
msifileW
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
if
(
res
!=
ERROR_SUCCESS
)
return
hdb
;
...
...
@@ -1397,10 +1397,10 @@ static void test_msiexport(void)
"phone
\t
id
\r\n
"
"1
\t
Abe
\t
8675309
\r\n
"
;
DeleteFile
A
(
msifile
);
DeleteFile
W
(
msifileW
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
/* create a table */
...
...
@@ -1466,9 +1466,9 @@ static void test_longstrings(void)
UINT
r
;
const
DWORD
STRING_LENGTH
=
0x10005
;
DeleteFile
A
(
msifile
);
DeleteFile
W
(
msifileW
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
/* create a table */
...
...
@@ -1491,7 +1491,7 @@ static void test_longstrings(void)
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseCommit failed
\n
"
);
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiDatabaseOpenViewA
(
hdb
,
"select * from `strings` where `id` = 1"
,
&
hview
);
...
...
@@ -1564,7 +1564,7 @@ static void test_streamtable(void)
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
/* check the column types */
...
...
@@ -1777,7 +1777,7 @@ static void test_binary(void)
UINT
r
;
/* insert a file into the Binary table */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
query
=
"CREATE TABLE `Binary` ( `Name` CHAR(72) NOT NULL, `ID` INT NOT NULL, `Data` OBJECT PRIMARY KEY `Name`, `ID`)"
;
...
...
@@ -1804,7 +1804,7 @@ static void test_binary(void)
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
/* read file from the Stream table */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
query
=
"SELECT * FROM `_Streams`"
;
...
...
@@ -2162,7 +2162,7 @@ static void test_suminfo_import(void)
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
add_table_to_db
(
hdb
,
suminfo
);
...
...
@@ -2282,7 +2282,7 @@ static void test_msiimport(void)
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_table_to_db
(
hdb
,
test_data
);
...
...
@@ -2499,7 +2499,7 @@ static void test_binary_import(void)
create_file_data
(
"bin_import/filename1.ibd"
,
"just some words"
,
15
);
/* import files into database */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
GetCurrentDirectoryA
(
MAX_PATH
,
path
);
...
...
@@ -2766,13 +2766,13 @@ static void generate_transform(void)
/* start with two identical databases */
CopyFileA
(
msifile2
,
msifile
,
FALSE
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb1
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
r
=
MsiDatabaseCommit
(
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
r
=
MsiOpenDatabase
A
(
msifile2
,
MSIDBOPEN_READONLY
,
&
hdb2
);
r
=
MsiOpenDatabase
W
(
msifile2W
,
MSIDBOPEN_READONLY
,
&
hdb2
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
/* the transform between two identical database should be empty */
...
...
@@ -3018,15 +3018,15 @@ static UINT set_summary_info(MSIHANDLE hdb)
return
res
;
}
static
MSIHANDLE
create_package_db
(
LPCSTR
filename
)
static
MSIHANDLE
create_package_db
(
const
WCHAR
*
filename
)
{
MSIHANDLE
hdb
=
0
;
UINT
res
;
DeleteFile
A
(
msifile
);
DeleteFile
W
(
msifileW
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
filename
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
filename
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
if
(
res
!=
ERROR_SUCCESS
)
return
hdb
;
...
...
@@ -3077,7 +3077,7 @@ static void test_try_transform(void)
DeleteFileA
(
mstfile
);
/* create the database */
hdb
=
create_package_db
(
msifile
);
hdb
=
create_package_db
(
msifile
W
);
ok
(
hdb
,
"Failed to create package db
\n
"
);
query
=
"CREATE TABLE `MOO` ( `NOO` SHORT NOT NULL, `OOO` CHAR(255) PRIMARY KEY `NOO`)"
;
...
...
@@ -3130,7 +3130,7 @@ static void test_try_transform(void)
else
generate_transform_manual
();
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
r
=
MsiDatabaseApplyTransformA
(
hdb
,
mstfile
,
0
);
...
...
@@ -4297,7 +4297,7 @@ static void test_integers(void)
UINT
r
;
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
/* create a table */
...
...
@@ -4425,7 +4425,7 @@ static void test_update(void)
UINT
r
;
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
/* create the Control table */
...
...
@@ -4728,7 +4728,7 @@ static void test_special_tables(void)
MSIHANDLE
hdb
=
0
;
UINT
r
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `_Properties` ( "
...
...
@@ -4768,7 +4768,7 @@ static void test_tables_order(void)
char
buffer
[
100
];
DWORD
sz
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `foo` ( "
...
...
@@ -4922,7 +4922,7 @@ static void test_rows_order(void)
char
buffer
[
100
];
DWORD
sz
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `foo` ( "
...
...
@@ -5087,7 +5087,7 @@ static void test_collation(void)
WCHAR
bufferW
[
100
];
DWORD
sz
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `bar` ( "
...
...
@@ -5366,7 +5366,7 @@ static void test_viewmodify_update(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `table` (`A` INT, `B` INT PRIMARY KEY `A`)"
;
...
...
@@ -5624,7 +5624,7 @@ static void test_viewmodify_assign(void)
/* setup database */
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `table` (`A` INT, `B` INT PRIMARY KEY `A`)"
;
...
...
@@ -5786,7 +5786,7 @@ static void test_stringtable(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `MOO` (`A` INT, `B` CHAR(72) PRIMARY KEY `A`)"
;
...
...
@@ -5848,7 +5848,7 @@ static void test_stringtable(void)
r
=
MsiCloseHandle
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `MOO`"
;
...
...
@@ -6014,7 +6014,7 @@ static void test_viewmodify_delete(void)
DeleteFileA
(
msifile
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `phone` ( "
...
...
@@ -6188,7 +6188,7 @@ static void test_defaultdatabase(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiDatabaseCommit
(
hdb
);
...
...
@@ -6472,7 +6472,7 @@ static void test_viewmodify_delete_temporary(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` SHORT PRIMARY KEY `A` )"
;
...
...
@@ -6590,7 +6590,7 @@ static void test_deleterow(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )"
;
...
...
@@ -6614,7 +6614,7 @@ static void test_deleterow(void)
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `Table`"
;
...
...
@@ -6657,7 +6657,7 @@ static void test_quotes(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )"
;
...
...
@@ -6763,7 +6763,7 @@ static void test_carriagereturn(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table`
\r
( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )"
;
...
...
@@ -6949,7 +6949,7 @@ static void test_noquotes(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE Table ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )"
;
...
...
@@ -7158,7 +7158,7 @@ static void test_forcecodepage(void)
DeleteFileA
(
msifile
);
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `_ForceCodepage`"
;
...
...
@@ -7182,7 +7182,7 @@ static void test_forcecodepage(void)
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `_ForceCodepage`"
;
...
...
@@ -7228,7 +7228,7 @@ static void test_viewmodify_refresh(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` CHAR(72) NOT NULL, `B` INT PRIMARY KEY `A` )"
;
...
...
@@ -7316,7 +7316,7 @@ static void test_where_viewmodify(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `Table` ( `A` INT, `B` INT PRIMARY KEY `A` )"
;
...
...
@@ -7461,7 +7461,7 @@ static void test_storages_table(void)
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
/* check the column types */
...
...
@@ -7571,7 +7571,7 @@ static void test_dbtopackage(void)
UINT
r
;
/* create an empty database, transact mode */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
set_summary_info
(
hdb
);
...
...
@@ -7635,7 +7635,7 @@ static void test_dbtopackage(void)
MsiCloseHandle
(
hpkg
);
/* create an empty database, direct mode */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
set_summary_info
(
hdb
);
...
...
@@ -7705,7 +7705,7 @@ static void test_droptable(void)
DWORD
size
;
UINT
r
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"CREATE TABLE `One` ( `A` INT PRIMARY KEY `A` )"
;
...
...
@@ -7918,16 +7918,17 @@ static void test_droptable(void)
static
void
test_dbmerge
(
void
)
{
static
const
WCHAR
refdbW
[]
=
{
'r'
,
'e'
,
'f'
,
'd'
,
'b'
,
'.'
,
'm'
,
's'
,
'i'
,
0
};
MSIHANDLE
hdb
,
href
,
hview
,
hrec
;
CHAR
buf
[
MAX_PATH
];
LPCSTR
query
;
DWORD
size
;
UINT
r
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
"refdb.msi"
,
MSIDBOPEN_CREATE
,
&
href
);
r
=
MsiOpenDatabase
W
(
refdbW
,
MSIDBOPEN_CREATE
,
&
href
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* hDatabase is invalid */
...
...
@@ -8536,7 +8537,7 @@ static void test_dbmerge(void)
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
href
);
DeleteFileA
(
msifile
);
DeleteFile
A
(
"refdb.msi"
);
DeleteFile
W
(
refdbW
);
DeleteFileA
(
"codepage.idt"
);
DeleteFileA
(
"binary.dat"
);
}
...
...
@@ -9322,7 +9323,7 @@ static void test_createtable(void)
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
query
=
"SELECT * FROM `a`"
;
...
...
@@ -9368,7 +9369,7 @@ static void test_embedded_nulls(void)
MSIHANDLE
hdb
,
hrec
;
char
buffer
[
32
];
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
...
...
@@ -9399,7 +9400,7 @@ static void test_select_column_names(void)
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database: %u
\n
"
,
r
);
r
=
try_query
(
hdb
,
"CREATE TABLE `t` (`a` CHAR NOT NULL, `b` CHAR PRIMARY KEY `a`)"
);
...
...
dlls/msi/tests/format.c
View file @
1d124f88
...
...
@@ -203,7 +203,7 @@ static MSIHANDLE create_package_db(void)
DeleteFileW
(
msifileW
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database %u
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
return
0
;
...
...
@@ -267,11 +267,19 @@ static UINT helper_createpackage( const char *szName, MSIHANDLE *handle )
{
MSIHANDLE
hPackage
,
suminfo
,
hdb
=
0
;
UINT
res
;
WCHAR
*
nameW
;
int
len
;
DeleteFileA
(
szName
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szName
,
-
1
,
NULL
,
0
);
if
(
!
(
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
ERROR_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szName
,
-
1
,
nameW
,
len
);
/* create an empty database */
res
=
MsiOpenDatabaseA
(
szName
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
res
=
MsiOpenDatabaseW
(
nameW
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database %u
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
return
res
;
...
...
dlls/msi/tests/install.c
View file @
1d124f88
...
...
@@ -2306,9 +2306,14 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
{
MSIHANDLE
db
;
UINT
r
;
int
j
;
WCHAR
*
nameW
;
int
j
,
len
;
r
=
MsiOpenDatabaseA
(
name
,
MSIDBOPEN_CREATE
,
&
db
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
NULL
,
0
);
if
(
!
(
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
;
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
nameW
,
len
);
r
=
MsiOpenDatabaseW
(
nameW
,
MSIDBOPEN_CREATE
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* import the tables into the database */
...
...
@@ -2330,6 +2335,7 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
db
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
}
static
void
check_service_is_installed
(
void
)
...
...
@@ -2729,6 +2735,7 @@ static void test_packagecoltypes(void)
{
MSIHANDLE
hdb
,
view
,
rec
;
char
path
[
MAX_PATH
];
WCHAR
pathW
[
MAX_PATH
];
LPCSTR
query
;
UINT
r
,
count
;
...
...
@@ -2739,8 +2746,9 @@ static void test_packagecoltypes(void)
lstrcpyA
(
path
,
CURR_DIR
);
lstrcatA
(
path
,
"
\\
"
);
lstrcatA
(
path
,
msifile
);
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
pathW
,
MAX_PATH
);
r
=
MsiOpenDatabase
A
(
path
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
pathW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
query
=
"SELECT * FROM `Media`"
;
...
...
@@ -3413,13 +3421,13 @@ static void generate_transform(void)
/* start with two identical databases */
CopyFileA
(
msifile
,
msifile2
,
FALSE
);
r
=
MsiOpenDatabase
A
(
msifile2
,
MSIDBOPEN_TRANSACT
,
&
hdb1
);
r
=
MsiOpenDatabase
W
(
msifile2W
,
MSIDBOPEN_TRANSACT
,
&
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
r
=
MsiDatabaseCommit
(
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb2
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb2
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
query
=
"INSERT INTO `Property` ( `Property`, `Value` ) VALUES ( 'prop', 'val' )"
;
...
...
@@ -3629,12 +3637,12 @@ error:
RemoveDirectoryA
(
"diffdir"
);
}
static
void
set_admin_summary_info
(
const
CHAR
*
name
)
static
void
set_admin_summary_info
(
const
W
CHAR
*
name
)
{
MSIHANDLE
db
,
summary
;
UINT
r
;
r
=
MsiOpenDatabase
A
(
name
,
MSIDBOPEN_DIRECT
,
&
db
);
r
=
MsiOpenDatabase
W
(
name
,
MSIDBOPEN_DIRECT
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiGetSummaryInformationA
(
db
,
NULL
,
1
,
&
summary
);
...
...
@@ -3663,7 +3671,7 @@ static void test_admin(void)
create_file
(
"msitest
\\
augustus"
,
500
);
create_database
(
msifile
,
adm_tables
,
sizeof
(
adm_tables
)
/
sizeof
(
msi_table
));
set_admin_summary_info
(
msifile
);
set_admin_summary_info
(
msifile
W
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
...
...
@@ -3740,7 +3748,7 @@ static void test_adminprops(void)
create_file
(
"msitest
\\
augustus"
,
500
);
create_database
(
msifile
,
amp_tables
,
sizeof
(
amp_tables
)
/
sizeof
(
msi_table
));
set_admin_summary_info
(
msifile
);
set_admin_summary_info
(
msifile
W
);
set_admin_property_stream
(
msifile
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
...
...
@@ -4615,6 +4623,9 @@ error:
static
void
test_int_widths
(
void
)
{
static
const
WCHAR
msitestW
[]
=
{
'm'
,
's'
,
'i'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
msitableW
[]
=
{
'm'
,
's'
,
'i'
,
't'
,
'a'
,
'b'
,
'l'
,
'e'
,
'.'
,
'i'
,
'd'
,
't'
,
0
};
static
const
WCHAR
slashW
[]
=
{
'\\'
,
0
};
static
const
char
int0
[]
=
"int0
\n
i0
\n
int0
\t
int0
\n
1"
;
static
const
char
int1
[]
=
"int1
\n
i1
\n
int1
\t
int1
\n
1"
;
static
const
char
int2
[]
=
"int2
\n
i2
\n
int2
\t
int2
\n
1"
;
...
...
@@ -4638,41 +4649,43 @@ static void test_int_widths( void )
{
int5
,
sizeof
(
int5
)
-
1
,
ERROR_FUNCTION_FAILED
},
{
int8
,
sizeof
(
int8
)
-
1
,
ERROR_FUNCTION_FAILED
}
};
char
tmpdir
[
MAX_PATH
],
msitable
[
MAX_PATH
],
msidb
[
MAX_PATH
];
WCHAR
tmpdir
[
MAX_PATH
],
msitable
[
MAX_PATH
],
msidb
[
MAX_PATH
];
MSIHANDLE
db
;
UINT
r
,
i
;
GetTempPath
A
(
MAX_PATH
,
tmpdir
);
CreateDirectory
A
(
tmpdir
,
NULL
);
GetTempPath
W
(
MAX_PATH
,
tmpdir
);
CreateDirectory
W
(
tmpdir
,
NULL
);
lstrcpyA
(
msitable
,
tmpdir
);
lstrcatA
(
msitable
,
"
\\
msitable.idt"
);
lstrcpyW
(
msitable
,
tmpdir
);
lstrcatW
(
msitable
,
slashW
);
lstrcatW
(
msitable
,
msitableW
);
lstrcpyA
(
msidb
,
tmpdir
);
lstrcatA
(
msidb
,
"
\\
msitest.msi"
);
lstrcpyW
(
msidb
,
tmpdir
);
lstrcatW
(
msidb
,
slashW
);
lstrcatW
(
msidb
,
msitestW
);
r
=
MsiOpenDatabase
A
(
msidb
,
MSIDBOPEN_CREATE
,
&
db
);
r
=
MsiOpenDatabase
W
(
msidb
,
MSIDBOPEN_CREATE
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
DWORD
count
;
HANDLE
handle
=
CreateFile
A
(
msitable
,
GENERIC_WRITE
,
0
,
NULL
,
HANDLE
handle
=
CreateFile
W
(
msitable
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
WriteFile
(
handle
,
tests
[
i
].
data
,
tests
[
i
].
size
,
&
count
,
NULL
);
CloseHandle
(
handle
);
r
=
MsiDatabaseImport
A
(
db
,
tmpdir
,
"msitable.idt"
);
r
=
MsiDatabaseImport
W
(
db
,
tmpdir
,
msitableW
);
ok
(
r
==
tests
[
i
].
ret
,
" %u expected %u, got %u
\n
"
,
i
,
tests
[
i
].
ret
,
r
);
r
=
MsiDatabaseCommit
(
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
DeleteFile
A
(
msitable
);
DeleteFile
W
(
msitable
);
}
MsiCloseHandle
(
db
);
DeleteFile
A
(
msidb
);
RemoveDirectory
A
(
tmpdir
);
DeleteFile
W
(
msidb
);
RemoveDirectory
W
(
tmpdir
);
}
static
void
test_shortcut
(
void
)
...
...
@@ -5254,7 +5267,7 @@ static void test_icon_table(void)
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"failed to open db: %d
\n
"
,
res
);
query
=
"CREATE TABLE `Icon` (`Name` CHAR(72) NOT NULL, `Data` OBJECT NOT NULL PRIMARY KEY `Name`)"
;
...
...
dlls/msi/tests/msi.c
View file @
1d124f88
...
...
@@ -1045,9 +1045,14 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
{
MSIHANDLE
db
;
UINT
r
;
int
j
;
WCHAR
*
nameW
;
int
j
,
len
;
r
=
MsiOpenDatabaseA
(
name
,
MSIDBOPEN_CREATE
,
&
db
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
NULL
,
0
);
if
(
!
(
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
;
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
nameW
,
len
);
r
=
MsiOpenDatabaseW
(
nameW
,
MSIDBOPEN_CREATE
,
&
db
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* import the tables into the database */
...
...
@@ -1069,6 +1074,7 @@ static void create_database_wordcount(const CHAR *name, const msi_table *tables,
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
db
);
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
}
static
UINT
run_query
(
MSIHANDLE
hdb
,
const
char
*
query
)
...
...
@@ -1140,7 +1146,7 @@ static MSIHANDLE create_package_db(LPSTR prodcode)
DeleteFileA
(
msifile
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
if
(
res
!=
ERROR_SUCCESS
)
return
hdb
;
...
...
dlls/msi/tests/package.c
View file @
1d124f88
...
...
@@ -759,7 +759,7 @@ static MSIHANDLE create_package_db(void)
DeleteFileA
(
msifile
);
/* create an empty database */
res
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
res
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to create database %u
\n
"
,
res
);
if
(
res
!=
ERROR_SUCCESS
)
return
hdb
;
...
...
@@ -2435,7 +2435,7 @@ static void test_msipackage(void)
r
=
MsiOpenPackageA
(
name
,
&
hpack
);
ok
(
r
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* database exists, but is emtpy */
...
...
@@ -2466,7 +2466,7 @@ static void test_msipackage(void)
DeleteFileA
(
msifile
);
/* start with a clean database to show what constitutes a valid package */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
sprintf
(
name
,
"#%d"
,
hdb
);
...
...
@@ -2650,6 +2650,12 @@ static void test_states(void)
static
char
msifile2
[]
=
"winetest2-package.msi"
;
static
char
msifile3
[]
=
"winetest3-package.msi"
;
static
char
msifile4
[]
=
"winetest4-package.msi"
;
static
const
WCHAR
msifile2W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
'2'
,
'-'
,
'p'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'.'
,
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
msifile3W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
'3'
,
'-'
,
'p'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'.'
,
'm'
,
's'
,
'i'
,
0
};
static
const
WCHAR
msifile4W
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
'4'
,
'-'
,
'p'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'.'
,
'm'
,
's'
,
'i'
,
0
};
MSIHANDLE
hpkg
;
UINT
r
;
MSIHANDLE
hdb
;
...
...
@@ -3098,7 +3104,7 @@ static void test_states(void)
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=one,four ADDSOURCE=two,three REMOVE=six,seven REINSTALL=eight,nine,ten"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database: %d
\n
"
,
r
);
/* these properties must not be in the saved msi file */
...
...
@@ -3182,7 +3188,7 @@ static void test_states(void)
r
=
MsiInstallProductA
(
msifile2
,
"ADDLOCAL=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile2
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifile2W
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database: %d
\n
"
,
r
);
/* these properties must not be in the saved msi file */
...
...
@@ -3249,7 +3255,7 @@ static void test_states(void)
r
=
MsiInstallProductA
(
msifile3
,
"ADDSOURCE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile3
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifile3W
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database: %d
\n
"
,
r
);
/* this property must not be in the saved msi file */
...
...
@@ -3318,7 +3324,7 @@ static void test_states(void)
r
=
MsiInstallProductA
(
msifile3
,
"REINSTALL=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
msifile4
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifile4W
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database: %d
\n
"
,
r
);
/* this property must not be in the saved msi file */
...
...
@@ -6826,7 +6832,7 @@ static void test_MsiGetSourcePath(void)
/* compressed source */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
set_suminfo_prop
(
hdb
,
PID_WORDCOUNT
,
msidbSumInfoSourceTypeCompressed
);
...
...
@@ -7340,7 +7346,7 @@ static void test_shortlongsource(void)
/* short file names */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
set_suminfo_prop
(
hdb
,
PID_WORDCOUNT
,
msidbSumInfoSourceTypeSFN
);
...
...
@@ -7960,7 +7966,7 @@ static void test_access(void)
MSIHANDLE
hdb
;
UINT
r
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
test_file_access
(
msifile
,
create
);
...
...
@@ -7974,7 +7980,7 @@ static void test_access(void)
test_file_access
(
msifile
,
create_close
);
DeleteFileA
(
msifile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATEDIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
test_file_access
(
msifile
,
create
);
...
...
@@ -8177,7 +8183,7 @@ static void test_MsiGetProductProperty(void)
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiDatabaseCommit
(
hdb
);
...
...
dlls/msi/tests/patch.c
View file @
1d124f88
...
...
@@ -266,12 +266,12 @@ static void write_file( const char *filename, const char *data, DWORD data_size
CloseHandle
(
file
);
}
static
void
set_suminfo
(
const
char
*
filename
)
static
void
set_suminfo
(
const
WCHAR
*
filename
)
{
UINT
r
;
MSIHANDLE
hsi
,
hdb
;
r
=
MsiOpenDatabase
A
(
filename
,
MSIDBOPEN_DIRECT
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
filename
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
r
=
MsiGetSummaryInformationA
(
hdb
,
NULL
,
7
,
&
hsi
);
...
...
@@ -312,8 +312,14 @@ static void create_database( const char *filename, const struct msi_table *table
{
MSIHANDLE
hdb
;
UINT
r
,
i
;
WCHAR
*
filenameW
;
int
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
if
(
!
(
filenameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
;
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameW
,
len
);
r
=
MsiOpenDatabase
A
(
filename
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
filenameW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
/* import the tables into the database */
...
...
@@ -333,7 +339,8 @@ static void create_database( const char *filename, const struct msi_table *table
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
set_suminfo
(
filename
);
set_suminfo
(
filenameW
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameW
);
}
/* data for generating a patch */
...
...
@@ -712,6 +719,7 @@ static void test_simple_patch( void )
DWORD
size
;
char
path
[
MAX_PATH
],
install_source
[
MAX_PATH
],
buffer
[
32
];
const
char
*
query
;
WCHAR
pathW
[
MAX_PATH
];
MSIHANDLE
hpackage
,
hdb
,
hview
,
hrec
;
if
(
!
pMsiApplyPatchA
)
...
...
@@ -860,7 +868,8 @@ static void test_simple_patch( void )
"LocalPackage"
,
path
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiOpenDatabaseA
(
path
,
MSIDBOPEN_READONLY
,
&
hdb
);
MultiByteToWideChar
(
CP_ACP
,
0
,
path
,
-
1
,
pathW
,
MAX_PATH
);
r
=
MsiOpenDatabaseW
(
pathW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiDatabaseOpenViewA
(
hdb
,
query
,
&
hview
);
...
...
@@ -902,25 +911,25 @@ static void test_MsiOpenDatabase( void )
UINT
r
;
MSIHANDLE
hdb
;
r
=
MsiOpenDatabase
A
(
mspfile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
mspfileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
r
=
MsiDatabaseCommit
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to commit database %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
mspfile
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
mspfileW
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
ok
(
r
==
ERROR_OPEN_FAILED
,
"expected ERROR_OPEN_FAILED, got %u
\n
"
,
r
);
DeleteFileA
(
mspfile
);
r
=
MsiOpenDatabase
A
(
mspfile
,
MSIDBOPEN_CREATE
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
mspfileW
,
MSIDBOPEN_CREATE
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
r
=
MsiDatabaseCommit
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to commit database %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
r
=
MsiOpenDatabase
A
(
mspfile
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
mspfileW
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
DeleteFileA
(
mspfile
);
...
...
@@ -928,10 +937,10 @@ static void test_MsiOpenDatabase( void )
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
struct
msi_table
)
);
create_patch
(
mspfile
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
ok
(
r
==
ERROR_OPEN_FAILED
,
"failed to open database %u
\n
"
,
r
);
r
=
MsiOpenDatabase
A
(
mspfile
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
mspfileW
,
MSIDBOPEN_READONLY
+
MSIDBOPEN_PATCHFILE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to open database %u
\n
"
,
r
);
MsiCloseHandle
(
hdb
);
...
...
dlls/msi/tests/record.c
View file @
1d124f88
...
...
@@ -547,7 +547,7 @@ static void test_fieldzero(void)
MsiCloseHandle
(
rec
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
query
=
"CREATE TABLE `drone` ( "
...
...
dlls/msi/tests/suminfo.c
View file @
1d124f88
...
...
@@ -79,7 +79,7 @@ static void test_suminfo(void)
DeleteFileA
(
msifile
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiGetSummaryInformationA
(
hdb
,
NULL
,
0
,
NULL
);
...
...
@@ -411,7 +411,7 @@ static void test_summary_binary(void)
ok
(
GetFileAttributesA
(
msifile
)
!=
INVALID_FILE_ATTRIBUTES
,
"file doesn't exist!
\n
"
);
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
W
(
msifileW
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiGetSummaryInformationA
(
hdb
,
NULL
,
0
,
&
hsuminfo
);
...
...
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