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
e835e143
Commit
e835e143
authored
Jan 25, 2022
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Add error handling to the synth GetPortCaps method.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
340e1fee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
synth.c
dlls/dmsynth/synth.c
+3
-0
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+11
-0
No files found.
dlls/dmsynth/synth.c
View file @
e835e143
...
...
@@ -295,6 +295,9 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps(IDirectMusicSynth8 *ifa
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
caps
);
if
(
!
caps
||
caps
->
dwSize
<
sizeof
(
*
caps
))
return
E_INVALIDARG
;
*
caps
=
This
->
caps
;
return
S_OK
;
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
e835e143
...
...
@@ -64,6 +64,7 @@ static void test_dmsynth(void)
KSPROPERTY
property
;
ULONG
value
;
ULONG
bytes
;
DMUS_PORTCAPS
caps
;
hr
=
CoCreateInstance
(
&
CLSID_DirectMusicSynth
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusicSynth
,
(
LPVOID
*
)
&
dmsynth
);
ok
(
hr
==
S_OK
,
"CoCreateInstance returned: %x
\n
"
,
hr
);
...
...
@@ -146,6 +147,16 @@ static void test_dmsynth(void)
ref_clock_synth
=
get_refcount
(
clock_synth
);
ok
(
ref_clock_synth
>
ref_clock_sink
+
1
,
"Latency clock refcount didn't increase
\n
"
);
/* GetPortCaps */
hr
=
IDirectMusicSynth_GetPortCaps
(
dmsynth
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetPortCaps failed: %#x
\n
"
,
hr
);
memset
(
&
caps
,
0
,
sizeof
(
caps
));
hr
=
IDirectMusicSynth_GetPortCaps
(
dmsynth
,
&
caps
);
ok
(
hr
==
E_INVALIDARG
,
"GetPortCaps failed: %#x
\n
"
,
hr
);
caps
.
dwSize
=
sizeof
(
caps
)
+
1
;
hr
=
IDirectMusicSynth_GetPortCaps
(
dmsynth
,
&
caps
);
ok
(
hr
==
S_OK
,
"GetPortCaps failed: %#x
\n
"
,
hr
);
if
(
control_synth
)
IDirectMusicSynth_Release
(
control_synth
);
if
(
control_sink
)
...
...
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