[PATCH v2] winmm: Fix the ordinal number for function PlaySound

Bruno Jesus 00cpxxx at gmail.com
Fri Jan 27 15:14:40 CST 2017


PlaySound redirects to PlaySoundA in Wine

Superseeds 129061

Fixes https://bugs.winehq.org/show_bug.cgi?id=42257

Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
---
 dlls/winmm/tests/wave.c | 7 +++++++
 dlls/winmm/winmm.spec   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index d6019f9..50ccef9 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -1656,6 +1656,13 @@ static void test_PlaySound(void)
 {
     BOOL br;
     char test_file[MAX_PATH], temp[MAX_PATH], *exts;
+    void *psound_ordinal, *psound_name;
+    HMODULE dll = GetModuleHandleA("winmm.dll");
+
+    /* test for bug 42257 */
+    psound_name = GetProcAddress(dll, "PlaySound");
+    psound_ordinal = GetProcAddress(dll, (LPCSTR) 2);
+    ok(psound_name == psound_ordinal, "Expected ordinal 2 to be PlaySound function\n");
 
     if(waveOutGetNumDevs() == 0) {
         skip("No output devices available\n");
diff --git a/dlls/winmm/winmm.spec b/dlls/winmm/winmm.spec
index 3d5272c..9c6ed2d 100644
--- a/dlls/winmm/winmm.spec
+++ b/dlls/winmm/winmm.spec
@@ -1,5 +1,5 @@
 # ordinal exports
-1 stdcall @(ptr long long) PlaySoundA
+2 stdcall @(ptr long long) PlaySoundA
 3 stub @
 4 stub @
 
-- 
2.9.3




More information about the wine-patches mailing list