Andrew Eikum : winmm: Reset dwUser in mixerGetLineInfo.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 11 09:59:46 CST 2016


Module: wine
Branch: master
Commit: 992e3c5dc8b1c5d52cffef96e7452cb17300e472
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=992e3c5dc8b1c5d52cffef96e7452cb17300e472

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Wed Feb 10 12:33:23 2016 -0600

winmm: Reset dwUser in mixerGetLineInfo.

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winmm/tests/mixer.c | 4 ++++
 dlls/winmm/waveform.c    | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/dlls/winmm/tests/mixer.c b/dlls/winmm/tests/mixer.c
index 82eb338..f03a71e 100644
--- a/dlls/winmm/tests/mixer.c
+++ b/dlls/winmm/tests/mixer.c
@@ -438,11 +438,13 @@ static void mixer_test_deviceA(int device)
 
             mixerlineA.cbStruct = sizeof(mixerlineA);
             mixerlineA.dwDestination=d;
+            mixerlineA.dwUser = (ULONG_PTR)0xdeadbeef;
             rc = mixerGetLineInfoA(mix, &mixerlineA, MIXER_GETLINEINFOF_DESTINATION);
             ok(rc==MMSYSERR_NOERROR||rc==MMSYSERR_NODRIVER,
                "mixerGetLineInfoA(MIXER_GETLINEINFOF_DESTINATION): "
                "MMSYSERR_NOERROR expected, got %s\n",
                mmsys_error(rc));
+            ok(mixerlineA.dwUser == 0, "dwUser was not reset\n");
             if (rc==MMSYSERR_NODRIVER)
                 trace("  No Driver\n");
             else if (rc==MMSYSERR_NOERROR) {
@@ -822,11 +824,13 @@ static void mixer_test_deviceW(int device)
 
             mixerlineW.cbStruct = sizeof(mixerlineW);
             mixerlineW.dwDestination=d;
+            mixerlineW.dwUser = (ULONG_PTR)0xdeadbeef;
             rc = mixerGetLineInfoW(mix, &mixerlineW, MIXER_GETLINEINFOF_DESTINATION);
             ok(rc==MMSYSERR_NOERROR||rc==MMSYSERR_NODRIVER,
                "mixerGetLineInfoW(MIXER_GETLINEINFOF_DESTINATION): "
                "MMSYSERR_NOERROR expected, got %s\n",
                mmsys_error(rc));
+            ok(mixerlineW.dwUser == 0, "dwUser was not reset\n");
             if (rc==MMSYSERR_NODRIVER)
                 trace("  No Driver\n");
             else if (rc==MMSYSERR_NOERROR && winetest_interactive) {
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 93a5004..a4917a2 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -4287,6 +4287,8 @@ UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, DWORD fdwInfo
     if(!mmdevice)
         return MMSYSERR_INVALHANDLE;
 
+    lpmliW->dwUser = 0;
+
     switch(fdwInfo & MIXER_GETLINEINFOF_QUERYMASK){
     case MIXER_GETLINEINFOF_DESTINATION:
         return WINMM_GetDestinationLineInfo(mmdevice, mmdev_index, lpmliW,




More information about the wine-cvs mailing list