winmm/tests: Compile with -D__WINESRC__.

This commit is contained in:
Michael Stefaniuc 2013-11-03 23:36:24 +01:00 committed by Alexandre Julliard
parent 36638ef5f8
commit 6d7bd62a73
6 changed files with 91 additions and 91 deletions

View File

@ -1,6 +1,5 @@
TESTDLL = winmm.dll
IMPORTS = winmm user32 advapi32
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \
capture.c \

View File

@ -43,9 +43,9 @@ static const char * wave_in_error(MMRESULT error)
static char long_msg[1100];
MMRESULT rc;
rc = waveInGetErrorText(error, msg, sizeof(msg));
rc = waveInGetErrorTextA(error, msg, sizeof(msg));
if (rc != MMSYSERR_NOERROR)
sprintf(long_msg, "waveInGetErrorText(%x) failed with error %x", error, rc);
sprintf(long_msg, "waveInGetErrorTextA(%x) failed with error %x", error, rc);
else
sprintf(long_msg, "%s(%s)", mmsys_error(error), msg);
return long_msg;
@ -127,7 +127,8 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
dev_name(device));
}
static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, DWORD flags, LPWAVEINCAPS pcaps)
static void wave_in_test_deviceIn(int device, WAVEFORMATEX *pwfx, DWORD format, DWORD flags,
WAVEINCAPSA *pcaps)
{
HWAVEIN win;
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);

View File

@ -30,12 +30,12 @@
static MCIERROR ok_saved = MCIERR_FILE_NOT_FOUND;
typedef union {
MCI_INFO_PARMS info;
MCI_INFO_PARMSA info;
MCI_STATUS_PARMS status;
MCI_WAVE_SET_PARMS set;
MCI_WAVE_OPEN_PARMS open;
MCI_WAVE_OPEN_PARMSA open;
MCI_GETDEVCAPS_PARMS caps;
MCI_SYSINFO_PARMS sys;
MCI_SYSINFO_PARMSA sys;
MCI_SEEK_PARMS seek;
MCI_GENERIC_PARMS gen;
} MCI_PARMS_UNION;
@ -412,8 +412,8 @@ static void test_openCloseWAVE(HWND hwnd)
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 = mciGetDeviceIDA("waveaudio");
ok(!err, "mciGetDeviceIDA waveaudio returned %u, expected 0\n", err);
err = mciSendStringA(command_open, buf, sizeof(buf), hwnd);
ok(!err,"mci %s returned %s\n", command_open, dbg_mcierr(err));
@ -527,8 +527,8 @@ static void test_openCloseWAVE(HWND hwnd)
ok(err==MCIERR_UNRECOGNIZED_KEYWORD || broken(err==MMSYSERR_NOTSUPPORTED/* Win9x */), "mciCommand MCI_INFO other: %s\n", dbg_mcierr(err));
ok(!strcmp(buf,"K"), "info output buffer %s\n", buf);
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 = mciGetDeviceIDA("all");
ok(err == MCI_ALL_DEVICE_ID, "mciGetDeviceIDA all returned %u, expected MCI_ALL_DEVICE_ID\n", err);
err = mciSendStringA(command_close_my, NULL, 0, hwnd);
ok(!err,"mci %s returned %s\n", command_close_my, dbg_mcierr(err));
@ -596,8 +596,8 @@ static void test_openCloseWAVE(HWND hwnd)
ok(0xDEADF00D==intbuf[0] && 0xABADCAFE==intbuf[2],"DWORD buffer corruption\n");
err = mciGetDeviceID("waveaudio");
ok(err==1,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
err = mciGetDeviceIDA("waveaudio");
ok(err == 1, "mciGetDeviceIDA waveaudio returned %u, expected 1\n", err);
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));
@ -638,12 +638,12 @@ static void test_recordWAVE(HWND hwnd)
ok(!err,"mciCommand open new type waveaudio alias x notify: %s\n", dbg_mcierr(err));
wDeviceID = parm.open.wDeviceID;
err = mciGetDeviceID("x");
ok(err==wDeviceID,"mciGetDeviceID x returned %u, expected %u\n", err, wDeviceID);
err = mciGetDeviceIDA("x");
ok(err == wDeviceID, "mciGetDeviceIDA x returned %u, expected %u\n", err, wDeviceID);
/* Only the alias is looked up. */
err = mciGetDeviceID("waveaudio");
ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
err = mciGetDeviceIDA("waveaudio");
ok(!err, "mciGetDeviceIDA waveaudio returned %u, expected 0\n", err);
test_notification(hwnd, "open new", MCI_NOTIFY_SUCCESSFUL);
test_notification(hwnd, "open new no #2", 0);
@ -771,8 +771,9 @@ static void test_recordWAVE(HWND hwnd)
if(!err) ok_saved = 0;
/* Save must not rename the original file. */
if (!DeleteFile("tempfile1.wav"))
todo_wine ok(FALSE, "Save must not rename the original file; DeleteFile returned %d\n", GetLastError());
if (!DeleteFileA("tempfile1.wav"))
todo_wine ok(FALSE, "Save must not rename the original file; DeleteFileA returned %d\n",
GetLastError());
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));
@ -807,14 +808,14 @@ static void test_playWAVE(HWND hwnd)
return;
}
err = mciGetDeviceID("mysound");
ok(err==1,"mciGetDeviceID mysound returned %u, expected 1\n", err);
err = mciGetDeviceIDA("mysound");
ok(err == 1, "mciGetDeviceIDA mysound returned %u, expected 1\n", err);
err = mciGetDeviceID("tempfile.wav");
ok(err==0,"mciGetDeviceID tempfile.wav returned %u, expected 0\n", err);
err = mciGetDeviceIDA("tempfile.wav");
ok(!err, "mciGetDeviceIDA tempfile.wav returned %u, expected 0\n", err);
err = mciGetDeviceID("waveaudio");
ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
err = mciGetDeviceIDA("waveaudio");
ok(!err, "mciGetDeviceIDA waveaudio returned %u, expected 0\n", err);
err = mciSendStringA("status mysound length", buf, sizeof(buf), NULL);
ok(!err,"mci status length returned %s\n", dbg_mcierr(err));
@ -949,15 +950,15 @@ static void test_asyncWAVE(HWND hwnd)
ok(wDeviceID,"mci open DeviceID: %d\n", wDeviceID);
test_notification(hwnd,"open alias notify",MCI_NOTIFY_SUCCESSFUL);
err = mciGetDeviceID("mysound");
ok(err==wDeviceID,"mciGetDeviceID alias returned %u, expected %u\n", err, wDeviceID);
err = mciGetDeviceIDA("mysound");
ok(err == wDeviceID, "mciGetDeviceIDA alias returned %u, expected %u\n", err, wDeviceID);
/* Only the alias is looked up. */
err = mciGetDeviceID("tempfile.wav");
ok(err==0,"mciGetDeviceID tempfile.wav returned %u, expected 0\n", err);
err = mciGetDeviceIDA("tempfile.wav");
ok(!err, "mciGetDeviceIDA tempfile.wav returned %u, expected 0\n", err);
err = mciGetDeviceID("waveaudio");
ok(err==0,"mciGetDeviceID waveaudio returned %u, expected 0\n", err);
err = mciGetDeviceIDA("waveaudio");
ok(!err, "mciGetDeviceIDA waveaudio returned %u, expected 0\n", err);
err = mciSendStringA("status mysound mode", buf, sizeof(buf), hwnd);
ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
@ -1195,8 +1196,8 @@ static void test_AutoOpenWAVE(HWND hwnd)
if(!err) ok(!strcmp(buf,"tempfile.wav"), "sysinfo name 1 open: %s\n", buf);
test_notification(hwnd, "sysinfo name notify\n", MCI_NOTIFY_SUCCESSFUL);
err = mciGetDeviceID("tempfile.wav");
ok(err==1,"mciGetDeviceID tempfile.wav returned %u, expected 1\n", err);
err = mciGetDeviceIDA("tempfile.wav");
ok(err == 1, "mciGetDeviceIDA tempfile.wav returned %u, expected 1\n", err);
/* Save the full pathname to the file. */
err = mciSendStringA("info tempfile.wav file", path, sizeof(path), NULL);
@ -1312,6 +1313,6 @@ START_TEST(mci)
/* Win9X hangs when exiting with something still open. */
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");
ok(DeleteFileA("tempfile.wav") || ok_saved, "Delete tempfile.wav (cause auto-open?)\n");
DestroyWindow(hwnd);
}

View File

@ -26,10 +26,10 @@
typedef union {
MCI_STATUS_PARMS status;
MCI_GETDEVCAPS_PARMS caps;
MCI_OPEN_PARMS open;
MCI_OPEN_PARMSA open;
MCI_PLAY_PARMS play;
MCI_SEEK_PARMS seek;
MCI_SAVE_PARMS save;
MCI_SAVE_PARMSA save;
MCI_GENERIC_PARMS gen;
} MCI_PARMS_UNION;

View File

@ -70,13 +70,13 @@ static void test_mmioDescend(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = sizeof(RIFF_buf);
mmio.pchBuffer = (char *)RIFF_buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
if (fname && !hmmio)
{
trace("No optional %s file. Skipping the test\n", fname);
return;
}
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
expect_buf_offset(hmmio, 0);
@ -237,13 +237,13 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = sizeof(buf);
mmio.pchBuffer = buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
if (fname && !hmmio)
{
trace("No optional %s file. Skipping the test\n", fname);
return;
}
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -271,8 +271,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 0;
mmio.pchBuffer = buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -297,8 +297,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 0;
mmio.pchBuffer = NULL;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -325,8 +325,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 256;
mmio.pchBuffer = NULL;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -356,8 +356,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = sizeof(buf);
mmio.pchBuffer = buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -385,8 +385,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 0;
mmio.pchBuffer = NULL;
hmmio = mmioOpen(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -416,8 +416,8 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 256;
mmio.pchBuffer = NULL;
hmmio = mmioOpen(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -447,14 +447,14 @@ static void test_mmioOpen(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = 0;
mmio.pchBuffer = buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ | MMIO_ALLOCBUF);
if (!hmmio && mmio.wErrorRet == ERROR_BAD_FORMAT)
{
/* Seen on Win9x, WinMe but also XP-SP1 */
skip("Some Windows versions don't like a 0 size and a given buffer\n");
return;
}
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -490,13 +490,13 @@ static void test_mmioSetBuffer(char *fname)
mmio.fccIOProc = fname ? FOURCC_DOS : FOURCC_MEM;
mmio.cchBuffer = sizeof(buf);
mmio.pchBuffer = buf;
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
if (fname && !hmmio)
{
trace("No optional %s file. Skipping the test\n", fname);
return;
}
ok(hmmio != 0, "mmioOpen error %u\n", mmio.wErrorRet);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
memset(&mmio, 0, sizeof(mmio));
ret = mmioGetInfo(hmmio, &mmio, 0);
@ -645,27 +645,29 @@ static void test_mmioOpen_fourcc(void)
HMMIO hmmio;
MMIOINFO mmio;
lpProc = mmioInstallIOProc(FOURCC_DOS, mmio_test_IOProc, MMIO_INSTALLPROC);
ok(lpProc == mmio_test_IOProc, "mmioInstallIOProc error\n");
lpProc = mmioInstallIOProcA(FOURCC_DOS, mmio_test_IOProc, MMIO_INSTALLPROC);
ok(lpProc == mmio_test_IOProc, "mmioInstallIOProcA error\n");
lpProc = mmioInstallIOProc(FOURCC_XYZ, mmio_test_IOProc, MMIO_INSTALLPROC);
ok(lpProc == mmio_test_IOProc, "mmioInstallIOProc error\n");
lpProc = mmioInstallIOProcA(FOURCC_XYZ, mmio_test_IOProc, MMIO_INSTALLPROC);
ok(lpProc == mmio_test_IOProc, "mmioInstallIOProcA error\n");
memset(&mmio, 0, sizeof(mmio));
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
mmioGetInfo(hmmio, &mmio, 0);
ok(hmmio != NULL && mmio.fccIOProc == FOURCC_XYZ, "mmioOpen error %u, got %4.4s\n", mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc);
ok(hmmio && mmio.fccIOProc == FOURCC_XYZ, "mmioOpenA error %u, got %4.4s\n",
mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc);
mmioClose(hmmio, 0);
mmioInstallIOProc(FOURCC_XYZ, NULL, MMIO_REMOVEPROC);
mmioInstallIOProcA(FOURCC_XYZ, NULL, MMIO_REMOVEPROC);
memset(&mmio, 0, sizeof(mmio));
hmmio = mmioOpen(fname, &mmio, MMIO_READ);
hmmio = mmioOpenA(fname, &mmio, MMIO_READ);
mmioGetInfo(hmmio, &mmio, 0);
ok(hmmio == NULL && mmio.wErrorRet == MMIOERR_FILENOTFOUND, "mmioOpen error %u, got %4.4s\n", mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc);
ok(!hmmio && mmio.wErrorRet == MMIOERR_FILENOTFOUND, "mmioOpenA error %u, got %4.4s\n",
mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc);
mmioClose(hmmio, 0);
mmioInstallIOProc(FOURCC_DOS, NULL, MMIO_REMOVEPROC);
mmioInstallIOProcA(FOURCC_DOS, NULL, MMIO_REMOVEPROC);
}
static BOOL create_test_file(char *temp_file)
@ -674,12 +676,12 @@ static BOOL create_test_file(char *temp_file)
DWORD ret, written;
HANDLE h;
ret = GetTempPath(sizeof(temp_path), temp_path);
ret = GetTempPathA(sizeof(temp_path), temp_path);
ok(ret, "Failed to get a temp path, err %d\n", GetLastError());
if (!ret)
return FALSE;
ret = GetTempFileName(temp_path, "mmio", 0, temp_file);
ret = GetTempFileNameA(temp_path, "mmio", 0, temp_file);
ok(ret, "Failed to get a temp name, err %d\n", GetLastError());
if (!ret)
return FALSE;
@ -712,8 +714,8 @@ static void test_mmioSeek(void)
mmio.fccIOProc = FOURCC_MEM;
mmio.pchBuffer = (char*)&RIFF_buf;
mmio.cchBuffer = sizeof(RIFF_buf);
hmmio = mmioOpen(NULL, &mmio, MMIO_READ);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(NULL, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio != NULL) {
/* seek to the end */
end = mmioSeek(hmmio, 0, SEEK_END);
@ -734,8 +736,8 @@ static void test_mmioSeek(void)
mmio.fccIOProc = FOURCC_DOS;
mmio.pchBuffer = 0;
mmio.cchBuffer = 0;
hmmio = mmioOpen(test_file, &mmio, MMIO_READ);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(test_file, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio != NULL) {
/* seek to the end */
end = mmioSeek(hmmio, 0, SEEK_END);
@ -763,8 +765,8 @@ static void test_mmioSeek(void)
mmio.fccIOProc = FOURCC_DOS;
mmio.pchBuffer = 0;
mmio.cchBuffer = 0;
hmmio = mmioOpen(test_file, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(test_file, &mmio, MMIO_READ | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio != NULL) {
/* seek to the end */
end = mmioSeek(hmmio, 0, SEEK_END);
@ -795,8 +797,8 @@ static void test_mmioSeek(void)
memset(&mmio, 0, sizeof(mmio));
mmio.fccIOProc = FOURCC_DOS;
mmio.adwInfo[0] = (DWORD)hfile;
hmmio = mmioOpen(NULL, &mmio, MMIO_READ | MMIO_DENYWRITE | MMIO_ALLOCBUF);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(NULL, &mmio, MMIO_READ | MMIO_DENYWRITE | MMIO_ALLOCBUF);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio != NULL) {
pos = mmioSeek(hmmio, 0, SEEK_CUR);
ok(pos == offset, "expected %d, got %d\n", offset, pos);
@ -821,8 +823,8 @@ static void test_mmio_end_of_file(void)
mmio.fccIOProc = FOURCC_DOS;
mmio.pchBuffer = buffer;
mmio.cchBuffer = sizeof(buffer);
hmmio = mmioOpen(test_file, &mmio, MMIO_READ);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(test_file, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio == NULL) {
DeleteFileA(test_file);
return;
@ -860,8 +862,8 @@ static void test_mmio_buffer_pointer(void)
mmio.fccIOProc = FOURCC_DOS;
mmio.pchBuffer = buffer;
mmio.cchBuffer = sizeof(buffer);
hmmio = mmioOpen(test_file, &mmio, MMIO_READ);
ok(hmmio != NULL, "mmioOpen error %u\n", mmio.wErrorRet);
hmmio = mmioOpenA(test_file, &mmio, MMIO_READ);
ok(hmmio != 0, "mmioOpenA error %u\n", mmio.wErrorRet);
if (hmmio == NULL) {
DeleteFileA(test_file);
return;

View File

@ -266,10 +266,9 @@ const char* wave_out_error(MMRESULT error)
static char long_msg[1100];
MMRESULT rc;
rc = waveOutGetErrorText(error, msg, sizeof(msg));
rc = waveOutGetErrorTextA(error, msg, sizeof(msg));
if (rc != MMSYSERR_NOERROR)
sprintf(long_msg, "waveOutGetErrorText(%x) failed with error %x",
error, rc);
sprintf(long_msg, "waveOutGetErrorTextA(%x) failed with error %x", error, rc);
else
sprintf(long_msg, "%s(%s)", mmsys_error(error), msg);
return long_msg;
@ -574,12 +573,12 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure the thread has a message queue */
SetEvent(lpParameter);
while (GetMessage(&msg, 0, 0, 0)) {
while (GetMessageA(&msg, 0, 0, 0)) {
UINT message = msg.message;
/* for some reason XP sends a WM_USER message before WOM_OPEN */
ok (message == WOM_OPEN || message == WOM_DONE ||
message == WOM_CLOSE || message == WM_USER || message == WM_APP,
"GetMessage returned unexpected message: %u\n", message);
"GetMessageA returned unexpected message: %u\n", message);
if (message == WOM_OPEN || message == WOM_DONE || message == WOM_CLOSE)
SetEvent(lpParameter);
else if (message == WM_APP) {
@ -591,11 +590,9 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
return 0;
}
static void wave_out_test_deviceOut(int device, double duration,
int headers, int loops,
LPWAVEFORMATEX pwfx, DWORD format,
DWORD flags, LPWAVEOUTCAPS pcaps,
BOOL interactive, BOOL sine, BOOL pause)
static void wave_out_test_deviceOut(int device, double duration, int headers, int loops,
WAVEFORMATEX *pwfx, DWORD format, DWORD flags, WAVEOUTCAPSA *pcaps, BOOL interactive,
BOOL sine, BOOL pause)
{
HWAVEOUT wout;
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
@ -862,7 +859,7 @@ static void wave_out_test_deviceOut(int device, double duration,
HeapFree(GetProcessHeap(), 0, buffer);
EXIT:
if ((flags & CALLBACK_TYPEMASK) == CALLBACK_THREAD) {
PostThreadMessage(thread_id, WM_APP, 0, 0);
PostThreadMessageW(thread_id, WM_APP, 0, 0);
WaitForSingleObject(hevent,10000);
}
CloseHandle(hevent);