Commit ac5de27d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winmm/mmsystem now compiles with -DSTRICT.

parent 4bbd7b3e
EXTRADEFS = -D_WINMM_ -DWINE_NO_STRICT EXTRADEFS = -D_WINMM_
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
...@@ -91,10 +91,10 @@ static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg, ...@@ -91,10 +91,10 @@ static LRESULT inline DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT msg,
if (pFnSendMessage16) if (pFnSendMessage16)
ret = pFnSendMessage16(lpDrv->d.d16.hDriver16, msg, lParam1, lParam2); ret = pFnSendMessage16(lpDrv->d.d16.hDriver16, msg, lParam1, lParam2);
} else { } else {
TRACE("Before call32 proc=%p drvrID=%08lx hDrv=%08x wMsg=%04x p1=%08lx p2=%08lx\n", TRACE("Before call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx\n",
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2); lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
ret = lpDrv->d.d32.lpDrvProc(lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2); ret = lpDrv->d.d32.lpDrvProc(lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2);
TRACE("After call32 proc=%p drvrID=%08lx hDrv=%08x wMsg=%04x p1=%08lx p2=%08lx => %08lx\n", TRACE("After call32 proc=%p drvrID=%08lx hDrv=%p wMsg=%04x p1=%08lx p2=%08lx => %08lx\n",
lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2, ret); lpDrv->d.d32.lpDrvProc, lpDrv->d.d32.dwDriverID, (HDRVR)lpDrv, msg, lParam1, lParam2, ret);
} }
return ret; return ret;
...@@ -110,12 +110,12 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, ...@@ -110,12 +110,12 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1,
LPWINE_DRIVER lpDrv; LPWINE_DRIVER lpDrv;
LRESULT retval = 0; LRESULT retval = 0;
TRACE("(%04x, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2); TRACE("(%p, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2);
if ((lpDrv = DRIVER_FindFromHDrvr(hDriver)) != NULL) { if ((lpDrv = DRIVER_FindFromHDrvr(hDriver)) != NULL) {
retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2); retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2);
} else { } else {
WARN("Bad driver handle %u\n", hDriver); WARN("Bad driver handle %p\n", hDriver);
} }
TRACE("retval = %ld\n", retval); TRACE("retval = %ld\n", retval);
...@@ -343,7 +343,7 @@ LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2) ...@@ -343,7 +343,7 @@ LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
{ {
LPWINE_DRIVER lpDrv; LPWINE_DRIVER lpDrv;
TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2); TRACE("(%p, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL)
{ {
...@@ -399,7 +399,7 @@ DWORD WINAPI GetDriverFlags(HDRVR hDrvr) ...@@ -399,7 +399,7 @@ DWORD WINAPI GetDriverFlags(HDRVR hDrvr)
LPWINE_DRIVER lpDrv; LPWINE_DRIVER lpDrv;
DWORD ret = 0; DWORD ret = 0;
TRACE("(%04x)\n", hDrvr); TRACE("(%p)\n", hDrvr);
if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) { if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) {
ret = WINE_GDF_EXIST | lpDrv->dwFlags; ret = WINE_GDF_EXIST | lpDrv->dwFlags;
...@@ -416,13 +416,13 @@ HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr) ...@@ -416,13 +416,13 @@ HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr)
LPWINE_DRIVER lpDrv; LPWINE_DRIVER lpDrv;
HMODULE hModule = 0; HMODULE hModule = 0;
TRACE("(%04x);\n", hDrvr); TRACE("(%p);\n", hDrvr);
if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) { if ((lpDrv = DRIVER_FindFromHDrvr(hDrvr)) != NULL) {
if (!(lpDrv->dwFlags & WINE_GDF_16BIT)) if (!(lpDrv->dwFlags & WINE_GDF_16BIT))
hModule = lpDrv->d.d32.hModule; hModule = lpDrv->d.d32.hModule;
} }
TRACE("=> %04x\n", hModule); TRACE("=> %p\n", hModule);
return hModule; return hModule;
} }
...@@ -454,7 +454,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, ...@@ -454,7 +454,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
UINT wMsg, DWORD dwUser, DWORD dwParam1, UINT wMsg, DWORD dwUser, DWORD dwParam1,
DWORD dwParam2) DWORD dwParam2)
{ {
TRACE("(%08lX, %04X, %04X, %04X, %08lX, %08lX, %08lX); !\n", TRACE("(%08lX, %04X, %p, %04X, %08lX, %08lX, %08lX); !\n",
dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2); dwCallBack, uFlags, hDev, wMsg, dwUser, dwParam1, dwParam2);
switch (uFlags & DCB_TYPEMASK) { switch (uFlags & DCB_TYPEMASK) {
...@@ -464,7 +464,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, ...@@ -464,7 +464,7 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
WARN("uFlags=%04X has null DCB value, but dwCallBack=%08lX is not null !\n", uFlags, dwCallBack); WARN("uFlags=%04X has null DCB value, but dwCallBack=%08lX is not null !\n", uFlags, dwCallBack);
break; break;
case DCB_WINDOW: case DCB_WINDOW:
TRACE("Window(%04lX) handle=%04X!\n", dwCallBack, hDev); TRACE("Window(%04lX) handle=%p!\n", dwCallBack, hDev);
PostMessageA((HWND)dwCallBack, wMsg, (WPARAM)hDev, dwParam1); PostMessageA((HWND)dwCallBack, wMsg, (WPARAM)hDev, dwParam1);
break; break;
case DCB_TASK: /* aka DCB_THREAD */ case DCB_TASK: /* aka DCB_THREAD */
......
...@@ -269,7 +269,7 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID) ...@@ -269,7 +269,7 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID)
*/ */
MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged) MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged)
{ {
TRACE("(%04X, %04X, %d, %d);\n", hWnd, wID, wPeriod, bChanged); TRACE("(%p, %04X, %d, %d);\n", hWnd, wID, wPeriod, bChanged);
if (wID >= MAXJOYSTICK || hWnd == 0) return JOYERR_PARMS; if (wID >= MAXJOYSTICK || hWnd == 0) return JOYERR_PARMS;
if (wPeriod<JOY_PERIOD_MIN || wPeriod>JOY_PERIOD_MAX) return JOYERR_PARMS; if (wPeriod<JOY_PERIOD_MIN || wPeriod>JOY_PERIOD_MAX) return JOYERR_PARMS;
......
...@@ -295,10 +295,10 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags, ...@@ -295,10 +295,10 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
if (!mld) return NULL; if (!mld) return NULL;
/* find an empty slot in MM_MLDrvs table */ /* find an empty slot in MM_MLDrvs table */
for (*hndl = 0; *hndl < MAX_MM_MLDRVS; (*hndl)++) { for (*hndl = 0; (DWORD)*hndl < MAX_MM_MLDRVS; (*hndl)++) {
if (!MM_MLDrvs[(UINT)*hndl]) break; if (!MM_MLDrvs[(UINT)*hndl]) break;
} }
if (*hndl == MAX_MM_MLDRVS) { if ((DWORD)*hndl == MAX_MM_MLDRVS) {
/* the MM_MLDrvs table could be made growable in the future if needed */ /* the MM_MLDrvs table could be made growable in the future if needed */
ERR("Too many open drivers\n"); ERR("Too many open drivers\n");
return NULL; return NULL;
...@@ -343,7 +343,7 @@ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld) ...@@ -343,7 +343,7 @@ void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
return; return;
} }
} }
ERR("Bad Handle %08x at %p (not freed)\n", hndl, mld); ERR("Bad Handle %p at %p (not freed)\n", hndl, mld);
} }
/************************************************************************** /**************************************************************************
...@@ -413,26 +413,27 @@ LPWINE_MLD MMDRV_GetByID(UINT uDevID, UINT type) ...@@ -413,26 +413,27 @@ LPWINE_MLD MMDRV_GetByID(UINT uDevID, UINT type)
/************************************************************************** /**************************************************************************
* MMDRV_Get [internal] * MMDRV_Get [internal]
*/ */
LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID) LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
{ {
LPWINE_MLD mld = NULL; LPWINE_MLD mld = NULL;
UINT hndl = (UINT)_hndl;
assert(type < MMDRV_MAX); assert(type < MMDRV_MAX);
if ((UINT)hndl >= llTypes[type].wMaxId && if (hndl >= llTypes[type].wMaxId &&
hndl != (UINT16)-1 && hndl != (UINT)-1) { hndl != (UINT16)-1 && hndl != (UINT)-1) {
if ((UINT)hndl & 0x8000) { if (hndl & 0x8000) {
hndl = (HANDLE)((UINT)hndl & ~0x8000); hndl = hndl & ~0x8000;
if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) { if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) {
mld = MM_MLDrvs[(UINT)hndl]; mld = MM_MLDrvs[hndl];
if (!mld || !HeapValidate(GetProcessHeap(), 0, mld) || mld->type != type) if (!mld || !HeapValidate(GetProcessHeap(), 0, mld) || mld->type != type)
mld = NULL; mld = NULL;
} }
hndl = (HANDLE)((UINT)hndl | 0x8000); hndl = hndl | 0x8000;
} }
} }
if (mld == NULL && bCanBeID) { if (mld == NULL && bCanBeID) {
mld = MMDRV_GetByID((UINT)hndl, type); mld = MMDRV_GetByID(hndl, type);
} }
return mld; return mld;
} }
......
...@@ -217,7 +217,7 @@ static BOOL MCI_IsCommandTableValid(UINT uTbl) ...@@ -217,7 +217,7 @@ static BOOL MCI_IsCommandTableValid(UINT uTbl)
int idx = 0; int idx = 0;
BOOL inCst = FALSE; BOOL inCst = FALSE;
TRACE("Dumping cmdTbl=%d [hMem=%08x devType=%d]\n", TRACE("Dumping cmdTbl=%d [hMem=%p devType=%d]\n",
uTbl, S_MciCmdTable[uTbl].hMem, S_MciCmdTable[uTbl].uDevType); uTbl, S_MciCmdTable[uTbl].hMem, S_MciCmdTable[uTbl].uDevType);
if (uTbl >= MAX_MCICMDTABLE || !S_MciCmdTable[uTbl].hMem || !S_MciCmdTable[uTbl].lpTable) if (uTbl >= MAX_MCICMDTABLE || !S_MciCmdTable[uTbl].hMem || !S_MciCmdTable[uTbl].lpTable)
...@@ -315,7 +315,7 @@ static UINT MCI_GetCommandTable(UINT uDevType) ...@@ -315,7 +315,7 @@ static UINT MCI_GetCommandTable(UINT uDevType)
if (hMem) { if (hMem) {
uTbl = MCI_SetCommandTable(hMem, uDevType); uTbl = MCI_SetCommandTable(hMem, uDevType);
} else { } else {
WARN("No command table found in resource %04x[%s]\n", WARN("No command table found in resource %p[%s]\n",
WINMM_IData->hWinMM32Instance, str); WINMM_IData->hWinMM32Instance, str);
} }
} }
...@@ -538,7 +538,7 @@ static DWORD MCI_LoadMciDriver(LPCSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd) ...@@ -538,7 +538,7 @@ static DWORD MCI_LoadMciDriver(LPCSTR _strDevTyp, LPWINE_MCIDRIVER* lpwmd)
wmd->uSpecificCmdTable = LOWORD(modp.wCustomCommandTable); wmd->uSpecificCmdTable = LOWORD(modp.wCustomCommandTable);
wmd->uTypeCmdTable = MCI_COMMAND_TABLE_NOT_LOADED; wmd->uTypeCmdTable = MCI_COMMAND_TABLE_NOT_LOADED;
TRACE("Loaded driver %x (%s), type is %d, cmdTable=%08x\n", TRACE("Loaded driver %p (%s), type is %d, cmdTable=%08x\n",
wmd->hDriver, strDevTyp, modp.wType, modp.wCustomCommandTable); wmd->hDriver, strDevTyp, modp.wType, modp.wCustomCommandTable);
wmd->lpstrDeviceType = strDevTyp; wmd->lpstrDeviceType = strDevTyp;
...@@ -878,7 +878,7 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet, ...@@ -878,7 +878,7 @@ DWORD WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrRet,
LPSTR devAlias = NULL; LPSTR devAlias = NULL;
BOOL bAutoOpen = FALSE; BOOL bAutoOpen = FALSE;
TRACE("('%s', %p, %d, %X)\n", lpstrCommand, lpstrRet, uRetLen, hwndCallback); TRACE("('%s', %p, %d, %p)\n", lpstrCommand, lpstrRet, uRetLen, hwndCallback);
/* format is <command> <device> <optargs> */ /* format is <command> <device> <optargs> */
if (!(verb = HeapAlloc(GetProcessHeap(), 0, strlen(lpstrCommand)+1))) if (!(verb = HeapAlloc(GetProcessHeap(), 0, strlen(lpstrCommand)+1)))
...@@ -1103,7 +1103,7 @@ UINT WINAPI mciLoadCommandResource(HINSTANCE hInst, LPCWSTR resNameW, UINT type) ...@@ -1103,7 +1103,7 @@ UINT WINAPI mciLoadCommandResource(HINSTANCE hInst, LPCWSTR resNameW, UINT type)
HGLOBAL hMem; HGLOBAL hMem;
UINT16 ret = MCI_NO_COMMAND_TABLE; UINT16 ret = MCI_NO_COMMAND_TABLE;
TRACE("(%04x, %s, %d)!\n", hInst, debugstr_w(resNameW), type); TRACE("(%p, %s, %d)!\n", hInst, debugstr_w(resNameW), type);
/* if a file named "resname.mci" exits, then load resource "resname" from it /* if a file named "resname.mci" exits, then load resource "resname" from it
* otherwise directly from driver * otherwise directly from driver
...@@ -1333,14 +1333,14 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms) ...@@ -1333,14 +1333,14 @@ static DWORD MCI_Open(DWORD dwParam, LPMCI_OPEN_PARMSA lpParms)
TRACE("wDevID=%04X wDeviceID=%d dwRet=%ld\n", wmd->wDeviceID, lpParms->wDeviceID, dwRet); TRACE("wDevID=%04X wDeviceID=%d dwRet=%ld\n", wmd->wDeviceID, lpParms->wDeviceID, dwRet);
if (dwParam & MCI_NOTIFY) if (dwParam & MCI_NOTIFY)
mciDriverNotify(lpParms->dwCallback, wmd->wDeviceID, MCI_NOTIFY_SUCCESSFUL); mciDriverNotify((HWND)lpParms->dwCallback, wmd->wDeviceID, MCI_NOTIFY_SUCCESSFUL);
return 0; return 0;
errCleanUp: errCleanUp:
if (wmd) MCI_UnLoadMciDriver(wmd); if (wmd) MCI_UnLoadMciDriver(wmd);
if (dwParam & MCI_NOTIFY) if (dwParam & MCI_NOTIFY)
mciDriverNotify(lpParms->dwCallback, 0, MCI_NOTIFY_FAILURE); mciDriverNotify((HWND)lpParms->dwCallback, 0, MCI_NOTIFY_FAILURE);
return dwRet; return dwRet;
} }
...@@ -1380,7 +1380,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms ...@@ -1380,7 +1380,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
MCI_UnLoadMciDriver(wmd); MCI_UnLoadMciDriver(wmd);
if (dwParam & MCI_NOTIFY) if (dwParam & MCI_NOTIFY)
mciDriverNotify(lpParms->dwCallback, wDevID, mciDriverNotify((HWND)lpParms->dwCallback, wDevID,
(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE); (dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
return dwRet; return dwRet;
...@@ -1503,7 +1503,7 @@ static DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms) ...@@ -1503,7 +1503,7 @@ static DWORD MCI_Break(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms)
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
if (dwFlags & MCI_NOTIFY) if (dwFlags & MCI_NOTIFY)
mciDriverNotify(lpParms->dwCallback, wDevID, mciDriverNotify((HWND)lpParms->dwCallback, wDevID,
(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE); (dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
return dwRet; return dwRet;
......
...@@ -41,7 +41,7 @@ extern WORD CALLBACK MMDRV_CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LON ...@@ -41,7 +41,7 @@ extern WORD CALLBACK MMDRV_CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LON
*/ */
static void MMDRV_Callback(LPWINE_MLD mld, HDRVR hDev, UINT uMsg, DWORD dwParam1, DWORD dwParam2) static void MMDRV_Callback(LPWINE_MLD mld, HDRVR hDev, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
{ {
TRACE("CB (*%08lx)(%08x %08x %08lx %08lx %08lx\n", TRACE("CB (*%08lx)(%p %08x %08lx %08lx %08lx\n",
mld->dwCallback, hDev, uMsg, mld->dwClientInstance, dwParam1, dwParam2); mld->dwCallback, hDev, uMsg, mld->dwClientInstance, dwParam1, dwParam2);
if (!mld->bFrom32 && (mld->dwFlags & DCB_TYPEMASK) == DCB_FUNCTION) { if (!mld->bFrom32 && (mld->dwFlags & DCB_TYPEMASK) == DCB_FUNCTION) {
...@@ -1764,7 +1764,7 @@ static BOOL MMDRV_GetDescription16(const char* fname, char* buf, int buflen) ...@@ -1764,7 +1764,7 @@ static BOOL MMDRV_GetDescription16(const char* fname, char* buf, int buflen)
ret = TRUE; ret = TRUE;
TRACE("Got '%s' [%d]\n", buf, buflen); TRACE("Got '%s' [%d]\n", buf, buflen);
theEnd: theEnd:
CloseHandle(hFile); _lclose(hFile);
return ret; return ret;
} }
......
...@@ -671,7 +671,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags, ...@@ -671,7 +671,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
(LPARAM)szFileName, 0, MMIO_PROC_32A); (LPARAM)szFileName, 0, MMIO_PROC_32A);
/* grab file size, when possible */ /* grab file size, when possible */
wm->dwFileSize = GetFileSize(wm->info.adwInfo[0], NULL); wm->dwFileSize = GetFileSize((HANDLE)wm->info.adwInfo[0], NULL);
if (refmminfo->wErrorRet == 0) if (refmminfo->wErrorRet == 0)
return wm->info.hmmio; return wm->info.hmmio;
...@@ -714,7 +714,7 @@ MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags) ...@@ -714,7 +714,7 @@ MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT uFlags)
LPWINE_MMIO wm; LPWINE_MMIO wm;
MMRESULT result; MMRESULT result;
TRACE("(%04X, %04X);\n", hmmio, uFlags); TRACE("(%p, %04X);\n", hmmio, uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
...@@ -746,7 +746,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch) ...@@ -746,7 +746,7 @@ LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch)
LPWINE_MMIO wm; LPWINE_MMIO wm;
LONG count; LONG count;
TRACE("(%04X, %p, %ld);\n", hmmio, pch, cch); TRACE("(%p, %p, %ld);\n", hmmio, pch, cch);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return -1; return -1;
...@@ -796,7 +796,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch) ...@@ -796,7 +796,7 @@ LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch)
LPWINE_MMIO wm; LPWINE_MMIO wm;
LONG count; LONG count;
TRACE("(%04X, %p, %ld);\n", hmmio, pch, cch); TRACE("(%p, %p, %ld);\n", hmmio, pch, cch);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return -1; return -1;
...@@ -851,7 +851,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin) ...@@ -851,7 +851,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
LPWINE_MMIO wm; LPWINE_MMIO wm;
LONG offset; LONG offset;
TRACE("(%04X, %08lX, %d);\n", hmmio, lOffset, iOrigin); TRACE("(%p, %08lX, %d);\n", hmmio, lOffset, iOrigin);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
...@@ -916,7 +916,7 @@ MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags) ...@@ -916,7 +916,7 @@ MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags); TRACE("(%p,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
...@@ -936,7 +936,7 @@ MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO* lpmmioinfo, UINT uFlags ...@@ -936,7 +936,7 @@ MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO* lpmmioinfo, UINT uFlags
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags); TRACE("(%p,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
...@@ -963,7 +963,7 @@ MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT ...@@ -963,7 +963,7 @@ MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("(hmmio=%04x, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n", TRACE("(hmmio=%p, pchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n",
hmmio, pchBuffer, cchBuffer, uFlags); hmmio, pchBuffer, cchBuffer, uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
...@@ -979,7 +979,7 @@ MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags) ...@@ -979,7 +979,7 @@ MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags)
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("(%04X, %04X)\n", hmmio, uFlags); TRACE("(%p, %04X)\n", hmmio, uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(hmmio)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
...@@ -994,7 +994,7 @@ MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags) ...@@ -994,7 +994,7 @@ MMRESULT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO* lpmmioinfo, UINT uFlags)
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("hmmio=%04X, lpmmioinfo=%p, uFlags=%04X\n", hmmio, lpmmioinfo, uFlags); TRACE("hmmio=%p, lpmmioinfo=%p, uFlags=%04X\n", hmmio, lpmmioinfo, uFlags);
/* NOTE: mmioAdvance16 heavily relies on parameters from lpmmioinfo we're using /* NOTE: mmioAdvance16 heavily relies on parameters from lpmmioinfo we're using
* here. be sure if you change something here to check mmioAdvance16 as well * here. be sure if you change something here to check mmioAdvance16 as well
...@@ -1101,7 +1101,7 @@ LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1, ...@@ -1101,7 +1101,7 @@ LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1,
{ {
LPWINE_MMIO wm; LPWINE_MMIO wm;
TRACE("(%04X, %u, %ld, %ld, %d)\n", hmmio, uMessage, lParam1, lParam2, type); TRACE("(%p, %u, %ld, %ld, %d)\n", hmmio, uMessage, lParam1, lParam2, type);
if (uMessage < MMIOM_USER) if (uMessage < MMIOM_USER)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
...@@ -1132,7 +1132,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck, ...@@ -1132,7 +1132,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
FOURCC srchType; FOURCC srchType;
TRACE("(%04X, %p, %p, %04X);\n", hmmio, lpck, lpckParent, uFlags); TRACE("(%p, %p, %p, %04X);\n", hmmio, lpck, lpckParent, uFlags);
if (lpck == NULL) if (lpck == NULL)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
...@@ -1230,7 +1230,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck, ...@@ -1230,7 +1230,7 @@ MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO lpck,
*/ */
MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags) MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags)
{ {
TRACE("(%04X, %p, %04X);\n", hmmio, lpck, uFlags); TRACE("(%p, %p, %04X);\n", hmmio, lpck, uFlags);
if (lpck->dwFlags & MMIO_DIRTY) { if (lpck->dwFlags & MMIO_DIRTY) {
DWORD dwOldPos, dwNewSize; DWORD dwOldPos, dwNewSize;
...@@ -1268,7 +1268,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags) ...@@ -1268,7 +1268,7 @@ MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO* lpck, UINT uFlags)
LONG size; LONG size;
LONG ix; LONG ix;
TRACE("(%04X, %p, %04X);\n", hmmio, lpck, uFlags); TRACE("(%p, %p, %04X);\n", hmmio, lpck, uFlags);
dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR); dwOldPos = mmioSeek(hmmio, 0, SEEK_CUR);
TRACE("dwOldPos=%ld\n", dwOldPos); TRACE("dwOldPos=%ld\n", dwOldPos);
......
...@@ -55,6 +55,9 @@ static LRESULT DRIVER_CloseDriver16(HDRVR16, LPARAM, LPARAM); ...@@ -55,6 +55,9 @@ static LRESULT DRIVER_CloseDriver16(HDRVR16, LPARAM, LPARAM);
static LRESULT DRIVER_SendMessage16(HDRVR16, UINT, LPARAM, LPARAM); static LRESULT DRIVER_SendMessage16(HDRVR16, UINT, LPARAM, LPARAM);
static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM); static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM);
#define HMODULE_32(h16) ((HMODULE)(ULONG_PTR)(h16))
#define HINSTANCE_32(h16) ((HMODULE)(ULONG_PTR)(h16))
/* ################################################### /* ###################################################
* # LIBRARY # * # LIBRARY #
* ################################################### * ###################################################
...@@ -69,7 +72,7 @@ static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM ...@@ -69,7 +72,7 @@ static LRESULT MMIO_Callback16(SEGPTR, LPMMIOINFO, UINT, LPARAM, LPARAM
BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds, BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
WORD wHeapSize, DWORD dwReserved1, WORD wReserved2) WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
{ {
TRACE("0x%x 0x%lx\n", hinstDLL, fdwReason); TRACE("%p 0x%lx\n", hinstDLL, fdwReason);
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
...@@ -130,7 +133,7 @@ BOOL16 WINAPI PlaySound16(LPCSTR pszSound, HMODULE16 hmod, DWORD fdwSound) ...@@ -130,7 +133,7 @@ BOOL16 WINAPI PlaySound16(LPCSTR pszSound, HMODULE16 hmod, DWORD fdwSound)
DWORD lc; DWORD lc;
ReleaseThunkLock(&lc); ReleaseThunkLock(&lc);
retv = PlaySoundA(pszSound, hmod, fdwSound); retv = PlaySoundA(pszSound, HMODULE_32(hmod), fdwSound);
RestoreThunkLock(lc); RestoreThunkLock(lc);
return retv; return retv;
...@@ -444,7 +447,7 @@ UINT16 WINAPI auxGetDevCaps16(UINT16 uDeviceID, LPAUXCAPS16 lpCaps, UINT16 uSize ...@@ -444,7 +447,7 @@ UINT16 WINAPI auxGetDevCaps16(UINT16 uDeviceID, LPAUXCAPS16 lpCaps, UINT16 uSize
TRACE("(%04X, %p, %d) !\n", uDeviceID, lpCaps, uSize); TRACE("(%04X, %p, %d) !\n", uDeviceID, lpCaps, uSize);
if ((wmld = MMDRV_Get(uDeviceID, MMDRV_AUX, TRUE)) == NULL) if ((wmld = MMDRV_Get((HANDLE)(ULONG_PTR)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, AUXDM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE); return MMDRV_Message(wmld, AUXDM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE);
} }
...@@ -458,7 +461,7 @@ UINT16 WINAPI auxGetVolume16(UINT16 uDeviceID, LPDWORD lpdwVolume) ...@@ -458,7 +461,7 @@ UINT16 WINAPI auxGetVolume16(UINT16 uDeviceID, LPDWORD lpdwVolume)
TRACE("(%04X, %p) !\n", uDeviceID, lpdwVolume); TRACE("(%04X, %p) !\n", uDeviceID, lpdwVolume);
if ((wmld = MMDRV_Get(uDeviceID, MMDRV_AUX, TRUE)) == NULL) if ((wmld = MMDRV_Get((HANDLE)(ULONG_PTR)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, AUXDM_GETVOLUME, (DWORD)lpdwVolume, 0L, TRUE); return MMDRV_Message(wmld, AUXDM_GETVOLUME, (DWORD)lpdwVolume, 0L, TRUE);
} }
...@@ -472,7 +475,7 @@ UINT16 WINAPI auxSetVolume16(UINT16 uDeviceID, DWORD dwVolume) ...@@ -472,7 +475,7 @@ UINT16 WINAPI auxSetVolume16(UINT16 uDeviceID, DWORD dwVolume)
TRACE("(%04X, %lu) !\n", uDeviceID, dwVolume); TRACE("(%04X, %lu) !\n", uDeviceID, dwVolume);
if ((wmld = MMDRV_Get(uDeviceID, MMDRV_AUX, TRUE)) == NULL) if ((wmld = MMDRV_Get((HANDLE)(ULONG_PTR)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, AUXDM_SETVOLUME, dwVolume, 0L, TRUE); return MMDRV_Message(wmld, AUXDM_SETVOLUME, dwVolume, 0L, TRUE);
} }
...@@ -500,7 +503,7 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD ...@@ -500,7 +503,7 @@ DWORD WINAPI auxOutMessage16(UINT16 uDeviceID, UINT16 uMessage, DWORD dw1, DWORD
uDeviceID, uMessage, dw1, dw2); uDeviceID, uMessage, dw1, dw2);
break; break;
} }
if ((wmld = MMDRV_Get(uDeviceID, MMDRV_AUX, TRUE)) == NULL) if ((wmld = MMDRV_Get((HANDLE)(ULONG_PTR)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, uMessage, dw1, dw2, TRUE); return MMDRV_Message(wmld, uMessage, dw1, dw2, TRUE);
...@@ -633,7 +636,8 @@ HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID) ...@@ -633,7 +636,8 @@ HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID)
LPWINE_MCIDRIVER wmd; LPWINE_MCIDRIVER wmd;
HTASK16 ret = 0; HTASK16 ret = 0;
if ((wmd = MCI_GetDriver(uDeviceID))) ret = K32WOWHandle16(wmd->CreatorThread, WOW_TYPE_HTASK); if ((wmd = MCI_GetDriver(uDeviceID)))
ret = HTASK_16(wmd->CreatorThread);
TRACE("(%u) => %04x\n", uDeviceID, ret); TRACE("(%u) => %04x\n", uDeviceID, ret);
return ret; return ret;
...@@ -1214,7 +1218,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID, ...@@ -1214,7 +1218,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
const LPWAVEFORMATEX lpFormat, DWORD dwCallback, const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
DWORD dwInstance, DWORD dwFlags) DWORD dwInstance, DWORD dwFlags)
{ {
HWAVEOUT hWaveOut; HANDLE hWaveOut;
UINT ret; UINT ret;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly /* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
...@@ -1508,7 +1512,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID, ...@@ -1508,7 +1512,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
const LPWAVEFORMATEX lpFormat, DWORD dwCallback, const LPWAVEFORMATEX lpFormat, DWORD dwCallback,
DWORD dwInstance, DWORD dwFlags) DWORD dwInstance, DWORD dwFlags)
{ {
HWAVEIN hWaveIn; HANDLE hWaveIn;
UINT ret; UINT ret;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly /* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
...@@ -1856,7 +1860,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD); ...@@ -1856,7 +1860,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD);
* bit.0 set means create a 16 bit task instead of thread calling a 16 bit proc * bit.0 set means create a 16 bit task instead of thread calling a 16 bit proc
* bit.1 set means to open a VxD for this thread (unsupported) * bit.1 set means to open a VxD for this thread (unsupported)
*/ */
LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD dwPmt, DWORD dwFlags) LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD dwPmt, DWORD dwFlags)
{ {
HANDLE16 hndl; HANDLE16 hndl;
LRESULT ret; LRESULT ret;
...@@ -1912,7 +1916,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD d ...@@ -1912,7 +1916,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, DWORD d
CloseHandle(lpMMThd->hEvent); CloseHandle(lpMMThd->hEvent);
ret = 2; ret = 2;
} else { } else {
TRACE("Got a nice thread hndl=0x%04x id=0x%08lx\n", lpMMThd->hThread, lpMMThd->dwThreadID); TRACE("Got a nice thread hndl=%p id=0x%08lx\n", lpMMThd->hThread, lpMMThd->dwThreadID);
ret = 0; ret = 0;
} }
} else { } else {
...@@ -2103,21 +2107,21 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt) ...@@ -2103,21 +2107,21 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt)
TRACE("(%04x %p)\n", hndl, lpMMThd); TRACE("(%04x %p)\n", hndl, lpMMThd);
lpMMThd->hTask = LOWORD(GetCurrentTask()); lpMMThd->hTask = LOWORD(GetCurrentTask());
TRACE("[10-%08x] setting hTask to 0x%08x\n", lpMMThd->hThread, lpMMThd->hTask); TRACE("[10-%p] setting hTask to 0x%08x\n", lpMMThd->hThread, lpMMThd->hTask);
lpMMThd->dwStatus = 0x10; lpMMThd->dwStatus = 0x10;
MMSYSTEM_ThreadBlock(lpMMThd); MMSYSTEM_ThreadBlock(lpMMThd);
TRACE("[20-%08x]\n", lpMMThd->hThread); TRACE("[20-%p]\n", lpMMThd->hThread);
lpMMThd->dwStatus = 0x20; lpMMThd->dwStatus = 0x20;
if (lpMMThd->fpThread) { if (lpMMThd->fpThread) {
MMSYSTEM_CallTo16_long_l(lpMMThd->fpThread, lpMMThd->dwThreadPmt); MMSYSTEM_CallTo16_long_l(lpMMThd->fpThread, lpMMThd->dwThreadPmt);
} }
lpMMThd->dwStatus = 0x30; lpMMThd->dwStatus = 0x30;
TRACE("[30-%08x]\n", lpMMThd->hThread); TRACE("[30-%p]\n", lpMMThd->hThread);
while (lpMMThd->dwCounter) { while (lpMMThd->dwCounter) {
Sleep(1); Sleep(1);
/* K32WOWYield16();*/ /* K32WOWYield16();*/
} }
TRACE("[XX-%08x]\n", lpMMThd->hThread); TRACE("[XX-%p]\n", lpMMThd->hThread);
/* paranoia */ /* paranoia */
lpMMThd->dwSignature = WINE_MMTHREAD_DELETED; lpMMThd->dwSignature = WINE_MMTHREAD_DELETED;
/* close lpMMThread->hVxD directIO */ /* close lpMMThread->hVxD directIO */
...@@ -2138,7 +2142,7 @@ BOOL16 WINAPI mmShowMMCPLPropertySheet16(HWND hWnd, LPCSTR lpStrDevice, ...@@ -2138,7 +2142,7 @@ BOOL16 WINAPI mmShowMMCPLPropertySheet16(HWND hWnd, LPCSTR lpStrDevice,
HANDLE hndl; HANDLE hndl;
BOOL16 ret = FALSE; BOOL16 ret = FALSE;
TRACE("(%04x \"%s\" \"%s\" \"%s\")\n", hWnd, lpStrDevice, lpStrTab, lpStrTitle); TRACE("(%p \"%s\" \"%s\" \"%s\")\n", hWnd, lpStrDevice, lpStrTab, lpStrTitle);
hndl = LoadLibraryA("MMSYS.CPL"); hndl = LoadLibraryA("MMSYS.CPL");
if (hndl != 0) { if (hndl != 0) {
...@@ -2546,10 +2550,10 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet, ...@@ -2546,10 +2550,10 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet,
/************************************************************************** /**************************************************************************
* mciLoadCommandResource [MMSYSTEM.705] * mciLoadCommandResource [MMSYSTEM.705]
*/ */
UINT16 WINAPI mciLoadCommandResource16(HANDLE16 hInst, LPCSTR resname, UINT16 type) UINT16 WINAPI mciLoadCommandResource16(HINSTANCE16 hInst, LPCSTR resname, UINT16 type)
{ {
LPCWSTR ptr = HEAP_strdupAtoW(GetProcessHeap(), 0, resname); LPCWSTR ptr = HEAP_strdupAtoW(GetProcessHeap(), 0, resname);
UINT ret = mciLoadCommandResource(hInst, ptr, type); UINT ret = mciLoadCommandResource(HINSTANCE_32(hInst), ptr, type);
HeapFree(GetProcessHeap(), 0, (LPWSTR)ptr); HeapFree(GetProcessHeap(), 0, (LPWSTR)ptr);
return ret; return ret;
} }
...@@ -2697,7 +2701,7 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16, ...@@ -2697,7 +2701,7 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
mmioinfo.adwInfo[0] = lpmmioinfo16->adwInfo[0]; mmioinfo.adwInfo[0] = lpmmioinfo16->adwInfo[0];
/* if we don't have a file name, it's likely a passed open file descriptor */ /* if we don't have a file name, it's likely a passed open file descriptor */
if (!szFileName) if (!szFileName)
mmioinfo.adwInfo[0] = DosFileHandleToWin32Handle(mmioinfo.adwInfo[0]); mmioinfo.adwInfo[0] = (DWORD)DosFileHandleToWin32Handle(mmioinfo.adwInfo[0]);
mmioinfo.adwInfo[1] = lpmmioinfo16->adwInfo[1]; mmioinfo.adwInfo[1] = lpmmioinfo16->adwInfo[1];
mmioinfo.adwInfo[2] = lpmmioinfo16->adwInfo[2]; mmioinfo.adwInfo[2] = lpmmioinfo16->adwInfo[2];
mmioinfo.adwInfo[3] = lpmmioinfo16->adwInfo[3]; mmioinfo.adwInfo[3] = lpmmioinfo16->adwInfo[3];
...@@ -2756,7 +2760,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF ...@@ -2756,7 +2760,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF
TRACE("(0x%04x,%p,0x%08x)\n", hmmio, lpmmioinfo, uFlags); TRACE("(0x%04x,%p,0x%08x)\n", hmmio, lpmmioinfo, uFlags);
if ((wm = MMIO_Get(hmmio)) == NULL) if ((wm = MMIO_Get(HMMIO_32(hmmio))) == NULL)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
ret = mmioGetInfo(HMMIO_32(hmmio), &mmioinfo, uFlags); ret = mmioGetInfo(HMMIO_32(hmmio), &mmioinfo, uFlags);
...@@ -2767,7 +2771,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF ...@@ -2767,7 +2771,7 @@ MMRESULT16 WINAPI mmioGetInfo16(HMMIO16 hmmio, MMIOINFO16* lpmmioinfo, UINT16 uF
lpmmioinfo->pIOProc = (wm->ioProc->type == MMIO_PROC_16) ? lpmmioinfo->pIOProc = (wm->ioProc->type == MMIO_PROC_16) ?
(LPMMIOPROC16)wm->ioProc->pIOProc : NULL; (LPMMIOPROC16)wm->ioProc->pIOProc : NULL;
lpmmioinfo->wErrorRet = mmioinfo.wErrorRet; lpmmioinfo->wErrorRet = mmioinfo.wErrorRet;
lpmmioinfo->hTask = mmioinfo.hTask; lpmmioinfo->hTask = HTASK_16(mmioinfo.hTask);
lpmmioinfo->cchBuffer = mmioinfo.cchBuffer; lpmmioinfo->cchBuffer = mmioinfo.cchBuffer;
lpmmioinfo->pchBuffer = (void*)wm->segBuffer16; lpmmioinfo->pchBuffer = (void*)wm->segBuffer16;
lpmmioinfo->pchNext = (void*)(wm->segBuffer16 + (mmioinfo.pchNext - mmioinfo.pchBuffer)); lpmmioinfo->pchNext = (void*)(wm->segBuffer16 + (mmioinfo.pchNext - mmioinfo.pchBuffer));
......
...@@ -409,7 +409,7 @@ BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BO ...@@ -409,7 +409,7 @@ BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BO
{ {
WINE_PLAYSOUND* wps = NULL; WINE_PLAYSOUND* wps = NULL;
TRACE("pszSound='%p' hmod=%04X fdwSound=%08lX\n", TRACE("pszSound='%p' hmod=%p fdwSound=%08lX\n",
pszSound, hmod, fdwSound); pszSound, hmod, fdwSound);
/* FIXME? I see no difference between SND_NOWAIT and SND_NOSTOP ! /* FIXME? I see no difference between SND_NOWAIT and SND_NOSTOP !
......
...@@ -200,7 +200,6 @@ typedef struct tagWINE_MM_IDATA { ...@@ -200,7 +200,6 @@ typedef struct tagWINE_MM_IDATA {
/* winmm part */ /* winmm part */
HANDLE hWinMM32Instance; HANDLE hWinMM32Instance;
HANDLE hWinMM16Instance; HANDLE hWinMM16Instance;
HANDLE h16Module32;
CRITICAL_SECTION cs; CRITICAL_SECTION cs;
/* mm timer part */ /* mm timer part */
HANDLE hMMTimer; HANDLE hMMTimer;
......
...@@ -497,7 +497,7 @@ void WINAPI mmTaskBlock16(HINSTANCE16 hInst); ...@@ -497,7 +497,7 @@ void WINAPI mmTaskBlock16(HINSTANCE16 hInst);
LRESULT WINAPI mmTaskSignal16(HTASK16 ht); LRESULT WINAPI mmTaskSignal16(HTASK16 ht);
void WINAPI mmTaskYield16(void); void WINAPI mmTaskYield16(void);
LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE lpHndl, LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl,
DWORD dwPmt, DWORD dwFlags); DWORD dwPmt, DWORD dwFlags);
void WINAPI mmThreadSignal16(HANDLE16 hndl); void WINAPI mmThreadSignal16(HANDLE16 hndl);
void WINAPI mmThreadBlock16(HANDLE16 hndl); void WINAPI mmThreadBlock16(HANDLE16 hndl);
......
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