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)
{
MSIHANDLE
hdb
=
0
,
hview
=
0
,
hrec
=
0
;
UINT
r
;
MSIDBERROR
err
;
const
char
*
query
;
char
buffer
[
0x100
];
DWORD
sz
;
...
...
@@ -717,8 +718,8 @@ static void test_viewmodify(void)
/* check what the error function reports without doing anything */
sz
=
0
;
/* passing NULL as the 3rd param make function to crash on older platforms */
r
=
MsiViewGetError
(
0
,
NULL
,
&
sz
);
ok
(
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
er
r
=
MsiViewGetError
(
0
,
NULL
,
&
sz
);
ok
(
er
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
/* open a view */
query
=
"SELECT * FROM `phone`"
;
...
...
@@ -726,31 +727,31 @@ static void test_viewmodify(void)
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
/* see what happens with a good hview and bad args */
r
=
MsiViewGetError
(
hview
,
NULL
,
NULL
);
ok
(
r
==
MSIDBERROR_INVALIDARG
||
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError returns %u (expected -3)
\n
"
,
r
);
r
=
MsiViewGetError
(
hview
,
buffer
,
NULL
);
ok
(
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
er
r
=
MsiViewGetError
(
hview
,
NULL
,
NULL
);
ok
(
err
==
MSIDBERROR_INVALIDARG
||
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError returns %u (expected -3)
\n
"
,
er
r
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
NULL
);
ok
(
er
r
==
MSIDBERROR_INVALIDARG
,
"MsiViewGetError return
\n
"
);
/* see what happens with a zero length buffer */
sz
=
0
;
buffer
[
0
]
=
'x'
;
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
r
==
MSIDBERROR_MOREDATA
,
"MsiViewGetError return
\n
"
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
er
r
==
MSIDBERROR_MOREDATA
,
"MsiViewGetError return
\n
"
);
ok
(
buffer
[
0
]
==
'x'
,
"buffer cleared
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
/* ok this one is strange */
sz
=
0
;
r
=
MsiViewGetError
(
hview
,
NULL
,
&
sz
);
ok
(
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
er
r
=
MsiViewGetError
(
hview
,
NULL
,
&
sz
);
ok
(
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
sz
==
0
,
"size not zero
\n
"
);
/* see if it really has an error */
sz
=
sizeof
buffer
;
buffer
[
0
]
=
'x'
;
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
er
r
=
MsiViewGetError
(
hview
,
buffer
,
&
sz
);
ok
(
er
r
==
MSIDBERROR_NOERROR
,
"MsiViewGetError return
\n
"
);
ok
(
buffer
[
0
]
==
0
,
"buffer not cleared
\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