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
6be7ba75
Commit
6be7ba75
authored
Sep 28, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement MsiDatabaseImport.
parent
4301816d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
102 deletions
+53
-102
database.c
dlls/msi/database.c
+0
-0
db.c
dlls/msi/tests/db.c
+31
-56
install.c
dlls/msi/tests/install.c
+22
-46
No files found.
dlls/msi/database.c
View file @
6be7ba75
This diff is collapsed.
Click to expand it.
dlls/msi/tests/db.c
View file @
6be7ba75
...
...
@@ -1396,91 +1396,66 @@ static void test_msiimport(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_table_to_db
(
hdb
,
test_data
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
query
=
"SELECT * FROM `TestTable`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_NAMES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
todo_wine
{
ok
(
count
==
9
,
"Expected 9, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"FirstPrimaryColumn"
),
"Expected FirstPrimaryColumn
\n
"
);
ok
(
check_record
(
rec
,
2
,
"SecondPrimaryColumn"
),
"Expected SecondPrimaryColumn
\n
"
);
ok
(
check_record
(
rec
,
3
,
"ShortInt"
),
"Expected ShortInt
\n
"
);
ok
(
check_record
(
rec
,
4
,
"ShortIntNullable"
),
"Expected ShortIntNullalble
\n
"
);
ok
(
check_record
(
rec
,
5
,
"LongInt"
),
"Expected LongInt
\n
"
);
ok
(
check_record
(
rec
,
6
,
"LongIntNullable"
),
"Expected LongIntNullalble
\n
"
);
ok
(
check_record
(
rec
,
7
,
"String"
),
"Expected String
\n
"
);
ok
(
check_record
(
rec
,
8
,
"LocalizableString"
),
"Expected LocalizableString
\n
"
);
ok
(
check_record
(
rec
,
9
,
"LocalizableStringNullable"
),
"Expected LocalizableStringNullable
\n
"
);
}
ok
(
count
==
9
,
"Expected 9, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"FirstPrimaryColumn"
),
"Expected FirstPrimaryColumn
\n
"
);
ok
(
check_record
(
rec
,
2
,
"SecondPrimaryColumn"
),
"Expected SecondPrimaryColumn
\n
"
);
ok
(
check_record
(
rec
,
3
,
"ShortInt"
),
"Expected ShortInt
\n
"
);
ok
(
check_record
(
rec
,
4
,
"ShortIntNullable"
),
"Expected ShortIntNullalble
\n
"
);
ok
(
check_record
(
rec
,
5
,
"LongInt"
),
"Expected LongInt
\n
"
);
ok
(
check_record
(
rec
,
6
,
"LongIntNullable"
),
"Expected LongIntNullalble
\n
"
);
ok
(
check_record
(
rec
,
7
,
"String"
),
"Expected String
\n
"
);
ok
(
check_record
(
rec
,
8
,
"LocalizableString"
),
"Expected LocalizableString
\n
"
);
ok
(
check_record
(
rec
,
9
,
"LocalizableStringNullable"
),
"Expected LocalizableStringNullable
\n
"
);
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_TYPES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
ok
(
count
==
9
,
"Expected 9, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"s255"
),
"Expected s255
\n
"
);
ok
(
check_record
(
rec
,
4
,
"I2"
),
"Expected I2
\n
"
);
ok
(
check_record
(
rec
,
6
,
"I4"
),
"Expected I4
\n
"
);
ok
(
check_record
(
rec
,
7
,
"S255"
),
"Expected S255
\n
"
);
ok
(
check_record
(
rec
,
8
,
"S0"
),
"Expected S0
\n
"
);
ok
(
check_record
(
rec
,
9
,
"s0"
),
"Expected s0
\n
"
);
todo_wine
{
ok
(
count
==
9
,
"Expected 9, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"s255"
),
"Expected s255
\n
"
);
ok
(
check_record
(
rec
,
2
,
"i2"
),
"Expected i2
\n
"
);
ok
(
check_record
(
rec
,
3
,
"i2"
),
"Expected i2
\n
"
);
ok
(
check_record
(
rec
,
4
,
"I2"
),
"Expected I2
\n
"
);
ok
(
check_record
(
rec
,
5
,
"i4"
),
"Expected i4
\n
"
);
ok
(
check_record
(
rec
,
6
,
"I4"
),
"Expected I4
\n
"
);
ok
(
check_record
(
rec
,
7
,
"S255"
),
"Expected S255
\n
"
);
ok
(
check_record
(
rec
,
8
,
"S0"
),
"Expected S0
\n
"
);
ok
(
check_record
(
rec
,
9
,
"s0"
),
"Expected s0
\n
"
);
}
query
=
"SELECT * FROM `TestTable`"
;
r
=
do_query
(
hdb
,
query
,
&
rec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
todo_wine
{
ok
(
check_record
(
rec
,
1
,
"stringage"
),
"Expected 'stringage'
\n
"
);
ok
(
check_record
(
rec
,
7
,
"another string"
),
"Expected 'another string'
\n
"
);
ok
(
check_record
(
rec
,
8
,
"localizable"
),
"Expected 'localizable'
\n
"
);
ok
(
check_record
(
rec
,
9
,
"duh"
),
"Expected 'duh'
\n
"
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
check_record
(
rec
,
1
,
"stringage"
),
"Expected 'stringage'
\n
"
);
ok
(
check_record
(
rec
,
7
,
"another string"
),
"Expected 'another string'
\n
"
);
ok
(
check_record
(
rec
,
8
,
"localizable"
),
"Expected 'localizable'
\n
"
);
ok
(
check_record
(
rec
,
9
,
"duh"
),
"Expected 'duh'
\n
"
);
i
=
MsiRecordGetInteger
(
rec
,
2
);
todo_wine
{
ok
(
i
==
5
,
"Expected 5, got %d
\n
"
,
i
);
}
ok
(
i
==
5
,
"Expected 5, got %d
\n
"
,
i
);
i
=
MsiRecordGetInteger
(
rec
,
3
);
todo_wine
{
ok
(
i
==
2
,
"Expected 2, got %d
\n
"
,
i
);
}
ok
(
i
==
2
,
"Expected 2, got %d
\n
"
,
i
);
i
=
MsiRecordGetInteger
(
rec
,
4
);
ok
(
i
==
0x80000000
,
"Expected 0x80000000, got %d
\n
"
,
i
);
i
=
MsiRecordGetInteger
(
rec
,
5
);
todo_wine
{
ok
(
i
==
2147483640
,
"Expected 214748364
0, got %d
\n
"
,
i
);
ok
(
i
==
0x80000000
,
"Expected 0x8000000
0, got %d
\n
"
,
i
);
}
i
=
MsiRecordGetInteger
(
rec
,
5
);
ok
(
i
==
2147483640
,
"Expected 2147483640, got %d
\n
"
,
i
);
i
=
MsiRecordGetInteger
(
rec
,
6
);
todo_wine
{
ok
(
i
==
-
2147483640
,
"Expected -2147483640, got %d
\n
"
,
i
);
}
ok
(
i
==
-
2147483640
,
"Expected -2147483640, got %d
\n
"
,
i
);
MsiCloseHandle
(
rec
);
MsiCloseHandle
(
view
);
...
...
dlls/msi/tests/install.c
View file @
6be7ba75
...
...
@@ -579,10 +579,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
write_file
(
table
->
filename
,
table
->
data
,
(
table
->
size
-
1
)
*
sizeof
(
char
));
r
=
MsiDatabaseImportA
(
db
,
CURR_DIR
,
table
->
filename
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
DeleteFileA
(
table
->
filename
);
}
...
...
@@ -604,10 +601,7 @@ static void test_MsiInstallProduct(void)
DWORD
num
,
size
,
type
;
r
=
MsiInstallProductA
(
msifile
,
NULL
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
todo_wine
{
...
...
@@ -624,19 +618,13 @@ static void test_MsiInstallProduct(void)
}
res
=
RegOpenKey
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Wine
\\
msitest"
,
&
hkey
);
todo_wine
{
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
}
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
size
=
MAX_PATH
;
type
=
REG_SZ
;
res
=
RegQueryValueExA
(
hkey
,
"Name"
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
);
todo_wine
{
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
ok
(
!
lstrcmpA
(
path
,
"imaname"
),
"Expected imaname, got %s
\n
"
,
path
);
}
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
ok
(
!
lstrcmpA
(
path
,
"imaname"
),
"Expected imaname, got %s
\n
"
,
path
);
size
=
MAX_PATH
;
type
=
REG_SZ
;
...
...
@@ -649,11 +637,8 @@ static void test_MsiInstallProduct(void)
size
=
sizeof
(
num
);
type
=
REG_DWORD
;
res
=
RegQueryValueExA
(
hkey
,
"number"
,
NULL
,
&
type
,
(
LPBYTE
)
&
num
,
&
size
);
todo_wine
{
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
ok
(
num
==
314
,
"Expected 314, got %ld
\n
"
,
num
);
}
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %ld
\n
"
,
res
);
ok
(
num
==
314
,
"Expected 314, got %ld
\n
"
,
num
);
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Wine
\\
msitest"
);
}
...
...
@@ -683,10 +668,7 @@ static void test_MsiSetComponentState(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiSetComponentState
(
package
,
"dangler"
,
INSTALLSTATE_SOURCE
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
package
);
CoUninitialize
();
...
...
@@ -710,37 +692,31 @@ static void test_packagecoltypes(void)
query
=
"SELECT * FROM `Media`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
}
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_NAMES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"DiskId"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
2
,
"LastSequence"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
3
,
"DiskPrompt"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
4
,
"Cabinet"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"VolumeLabel"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"Source"
),
"wrong column label
\n
"
);
}
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"DiskId"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
2
,
"LastSequence"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
3
,
"DiskPrompt"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
4
,
"Cabinet"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"VolumeLabel"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"Source"
),
"wrong column label
\n
"
);
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_TYPES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
4
,
"S255"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"S32"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"S72"
),
"wrong column label
\n
"
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"i2"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
2
,
"i4"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
3
,
"L64"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
4
,
"S255"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"S32"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"S72"
),
"wrong column label
\n
"
);
}
MsiCloseHandle
(
hdb
);
...
...
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