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
37895faa
Commit
37895faa
authored
Nov 05, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: MsiViewGetError returns MSIDBERROR, not UINT.
parent
76275bea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
db.c
dlls/msi/tests/db.c
+14
-13
No files found.
dlls/msi/tests/db.c
View file @
37895faa
...
@@ -698,6 +698,7 @@ static void test_viewmodify(void)
...
@@ -698,6 +698,7 @@ static void test_viewmodify(void)
{
{
MSIHANDLE
hdb
=
0
,
hview
=
0
,
hrec
=
0
;
MSIHANDLE
hdb
=
0
,
hview
=
0
,
hrec
=
0
;
UINT
r
;
UINT
r
;
MSIDBERROR
err
;
const
char
*
query
;
const
char
*
query
;
char
buffer
[
0x100
];
char
buffer
[
0x100
];
DWORD
sz
;
DWORD
sz
;
...
@@ -717,8 +718,8 @@ static void test_viewmodify(void)
...
@@ -717,8 +718,8 @@ static void test_viewmodify(void)
/* check what the error function reports without doing anything */
/* check what the error function reports without doing anything */
sz
=
0
;
sz
=
0
;
/* passing NULL as the 3rd param make function to crash on older platforms */
/* passing NULL as the 3rd param make function to crash on older platforms */
r
=
MsiViewGetError
(
0
,
NULL
,
&
sz
);
er
r
=
MsiViewGetError
(
0
,
NULL
,
&
sz
);
ok
(
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
ok
(
er
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
/* open a view */
/* open a view */
query
=
"SELECT * FROM `phone`"
;
query
=
"SELECT * FROM `phone`"
;
...
@@ -726,31 +727,31 @@ static void test_viewmodify(void)
...
@@ -726,31 +727,31 @@ static void test_viewmodify(void)
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
/* see what happens with a good hview and bad args */
/* see what happens with a good hview and bad args */
r
=
MsiViewGetError
(
hview
,
NULL
,
NULL
);
er
r
=
MsiViewGetError
(
hview
,
NULL
,
NULL
);
ok
(
r
==
MSIDBERROR_INVALIDARG
||
r
==
MSIDBERROR_NOERROR
,
ok
(
err
==
MSIDBERROR_INVALIDARG
||
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError returns %u (expected -3)
\n
"
,
r
);
"MsiViewGetError returns %u (expected -3)
\n
"
,
er
r
);
r
=
MsiViewGetError
(
hview
,
buffer
,
NULL
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
NULL
);
ok
(
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
ok
(
er
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
/* see what happens with a zero length buffer */
/* see what happens with a zero length buffer */
sz
=
0
;
sz
=
0
;
buffer
[
0
]
=
'x'
;
buffer
[
0
]
=
'x'
;
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
r
==
MSIDBERROR_MOREDATA
,
"MsiViewGetError return
\n
"
);
ok
(
er
r
==
MSIDBERROR_MOREDATA
,
"MsiViewGetError return
\n
"
);
ok
(
buffer
[
0
]
==
'x'
,
"buffer cleared
\n
"
);
ok
(
buffer
[
0
]
==
'x'
,
"buffer cleared
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
/* ok this one is strange */
/* ok this one is strange */
sz
=
0
;
sz
=
0
;
r
=
MsiViewGetError
(
hview
,
NULL
,
&
sz
);
er
r
=
MsiViewGetError
(
hview
,
NULL
,
&
sz
);
ok
(
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
/* see if it really has an error */
/* see if it really has an error */
sz
=
sizeof
buffer
;
sz
=
sizeof
buffer
;
buffer
[
0
]
=
'x'
;
buffer
[
0
]
=
'x'
;
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
buffer
[
0
]
==
0
,
"buffer not cleared
\n
"
);
ok
(
buffer
[
0
]
==
0
,
"buffer not cleared
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
...
...
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