Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ca0381e
Commit
7ca0381e
authored
Feb 27, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Feb 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup prepare/unprepare header parameter checking.
Fix midiInGetDevCapsW.
parent
e7310f44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
winmm.c
dlls/winmm/winmm.c
+19
-3
No files found.
dlls/winmm/winmm.c
View file @
7ca0381e
...
...
@@ -1369,6 +1369,9 @@ UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
TRACE
(
"(%p, %p, %d)
\n
"
,
hMidiOut
,
lpMidiOutHdr
,
uSize
);
if
(
lpMidiOutHdr
==
NULL
||
uSize
<
sizeof
(
MIDIHDR
))
return
MMSYSERR_INVALPARAM
;
if
((
wmld
=
MMDRV_Get
(
hMidiOut
,
MMDRV_MIDIOUT
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -1385,6 +1388,9 @@ UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
TRACE
(
"(%p, %p, %d)
\n
"
,
hMidiOut
,
lpMidiOutHdr
,
uSize
);
if
(
lpMidiOutHdr
==
NULL
||
uSize
<
sizeof
(
MIDIHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpMidiOutHdr
->
dwFlags
&
MHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
}
...
...
@@ -1554,7 +1560,7 @@ UINT WINAPI midiInGetNumDevs(void)
UINT
WINAPI
midiInGetDevCapsW
(
UINT_PTR
uDeviceID
,
LPMIDIINCAPSW
lpCaps
,
UINT
uSize
)
{
MIDIINCAPSA
micA
;
UINT
ret
=
midiInGetDevCapsA
(
uDeviceID
,
&
micA
,
uSize
);
UINT
ret
=
midiInGetDevCapsA
(
uDeviceID
,
&
micA
,
sizeof
(
micA
)
);
if
(
ret
==
MMSYSERR_NOERROR
)
{
MIDIINCAPSW
micW
;
...
...
@@ -1679,6 +1685,9 @@ UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
TRACE
(
"(%p, %p, %d)
\n
"
,
hMidiIn
,
lpMidiInHdr
,
uSize
);
if
(
lpMidiInHdr
==
NULL
||
uSize
<
sizeof
(
MIDIHDR
))
return
MMSYSERR_INVALPARAM
;
if
((
wmld
=
MMDRV_Get
(
hMidiIn
,
MMDRV_MIDIIN
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -1695,6 +1704,9 @@ UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
TRACE
(
"(%p, %p, %d)
\n
"
,
hMidiIn
,
lpMidiInHdr
,
uSize
);
if
(
lpMidiInHdr
==
NULL
||
uSize
<
sizeof
(
MIDIHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpMidiInHdr
->
dwFlags
&
MHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
}
...
...
@@ -2963,7 +2975,9 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
if
(
lpWaveInHdr
==
NULL
)
return
MMSYSERR_INVALPARAM
;
if
(
lpWaveInHdr
==
NULL
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
((
wmld
=
MMDRV_Get
(
hWaveIn
,
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
...
...
@@ -2982,7 +2996,9 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
if
(
lpWaveInHdr
==
NULL
)
return
MMSYSERR_INVALPARAM
;
if
(
lpWaveInHdr
==
NULL
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpWaveInHdr
->
dwFlags
&
WHDR_PREPARED
))
{
return
MMSYSERR_NOERROR
;
}
...
...
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