winmm/tests: Use the explicit mciSendStringA() form.

Michael Stefaniuc mstefani at redhat.de
Tue Oct 15 15:12:43 CDT 2013


---
 dlls/winmm/tests/mci.c    | 342 +++++++++++++++++++++++-----------------------
 dlls/winmm/tests/mcicda.c |  86 ++++++------
 dlls/winmm/tests/midi.c   |   4 +-
 3 files changed, 216 insertions(+), 216 deletions(-)

diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c
index ffde6b9..d95a0a7 100644
--- a/dlls/winmm/tests/mci.c
+++ b/dlls/winmm/tests/mci.c
@@ -182,7 +182,7 @@ static void test_mciParser(HWND hwnd)
     /* Get a handle on an MCI device, works even without sound. */
     parm.open.lpstrDeviceType = "waveaudio";
     parm.open.lpstrElementName = ""; /* "new" at the command level */
-    parm.open.lpstrAlias = "x"; /* to enable mciSendString */
+    parm.open.lpstrAlias = "x"; /* to enable mciSendStringA */
     parm.open.dwCallback = (DWORD_PTR)hwnd;
     err = mciSendCommand(0, MCI_OPEN,
         MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_OPEN_ALIAS | MCI_NOTIFY,
@@ -194,128 +194,128 @@ static void test_mciParser(HWND hwnd)
     test_notification(hwnd, "MCI_OPEN", MCI_NOTIFY_SUCCESSFUL);
     test_notification(hwnd, "MCI_OPEN no #2", 0);
 
-    err = mciSendString("open avivideo alias a", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("open avivideo alias a", buf, sizeof(buf), hwnd);
     ok(!err,"open another: %s\n", dbg_mcierr(err));
 
     buf[0]='z';
-    err = mciSendString("", buf, sizeof(buf), NULL);
+    err = mciSendStringA("", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_MISSING_COMMAND_STRING,"empty string: %s\n", dbg_mcierr(err));
     ok(!buf[0], "error buffer %s\n", buf);
 
     buf[0]='d';
-    err = mciSendString("open", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open", buf, sizeof(buf), NULL);
     ok(err==MCIERR_MISSING_DEVICE_NAME,"open void: %s\n", dbg_mcierr(err));
     ok(!buf[0], "open error buffer %s\n", buf);
 
-    err = mciSendString("open notify", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open notify", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_INVALID_DEVICE_NAME,"open notify: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open new", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open new", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_NEW_REQUIRES_ALIAS,"open new: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open new type waveaudio alias r shareable shareable", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open new type waveaudio alias r shareable shareable", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_DUPLICATE_FLAGS,"open new: %s\n", dbg_mcierr(err));
-    if(!err) mciSendString("close r", NULL, 0, NULL);
+    if(!err) mciSendStringA("close r", NULL, 0, NULL);
 
-    err = mciSendString("status x position wait wait", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x position wait wait", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_DUPLICATE_FLAGS,"status wait wait: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x length length", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x length length", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_FLAGS_NOT_COMPATIBLE,"status 2xlength: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x length position", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x length position", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_FLAGS_NOT_COMPATIBLE,"status length+position: %s\n", dbg_mcierr(err));
 
     buf[0]='I';
-    err = mciSendString("set x time format milliseconds time format ms", buf, sizeof(buf), NULL);
+    err = mciSendStringA("set x time format milliseconds time format ms", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_FLAGS_NOT_COMPATIBLE,"status length+position: %s\n", dbg_mcierr(err));
     ok(!buf[0], "set error buffer %s\n", buf);
 
     /* device's response, not a parser test */
-    err = mciSendString("status x", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x", buf, sizeof(buf), NULL);
     ok(err==MCIERR_MISSING_PARAMETER,"status waveaudio nokeyword: %s\n", dbg_mcierr(err));
 
     buf[0]='G';
-    err = mciSendString("status a", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status a", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_UNSUPPORTED_FUNCTION,"status avivideo nokeyword: %s\n", dbg_mcierr(err));
     ok(!buf[0], "status error buffer %s\n", buf);
 
-    err = mciSendString("status x track", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x track", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"status waveaudio no track: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x track 3", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x track 3", buf, sizeof(buf), NULL);
     ok(err==MCIERR_MISSING_PARAMETER,"status waveaudio track 3: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x 2 track 3", buf, sizeof(buf), NULL);
+    err = mciSendStringA("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);
+    err = mciSendStringA("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);
+    err = mciSendStringA("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);
 
-    err = mciSendString("status x 4 notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status x 4 notify", buf, sizeof(buf), hwnd);
     todo_wine ok(!err,"status 4(mode) notify: %s\n", dbg_mcierr(err));
     if(!err)ok(!strcmp(buf,"stopped"), "status 4(mode), got: %s\n", buf);
     test_notification(hwnd, "status 4 notify", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("set x milliseconds", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set x milliseconds", buf, sizeof(buf), hwnd);
     todo_wine ok(err==MCIERR_UNRECOGNIZED_KEYWORD,"set milliseconds: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("set x milliseconds ms", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set x milliseconds ms", buf, sizeof(buf), hwnd);
     todo_wine ok(err==MCIERR_UNRECOGNIZED_KEYWORD,"set milliseconds ms: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("capability x can   save", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability x can   save", buf, sizeof(buf), hwnd);
     todo_wine ok(!err,"capability can (space) save: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x nsa", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status x nsa", buf, sizeof(buf), hwnd);
     todo_wine ok(err==MCIERR_BAD_CONSTANT,"status nsa: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek x to 0:0:0:0:0", buf, sizeof(buf), NULL);
+    err = mciSendStringA("seek x to 0:0:0:0:0", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"seek to 0:0:0:0:0 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek x to 0:0:0:0:", buf, sizeof(buf), NULL);
+    err = mciSendStringA("seek x to 0:0:0:0:", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"seek to 0:0:0:0: returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek x to :0:0:0:0", buf, sizeof(buf), NULL);
+    err = mciSendStringA("seek x to :0:0:0:0", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"seek to :0:0:0:0 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek x to 256:0:0:0", buf, sizeof(buf), NULL);
+    err = mciSendStringA("seek x to 256:0:0:0", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"seek to 256:0:0:0 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek x to 0:256", buf, sizeof(buf), NULL);
+    err = mciSendStringA("seek x to 0:256", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"seek to 0:256 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status all time format", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status all time format", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_CANNOT_USE_ALL,"status all: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("cue all", buf, sizeof(buf), NULL);
+    err = mciSendStringA("cue all", buf, sizeof(buf), NULL);
     ok(err==MCIERR_UNRECOGNIZED_COMMAND,"cue all: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open all", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open all", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_CANNOT_USE_ALL,"open all: %s\n", dbg_mcierr(err));
 
     /* avivideo is not a known MCI_DEVTYPE resource name */
-    err = mciSendString("sysinfo avivideo quantity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo avivideo quantity", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_DEVICE_TYPE_REQUIRED,"sysinfo sequencer quantity: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("sysinfo digitalvideo quantity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo digitalvideo quantity", buf, sizeof(buf), hwnd);
     ok(!err,"sysinfo digitalvideo quantity: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"0"), "sysinfo digitalvideo quantity returned %s\n", buf);
 
     /* quantity 0 yet open 1 (via type "avivideo"), fun */
-    err = mciSendString("sysinfo digitalvideo quantity open", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo digitalvideo quantity open", buf, sizeof(buf), hwnd);
     ok(!err,"sysinfo digitalvideo quantity open: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"1"), "sysinfo digitalvideo quantity open returned %s\n", buf);
 
-    err = mciSendString("put a window at 0 0", buf, sizeof(buf), NULL);
+    err = mciSendStringA("put a window at 0 0", buf, sizeof(buf), NULL);
     ok(err==MCIERR_BAD_INTEGER,"put incomplete rect: %s\n", dbg_mcierr(err));
 
     /*w9X-w2k report code from device last opened, newer versions compare them all
      * and return the one error code or MCIERR_MULTIPLE if they differ. */
-    err = mciSendString("pause all", buf, sizeof(buf), NULL);
+    err = mciSendStringA("pause all", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_MULTIPLE || broken(err==MCIERR_NONAPPLICABLE_FUNCTION),"pause all: %s\n", dbg_mcierr(err));
     ok(!buf[0], "pause error buffer %s\n", buf);
 
@@ -332,7 +332,7 @@ static void test_mciParser(HWND hwnd)
     ok(!err,"mciCommand status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(MCI_MODE_STOP==parm.status.dwReturn,"STATUS mode: %ld\n",parm.status.dwReturn);
 
-    err = mciSendString("status x mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status x mode", buf, sizeof(buf), hwnd);
     ok(!err,"status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped"), "status mode is %s\n", buf);
 
@@ -354,22 +354,22 @@ static void test_mciParser(HWND hwnd)
     ok(!err,"mciCommand getdevcaps video: %s\n", dbg_mcierr(err));
     if(!err) ok(MCI_DEVTYPE_WAVEFORM_AUDIO==parm.caps.dwReturn,"getdevcaps device type: %d\n",parm.caps.dwReturn);
 
-    err = mciSendString("capability x uses files", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability x uses files", buf, sizeof(buf), hwnd);
     ok(!err,"capability files: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "true"), "capability files is %s\n", buf);
 
-    err = mciSendString("capability x has video", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability x has video", buf, sizeof(buf), hwnd);
     ok(!err,"capability video: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "false"), "capability video is %s\n", buf);
 
-    err = mciSendString("capability x device type", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability x device type", buf, sizeof(buf), hwnd);
     ok(!err,"capability device type: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "waveaudio"), "capability device type is %s\n", buf);
 
     err = mciSendCommand(wDeviceID, MCI_CLOSE, 0, 0);
     ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("close a", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("close a", buf, sizeof(buf), hwnd);
     ok(!err,"close avi: %s\n", dbg_mcierr(err));
 
     test_notification(hwnd, "-end of 1st set-", 0);
@@ -389,7 +389,7 @@ static void test_openCloseWAVE(HWND hwnd)
     test_notification(hwnd, "-prior to any command-", 0);
 
     /* Avoid Sysinfo quantity with notify because Win9x and newer differ. */
-    err = mciSendString("sysinfo all quantity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo all quantity", buf, sizeof(buf), hwnd);
     ok(!err,"mci sysinfo all quantity returned %s\n", dbg_mcierr(err));
     if(!err) trace("[MCI] with %s drivers\n", buf);
 
@@ -404,23 +404,23 @@ static void test_openCloseWAVE(HWND hwnd)
     err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_SYSINFO, MCI_SYSINFO_QUANTITY, (DWORD_PTR)&parm);
     ok(err==MCIERR_PARAM_OVERFLOW || broken(!err/* Win9x */),"mciSendCommand MCI_SYSINFO with too small buffer returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open new type waveaudio alias r shareable", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open new type waveaudio alias r shareable", buf, sizeof(buf), NULL);
     ok(err==MCIERR_UNSUPPORTED_FUNCTION,"mci open new shareable returned %s\n", dbg_mcierr(err));
     if(!err) {
-        err = mciSendString("close r", NULL, 0, NULL);
+        err = mciSendStringA("close r", NULL, 0, NULL);
         ok(!err,"mci close shareable returned %s\n", dbg_mcierr(err));
     }
 
     err = mciGetDeviceID("waveaudio");
     ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
 
-    err = mciSendString(command_open, buf, sizeof(buf), hwnd);
+    err = mciSendStringA(command_open, buf, sizeof(buf), hwnd);
     ok(!err,"mci %s returned %s\n", command_open, dbg_mcierr(err));
     ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf);
     /* Wine<=1.1.33 used to ignore anything past alias XY */
     test_notification(hwnd,"open new alias notify",MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound time format", buf, sizeof(buf), hwnd);
     ok(!err,"mci status time format returned %s\n", dbg_mcierr(err));
     if(!err) {
         if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) == LANG_ENGLISH)
@@ -480,13 +480,13 @@ static void test_openCloseWAVE(HWND hwnd)
     ok(err==MCIERR_PARAM_OVERFLOW || broken(!err /* Win9x */),"mciCommand MCI_SYSINFO all name 1 open too small: %s\n", dbg_mcierr(err));
     ok(!strcmp(buf, err ? "Y" : "mysound"), "sysinfo short name returned %s\n", buf);
 
-    err = mciSendString("sysinfo mysound quantity open", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo mysound quantity open", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_DEVICE_TYPE_REQUIRED,"sysinfo alias quantity: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("sysinfo nosuchalias quantity open", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo nosuchalias quantity open", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_DEVICE_TYPE_REQUIRED,"sysinfo unknown quantity open: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("sysinfo all installname", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo all installname", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_CANNOT_USE_ALL,"sysinfo all installname: %s\n", dbg_mcierr(err));
 
     buf[0] = 'M'; buf[1] = 0;
@@ -496,7 +496,7 @@ static void test_openCloseWAVE(HWND hwnd)
     ok(err==MCIERR_CANNOT_USE_ALL,"mciCommand MCI_SYSINFO all installname: %s\n", dbg_mcierr(err));
     ok(!strcmp(buf,"M"), "output buffer %s\n", buf);
 
-    err = mciSendString("sysinfo nodev installname", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo nodev installname", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_INVALID_DEVICE_NAME,"sysinfo nodev installname: %s\n", dbg_mcierr(err));
     ok(!buf[0], "sysinfo error buffer %s\n", buf);
 
@@ -526,56 +526,56 @@ static void test_openCloseWAVE(HWND hwnd)
     err = mciGetDeviceID("all");
     ok(MCI_ALL_DEVICE_ID==err || /* Win9x */(WORD)MCI_ALL_DEVICE_ID==err,"mciGetDeviceID all returned %u, expected %d\n", err, MCI_ALL_DEVICE_ID);
 
-    err = mciSendString(command_close_my, NULL, 0, hwnd);
+    err = mciSendStringA(command_close_my, NULL, 0, hwnd);
     ok(!err,"mci %s returned %s\n", command_close_my, dbg_mcierr(err));
     test_notification(hwnd, command_close_my, MCI_NOTIFY_SUCCESSFUL);
     Sleep(5);
     test_notification(hwnd, command_close_my, 0);
 
-    err = mciSendString("open no-such-file-exists.wav alias y buffer 6", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open no-such-file-exists.wav alias y buffer 6", buf, sizeof(buf), NULL);
     ok(err==MCIERR_FILE_NOT_FOUND,"open no-such-file.wav returned %s\n", dbg_mcierr(err));
     if(!err) {
-        err = mciSendString("close y", NULL, 0, NULL);
+        err = mciSendStringA("close y", NULL, 0, NULL);
         ok(!err,"close y returned %s\n", dbg_mcierr(err));
     }
 
-    err = mciSendString("open no-such-dir\\file.wav alias y type waveaudio", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open no-such-dir\\file.wav alias y type waveaudio", buf, sizeof(buf), NULL);
     ok(err==MCIERR_FILE_NOT_FOUND || broken(err==MCIERR_INVALID_FILE /* Win9X */),"open no-such-dir/file.wav returned %s\n", dbg_mcierr(err));
     if(!err) {
-        err = mciSendString("close y", NULL, 0, NULL);
+        err = mciSendStringA("close y", NULL, 0, NULL);
         ok(!err,"close y returned %s\n", dbg_mcierr(err));
     }
 
-    err = mciSendString("open ! alias no", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open ! alias no", buf, sizeof(buf), NULL);
     ok(err==MCIERR_INVALID_DEVICE_NAME,"open !(void): %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open !no-such-file-exists.wav alias no", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open !no-such-file-exists.wav alias no", buf, sizeof(buf), NULL);
     ok(err==MCIERR_FILE_NOT_FOUND || /* Win9X */err==MCIERR_INVALID_DEVICE_NAME,"open !name: %s\n", dbg_mcierr(err));
 
     /* FILE_NOT_FOUND stems from mciwave,
      * the complete name including ! is passed through since NT */
-    err = mciSendString("open nosuchdevice!tempfile.wav alias no", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open nosuchdevice!tempfile.wav alias no", buf, sizeof(buf), NULL);
     ok(err==MCIERR_FILE_NOT_FOUND || /* Win9X */err==MCIERR_INVALID_DEVICE_NAME,"open nosuchdevice!name: %s\n", dbg_mcierr(err));
     /* FIXME? use broken(INVALID_DEVICE_NAME) and have Wine not mimic Win9X? */
 
-    err = mciSendString("close waveaudio", buf, sizeof(buf), NULL);
+    err = mciSendStringA("close waveaudio", buf, sizeof(buf), NULL);
     ok(err==MCIERR_INVALID_DEVICE_NAME,"close waveaudio: %s\n", dbg_mcierr(err));
 
-    err = mciSendString(command_close_all, NULL, 0, NULL);
+    err = mciSendStringA(command_close_all, NULL, 0, NULL);
     ok(!err,"mci %s (without buffer) returned %s\n", command_close_all, dbg_mcierr(err));
 
-    err = mciSendString(command_close_all, buf, sizeof(buf), hwnd);
+    err = mciSendStringA(command_close_all, buf, sizeof(buf), hwnd);
     ok(!err,"mci %s (with output buffer) returned %s\n", command_close_all, dbg_mcierr(err));
     ok(buf[0] == 0, "mci %s output buffer: %s\n", command_close_all, buf);
     /* No notification left, everything closed already */
     test_notification(hwnd, command_close_all, 0);
     /* TODO test close all sends one notification per open device */
 
-    err = mciSendString(command_sysinfo, buf, sizeof(buf), NULL);
+    err = mciSendStringA(command_sysinfo, buf, sizeof(buf), NULL);
     ok(!err,"mci %s returned %s\n", command_sysinfo, dbg_mcierr(err));
     ok(buf[0] == '0' && buf[1] == 0, "mci %s, expected output buffer '0', got: '%s'\n", command_sysinfo, buf);
 
-    err = mciSendString("open new type waveaudio", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open new type waveaudio", buf, sizeof(buf), NULL);
     ok(err==MCIERR_NEW_REQUIRES_ALIAS,"mci open new without alias returned %s\n", dbg_mcierr(err));
 
     parm.open.lpstrDeviceType = (LPSTR)MCI_DEVTYPE_WAVEFORM_AUDIO;
@@ -597,7 +597,7 @@ static void test_openCloseWAVE(HWND hwnd)
     err = mciGetDeviceID("waveaudio");
     ok(err==1,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
 
-    err = mciSendString("open no-such-file.wav alias waveaudio", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open no-such-file.wav alias waveaudio", buf, sizeof(buf), NULL);
     ok(err==MCIERR_DUPLICATE_ALIAS, "mci open alias waveaudio returned %s\n", dbg_mcierr(err));
     /* If it were not already in use, open avivideo alias waveaudio would succeed,
      * making for funny test cases. */
@@ -629,7 +629,7 @@ static void test_recordWAVE(HWND hwnd)
 
     parm.open.lpstrDeviceType = "waveaudio";
     parm.open.lpstrElementName = ""; /* "new" at the command level */
-    parm.open.lpstrAlias = "x"; /* to enable mciSendString */
+    parm.open.lpstrAlias = "x"; /* to enable mciSendStringA */
     parm.open.dwCallback = (DWORD_PTR)hwnd;
     err = mciSendCommand(0, MCI_OPEN,
         MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_OPEN_ALIAS | MCI_NOTIFY,
@@ -654,21 +654,21 @@ static void test_recordWAVE(HWND hwnd)
     ok(parm.status.dwReturn==MCI_FORMAT_MILLISECONDS,"status time format: %ld\n",parm.status.dwReturn);
 
     /* Info file fails until named in Open or Save. */
-    err = mciSendString("info x file", buf, sizeof(buf), NULL);
+    err = mciSendStringA("info x file", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci info new file returned %s\n", dbg_mcierr(err));
     ok(!buf[0], "info error buffer %s\n", buf);
 
-    err = mciSendString("status x length", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x length", buf, sizeof(buf), NULL);
     todo_wine ok(!err,"status x length initial: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"0"), "mci status length expected 0, got: %s\n", buf);
 
     /* Check the default recording: 8-bits per sample, mono, 11kHz */
-    err = mciSendString("status x samplespersec", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x samplespersec", buf, sizeof(buf), NULL);
     ok(!err,"mci status samplespersec returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"11025"), "mci status samplespersec expected 11025, got: %s\n", buf);
 
     /* MCI seems to solely support PCM, no need for ACM conversion. */
-    err = mciSendString("set x format tag 2", NULL, 0, NULL);
+    err = mciSendStringA("set x format tag 2", NULL, 0, NULL);
     ok(err==MCIERR_OUTOFRANGE,"mci set format tag 2 returned %s\n", dbg_mcierr(err));
 
     /* MCI appears to scan the available devices for support of this format,
@@ -677,7 +677,7 @@ static void test_recordWAVE(HWND hwnd)
      * input device (perhaps querying waveOutGetNumDevs instead of waveIn?),
      * still the record command below fails with MCIERR_WAVE_INPUTSUNSUITABLE.
      * Don't skip here, record will fail below. */
-    err = mciSendString("set x format tag pcm", NULL, 0, NULL);
+    err = mciSendStringA("set x format tag pcm", NULL, 0, NULL);
     ok(!err || err==MCIERR_OUTOFRANGE,"mci set format tag pcm returned %s\n", dbg_mcierr(err));
     ok_pcm = err;
 
@@ -685,15 +685,15 @@ static void test_recordWAVE(HWND hwnd)
      * Indeed, it produces strange results, incl.
      * inconsistent PCMWAVEFORMAT headers in the saved file.
      */
-    err = mciSendString("set x bytespersec 22050 alignment 2 samplespersec 11025 channels 1 bitspersample 16", NULL, 0, NULL);
+    err = mciSendStringA("set x bytespersec 22050 alignment 2 samplespersec 11025 channels 1 bitspersample 16", NULL, 0, NULL);
     ok(err==ok_pcm,"mci set 5 wave parameters returned %s\n", dbg_mcierr(err));
     /* Investigate: on w2k, set samplespersec 22050 sets nChannels to 2!
-     *  err = mciSendString("set x samplespersec 22050", NULL, 0, NULL);
+     *  err = mciSendStringA("set x samplespersec 22050", NULL, 0, NULL);
      *  ok(!err,"mci set samplespersec returned %s\n", dbg_mcierr(err));
      */
 
     /* Checks are generally performed immediately. */
-    err = mciSendString("set x bitspersample 4", NULL, 0, NULL);
+    err = mciSendStringA("set x bitspersample 4", NULL, 0, NULL);
     todo_wine ok(err==MCIERR_OUTOFRANGE,"mci set bitspersample 4 returned %s\n", dbg_mcierr(err));
 
     parm.set.wFormatTag = WAVE_FORMAT_PCM;
@@ -717,7 +717,7 @@ static void test_recordWAVE(HWND hwnd)
     test_notification(hwnd, "GETDEVCAPS inputs", MCI_NOTIFY_SUCCESSFUL);
 
     /* A few ME machines pass all tests except set format tag pcm! */
-    err = mciSendString("record x to 2000 wait", NULL, 0, hwnd);
+    err = mciSendStringA("record x to 2000 wait", NULL, 0, hwnd);
     ok(err || !ok_pcm,"can record yet set wave format pcm returned %s\n", dbg_mcierr(ok_pcm));
     if(!ndevs) todo_wine /* with sound disabled */
     ok(ndevs>0 ? !err : err==MCIERR_WAVE_INPUTSUNSUITABLE,"mci record to 2000 returned %s\n", dbg_mcierr(err));
@@ -728,18 +728,18 @@ static void test_recordWAVE(HWND hwnd)
              skip("Please install audio driver. Everything is skipped.\n");
         else skip("Cannot record cause %s. Everything is skipped.\n", dbg_mcierr(err));
 
-        err = mciSendString("close x", NULL, 0, NULL);
+        err = mciSendStringA("close x", NULL, 0, NULL);
         ok(!err,"mci close returned %s\n", dbg_mcierr(err));
         test_notification(hwnd,"record skipped",0);
         return;
     }
 
     /* Query some wave format parameters depending on the time format. */
-    err = mciSendString("status x position", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x position", buf, sizeof(buf), NULL);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     if(!err) todo_wine ok(!strcmp(buf,"2000"), "mci status position gave %s, expected 2000, some tests will fail\n", buf);
 
-    err = mciSendString("set x time format 8", NULL, 0, NULL); /* bytes */
+    err = mciSendStringA("set x time format 8", NULL, 0, NULL); /* bytes */
     ok(!err,"mci returned %s\n", dbg_mcierr(err));
 
     parm.status.dwItem = MCI_STATUS_POSITION;
@@ -758,13 +758,13 @@ static void test_recordWAVE(HWND hwnd)
     expect = 2 * nsamp;
     if(!err) todo_wine ok(parm.status.dwReturn==expect,"recorded %lu samples, expected %u\n",parm.status.dwReturn,expect);
 
-    err = mciSendString("set x time format milliseconds", NULL, 0, NULL);
+    err = mciSendStringA("set x time format milliseconds", NULL, 0, NULL);
     ok(!err,"mci set time format milliseconds returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("save x tempfile1.wav", NULL, 0, NULL);
+    err = mciSendStringA("save x tempfile1.wav", NULL, 0, NULL);
     ok(!err,"mci save returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("save x tempfile.wav", NULL, 0, NULL);
+    err = mciSendStringA("save x tempfile.wav", NULL, 0, NULL);
     ok(!err,"mci save returned %s\n", dbg_mcierr(err));
     if(!err) ok_saved = 0;
 
@@ -772,7 +772,7 @@ static void test_recordWAVE(HWND hwnd)
     if (!DeleteFile("tempfile1.wav"))
         todo_wine ok(FALSE, "Save must not rename the original file; DeleteFile returned %d\n", GetLastError());
 
-    err = mciSendString("set x channels 2", NULL, 0, NULL);
+    err = mciSendStringA("set x channels 2", NULL, 0, NULL);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci set channels after saving returned %s\n", dbg_mcierr(err));
 
     parm.seek.dwTo = 600;
@@ -780,14 +780,14 @@ static void test_recordWAVE(HWND hwnd)
     ok(!err,"mciCommand seek to 600: %s\n", dbg_mcierr(err));
 
     /* Truncate to current position */
-    err = mciSendString("delete x", NULL, 0, NULL);
+    err = mciSendStringA("delete x", NULL, 0, NULL);
     todo_wine ok(!err,"mci delete returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status x length", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status x length", buf, sizeof(buf), NULL);
     ok(!err,"mci status length returned %s\n", dbg_mcierr(err));
     todo_wine ok(!strcmp(buf,"600"), "mci status length after delete gave %s, expected 600\n", buf);
 
-    err = mciSendString("close x", NULL, 0, NULL);
+    err = mciSendStringA("close x", NULL, 0, NULL);
     ok(!err,"mci close returned %s\n", dbg_mcierr(err));
     test_notification(hwnd,"record complete",0);
 }
@@ -798,7 +798,7 @@ static void test_playWAVE(HWND hwnd)
     char buf[1024];
     memset(buf, 0, sizeof(buf));
 
-    err = mciSendString("open waveaudio!tempfile.wav alias mysound", NULL, 0, NULL);
+    err = mciSendStringA("open waveaudio!tempfile.wav alias mysound", NULL, 0, NULL);
     ok(err==ok_saved,"mci open waveaudio!tempfile.wav returned %s\n", dbg_mcierr(err));
     if(err) {
         skip("Cannot open waveaudio!tempfile.wav for playing (%s), skipping\n", dbg_mcierr(err));
@@ -814,116 +814,116 @@ static void test_playWAVE(HWND hwnd)
     err = mciGetDeviceID("waveaudio");
     ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
 
-    err = mciSendString("status mysound length", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status mysound length", buf, sizeof(buf), NULL);
     ok(!err,"mci status length returned %s\n", dbg_mcierr(err));
     todo_wine ok(!strcmp(buf,"2000"), "mci status length gave %s, expected 2000, some tests will fail.\n", buf);
 
-    err = mciSendString("cue output", NULL, 0, NULL);
+    err = mciSendStringA("cue output", NULL, 0, NULL);
     ok(err==MCIERR_UNRECOGNIZED_COMMAND,"mci incorrect cue output returned %s\n", dbg_mcierr(err));
 
     /* Test MCI to the bones -- Some todo_wine from Cue and
      * from Play from 0 to 0 are not worth fixing. */
-    err = mciSendString("cue mysound output notify", NULL, 0, hwnd);
+    err = mciSendStringA("cue mysound output notify", NULL, 0, hwnd);
     ok(!err,"mci cue output after open file returned %s\n", dbg_mcierr(err));
     /* Notification is delayed as a play thread is started. */
     todo_wine test_notification(hwnd, "cue immediate", 0);
 
     /* Cue pretends to put the MCI into paused state. */
-    err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     todo_wine ok(!strcmp(buf,"paused"), "mci status mode: %s, expected (pseudo)paused\n", buf);
 
     /* Strange pause where Pause is rejected, unlike Play; Pause; Pause tested below */
-    err = mciSendString("pause mysound", NULL, 0, hwnd);
+    err = mciSendStringA("pause mysound", NULL, 0, hwnd);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci pause after cue returned %s\n", dbg_mcierr(err));
 
     /* MCI appears to start the play thread in this border case.
      * Guessed that from (flaky) status mode and late notification arrival. */
-    err = mciSendString("play mysound from 0 to 0 notify", NULL, 0, hwnd);
+    err = mciSendStringA("play mysound from 0 to 0 notify", NULL, 0, hwnd);
     ok(!err,"mci play from 0 to 0 returned %s\n", dbg_mcierr(err));
     todo_wine test_notification(hwnd, "cue aborted by play", MCI_NOTIFY_ABORTED);
     /* play's own notification follows below */
 
-    err = mciSendString("play mysound from 250 to 0", NULL, 0, NULL);
+    err = mciSendStringA("play mysound from 250 to 0", NULL, 0, NULL);
     ok(err==MCIERR_OUTOFRANGE,"mci play from 250 to 0 returned %s\n", dbg_mcierr(err));
 
     Sleep(50); /* Give play from 0 to 0 time to finish. */
     todo_wine test_notification(hwnd, "play from 0 to 0", MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     ok(!strcmp(buf,"stopped"), "mci status mode: %s after play from 0 to 0\n", buf);
 
-    err = mciSendString("play MYSOUND from 250 to 0 notify", NULL, 0, hwnd);
+    err = mciSendStringA("play MYSOUND from 250 to 0 notify", NULL, 0, hwnd);
     ok(err==MCIERR_OUTOFRANGE,"mci play from 250 to 0 notify returned %s\n", dbg_mcierr(err));
     /* No notification (checked below) sent if error */
 
     /* A second play caused Wine<1.1.33 to hang */
-    err = mciSendString("play mysound from 500 to 220:5:0 wait", NULL, 0, NULL);
+    err = mciSendStringA("play mysound from 500 to 220:5:0 wait", NULL, 0, NULL);
     ok(!err,"mci play from 500 to 220:5:0 (=1500) returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), hwnd);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"1500"), "mci status position: %s\n", buf);
 
     /* mci will not play position < current */
-    err = mciSendString("play mysound to 1000", NULL, 0, NULL);
+    err = mciSendStringA("play mysound to 1000", NULL, 0, NULL);
     ok(err==MCIERR_OUTOFRANGE,"mci play to 1000 returned %s\n", dbg_mcierr(err));
 
     /* mci will not play to > end */
-    err = mciSendString("play mysound TO 3000 notify", NULL, 0, hwnd);
+    err = mciSendStringA("play mysound TO 3000 notify", NULL, 0, hwnd);
     ok(err==MCIERR_OUTOFRANGE,"mci play to 3000 notify returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("play mysound to 2000", NULL, 0, NULL);
+    err = mciSendStringA("play mysound to 2000", NULL, 0, NULL);
     ok(!err,"mci play to 2000 returned %s\n", dbg_mcierr(err));
 
     /* Rejected while playing */
-    err = mciSendString("cue mysound output", NULL, 0, NULL);
+    err = mciSendStringA("cue mysound output", NULL, 0, NULL);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci cue output while playing returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("play mysound to 3000", NULL, 0, NULL);
+    err = mciSendStringA("play mysound to 3000", NULL, 0, NULL);
     ok(err==MCIERR_OUTOFRANGE,"mci play to 3000 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("stop mysound Wait", NULL, 0, NULL);
+    err = mciSendStringA("stop mysound Wait", NULL, 0, NULL);
     ok(!err,"mci stop wait returned %s\n", dbg_mcierr(err));
     test_notification(hwnd, "play/cue/pause/stop", 0);
 
-    err = mciSendString("Seek Mysound to 250 wait Notify", NULL, 0, hwnd);
+    err = mciSendStringA("Seek Mysound to 250 wait Notify", NULL, 0, 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);
+    err = mciSendStringA("seek mysound to 0xfa", NULL, 0, NULL);
     ok(err==MCIERR_BAD_INTEGER,"mci seek to 0xfa returned %s\n", dbg_mcierr(err));
 
     /* MCI_INTEGER always accepts colon notation */
-    err = mciSendString("seek mysound to :1", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to :1", NULL, 0, NULL);
     ok(!err,"mci seek to :1 (=256) returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek mysound to 250::", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to 250::", NULL, 0, NULL);
     ok(!err,"mci seek to 250:: returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek mysound to 250:0", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to 250:0", NULL, 0, NULL);
     ok(!err,"mci seek to 250:0 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status mysound position notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("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);
     /* Immediate commands like status also send notifications. */
     test_notification(hwnd,"status position",MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
 
     /* Another play from == to testcase */
-    err = mciSendString("play mysound to 250 wait notify", NULL, 0, hwnd);
+    err = mciSendStringA("play mysound to 250 wait notify", NULL, 0, hwnd);
     ok(!err,"mci play (from 250) to 250 returned %s\n", dbg_mcierr(err));
     todo_wine test_notification(hwnd,"play to 250 wait notify",MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("cue mysound output", NULL, 0, NULL);
+    err = mciSendStringA("cue mysound output", NULL, 0, NULL);
     ok(!err,"mci cue output after play returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("close mysound", NULL, 0, NULL);
+    err = mciSendStringA("close mysound", NULL, 0, NULL);
     ok(!err,"mci close returned %s\n", dbg_mcierr(err));
     test_notification(hwnd,"after close",0);
 }
@@ -936,7 +936,7 @@ static void test_asyncWAVE(HWND hwnd)
     char buf[1024];
     memset(buf, 0, sizeof(buf));
 
-    err = mciSendString("open tempfile.wav alias mysound notify type waveaudio", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("open tempfile.wav alias mysound notify type waveaudio", buf, sizeof(buf), hwnd);
     ok(err==ok_saved,"mci open tempfile.wav returned %s\n", dbg_mcierr(err));
     if(err) {
         skip("Cannot open tempfile.wav for playing (%s), skipping\n", dbg_mcierr(err));
@@ -957,11 +957,11 @@ static void test_asyncWAVE(HWND hwnd)
     err = mciGetDeviceID("waveaudio");
     ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
 
-    err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
 
-    err = mciSendString("play mysound notify", NULL, 0, hwnd);
+    err = mciSendStringA("play mysound notify", NULL, 0, hwnd);
     ok(!err,"mci play returned %s\n", dbg_mcierr(err));
 
     Sleep(500); /* milliseconds */
@@ -976,7 +976,7 @@ static void test_asyncWAVE(HWND hwnd)
     err = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)&parm);
     ok(!err,"mciCommand set time format ms: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), hwnd);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     trace("position after Sleep: %sms\n", buf);
     p2 = atoi(buf);
@@ -993,25 +993,25 @@ static void test_asyncWAVE(HWND hwnd)
     ok(400 <= p2 && p2 <= 1000, "%ums is not even in the expected 400-1000ms range\n", p2);
     test_notification(hwnd,"play (nowait)",0);
 
-    err = mciSendString("pause mysound wait", NULL, 0, hwnd);
+    err = mciSendStringA("pause mysound wait", NULL, 0, hwnd);
     ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status mysound mode notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode notify", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"paused"), "mci status mode: %s\n", buf);
     test_notification(hwnd,"play",MCI_NOTIFY_SUPERSEDED);
     test_notification(hwnd,"status",MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), hwnd);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     trace("position while paused: %sms\n",buf);
     p1 = atoi(buf);
     ok(p1>=p2, "position not increasing: %u > %u\n", p2, p1);
 
-    err = mciSendString("stop mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("stop mysound wait", NULL, 0, NULL);
     ok(!err,"mci stop returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("info mysound file notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("info mysound file notify", buf, sizeof(buf), hwnd);
     ok(!err,"mci info file returned %s\n", dbg_mcierr(err));
     if(!err) { /* fully qualified name */
         int len = strlen(buf);
@@ -1020,11 +1020,11 @@ static void test_asyncWAVE(HWND hwnd)
     }
     test_notification(hwnd,"info file",MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
 
-    err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), hwnd);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     trace("position once stopped: %sms\n",buf);
     p2 = atoi(buf);
@@ -1032,82 +1032,82 @@ static void test_asyncWAVE(HWND hwnd)
     ok(p2>=p1 && p2<=p1+16,"position changed from %ums to %ums\n",p1,p2);
 
     /* No Resume once stopped (waveaudio, sequencer and cdaudio differ). */
-    err = mciSendString("resume mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("resume mysound wait", NULL, 0, NULL);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci resume wait returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("play mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("play mysound wait", NULL, 0, NULL);
     ok(!err,"mci play wait returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), hwnd);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     todo_wine ok(!strcmp(buf,"2000"), "mci status position: %s\n", buf);
 
-    err = mciSendString("seek mysound to start wait", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to start wait", NULL, 0, NULL);
     ok(!err,"mci seek to start wait returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("play mysound to 1000 notify", NULL, 0, hwnd);
+    err = mciSendStringA("play mysound to 1000 notify", NULL, 0, hwnd);
     ok(!err,"mci play returned %s\n", dbg_mcierr(err));
 
     /* Sleep(200); not needed with Wine any more. */
 
-    err = mciSendString("pause mysound notify", NULL, 0, NULL); /* notify no callback */
+    err = mciSendStringA("pause mysound notify", NULL, 0, NULL); /* notify no callback */
     ok(!err,"mci pause notify returned %s\n", dbg_mcierr(err));
     /* Supersede even though pause cannot notify given no callback */
     test_notification(hwnd,"pause aborted play #1 notification",MCI_NOTIFY_SUPERSEDED);
     test_notification(hwnd,"impossible pause notification",0);
 
-    err = mciSendString("cue mysound output notify", NULL, 0, hwnd);
+    err = mciSendStringA("cue mysound output notify", NULL, 0, hwnd);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci cue output while paused returned %s\n", dbg_mcierr(err));
     test_notification(hwnd,"cue output notify #2",0);
 
-    err = mciSendString("resume mysound notify", NULL, 0, hwnd);
+    err = mciSendStringA("resume mysound notify", NULL, 0, hwnd);
     ok(!err,"mci resume notify returned %s\n", dbg_mcierr(err));
     test_notification(hwnd, "resume notify", MCI_NOTIFY_SUCCESSFUL);
 
     /* Seek or even Stop used to hang Wine<1.1.32 on MacOS. */
-    err = mciSendString("seek mysound to 0 wait", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to 0 wait", NULL, 0, NULL);
     ok(!err,"mci seek to start returned %s\n", dbg_mcierr(err));
 
     /* Seek stops. */
-    err = mciSendString("status mysound mode", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), NULL);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
 
-    err = mciSendString("seek mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound wait", NULL, 0, NULL);
     ok(err==MCIERR_MISSING_PARAMETER,"mci seek to nowhere returned %s\n", dbg_mcierr(err));
 
     /* cdaudio does not detect to start to end as error */
-    err = mciSendString("seek mysound to start to 0", NULL, 0, NULL);
+    err = mciSendStringA("seek mysound to start to 0", NULL, 0, NULL);
     ok(err==MCIERR_FLAGS_NOT_COMPATIBLE,"mci seek to start to 0 returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("PLAY mysound to 1000 notify", NULL, 0, hwnd);
+    err = mciSendStringA("PLAY mysound to 1000 notify", NULL, 0, hwnd);
     ok(!err,"mci play to 1000 notify returned %s\n", dbg_mcierr(err));
 
     /* Sleep(200); not needed with Wine any more. */
     /* Give it 400ms and resume will appear to complete below. */
 
-    err = mciSendString("pause mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("pause mysound wait", NULL, 0, NULL);
     ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
     /* Unlike sequencer and cdaudio, waveaudio's pause does not abort. */
     test_notification(hwnd,"pause aborted play #2 notification",0);
 
-    err = mciSendString("resume mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("resume mysound wait", NULL, 0, NULL);
     ok(!err,"mci resume wait returned %s\n", dbg_mcierr(err));
     /* Resume is a short asynchronous call, something else is playing. */
 
-    err = mciSendString("status mysound mode", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status mysound mode", buf, sizeof(buf), NULL);
     ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf);
 
     /* Note extra space before alias */
-    err = mciSendString("pause  mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("pause  mysound wait", NULL, 0, NULL);
     todo_wine ok(!err,"mci pause (space) wait returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("pause mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("pause mysound wait", NULL, 0, NULL);
     ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
 
     /* Better ask position only when paused, is it updated while playing? */
-    err = mciSendString("status mysound position", buf, sizeof(buf), NULL);
+    err = mciSendStringA("status mysound position", buf, sizeof(buf), NULL);
     ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
     /* TODO compare position < 900 */
     ok(strcmp(buf,"1000"), "mci resume waited\n");
@@ -1115,7 +1115,7 @@ static void test_asyncWAVE(HWND hwnd)
     trace("position after resume: %sms\n",buf);
     test_notification(hwnd,"play (aborted by pause/resume/pause)",0);
 
-    err = mciSendString("close mysound wait", NULL, 0, NULL);
+    err = mciSendStringA("close mysound wait", NULL, 0, NULL);
     ok(!err,"mci close wait returned %s\n", dbg_mcierr(err));
     test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED);
 }
@@ -1133,42 +1133,42 @@ static void test_AutoOpenWAVE(HWND hwnd)
     memset(buf, 0, sizeof(buf)); memset(path, 0, sizeof(path));
 
     /* Do not crash on NULL buffer pointer */
-    err = mciSendString("sysinfo waveaudio quantity open", NULL, 0, NULL);
+    err = mciSendStringA("sysinfo waveaudio quantity open", NULL, 0, NULL);
     ok(err==MCIERR_PARAM_OVERFLOW,"mci sysinfo without buffer returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
+    err = mciSendStringA("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
     ok(!err,"mci sysinfo waveaudio quantity open returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"0"), "sysinfo quantity open expected 0, got: %s, some more tests will fail.\n", buf);
 
     /* Who knows why some MS machines pass all tests but return MCIERR_HARDWARE here? */
     /* Wine returns MCIERR_HARDWARE when no default sound is found in win.ini or the registry. */
-    err = mciSendString("sound NoSuchSoundDefined wait", NULL, 0, NULL);
+    err = mciSendStringA("sound NoSuchSoundDefined wait", NULL, 0, NULL);
     ok(err==ok_snd || err==MCIERR_HARDWARE, "mci sound NoSuchSoundDefined returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("sound SystemExclamation notify wait", NULL, 0, hwnd);
+    err = mciSendStringA("sound SystemExclamation notify wait", NULL, 0, hwnd);
     ok(err==ok_snd || err==MCIERR_HARDWARE, "mci sound SystemExclamation returned %s\n", dbg_mcierr(err));
     test_notification(hwnd, "sound notify", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
     Sleep(16); /* time to auto-close makes sysinfo below return expected error */
-    err = mciSendString("sysinfo waveaudio notify name 1 open", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo waveaudio notify name 1 open", buf, sizeof(buf), hwnd);
     ok(err==MCIERR_OUTOFRANGE,"sysinfo waveaudio name 1 returned %s\n", dbg_mcierr(err));
     if(!err) trace("sysinfo dangling open alias: %s\n", buf);
     test_notification(hwnd, "sysinfo name outofrange\n", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("play no-such-file-exists.wav notify", buf, sizeof(buf), NULL);
+    err = mciSendStringA("play no-such-file-exists.wav notify", buf, sizeof(buf), NULL);
     todo_wine ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open notify returned %s\n", dbg_mcierr(err));
     /* FILE_NOT_FOUND in Wine because auto-open fails before testing the notify flag */
 
     test_notification(hwnd, "-prior to auto-open-", 0);
 
-    err = mciSendString("play tempfile.wav notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("play tempfile.wav notify", buf, sizeof(buf), hwnd);
     if(ok_saved==MCIERR_FILE_NOT_FOUND) todo_wine /* same as above */
     ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err));
     else
     ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err));
 
     if(err) /* FIXME: don't open twice yet, it confuses Wine. */
-    err = mciSendString("play tempfile.wav", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("play tempfile.wav", buf, sizeof(buf), hwnd);
     ok(err==ok_saved,"mci auto-open play returned %s\n", dbg_mcierr(err));
 
     if(err==MCIERR_FILE_NOT_FOUND) {
@@ -1176,7 +1176,7 @@ static void test_AutoOpenWAVE(HWND hwnd)
         return;
     }
 
-    err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
+    err = mciSendStringA("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
     ok(!err,"mci sysinfo waveaudio quantity after auto-open returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"1"), "sysinfo quantity open expected 1, got: %s\n", buf);
 
@@ -1187,7 +1187,7 @@ static void test_AutoOpenWAVE(HWND hwnd)
     ok(!err,"mciSendCommand(0(WAVEAUDIO), MCI_SYSINFO, OPEN | MCI_NOTIFY) returned %s\n", dbg_mcierr(err));
     if(!err) ok(atoi(buf)==intbuf[1],"sysinfo waveaudio quantity open string and command differ\n");
 
-    err = mciSendString("sysinfo waveaudio name 1 open notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo waveaudio name 1 open notify", buf, sizeof(buf), hwnd);
     ok(!err,"mci sysinfo waveaudio name after auto-open returned %s\n", dbg_mcierr(err));
     /* This is the alias, not necessarily a file name. */
     if(!err) ok(!strcmp(buf,"tempfile.wav"), "sysinfo name 1 open: %s\n", buf);
@@ -1197,25 +1197,25 @@ static void test_AutoOpenWAVE(HWND hwnd)
     ok(err==1,"mciGetDeviceID tempfile.wav returned %u, expected 1\n", err);
 
     /* Save the full pathname to the file. */
-    err = mciSendString("info tempfile.wav file", path, sizeof(path), NULL);
+    err = mciSendStringA("info tempfile.wav file", path, sizeof(path), NULL);
     ok(!err,"mci info tempfile.wav file returned %s\n", dbg_mcierr(err));
     if(err) strcpy(path,"tempfile.wav");
 
-    err = mciSendString("status tempfile.wav mode", NULL, 0, hwnd);
+    err = mciSendStringA("status tempfile.wav mode", NULL, 0, hwnd);
     ok(!err,"mci status tempfile.wav mode without buffer returned %s\n", dbg_mcierr(err));
 
     sprintf(command,"status \"%s\" mode",path);
-    err = mciSendString(command, buf, sizeof(buf), hwnd);
+    err = mciSendStringA(command, buf, sizeof(buf), hwnd);
     ok(!err,"mci status \"%s\" mode returned %s\n", path, dbg_mcierr(err));
 
-    err = mciSendString("status tempfile.wav mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status tempfile.wav mode", buf, sizeof(buf), hwnd);
     ok(!err,"mci status tempfile.wav mode returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"playing"), "mci auto-open status mode, got: %s\n", buf);
 
-    err = mciSendString("open tempfile.wav", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open tempfile.wav", buf, sizeof(buf), NULL);
     ok(err==MCIERR_DEVICE_OPEN, "mci open from auto-open returned %s\n", dbg_mcierr(err));
 
-    err = mciSendString("open foo.wav alias tempfile.wav", buf, sizeof(buf), NULL);
+    err = mciSendStringA("open foo.wav alias tempfile.wav", buf, sizeof(buf), NULL);
     ok(err==MCIERR_DUPLICATE_ALIAS, "mci open re-using alias returned %s\n", dbg_mcierr(err));
 
     /* w2k/xp and Wine differ. While the device is busy playing, it is
@@ -1229,7 +1229,7 @@ static void test_AutoOpenWAVE(HWND hwnd)
      * MCIERR_NOTIFY_ON_AUTO_OPEN and thus don't abort the original
      * command.
      */
-    err = mciSendString("status tempfile.wav mode notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status tempfile.wav mode notify", buf, sizeof(buf), hwnd);
     todo_wine ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN, "mci status auto-open notify returned %s\n", dbg_mcierr(err));
     if(!err) {
         trace("Wine style MCI auto-close upon notification\n");
@@ -1242,27 +1242,27 @@ static void test_AutoOpenWAVE(HWND hwnd)
         /* MCI received NOTIFY_SUPERSEDED and auto-closed the device. */
 
         /* Until this is implemented, force closing the device */
-        err = mciSendString("close tempfile.wav", NULL, 0, hwnd);
+        err = mciSendStringA("close tempfile.wav", NULL, 0, hwnd);
         ok(!err,"mci auto-still-open stop returned %s\n", dbg_mcierr(err));
         Sleep(16);
         test_notification(hwnd,"auto-open",0);
     } else if(err==MCIERR_NOTIFY_ON_AUTO_OPEN) { /* MS style */
         trace("MS style MCI auto-open forbids notification\n");
 
-        err = mciSendString("pause tempfile.wav", NULL, 0, hwnd);
+        err = mciSendStringA("pause tempfile.wav", NULL, 0, hwnd);
         ok(!err,"mci auto-still-open pause returned %s\n", dbg_mcierr(err));
 
-        err = mciSendString("status tempfile.wav mode", buf, sizeof(buf), hwnd);
+        err = mciSendStringA("status tempfile.wav mode", buf, sizeof(buf), hwnd);
         ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
         if(!err) ok(!strcmp(buf,"paused"), "mci auto-open status mode, got: %s\n", buf);
 
         /* Auto-close */
-        err = mciSendString("stop tempfile.wav wait", NULL, 0, hwnd);
+        err = mciSendStringA("stop tempfile.wav wait", NULL, 0, hwnd);
         ok(!err,"mci auto-still-open stop returned %s\n", dbg_mcierr(err));
         Sleep(16); /* makes sysinfo quantity open below succeed */
     }
 
-    err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
+    err = mciSendStringA("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
     ok(!err,"mci sysinfo waveaudio quantity open after close returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"0"), "sysinfo quantity open expected 0 after auto-close, got: %s\n", buf);
 
@@ -1270,23 +1270,23 @@ static void test_AutoOpenWAVE(HWND hwnd)
      * MCIERR_FILE_NOT_FOUND by using the full path name from the Info file command.
      */
     sprintf(command,"status \"%s\" mode wait",path);
-    err = mciSendString(command, buf, sizeof(buf), hwnd);
+    err = mciSendStringA(command, buf, sizeof(buf), hwnd);
     ok(!err,"mci re-auto-open status mode returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"stopped"), "mci re-auto-open status mode, got: %s\n", buf);
 
     /* This uses auto-open as well. */
-    err = mciSendString("capability waveaudio outputs", buf, sizeof(buf), NULL);
+    err = mciSendStringA("capability waveaudio outputs", buf, sizeof(buf), NULL);
     ok(!err,"mci capability waveaudio outputs returned %s\n", dbg_mcierr(err));
     /* Wine with no sound selected in winecfg's audio tab fails this test. */
     if(!err) ok(atoi(buf)==ndevs,"Expected %d audio outputs, got %s\n", ndevs, buf);
 
-    err = mciSendString("capability waveaudio device type", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability waveaudio device type", buf, sizeof(buf), hwnd);
     ok(!err,"mci capability device type returned %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf,"waveaudio"), "mci capability device type response: %s\n", buf);
 
     /* waveaudio forbids Pause without Play. */
     sprintf(command,"pause \"%s\"",path);
-    err = mciSendString(command, NULL, 0, hwnd);
+    err = mciSendStringA(command, NULL, 0, hwnd);
     ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci auto-open pause returned %s\n", dbg_mcierr(err));
 
     ok(0xDEADF00D==intbuf[0] && 0xABADCAFE==intbuf[2],"DWORD buffer corruption\n");
@@ -1308,7 +1308,7 @@ START_TEST(mci)
     }else
         skip("No output devices available, skipping all output tests\n");
     /* Win9X hangs when exiting with something still open. */
-    err = mciSendString("close all", NULL, 0, hwnd);
+    err = mciSendStringA("close all", NULL, 0, hwnd);
     ok(!err,"final close all returned %s\n", dbg_mcierr(err));
     ok(DeleteFile("tempfile.wav")||ok_saved,"Delete tempfile.wav (cause auto-open?)\n");
     DestroyWindow(hwnd);
diff --git a/dlls/winmm/tests/mcicda.c b/dlls/winmm/tests/mcicda.c
index 7536111..ae7e9b3 100644
--- a/dlls/winmm/tests/mcicda.c
+++ b/dlls/winmm/tests/mcicda.c
@@ -98,7 +98,7 @@ static void test_play(HWND hwnd)
     memset(buf, 0, sizeof(buf));
     parm.gen.dwCallback = (DWORD_PTR)hwnd; /* once to rule them all */
 
-    err = mciSendString("open cdaudio alias c notify shareable", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("open cdaudio alias c notify shareable", buf, sizeof(buf), hwnd);
     ok(!err || err == MCIERR_CANNOT_LOAD_DRIVER || err == MCIERR_MUST_USE_SHAREABLE,
        "mci open cdaudio notify returned %s\n", dbg_mcierr(err));
     ok_open = err;
@@ -115,20 +115,20 @@ static void test_play(HWND hwnd)
     ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf);
     /* Win9X-ME may start the MCI and media player upon insertion of a CD. */
 
-    err = mciSendString("sysinfo all name 1 open", buf, sizeof(buf), NULL);
+    err = mciSendStringA("sysinfo all name 1 open", buf, sizeof(buf), NULL);
     ok(!err,"sysinfo all name 1 returned %s\n", dbg_mcierr(err));
     if(!err && wDeviceID != 1) trace("Device '%s' is open.\n", buf);
 
-    err = mciSendString("capability c has video notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability c has video notify", buf, sizeof(buf), hwnd);
     ok(!err, "capability video: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "false"), "capability video is %s\n", buf);
     test_notification(hwnd, "capability notify", MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("capability c can play", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability c can play", buf, sizeof(buf), hwnd);
     ok(!err, "capability video: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "true"), "capability play is %s\n", buf);
 
-    err = mciSendString("capability c", buf, sizeof(buf), NULL);
+    err = mciSendStringA("capability c", buf, sizeof(buf), NULL);
     ok(err == MCIERR_MISSING_PARAMETER, "capability nokeyword: %s\n", dbg_mcierr(err));
 
     parm.caps.dwItem = 0x4001;
@@ -160,7 +160,7 @@ static void test_play(HWND hwnd)
     if(!err) ok(parm.status.dwReturn == MCI_FORMAT_MSF, "status time default format: %ld\n", parm.status.dwReturn);
 
     /* "CD-Audio" */
-    err = mciSendString("info c product wait notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("info c product wait notify", buf, sizeof(buf), hwnd);
     ok(!err, "info product: %s\n", dbg_mcierr(err));
     test_notification(hwnd, "info notify", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
@@ -194,24 +194,24 @@ static void test_play(HWND hwnd)
     }
 
     /* Initial mode is "stopped" with a CD in drive */
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped"), "status mode is initially %s\n", buf);
 
-    err = mciSendString("status c ready", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c ready", buf, sizeof(buf), hwnd);
     ok(!err, "status ready: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "true"), "status ready with media is %s\n", buf);
 
-    err = mciSendString("info c product identity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("info c product identity", buf, sizeof(buf), hwnd);
     ok(!err, "info 2flags: %s\n", dbg_mcierr(err)); /* not MCIERR_FLAGS_NOT_COMPATIBLE */
     /* Precedence rule p>u>i verified experimentally, not tested here. */
 
-    err = mciSendString("info c identity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("info c identity", buf, sizeof(buf), hwnd);
     ok(!err || err == MCIERR_HARDWARE, "info identity: %s\n", dbg_mcierr(err));
     /* a blank disk causes MCIERR_HARDWARE and other commands to fail likewise. */
     ok_hw = err;
 
-    err = mciSendString("info c upc", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("info c upc", buf, sizeof(buf), hwnd);
     ok(err == ok_hw || err == MCIERR_NO_IDENTITY, "info upc: %s\n", dbg_mcierr(err));
 
     parm.status.dwItem = MCI_STATUS_NUMBER_OF_TRACKS;
@@ -222,7 +222,7 @@ static void test_play(HWND hwnd)
     /* cf. MAXIMUM_NUMBER_TRACKS */
     ok(0 < numtracks && numtracks <= 99, "number of tracks=%ld\n", parm.status.dwReturn);
 
-    err = mciSendString("status c length", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c length", buf, sizeof(buf), hwnd);
     ok(err == ok_hw, "status length: %s\n", dbg_mcierr(err));
     if(!err) trace("CD length %s\n", buf);
 
@@ -233,76 +233,76 @@ static void test_play(HWND hwnd)
 
     /* Linux leaves the drive at some random position,
      * native initialises to the start position below. */
-    err = mciSendString("status c position", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c position", buf, sizeof(buf), hwnd);
     ok(!err, "status position: %s\n", dbg_mcierr(err));
     if(!err) todo_wine ok(!strcmp(buf, "00:02:00") || !strcmp(buf, "00:02:33") || !strcmp(buf, "00:03:00"),
                 "status position initially %s\n", buf);
     /* 2 seconds is the initial position even with data tracks. */
 
-    err = mciSendString("status c position start notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c position start notify", buf, sizeof(buf), hwnd);
     ok(err == ok_hw, "status position start: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "00:02:00") || !strcmp(buf, "00:02:33") || !strcmp(buf, "00:03:00"),
                 "status position start %s\n", buf);
     test_notification(hwnd, "status notify", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("status c position start track 1 notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c position start track 1 notify", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_FLAGS_NOT_COMPATIBLE, "status position start: %s\n", dbg_mcierr(err));
     test_notification(hwnd, "status 2flags", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("play c from 00:02:00 to 00:01:00 notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("play c from 00:02:00 to 00:01:00 notify", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_OUTOFRANGE, "play 2s to 1s: %s\n", dbg_mcierr(err));
     test_notification(hwnd, "play 2s to 1s", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("resume c", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("resume c", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_HARDWARE || /* Win9x */ err == MCIERR_UNSUPPORTED_FUNCTION,
        "resume without play: %s\n", dbg_mcierr(err)); /* not NONAPPLICABLE_FUNCTION */
     /* vmware with a .iso (data-only) yields no error on NT/w2k */
 
-    err = mciSendString("seek c wait", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("seek c wait", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_MISSING_PARAMETER, "seek noflag: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("seek c to start to end", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("seek c to start to end", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_FLAGS_NOT_COMPATIBLE || broken(!err), "seek to start+end: %s\n", dbg_mcierr(err));
     /* Win9x only errors out with Seek to start to <position> */
 
     /* set Wine to a defined position before play */
-    err = mciSendString("seek c to start notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("seek c to start notify", buf, sizeof(buf), hwnd);
     ok(!err, "seek to start: %s\n", dbg_mcierr(err));
     test_notification(hwnd, "seek to start", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
     /* Win9X Status position / current track then sometimes report the end position / track! */
 
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped"), "status mode after seek is %s\n", buf);
 
     /* MCICDA ignores MCI_SET_VIDEO */
-    err = mciSendString("set c video on", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set c video on", buf, sizeof(buf), hwnd);
     ok(!err, "set video: %s\n", dbg_mcierr(err));
 
     /* One xp machine ignored SET_AUDIO, one w2k and one w7 machine honoured it
      * and simultaneously toggled the mute button in the mixer control panel.
      * Or does it only depend on the HW, not the OS?
      * Some vmware machines return MCIERR_HARDWARE. */
-    err = mciSendString("set c audio all on", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set c audio all on", buf, sizeof(buf), hwnd);
     ok(!err || err == MCIERR_HARDWARE, "set audio: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("set c time format ms", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set c time format ms", buf, sizeof(buf), hwnd);
     ok(!err, "set time format ms: %s\n", dbg_mcierr(err));
 
     memset(buf, 0, sizeof(buf));
-    err = mciSendString("status c position start", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c position start", buf, sizeof(buf), hwnd);
     ok(!err, "status position start (ms): %s\n", dbg_mcierr(err));
     duration = atoi(buf);
     if(!err) ok(duration > 2000, "status position initially %sms\n", buf);
     /* 00:02:00 corresponds to 2001 ms, 02:33 -> 2441 etc. */
 
-    err = mciSendString("status c position start track 1", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c position start track 1", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_FLAGS_NOT_COMPATIBLE, "status position start+track: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status c notify wait", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c notify wait", buf, sizeof(buf), hwnd);
     ok(err == MCIERR_MISSING_PARAMETER, "status noflag: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status c length track 1", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c length track 1", buf, sizeof(buf), hwnd);
     ok(!err, "status length (ms): %s\n", dbg_mcierr(err));
     if(!err) {
         trace("track #1 length %sms\n", buf);
@@ -311,7 +311,7 @@ static void test_play(HWND hwnd)
 
     if (0) { /* causes some native systems to return Seek and Play with MCIERR_HARDWARE */
         /* depending on capability can eject only? */
-        err = mciSendString("set c door closed notify", buf, sizeof(buf), hwnd);
+        err = mciSendStringA("set c door closed notify", buf, sizeof(buf), hwnd);
         ok(!err, "set door closed: %s\n", dbg_mcierr(err));
         test_notification(hwnd, "door closed", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
     }
@@ -352,7 +352,7 @@ static void test_play(HWND hwnd)
          * On some native systems, status position fluctuates around the target position;
          * Successive calls return varying positions! */
 
-        err = mciSendString("set c time format msf", buf, sizeof(buf), hwnd);
+        err = mciSendStringA("set c time format msf", buf, sizeof(buf), hwnd);
         ok(!err, "set time format msf: %s\n", dbg_mcierr(err));
 
         parm.status.dwItem = MCI_STATUS_LENGTH;
@@ -374,7 +374,7 @@ static void test_play(HWND hwnd)
 
         Sleep(1500*factor); /* Time to spin up, hopefully less than track length */
 
-        err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+        err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
         ok(!err, "status mode: %s\n", dbg_mcierr(err));
         if(!err) ok(!strcmp(buf, "stopped"), "status mode on data is %s\n", buf);
     } else if (parm.status.dwReturn == MCI_CDA_TRACK_AUDIO) {
@@ -387,7 +387,7 @@ static void test_play(HWND hwnd)
         return;
     }
 
-    err = mciSendString("set c time format msf", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set c time format msf", buf, sizeof(buf), hwnd);
     ok(!err, "set time format msf: %s\n", dbg_mcierr(err));
 
     parm.status.dwItem = MCI_STATUS_LENGTH;
@@ -417,7 +417,7 @@ static void test_play(HWND hwnd)
     err = mciSendCommand(wDeviceID, MCI_SEEK, MCI_TO, (DWORD_PTR)&parm);
     ok(err == MCIERR_OUTOFRANGE, "SEEK past %08X position last + length: %s\n", parm.seek.dwTo, dbg_mcierr(err));
 
-    err = mciSendString("set c time format tmsf", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("set c time format tmsf", buf, sizeof(buf), hwnd);
     ok(!err, "set time format tmsf: %s\n", dbg_mcierr(err));
 
     parm.play.dwFrom = track;
@@ -431,18 +431,18 @@ static void test_play(HWND hwnd)
 
     Sleep(1800*factor); /* Time to spin up, hopefully less than track length */
 
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "playing"), "status mode during play is %s\n", buf);
 
-    err = mciSendString("pause c", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("pause c", buf, sizeof(buf), hwnd);
     ok(!err, "pause: %s\n", dbg_mcierr(err));
 
     test_notification(hwnd, "pause should abort notification", MCI_NOTIFY_ABORTED);
 
     /* Native returns stopped when paused,
      * yet the Stop command is different as it would disallow Resume. */
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) todo_wine ok(!strcmp(buf, "stopped"), "status mode while paused is %s\n", buf);
 
@@ -461,7 +461,7 @@ static void test_play(HWND hwnd)
     err = mciSendCommand(wDeviceID, MCI_PLAY, MCI_FROM|MCI_TO, (DWORD_PTR)&parm);
     ok(err == MCIERR_OUTOFRANGE, "PLAY: %s\n", dbg_mcierr(err));
 
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "playing"), "status mode after play is %s\n", buf);
 
@@ -483,7 +483,7 @@ static void test_play(HWND hwnd)
      * and reflect the new position only seconds after issuing the command. */
 
     /* Seek stops */
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped"), "status mode after play is %s\n", buf);
 
@@ -497,7 +497,7 @@ static void test_play(HWND hwnd)
 
     Sleep(2200*factor);
 
-    err = mciSendString("status c mode", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped") || broken(!strcmp(buf, "playing")), "status mode after play is %s\n", buf);
     if(!err && !strcmp(buf, "playing")) trace("status playing after sleep\n");
@@ -505,7 +505,7 @@ static void test_play(HWND hwnd)
     /* Playing to end asynchronously sends no notification! */
     test_notification(hwnd, "PLAY to end", 0);
 
-    err = mciSendString("status c mode notify", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c mode notify", buf, sizeof(buf), hwnd);
     ok(!err, "status mode: %s\n", dbg_mcierr(err));
     if(!err) ok(!strcmp(buf, "stopped") || broken(!strcmp(buf, "playing")), "status mode after play is %s\n", buf);
     if(!err && !strcmp(buf, "playing")) trace("status still playing\n");
@@ -515,7 +515,7 @@ static void test_play(HWND hwnd)
     test_notification(hwnd, "dangling from PLAY", MCI_NOTIFY_SUPERSEDED);
     test_notification(hwnd, "status mode", MCI_NOTIFY_SUCCESSFUL);
 
-    err = mciSendString("stop c", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("stop c", buf, sizeof(buf), hwnd);
     ok(!err, "stop: %s\n", dbg_mcierr(err));
 
     test_notification(hwnd, "PLAY to end", 0);
@@ -537,7 +537,7 @@ static void test_play(HWND hwnd)
 
     Sleep(1400*factor);
 
-    err = mciSendString("status c current track", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("status c current track", buf, sizeof(buf), hwnd);
     ok(!err, "status track: %s\n", dbg_mcierr(err));
     if(!err) todo_wine ok(numtracks == atoi(buf), "status current track gave %s, expected %u\n", buf, numtracks);
     /* fails in Wine because SEEK is independent on IOCTL_CDROM_RAW_READ */
@@ -605,7 +605,7 @@ START_TEST(mcicda)
     err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_STOP, 0, 0);
     todo_wine ok(!err || broken(err == MCIERR_HARDWARE /* blank CD or testbot without CD-ROM */),
        "STOP all returned %s\n", dbg_mcierr(err));
-    err = mciSendString("close all", NULL, 0, hwnd);
+    err = mciSendStringA("close all", NULL, 0, hwnd);
     ok(!err, "final close all returned %s\n", dbg_mcierr(err));
     test_notification(hwnd, "-tests complete-", 0);
     DestroyWindow(hwnd);
diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c
index 65b5e78..8fb035a 100644
--- a/dlls/winmm/tests/midi.c
+++ b/dlls/winmm/tests/midi.c
@@ -244,13 +244,13 @@ static void test_midi_mci(HWND hwnd)
     char buf[1024];
     memset(buf, 0, sizeof(buf));
 
-    err = mciSendString("sysinfo sequencer quantity", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("sysinfo sequencer quantity", buf, sizeof(buf), hwnd);
     ok(!err, "mci sysinfo sequencer quantity returned %d\n", err);
     if (!err) trace("Found %s MCI sequencer devices\n", buf);
 
     if (!strcmp(buf, "0")) return;
 
-    err = mciSendString("capability sequencer can record", buf, sizeof(buf), hwnd);
+    err = mciSendStringA("capability sequencer can record", buf, sizeof(buf), hwnd);
     ok(!err, "mci sysinfo sequencer quantity returned %d\n", err);
     if(!err) ok(!strcmp(buf, "false"), "capability can record is %s\n", buf);
 }
-- 
1.8.3.1



More information about the wine-patches mailing list