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
07043df7
Commit
07043df7
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 suminfo.c for the switch to -D__WINESRC__.
parent
2a70f1bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
53 deletions
+53
-53
suminfo.c
dlls/msi/tests/suminfo.c
+53
-53
No files found.
dlls/msi/tests/suminfo.c
View file @
07043df7
...
@@ -76,27 +76,27 @@ static void test_suminfo(void)
...
@@ -76,27 +76,27 @@ static void test_suminfo(void)
FILETIME
ft
;
FILETIME
ft
;
char
buf
[
0x10
];
char
buf
[
0x10
];
DeleteFile
(
msifile
);
DeleteFile
A
(
msifile
);
/* just MsiOpenDatabase should not create a file */
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiGetSummaryInformation
(
hdb
,
NULL
,
0
,
NULL
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiGetSummaryInformation wrong error
\n
"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiGetSummaryInformation wrong error
\n
"
);
r
=
MsiGetSummaryInformation
(
hdb
,
NULL
,
0
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
NULL
,
0
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
r
=
MsiCloseHandle
(
hsuminfo
);
r
=
MsiCloseHandle
(
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
r
=
MsiGetSummaryInformation
(
0
,
""
,
0
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
0
,
""
,
0
,
&
hsuminfo
);
todo_wine
todo_wine
ok
(
r
==
ERROR_INSTALL_PACKAGE_INVALID
||
r
==
ERROR_INSTALL_PACKAGE_OPEN_FAILED
,
ok
(
r
==
ERROR_INSTALL_PACKAGE_INVALID
||
r
==
ERROR_INSTALL_PACKAGE_OPEN_FAILED
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
r
=
MsiGetSummaryInformation
(
hdb
,
""
,
0
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
""
,
0
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
r
=
MsiSummaryInfoGetPropertyCount
(
0
,
NULL
);
r
=
MsiSummaryInfoGetPropertyCount
(
0
,
NULL
);
...
@@ -110,23 +110,23 @@ static void test_suminfo(void)
...
@@ -110,23 +110,23 @@ static void test_suminfo(void)
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
count
==
0
,
"count should be zero
\n
"
);
ok
(
count
==
0
,
"count should be zero
\n
"
);
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
0
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
0
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
-
1
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
-
1
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_UNKNOWN_PROPERTY
,
"MsiSummaryInfoGetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_UNKNOWN_PROPERTY
,
"MsiSummaryInfoGetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_SECURITY
+
1
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_SECURITY
+
1
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_UNKNOWN_PROPERTY
,
"MsiSummaryInfoGetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_UNKNOWN_PROPERTY
,
"MsiSummaryInfoGetProperty wrong error
\n
"
);
type
=
-
1
;
type
=
-
1
;
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
0
,
&
type
,
NULL
,
NULL
,
0
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
0
,
&
type
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
type
==
0
,
"wrong type
\n
"
);
ok
(
type
==
0
,
"wrong type
\n
"
);
type
=
-
1
;
type
=
-
1
;
val
=
1234
;
val
=
1234
;
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
0
,
&
type
,
&
val
,
NULL
,
0
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
0
,
&
type
,
&
val
,
NULL
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
type
==
0
,
"wrong type
\n
"
);
ok
(
type
==
0
,
"wrong type
\n
"
);
ok
(
val
==
1234
,
"wrong val
\n
"
);
ok
(
val
==
1234
,
"wrong val
\n
"
);
...
@@ -134,73 +134,73 @@ static void test_suminfo(void)
...
@@ -134,73 +134,73 @@ static void test_suminfo(void)
buf
[
0
]
=
'x'
;
buf
[
0
]
=
'x'
;
buf
[
1
]
=
0
;
buf
[
1
]
=
0
;
sz
=
0x10
;
sz
=
0x10
;
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_REVNUMBER
,
&
type
,
&
val
,
NULL
,
buf
,
&
sz
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_REVNUMBER
,
&
type
,
&
val
,
NULL
,
buf
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
buf
[
0
]
==
'x'
,
"cleared buffer
\n
"
);
ok
(
buf
[
0
]
==
'x'
,
"cleared buffer
\n
"
);
ok
(
sz
==
0x10
,
"count wasn't zero
\n
"
);
ok
(
sz
==
0x10
,
"count wasn't zero
\n
"
);
ok
(
type
==
VT_EMPTY
,
"should be empty
\n
"
);
ok
(
type
==
VT_EMPTY
,
"should be empty
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
1
,
NULL
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
1
,
NULL
,
"JungAh"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"JungAh"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiCloseHandle
(
hsuminfo
);
r
=
MsiCloseHandle
(
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
/* try again with the update count set */
/* try again with the update count set */
r
=
MsiGetSummaryInformation
(
hdb
,
NULL
,
1
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
NULL
,
1
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
0
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
0
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_I4
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_I4
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_AUTHOR
,
VT_I4
,
0
,
NULL
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_AUTHOR
,
VT_I4
,
0
,
NULL
,
"JungAh"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_KEYWORDS
,
VT_I2
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_KEYWORDS
,
VT_I2
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_COMMENTS
,
VT_FILETIME
,
0
,
NULL
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_COMMENTS
,
VT_FILETIME
,
0
,
NULL
,
"JungAh"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TEMPLATE
,
VT_I2
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TEMPLATE
,
VT_I2
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_LASTAUTHOR
,
VT_LPSTR
,
0
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_LASTAUTHOR
,
VT_LPSTR
,
0
,
NULL
,
NULL
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_LASTSAVE_DTM
,
VT_FILETIME
,
0
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_LASTSAVE_DTM
,
VT_FILETIME
,
0
,
NULL
,
NULL
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_LASTAUTHOR
,
VT_LPWSTR
,
0
,
NULL
,
"h
\0
i
\0\0
"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_LASTAUTHOR
,
VT_LPWSTR
,
0
,
NULL
,
"h
\0
i
\0\0
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_REVNUMBER
,
VT_I4
,
0
,
NULL
,
"Jungah"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_REVNUMBER
,
VT_I4
,
0
,
NULL
,
"Jungah"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_PAGECOUNT
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_PAGECOUNT
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
sz
=
2
;
sz
=
2
;
strcpy
(
buf
,
"x"
);
strcpy
(
buf
,
"x"
);
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_TITLE
,
&
type
,
NULL
,
NULL
,
buf
,
&
sz
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_TITLE
,
&
type
,
NULL
,
NULL
,
buf
,
&
sz
);
ok
(
r
==
ERROR_MORE_DATA
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
r
==
ERROR_MORE_DATA
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
sz
==
4
,
"count was wrong
\n
"
);
ok
(
sz
==
4
,
"count was wrong
\n
"
);
ok
(
type
==
VT_LPSTR
,
"type was wrong
\n
"
);
ok
(
type
==
VT_LPSTR
,
"type was wrong
\n
"
);
...
@@ -208,38 +208,38 @@ static void test_suminfo(void)
...
@@ -208,38 +208,38 @@ static void test_suminfo(void)
sz
=
4
;
sz
=
4
;
strcpy
(
buf
,
"x"
);
strcpy
(
buf
,
"x"
);
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_TITLE
,
&
type
,
NULL
,
NULL
,
buf
,
&
sz
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_TITLE
,
&
type
,
NULL
,
NULL
,
buf
,
&
sz
);
ok
(
r
==
ERROR_MORE_DATA
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
r
==
ERROR_MORE_DATA
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
sz
==
4
,
"count was wrong
\n
"
);
ok
(
sz
==
4
,
"count was wrong
\n
"
);
ok
(
type
==
VT_LPSTR
,
"type was wrong
\n
"
);
ok
(
type
==
VT_LPSTR
,
"type was wrong
\n
"
);
ok
(
!
strcmp
(
buf
,
"Mik"
),
"buffer was wrong
\n
"
);
ok
(
!
strcmp
(
buf
,
"Mik"
),
"buffer was wrong
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"JungAh"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"Mike"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiCloseHandle
(
hsuminfo
);
r
=
MsiCloseHandle
(
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
/* try again with a higher update count */
/* try again with a higher update count */
r
=
MsiGetSummaryInformation
(
hdb
,
NULL
,
10
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
NULL
,
10
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"JungAh"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"JungAh"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty failed
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_LPSTR
,
1
,
NULL
,
NULL
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_DATATYPE_MISMATCH
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
NULL
,
NULL
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
NULL
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_CODEPAGE
,
VT_I2
,
1
,
&
ft
,
"Mike"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
...
@@ -254,10 +254,10 @@ static void test_suminfo(void)
...
@@ -254,10 +254,10 @@ static void test_suminfo(void)
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
/* filename, non-zero update count */
/* filename, non-zero update count */
r
=
MsiGetSummaryInformation
(
0
,
msifile
,
1
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
0
,
msifile
,
1
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoSetProperty wrong error
\n
"
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
...
@@ -267,10 +267,10 @@ static void test_suminfo(void)
...
@@ -267,10 +267,10 @@ static void test_suminfo(void)
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed %u
\n
"
,
r
);
/* filename, zero update count */
/* filename, zero update count */
r
=
MsiGetSummaryInformation
(
0
,
msifile
,
0
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
0
,
msifile
,
0
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed %u
\n
"
,
r
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_AUTHOR
,
VT_LPSTR
,
1
,
&
ft
,
"Mike"
);
todo_wine
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error, %u
\n
"
,
r
);
todo_wine
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty wrong error, %u
\n
"
,
r
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
...
@@ -279,7 +279,7 @@ static void test_suminfo(void)
...
@@ -279,7 +279,7 @@ static void test_suminfo(void)
r
=
MsiCloseHandle
(
hsuminfo
);
r
=
MsiCloseHandle
(
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiCloseHandle failed
\n
"
);
r
=
DeleteFile
(
msifile
);
r
=
DeleteFile
A
(
msifile
);
ok
(
r
,
"DeleteFile failed
\n
"
);
ok
(
r
,
"DeleteFile failed
\n
"
);
}
}
...
@@ -404,17 +404,17 @@ static void test_summary_binary(void)
...
@@ -404,17 +404,17 @@ static void test_summary_binary(void)
DWORD
sz
;
DWORD
sz
;
char
sval
[
20
];
char
sval
[
20
];
DeleteFile
(
msifile
);
DeleteFile
A
(
msifile
);
test_create_database_binary
();
test_create_database_binary
();
ok
(
INVALID_FILE_ATTRIBUTES
!=
GetFileAttributes
(
msifile
)
,
"file doesn't exist!
\n
"
);
ok
(
GetFileAttributesA
(
msifile
)
!=
INVALID_FILE_ATTRIBUTES
,
"file doesn't exist!
\n
"
);
/* just MsiOpenDatabase should not create a file */
/* just MsiOpenDatabase should not create a file */
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
r
=
MsiOpenDatabase
A
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiOpenDatabase failed
\n
"
);
r
=
MsiGetSummaryInformation
(
hdb
,
NULL
,
0
,
&
hsuminfo
);
r
=
MsiGetSummaryInformation
A
(
hdb
,
NULL
,
0
,
&
hsuminfo
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiGetSummaryInformation failed
\n
"
);
/*
/*
...
@@ -426,7 +426,7 @@ static void test_summary_binary(void)
...
@@ -426,7 +426,7 @@ static void test_summary_binary(void)
sz
=
sizeof
sval
;
sz
=
sizeof
sval
;
sval
[
0
]
=
0
;
sval
[
0
]
=
0
;
type
=
0
;
type
=
0
;
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_LASTPRINTED
,
&
type
,
NULL
,
NULL
,
sval
,
&
sz
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_LASTPRINTED
,
&
type
,
NULL
,
NULL
,
sval
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoGetProperty failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoGetProperty failed
\n
"
);
ok
(
!
lstrcmpA
(
sval
,
""
)
||
!
lstrcmpA
(
sval
,
"7"
),
ok
(
!
lstrcmpA
(
sval
,
""
)
||
!
lstrcmpA
(
sval
,
"7"
),
"Expected empty string or
\"
7
\"
, got
\"
%s
\"\n
"
,
sval
);
"Expected empty string or
\"
7
\"
, got
\"
%s
\"\n
"
,
sval
);
...
@@ -436,7 +436,7 @@ static void test_summary_binary(void)
...
@@ -436,7 +436,7 @@ static void test_summary_binary(void)
}
}
ival
=
-
1
;
ival
=
-
1
;
r
=
MsiSummaryInfoGetProperty
(
hsuminfo
,
PID_WORDCOUNT
,
&
type
,
&
ival
,
NULL
,
NULL
,
NULL
);
r
=
MsiSummaryInfoGetProperty
A
(
hsuminfo
,
PID_WORDCOUNT
,
&
type
,
&
ival
,
NULL
,
NULL
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoGetProperty failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiSummaryInfoGetProperty failed
\n
"
);
todo_wine
ok
(
ival
==
0
,
"value incorrect
\n
"
);
todo_wine
ok
(
ival
==
0
,
"value incorrect
\n
"
);
...
@@ -446,7 +446,7 @@ static void test_summary_binary(void)
...
@@ -446,7 +446,7 @@ static void test_summary_binary(void)
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"getpropcount failed
\n
"
);
todo_wine
ok
(
count
==
10
,
"prop count incorrect
\n
"
);
todo_wine
ok
(
count
==
10
,
"prop count incorrect
\n
"
);
r
=
MsiSummaryInfoSetProperty
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
r
=
MsiSummaryInfoSetProperty
A
(
hsuminfo
,
PID_TITLE
,
VT_LPSTR
,
0
,
NULL
,
"Mike"
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty failed %u
\n
"
,
r
);
ok
(
r
==
ERROR_FUNCTION_FAILED
,
"MsiSummaryInfoSetProperty failed %u
\n
"
,
r
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
r
=
MsiSummaryInfoPersist
(
hsuminfo
);
...
@@ -455,7 +455,7 @@ static void test_summary_binary(void)
...
@@ -455,7 +455,7 @@ static void test_summary_binary(void)
MsiCloseHandle
(
hsuminfo
);
MsiCloseHandle
(
hsuminfo
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
DeleteFile
A
(
msifile
);
}
}
START_TEST
(
suminfo
)
START_TEST
(
suminfo
)
...
...
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