winmm: Check waveOutGetVolume parameter.
This commit is contained in:
parent
6aac40364b
commit
a9bd81be63
|
@ -640,6 +640,9 @@ static void wave_out_test_deviceOut(int device, double duration,
|
|||
frag.dwFlags=0;
|
||||
frag.dwLoops=0;
|
||||
|
||||
rc=waveOutGetVolume(wout,0);
|
||||
ok(rc==MMSYSERR_INVALPARAM,"waveOutGetVolume(%s,0) expected "
|
||||
"MMSYSERR_INVALPARAM, got %s\n", dev_name(device),wave_out_error(rc));
|
||||
rc=waveOutGetVolume(wout,&volume);
|
||||
ok(has_volume ? rc==MMSYSERR_NOERROR : rc==MMSYSERR_NOTSUPPORTED,
|
||||
"waveOutGetVolume(%s): rc=%s\n",dev_name(device),wave_out_error(rc));
|
||||
|
|
|
@ -2425,6 +2425,11 @@ UINT WINAPI waveOutGetVolume(HWAVEOUT hWaveOut, LPDWORD lpdw)
|
|||
|
||||
TRACE("(%p, %08lx);\n", hWaveOut, (DWORD)lpdw);
|
||||
|
||||
if (lpdw == NULL) {
|
||||
WARN("invalid parameter\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
|
||||
if ((wmld = MMDRV_Get(hWaveOut, MMDRV_WAVEOUT, TRUE)) == NULL)
|
||||
return MMSYSERR_INVALHANDLE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue