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
b9462e66
Commit
b9462e66
authored
Nov 16, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Check more return values in moniker tests (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21ac8397
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
moniker.c
dlls/ole32/tests/moniker.c
+14
-15
No files found.
dlls/ole32/tests/moniker.c
View file @
b9462e66
...
...
@@ -1049,36 +1049,33 @@ todo_wine
ok_ole_success
(
hr
,
CreateBindCtx
);
hr
=
CreateFileMoniker
(
wszFileName1
,
&
pmk1
);
ok
(
hr
==
0
,
"CreateFileMoniker for file hr=%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create file moniker, hr %#x.
\n
"
,
hr
);
hr
=
CreateFileMoniker
(
wszFileName2
,
&
pmk2
);
ok
(
hr
==
0
,
"CreateFileMoniker for file hr=%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create file moniker, hr %#x.
\n
"
,
hr
);
hr
=
IBindCtx_GetRunningObjectTable
(
pbc
,
&
pprot
);
ok
(
hr
==
0
,
"IBindCtx_GetRunningObjectTable hr=%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get ROT, hr %#x.
\n
"
,
hr
);
/* Check EnumMoniker before registering */
hr
=
IRunningObjectTable_EnumRunning
(
pprot
,
&
spEM1
);
ok
(
hr
==
0
,
"IRunningObjectTable_EnumRunning hr=%08x
\n
"
,
hr
);
hr
=
IEnumMoniker_QueryInterface
(
spEM1
,
&
IID_IUnknown
,
(
void
*
)
&
lpEM1
);
ok
(
hr
==
S_OK
,
"Failed to get enum object, hr %#x.
\n
"
,
hr
);
hr
=
IEnumMoniker_QueryInterface
(
spEM1
,
&
IID_IUnknown
,
(
void
*
)
&
lpEM1
);
/* Register a couple of Monikers and check is ok */
ok
(
hr
==
0
,
"IEnumMoniker_QueryInterface hr %08x %p
\n
"
,
hr
,
lpEM1
);
ok
(
hr
==
S_OK
,
"Failed to get interface, hr %#x.
\n
"
,
hr
);
matchCnt
=
count_moniker_matches
(
pbc
,
spEM1
);
trace
(
"Number of matches is %i
\n
"
,
matchCnt
);
grflags
=
grflags
|
ROTFLAGS_REGISTRATIONKEEPSALIVE
;
hr
=
IRunningObjectTable_Register
(
pprot
,
grflags
,
lpEM1
,
pmk1
,
&
pdwReg1
);
ok
(
hr
==
0
,
"IRunningObjectTable_Register hr=%08x %p %08x %p %p %d
\n
"
,
hr
,
pprot
,
grflags
,
lpEM1
,
pmk1
,
pdwReg1
);
ok
(
hr
==
S_OK
,
"Failed to register object, hr %#x.
\n
"
,
hr
);
trace
(
"IROT::Register
\n
"
);
grflags
=
0
;
grflags
=
grflags
|
ROTFLAGS_REGISTRATIONKEEPSALIVE
;
hr
=
IRunningObjectTable_Register
(
pprot
,
grflags
,
lpEM1
,
pmk2
,
&
pdwReg2
);
ok
(
hr
==
0
,
"IRunningObjectTable_Register hr=%08x %p %08x %p %p %d
\n
"
,
hr
,
pprot
,
grflags
,
lpEM1
,
pmk2
,
pdwReg2
);
ok
(
hr
==
S_OK
,
"Failed to register object, hr %#x.
\n
"
,
hr
);
hr
=
IRunningObjectTable_EnumRunning
(
pprot
,
&
spEM2
);
ok
(
hr
==
0
,
"IRunningObjectTable_EnumRunning hr=%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get enum object, hr %#x.
\n
"
,
hr
);
matchCnt
=
count_moniker_matches
(
pbc
,
spEM2
);
ok
(
matchCnt
==
2
,
"Number of matches should be equal to 2 not %i
\n
"
,
matchCnt
);
...
...
@@ -1094,8 +1091,10 @@ todo_wine
matchCnt
=
count_moniker_matches
(
pbc
,
spEM3
);
ok
(
matchCnt
==
2
,
"Number of matches should be equal to 2 not %i
\n
"
,
matchCnt
);
IRunningObjectTable_Revoke
(
pprot
,
pdwReg1
);
IRunningObjectTable_Revoke
(
pprot
,
pdwReg2
);
hr
=
IRunningObjectTable_Revoke
(
pprot
,
pdwReg1
);
ok
(
hr
==
S_OK
,
"Failed to revoke, hr %#x.
\n
"
,
hr
);
hr
=
IRunningObjectTable_Revoke
(
pprot
,
pdwReg2
);
ok
(
hr
==
S_OK
,
"Failed to revoke, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
lpEM1
);
IEnumMoniker_Release
(
spEM1
);
IEnumMoniker_Release
(
spEM2
);
...
...
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