Commit 71189f62 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winmm: Enable compilation with long types.

parent 5ea3d511
EXTRADEFS = -DWINE_NO_LONG_TYPES -D_WINMM_
EXTRADEFS = -D_WINMM_
MODULE = winmm.dll
IMPORTLIB = winmm
IMPORTS = uuid user32 advapi32 ole32 msacm32
......
......@@ -125,10 +125,10 @@ static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
{
LRESULT ret;
TRACE("Before call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx\n",
TRACE("Before call32 proc=%p drvrID=%08Ix hDrv=%p wMsg=%04x p1=%08Ix p2=%08Ix\n",
lpDrv->lpDrvProc, lpDrv->dwDriverID, lpDrv, msg, lParam1, lParam2);
ret = lpDrv->lpDrvProc(lpDrv->dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
TRACE("After call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx => %08lx\n",
TRACE("After call32 proc=%p drvrID=%08Ix hDrv=%p wMsg=%04x p1=%08Ix p2=%08Ix => %08Ix\n",
lpDrv->lpDrvProc, lpDrv->dwDriverID, lpDrv, msg, lParam1, lParam2, ret);
return ret;
......@@ -144,14 +144,14 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1,
LPWINE_DRIVER lpDrv;
LRESULT retval = 0;
TRACE("(%p, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2);
TRACE("(%p, %04X, %08IX, %08IX)\n", hDriver, msg, lParam1, lParam2);
if ((lpDrv = DRIVER_FindFromHDrvr(hDriver)) != NULL) {
retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2);
} else {
WARN("Bad driver handle %p\n", hDriver);
}
TRACE("retval = %ld\n", retval);
TRACE("retval = %Id\n", retval);
return retval;
}
......@@ -278,7 +278,7 @@ LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCWSTR fn, LPARAM lParam2)
LPWSTR ptr;
LPCSTR cause = 0;
TRACE("(%s, %08lX);\n", debugstr_w(fn), lParam2);
TRACE("(%s, %08IX);\n", debugstr_w(fn), lParam2);
if ((ptr = wcschr(fn, ' ')) != NULL) {
*ptr++ = '\0';
......@@ -382,7 +382,7 @@ HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lPar
WCHAR libName[MAX_PATH + 1];
LPCWSTR lsn = lpSectionName;
TRACE("(%s, %s, 0x%08lx);\n",
TRACE("(%s, %s, 0x%08Ix);\n",
debugstr_w(lpDriverName), debugstr_w(lpSectionName), lParam);
DRIVER_Dump("BEFORE:");
......@@ -418,7 +418,7 @@ LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
BOOL ret;
LPWINE_DRIVER lpDrv;
TRACE("(%p, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
TRACE("(%p, %08IX, %08IX);\n", hDrvr, lParam1, lParam2);
DRIVER_Dump("BEFORE:");
......@@ -545,7 +545,7 @@ BOOL WINAPI DriverCallback(DWORD_PTR dwCallBack, DWORD uFlags, HDRVR hDev,
DWORD_PTR dwParam2)
{
BOOL ret = FALSE;
TRACE("(%08lX, %s %04X, %p, %04X, %08lX, %08lX, %08lX)\n",
TRACE("(%08IX, %s %04lX, %p, %04lX, %08IX, %08IX, %08IX)\n",
dwCallBack, DRIVER_getCallback(uFlags), uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
if (!dwCallBack)
return ret;
......@@ -594,7 +594,7 @@ BOOL WINAPI DriverCallback(DWORD_PTR dwCallBack, DWORD uFlags, HDRVR hDev,
break;
#endif
default:
WARN("Unknown callback type %d\n", uFlags & DCB_TYPEMASK);
WARN("Unknown callback type %ld\n", uFlags & DCB_TYPEMASK);
return FALSE;
}
if (ret)
......
......@@ -156,7 +156,7 @@ static BOOL WINAPI joystick_load_once( INIT_ONCE *once, void *param, void **cont
{
HRESULT hr = DirectInput8Create( hWinMM32Instance, DIRECTINPUT_VERSION, &IID_IDirectInput8W,
(void **)&dinput, NULL );
if (FAILED(hr)) ERR( "Could not create dinput instance, hr %#x\n", hr );
if (FAILED(hr)) ERR( "Could not create dinput instance, hr %#lx\n", hr );
return TRUE;
}
......@@ -191,7 +191,7 @@ static void find_joysticks(void)
index = 0;
IDirectInput8_EnumDevices( dinput, DI8DEVCLASS_ALL, enum_instances, &index, DIEDFL_ATTACHEDONLY );
TRACE( "found %u device instances\n", index );
TRACE( "found %lu device instances\n", index );
while (index--)
{
......@@ -205,18 +205,18 @@ static void find_joysticks(void)
}
if (!(event = CreateEventW( NULL, FALSE, FALSE, NULL )))
WARN( "could not event for device, error %u\n", GetLastError() );
WARN( "could not event for device, error %lu\n", GetLastError() );
else if (FAILED(hr = IDirectInput8_CreateDevice( dinput, &instances[index].guidInstance, &device, NULL )))
WARN( "could not create device %s instance, hr %#x\n",
WARN( "could not create device %s instance, hr %#lx\n",
debugstr_guid( &instances[index].guidInstance ), hr );
else if (FAILED(hr = IDirectInputDevice8_SetEventNotification( device, event )))
WARN( "SetEventNotification device %p hr %#x\n", device, hr );
WARN( "SetEventNotification device %p hr %#lx\n", device, hr );
else if (FAILED(hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_NONEXCLUSIVE|DISCL_BACKGROUND )))
WARN( "SetCooperativeLevel device %p hr %#x\n", device, hr );
WARN( "SetCooperativeLevel device %p hr %#lx\n", device, hr );
else if (FAILED(hr = IDirectInputDevice8_SetDataFormat( device, &data_format )))
WARN( "SetDataFormat device %p hr %#x\n", device, hr );
WARN( "SetDataFormat device %p hr %#lx\n", device, hr );
else if (FAILED(hr = IDirectInputDevice8_Acquire( device )))
WARN( "Acquire device %p hr %#x\n", device, hr );
WARN( "Acquire device %p hr %#lx\n", device, hr );
else
{
TRACE( "opened device %p event %p\n", device, event );
......@@ -295,7 +295,7 @@ static void CALLBACK joystick_timer( HWND hwnd, UINT msg, UINT_PTR timer, DWORD
*/
MMRESULT WINAPI joyConfigChanged(DWORD flags)
{
FIXME( "flags %#x stub!\n", flags );
FIXME( "flags %#lx stub!\n", flags );
if (flags) return JOYERR_PARMS;
return JOYERR_NOERROR;
}
......@@ -351,13 +351,13 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetDevCapsW( UINT_PTR id, JOYCAPSW *caps, U
if (!(device = joysticks[id].device)) res = JOYERR_PARMS;
else if (FAILED(hr = IDirectInputDevice8_GetCapabilities( device, &dicaps )))
{
WARN( "GetCapabilities device %p returned %#x\n", device, hr );
WARN( "GetCapabilities device %p returned %#lx\n", device, hr );
res = JOYERR_PARMS;
}
else
{
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &diprop.diph );
if (FAILED(hr)) WARN( "GetProperty device %p returned %#x\n", device, hr );
if (FAILED(hr)) WARN( "GetProperty device %p returned %#lx\n", device, hr );
else
{
caps->wMid = LOWORD(diprop.dwData);
......@@ -487,7 +487,7 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx( UINT id, JOYINFOEX *info )
res = JOYERR_PARMS;
else if (FAILED(hr = IDirectInputDevice8_GetDeviceState( device, sizeof(struct joystick_state), &state )))
{
WARN( "GetDeviceState device %p returned %#x\n", device, hr );
WARN( "GetDeviceState device %p returned %#lx\n", device, hr );
res = JOYERR_PARMS;
}
else
......
......@@ -97,7 +97,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
WINE_MM_DRIVER_PART* part;
WINE_LLTYPE* llType = &llTypes[mld->type];
TRACE("(%s %d %u 0x%08lx 0x%08lx 0x%08lx)\n",
TRACE("(%s %d %u 0x%08Ix 0x%08Ix 0x%08Ix)\n",
llTypes[mld->type].typestr, mld->uDeviceID, wMsg,
mld->dwDriverInstance, dwParam1, dwParam2);
......@@ -119,7 +119,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
assert(part->fnMessage32);
TRACE("Calling message(dev=%d msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
TRACE("Calling message(dev=%d msg=%u usr=0x%08Ix p1=0x%08Ix p2=0x%08Ix)\n",
mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
ret = part->fnMessage32(mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
TRACE("=> %s\n", WINMM_ErrorToString(ret));
......@@ -195,7 +195,7 @@ DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD dwFlags)
DWORD dwRet = MMSYSERR_BADDEVICEID;
DWORD_PTR dwInstance;
WINE_LLTYPE* llType = &llTypes[mld->type];
TRACE("(%p, %04x, 0x%08lx, 0x%08x)\n", mld, wMsg, dwParam1, dwFlags);
TRACE("(%p, %04x, 0x%08Ix, 0x%08lx)\n", mld, wMsg, dwParam1, dwFlags);
mld->dwDriverInstance = (DWORD_PTR)&dwInstance;
......@@ -286,7 +286,7 @@ UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg,
{
WINE_MM_DRIVER* lpDrv = &MMDrvs[mld->mmdIndex];
TRACE("(%p, %04x, %08lx, %08lx)\n", mld, uMsg, dwParam1, dwParam2);
TRACE("(%p, %04x, %08Ix, %08Ix)\n", mld, uMsg, dwParam1, dwParam2);
/* all those function calls are undocumented */
switch (uMsg) {
......@@ -505,20 +505,20 @@ static void MMDRV_Init(void)
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&devenum);
if(FAILED(hr)){
ERR("CoCreateInstance failed: %08x\n", hr);
ERR("CoCreateInstance failed: %08lx\n", hr);
goto exit;
}
hr = IMMDeviceEnumerator_GetDevice(devenum, L"Wine info device", &device);
IMMDeviceEnumerator_Release(devenum);
if(FAILED(hr)){
ERR("GetDevice failed: %08x\n", hr);
ERR("GetDevice failed: %08lx\n", hr);
goto exit;
}
hr = IMMDevice_OpenPropertyStore(device, STGM_READ, &ps);
if(FAILED(hr)){
ERR("OpenPropertyStore failed: %08x\n", hr);
ERR("OpenPropertyStore failed: %08lx\n", hr);
IMMDevice_Release(device);
goto exit;
}
......@@ -528,7 +528,7 @@ static void MMDRV_Init(void)
IPropertyStore_Release(ps);
IMMDevice_Release(device);
if(FAILED(hr)){
ERR("GetValue failed: %08x\n", hr);
ERR("GetValue failed: %08lx\n", hr);
goto exit;
}
......
......@@ -97,7 +97,7 @@ static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
{
LRESULT ret = MMSYSERR_NOERROR;
TRACE("(%p, %X, 0x%lx, 0x%lx);\n", lpmmioinfo, uMessage, lParam1, lParam2);
TRACE("(%p, %X, 0x%Ix, 0x%Ix);\n", lpmmioinfo, uMessage, lParam1, lParam2);
switch (uMessage) {
case MMIOM_OPEN:
......@@ -206,7 +206,7 @@ static LRESULT CALLBACK mmioDosIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
static LRESULT CALLBACK mmioMemIOProc(LPMMIOINFO lpmmioinfo, UINT uMessage,
LPARAM lParam1, LPARAM lParam2)
{
TRACE("(%p,0x%04x,0x%08lx,0x%08lx)\n", lpmmioinfo, uMessage, lParam1, lParam2);
TRACE("(%p,0x%04x,0x%08Ix,0x%08Ix)\n", lpmmioinfo, uMessage, lParam1, lParam2);
switch (uMessage) {
......@@ -310,7 +310,7 @@ static LPMMIOPROC MMIO_InstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
struct IOProcList* pListNode;
struct IOProcList** ppListNode;
TRACE("(%08x, %p, %08X, %s)\n", fccIOProc, pIOProc, dwFlags, is_unicode ? "unicode" : "ansi");
TRACE("(%08lx, %p, %08lX, %s)\n", fccIOProc, pIOProc, dwFlags, is_unicode ? "unicode" : "ansi");
if (dwFlags & MMIO_GLOBALPROC)
FIXME("Global procedures not implemented\n");
......@@ -563,7 +563,7 @@ static LONG MMIO_GrabNextBuffer(LPWINE_MMIO wm, int for_read)
{
LONG size = wm->info.cchBuffer;
TRACE("bo=%x do=%x\n",
TRACE("bo=%lx do=%lx\n",
wm->info.lBufOffset, wm->info.lDiskOffset);
wm->info.lBufOffset = wm->info.lDiskOffset;
......@@ -590,10 +590,10 @@ static LONG MMIO_GrabNextBuffer(LPWINE_MMIO wm, int for_read)
static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
UINT uFlags)
{
TRACE("(%p %p %d %u)\n", wm, pchBuffer, cchBuffer, uFlags);
TRACE("(%p %p %ld %u)\n", wm, pchBuffer, cchBuffer, uFlags);
if (cchBuffer > 0xFFFF)
WARN("Untested handling of huge mmio buffers (%d >= 64k)\n", cchBuffer);
WARN("Untested handling of huge mmio buffers (%ld >= 64k)\n", cchBuffer);
if (MMIO_Flush(wm, 0) != MMSYSERR_NOERROR)
return MMIOERR_CANNOTWRITE;
......@@ -634,7 +634,7 @@ static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
MMIOINFO mmioinfo;
DWORD pos;
TRACE("(%s, %p, %08X, %s);\n", debugstr_a(szFileName), refmminfo, dwOpenFlags, is_unicode ? "unicode" : "ansi");
TRACE("(%s, %p, %08lX, %s);\n", debugstr_a(szFileName), refmminfo, dwOpenFlags, is_unicode ? "unicode" : "ansi");
if (!refmminfo) {
refmminfo = &mmioinfo;
......@@ -801,7 +801,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
LPWINE_MMIO wm;
LONG count;
TRACE("(%p, %p, %d);\n", hmmio, pch, cch);
TRACE("(%p, %p, %ld);\n", hmmio, pch, cch);
if ((wm = MMIO_Get(hmmio)) == NULL)
return -1;
......@@ -842,7 +842,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
mmioSeek(hmmio, 0, SEEK_CUR);
}
TRACE("count=%d\n", count);
TRACE("count=%ld\n", count);
return count;
}
......@@ -854,7 +854,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
LPWINE_MMIO wm;
LONG count;
TRACE("(%p, %p, %d);\n", hmmio, pch, cch);
TRACE("(%p, %p, %ld);\n", hmmio, pch, cch);
if ((wm = MMIO_Get(hmmio)) == NULL)
return -1;
......@@ -895,7 +895,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
wm->info.lBufOffset = wm->info.lDiskOffset;
}
TRACE("bytes written=%d\n", count);
TRACE("bytes written=%ld\n", count);
return count;
}
......@@ -907,7 +907,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
LPWINE_MMIO wm;
LONG offset;
TRACE("(%p, %08X, %d);\n", hmmio, lOffset, iOrigin);
TRACE("(%p, %08lX, %d);\n", hmmio, lOffset, iOrigin);
if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE;
......@@ -966,7 +966,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
else
wm->info.pchNext = wm->info.pchBuffer + (offset - wm->info.lBufOffset);
TRACE("=> %d\n", offset);
TRACE("=> %ld\n", offset);
return offset;
}
......@@ -1019,7 +1019,7 @@ MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT
{
LPWINE_MMIO wm;
TRACE("(hmmio=%p, pchBuf=%p, cchBuf=%d, uFlags=%#08x)\n",
TRACE("(hmmio=%p, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n",
hmmio, pchBuffer, cchBuffer, uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL)
......@@ -1154,7 +1154,7 @@ static LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1,
{
LPWINE_MMIO wm;
TRACE("(%p, %u, %ld, %ld, %s)\n", hmmio, uMessage, lParam1, lParam2, is_unicode ? "unicode" : "ansi");
TRACE("(%p, %u, %Id, %Id, %s)\n", hmmio, uMessage, lParam1, lParam2, is_unicode ? "unicode" : "ansi");
if (uMessage < MMIOM_USER)
return MMSYSERR_INVALPARAM;
......@@ -1190,10 +1190,10 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
return MMSYSERR_INVALPARAM;
dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
TRACE("dwOldPos=%d\n", dwOldPos);
TRACE("dwOldPos=%ld\n", dwOldPos);
if (lpckParent != NULL) {
TRACE("seek inside parent at %d !\n", lpckParent->dwDataOffset);
TRACE("seek inside parent at %ld !\n", lpckParent->dwDataOffset);
/* EPP: was dwOldPos = mmioSeek(hmmio,lpckParent->dwDataOffset,SEEK_SET); */
if (dwOldPos < lpckParent->dwDataOffset ||
dwOldPos >= lpckParent->dwDataOffset + lpckParent->cksize) {
......@@ -1242,7 +1242,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
}
lpck->dwDataOffset = dwOldPos + 2 * sizeof(DWORD);
TRACE("ckid=%s fcc=%s cksize=%08X !\n",
TRACE("ckid=%s fcc=%s cksize=%08lX !\n",
debugstr_an((LPCSTR)&lpck->ckid, 4),
srchType ? debugstr_an((LPCSTR)&lpck->fccType, 4) : "<na>",
lpck->cksize);
......@@ -1266,7 +1266,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
mmioSeek(hmmio, lpck->dwDataOffset, SEEK_SET);
lpck->fccType = 0;
}
TRACE("lpck: ckid=%s, cksize=%d, dwDataOffset=%d fccType=%08X (%s)!\n",
TRACE("lpck: ckid=%s, cksize=%ld, dwDataOffset=%ld fccType=%08lX (%s)!\n",
debugstr_an((LPSTR)&lpck->ckid, 4), lpck->cksize, lpck->dwDataOffset,
lpck->fccType, srchType ? debugstr_an((LPSTR)&lpck->fccType, 4):"");
return MMSYSERR_NOERROR;
......@@ -1284,10 +1284,10 @@ MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
TRACE("Chunk is dirty, checking if chunk's size is correct\n");
dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
TRACE("dwOldPos=%d lpck->dwDataOffset = %d\n", dwOldPos, lpck->dwDataOffset);
TRACE("dwOldPos=%ld lpck->dwDataOffset = %ld\n", dwOldPos, lpck->dwDataOffset);
dwNewSize = dwOldPos - lpck->dwDataOffset;
if (dwNewSize != lpck->cksize) {
TRACE("Nope: lpck->cksize=%d dwNewSize=%d\n", lpck->cksize, dwNewSize);
TRACE("Nope: lpck->cksize=%ld dwNewSize=%ld\n", lpck->cksize, dwNewSize);
lpck->cksize = dwNewSize;
/* pad odd size with 0 */
......@@ -1318,7 +1318,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
TRACE("(%p, %p, %04X);\n", hmmio, lpck, uFlags);
dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
TRACE("dwOldPos=%d\n", dwOldPos);
TRACE("dwOldPos=%ld\n", dwOldPos);
if (uFlags == MMIO_CREATELIST)
lpck->ckid = FOURCC_LIST;
......@@ -1335,7 +1335,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
lpck->dwFlags = MMIO_DIRTY;
ix = mmioWrite(hmmio, (LPSTR)lpck, size);
TRACE("after mmioWrite ix = %d req = %d, errno = %d\n", ix, size, errno);
TRACE("after mmioWrite ix = %ld req = %ld, errno = %d\n", ix, size, errno);
if (ix < size) {
mmioSeek(hmmio, dwOldPos, SEEK_SET);
WARN("return CannotWrite\n");
......@@ -1355,7 +1355,7 @@ MMRESULT WINAPI mmioRenameA(LPCSTR szFileName, LPCSTR szNewFileName,
struct IOProcList tmp;
FOURCC fcc;
TRACE("(%s, %s, %p, %08X);\n",
TRACE("(%s, %s, %p, %08lX);\n",
debugstr_a(szFileName), debugstr_a(szNewFileName), lpmmioinfo, dwFlags);
/* If both params are NULL, then parse the file name */
......
......@@ -159,7 +159,7 @@ static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg,
break;
case WOM_DONE:
InterlockedIncrement(&s->dwEventCount);
TRACE("Returning waveHdr=%lx\n", dwParam1);
TRACE("Returning waveHdr=%Ix\n", dwParam1);
SetEvent(s->hEvent);
break;
default:
......@@ -344,7 +344,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if (mmioDescend(hmmio, &ckMainRIFF, NULL, 0))
goto errCleanUp;
TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08X\n",
TRACE("ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX\n",
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType, ckMainRIFF.cksize);
if ((ckMainRIFF.ckid != FOURCC_RIFF) ||
......@@ -355,7 +355,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if (mmioDescend(hmmio, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK))
goto errCleanUp;
TRACE("Chunk Found ckid=%.4s fccType=%08x cksize=%08X\n",
TRACE("Chunk Found ckid=%.4s fccType=%08lx cksize=%08lX\n",
(LPSTR)&mmckInfo.ckid, mmckInfo.fccType, mmckInfo.cksize);
lpWaveFormat = HeapAlloc(GetProcessHeap(), 0, mmckInfo.cksize);
......@@ -366,8 +366,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
TRACE("wFormatTag=%04X !\n", lpWaveFormat->wFormatTag);
TRACE("nChannels=%d\n", lpWaveFormat->nChannels);
TRACE("nSamplesPerSec=%d\n", lpWaveFormat->nSamplesPerSec);
TRACE("nAvgBytesPerSec=%d\n", lpWaveFormat->nAvgBytesPerSec);
TRACE("nSamplesPerSec=%ld\n", lpWaveFormat->nSamplesPerSec);
TRACE("nAvgBytesPerSec=%ld\n", lpWaveFormat->nAvgBytesPerSec);
TRACE("nBlockAlign=%d\n", lpWaveFormat->nBlockAlign);
TRACE("wBitsPerSample=%u !\n", lpWaveFormat->wBitsPerSample);
......@@ -378,7 +378,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if (mmioDescend(hmmio, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK))
goto errCleanUp;
TRACE("Chunk Found ckid=%.4s fccType=%08x cksize=%08X\n",
TRACE("Chunk Found ckid=%.4s fccType=%08lx cksize=%08lX\n",
(LPSTR)&mmckInfo.ckid, mmckInfo.fccType, mmckInfo.cksize);
s.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
......@@ -469,7 +469,7 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo
{
WINE_PLAYSOUND* wps = NULL;
TRACE("pszSound='%p' hmod=%p fdwSound=%08X\n",
TRACE("pszSound='%p' hmod=%p fdwSound=%08lX\n",
pszSound, hmod, fdwSound);
/* SND_NOWAIT is ignored in w95/2k/xp. */
......
......@@ -271,7 +271,7 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
WORD new_id = 0;
int i;
TRACE("(%u, %u, %p, %08lX, %04X);\n", wDelay, wResol, lpFunc, dwUser, wFlags);
TRACE("(%u, %u, %p, %08IX, %04X);\n", wDelay, wResol, lpFunc, dwUser, wFlags);
if (wDelay < MMSYSTIME_MININTERVAL || wDelay > MMSYSTIME_MAXINTERVAL)
return 0;
......
......@@ -136,7 +136,7 @@ const char* WINMM_ErrorToString(MMRESULT error)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
{
TRACE("%p 0x%x %p\n", hInstDLL, fdwReason, fImpLoad);
TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
......@@ -206,7 +206,7 @@ UINT WINAPI auxGetDevCapsW(UINT_PTR uDeviceID, LPAUXCAPSW lpCaps, UINT uSize)
{
LPWINE_MLD wmld;
TRACE("(%04lX, %p, %d) !\n", uDeviceID, lpCaps, uSize);
TRACE("(%04IX, %p, %d) !\n", uDeviceID, lpCaps, uSize);
if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
......@@ -263,7 +263,7 @@ UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume)
{
LPWINE_MLD wmld;
TRACE("(%04X, %u) !\n", uDeviceID, dwVolume);
TRACE("(%04X, %lu) !\n", uDeviceID, dwVolume);
if ((wmld = MMDRV_Get((HANDLE)(DWORD_PTR)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE;
......@@ -299,7 +299,7 @@ UINT WINAPI midiOutGetDevCapsW(UINT_PTR uDeviceID, LPMIDIOUTCAPSW lpCaps,
{
LPWINE_MLD wmld;
TRACE("(%lu, %p, %u);\n", uDeviceID, lpCaps, uSize);
TRACE("(%Iu, %p, %u);\n", uDeviceID, lpCaps, uSize);
if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
......@@ -425,7 +425,7 @@ MMRESULT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID,
LPWINE_MIDI lpwm;
MMRESULT dwRet;
TRACE("(%p, %d, %08lX, %08lX, %08X);\n",
TRACE("(%p, %d, %08IX, %08IX, %08lX);\n",
lphMidiOut, uDeviceID, dwCallback, dwInstance, dwFlags);
if (lphMidiOut != NULL) *lphMidiOut = 0;
......@@ -513,7 +513,7 @@ UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg)
{
LPWINE_MLD wmld;
TRACE("(%p, %08X)\n", hMidiOut, dwMsg);
TRACE("(%p, %08lX)\n", hMidiOut, dwMsg);
if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL)
return MMSYSERR_INVALHANDLE;
......@@ -574,7 +574,7 @@ UINT WINAPI midiOutSetVolume(HMIDIOUT hMidiOut, DWORD dwVolume)
{
LPWINE_MLD wmld;
TRACE("(%p, %d);\n", hMidiOut, dwVolume);
TRACE("(%p, %ld);\n", hMidiOut, dwVolume);
if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE;
......@@ -628,7 +628,7 @@ UINT WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage,
{
LPWINE_MLD wmld;
TRACE("(%p, %04X, %08lX, %08lX)\n", hMidiOut, uMessage, dwParam1, dwParam2);
TRACE("(%p, %04X, %08IX, %08IX)\n", hMidiOut, uMessage, dwParam1, dwParam2);
if ((wmld = MMDRV_Get(hMidiOut, MMDRV_MIDIOUT, FALSE)) == NULL) {
/* HACK... */
......@@ -666,7 +666,7 @@ UINT WINAPI midiInGetDevCapsW(UINT_PTR uDeviceID, LPMIDIINCAPSW lpCaps, UINT uSi
{
LPWINE_MLD wmld;
TRACE("(%ld, %p, %d);\n", uDeviceID, lpCaps, uSize);
TRACE("(%Id, %p, %d);\n", uDeviceID, lpCaps, uSize);
if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
......@@ -711,7 +711,7 @@ MMRESULT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID,
LPWINE_MIDI lpwm;
MMRESULT dwRet;
TRACE("(%p, %d, %08lX, %08lX, %08X);\n",
TRACE("(%p, %d, %08IX, %08IX, %08lX);\n",
lphMidiIn, uDeviceID, dwCallback, dwInstance, dwFlags);
if (lphMidiIn != NULL) *lphMidiIn = 0;
......@@ -881,7 +881,7 @@ UINT WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage,
{
LPWINE_MLD wmld;
TRACE("(%p, %04X, %08lX, %08lX)\n", hMidiIn, uMessage, dwParam1, dwParam2);
TRACE("(%p, %04X, %08IX, %08IX)\n", hMidiIn, uMessage, dwParam1, dwParam2);
if ((wmld = MMDRV_Get(hMidiIn, MMDRV_MIDIIN, FALSE)) == NULL)
return MMSYSERR_INVALHANDLE;
......@@ -1129,7 +1129,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
lpMidiStrm->dwStartTicks = timeGetTime();
lpMidiHdr = (LPMIDIHDR)msg->lParam;
lpData = (LPBYTE)lpMidiHdr->lpData;
TRACE("Adding %s lpMidiHdr=%p [lpData=0x%p dwBytesRecorded=%u/%u dwFlags=0x%08x size=%lu]\n",
TRACE("Adding %s lpMidiHdr=%p [lpData=0x%p dwBytesRecorded=%lu/%lu dwFlags=0x%08lx size=%Iu]\n",
(lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular", lpMidiHdr,
lpData, lpMidiHdr->dwBytesRecorded, lpMidiHdr->dwBufferLength,
lpMidiHdr->dwFlags, msg->wParam);
......@@ -1155,7 +1155,7 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
if (((LPMIDIEVENT)lpData)->dwStreamID != 0 &&
((LPMIDIEVENT)lpData)->dwStreamID != 0xFFFFFFFF &&
((LPMIDIEVENT)lpData)->dwStreamID != lpMidiStrm->dwStreamID) {
FIXME("Dropping bad %s lpMidiHdr (streamID=%08x)\n",
FIXME("Dropping bad %s lpMidiHdr (streamID=%08lx)\n",
(lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular",
((LPMIDIEVENT)lpData)->dwStreamID);
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
......@@ -1235,7 +1235,7 @@ start_header:
dwToGo = lpMidiStrm->dwStartTicks + lpMidiStrm->position_usec / 1000;
TRACE("%u/%u/%u\n", dwToGo, timeGetTime(), me->dwDeltaTime);
TRACE("%lu/%lu/%lu\n", dwToGo, timeGetTime(), me->dwDeltaTime);
while (dwToGo - (dwCurrTC = timeGetTime()) <= MAXLONG) {
if (MsgWaitForMultipleObjects(0, NULL, FALSE, dwToGo - dwCurrTC, QS_ALLINPUT) == WAIT_OBJECT_0) {
/* got a message, handle it */
......@@ -1368,7 +1368,7 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
LPWINE_MIDI lpwm;
HMIDIOUT hMidiOut;
TRACE("(%p, %p, %d, 0x%08lx, 0x%08lx, 0x%08x)!\n",
TRACE("(%p, %p, %ld, 0x%08Ix, 0x%08Ix, 0x%08lx)!\n",
lphMidiStrm, lpuDeviceID, cMidi, dwCallback, dwInstance, fdwOpen);
if (cMidi != 1 || lphMidiStrm == NULL || lpuDeviceID == NULL)
......@@ -1496,7 +1496,7 @@ static MMRESULT midistream_post_message_and_wait(WINE_MIDIStream* lpMidiStrm, UI
ret = WaitForMultipleObjects(ARRAY_SIZE(hObjects), hObjects, FALSE, INFINITE);
if (ret != WAIT_OBJECT_0) {
CloseHandle(hObjects[0]);
WARN("bad WaitForSingleObject (%u)\n", ret);
WARN("bad WaitForSingleObject (%lu)\n", ret);
return MMSYSERR_ERROR;
}
}
......@@ -1562,7 +1562,7 @@ MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbm
pulses = midistream_get_current_pulse(lpMidiStrm);
lpMMT->u.midi.songptrpos = (pulses + tdiv/8) / (tdiv/4);
if (!lpMMT->u.midi.songptrpos && pulses) lpMMT->u.midi.songptrpos++;
TRACE("=> song position %d (pulses %u, tdiv %u)\n", lpMMT->u.midi.songptrpos, pulses, tdiv);
TRACE("=> song position %ld (pulses %lu, tdiv %lu)\n", lpMMT->u.midi.songptrpos, pulses, tdiv);
break;
}
/* fall through */
......@@ -1572,18 +1572,18 @@ MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbm
/* fall through to alternative format */
case TIME_MS:
lpMMT->u.ms = midistream_get_playing_position(lpMidiStrm);
TRACE("=> %d ms\n", lpMMT->u.ms);
TRACE("=> %ld ms\n", lpMMT->u.ms);
break;
case TIME_TICKS:
lpMMT->u.ticks = midistream_get_current_pulse(lpMidiStrm);
TRACE("=> %d ticks\n", lpMMT->u.ticks);
TRACE("=> %ld ticks\n", lpMMT->u.ticks);
break;
default:
FIXME("Unsupported time type %x\n", lpMMT->wType);
/* use TIME_MS instead */
lpMMT->wType = TIME_MS;
lpMMT->u.ms = midistream_get_playing_position(lpMidiStrm);
TRACE("=> %d ms\n", lpMMT->u.ms);
TRACE("=> %ld ms\n", lpMMT->u.ms);
break;
}
LeaveCriticalSection(&lpMidiStrm->lock);
......@@ -1599,7 +1599,7 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
WINE_MIDIStream* lpMidiStrm;
MMRESULT ret = MMSYSERR_NOERROR;
TRACE("(%p, %p, %x)\n", hMidiStrm, lpPropData, dwProperty);
TRACE("(%p, %p, %lx)\n", hMidiStrm, lpPropData, dwProperty);
if (!MMSYSTEM_GetMidiStream(hMidiStrm, &lpMidiStrm, NULL)) {
ret = MMSYSERR_INVALHANDLE;
......@@ -1613,10 +1613,10 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
ret = MMSYSERR_INVALPARAM;
} else if (dwProperty & MIDIPROP_SET) {
lpMidiStrm->dwTempo = mpt->dwTempo;
TRACE("Setting tempo to %d\n", mpt->dwTempo);
TRACE("Setting tempo to %ld\n", mpt->dwTempo);
} else if (dwProperty & MIDIPROP_GET) {
mpt->dwTempo = lpMidiStrm->dwTempo;
TRACE("Getting tempo <= %d\n", mpt->dwTempo);
TRACE("Getting tempo <= %ld\n", mpt->dwTempo);
}
LeaveCriticalSection(&lpMidiStrm->lock);
} else if (dwProperty & MIDIPROP_TIMEDIV) {
......@@ -1628,14 +1628,14 @@ MMRESULT WINAPI midiStreamProperty(HMIDISTRM hMidiStrm, LPBYTE lpPropData, DWORD
EnterCriticalSection(&lpMidiStrm->lock);
if (lpMidiStrm->status != MSM_STATUS_PLAYING) {
lpMidiStrm->dwTimeDiv = mptd->dwTimeDiv;
TRACE("Setting time div to %d\n", mptd->dwTimeDiv);
TRACE("Setting time div to %ld\n", mptd->dwTimeDiv);
}
else
ret = MMSYSERR_INVALPARAM;
LeaveCriticalSection(&lpMidiStrm->lock);
} else if (dwProperty & MIDIPROP_GET) {
mptd->dwTimeDiv = lpMidiStrm->dwTimeDiv;
TRACE("Getting time div <= %d\n", mptd->dwTimeDiv);
TRACE("Getting time div <= %ld\n", mptd->dwTimeDiv);
}
} else {
ret = MMSYSERR_INVALPARAM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment