From d1a034627c3fac9db5e51ffadd1a9005a5c0e1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Wed, 23 Feb 2011 10:07:42 +0100 Subject: [PATCH] winmm: MCI does not support the 0xhexadecimal notation. --- dlls/winmm/mci.c | 2 +- dlls/winmm/tests/mci.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 0fcccec6d0b..822b1c0116a 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -978,7 +978,7 @@ static BOOL MCI_GetDWord(DWORD* data, LPWSTR* ptr) DWORD val; LPWSTR ret; - val = strtoulW(*ptr, &ret, 0); + val = strtoulW(*ptr, &ret, 10); switch (*ret) { case '\0': break; diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index cb6df72b828..91a3e477f1a 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -249,6 +249,9 @@ static void test_mciParser(HWND hwnd) err = mciSendString("status x 2 track 3", buf, sizeof(buf), NULL); todo_wine ok(err==MCIERR_OUTOFRANGE,"status 2(position) track 3: %s\n", dbg_mcierr(err)); + err = mciSendString("status x 0x4", buf, sizeof(buf), NULL); + todo_wine ok(err==MCIERR_BAD_CONSTANT, "status 0x4: %s\n", dbg_mcierr(err)); + err = mciSendString("status x 4", buf, sizeof(buf), hwnd); ok(!err,"status 4(mode): %s\n", dbg_mcierr(err)); if(!err)ok(!strcmp(buf,"stopped"), "status 4(mode), got: %s\n", buf); @@ -874,6 +877,9 @@ static void test_playWAVE(HWND hwnd) ok(!err,"mci seek to 250 wait notify returned %s\n", dbg_mcierr(err)); test_notification(hwnd,"seek wait notify",MCI_NOTIFY_SUCCESSFUL); + err = mciSendString("seek mysound to 0xfa", NULL, 0, NULL); + ok(err==MCIERR_BAD_INTEGER,"mci seek to 0xfa returned %s\n", dbg_mcierr(err)); + err = mciSendString("status mysound position notify", buf, sizeof(buf), hwnd); ok(!err,"mci status position notify returned %s\n", dbg_mcierr(err)); if(!err) ok(!strcmp(buf,"250"), "mci status position: %s\n", buf);