winmm: Declare some functions static.
This commit is contained in:
parent
f815b68a30
commit
84666d84a5
|
@ -85,6 +85,8 @@ static const WCHAR wszSystemIni[] = {'s','y','s','t','e','m','.','i','n','i',0};
|
|||
|
||||
static WINE_MCIDRIVER *MciDrivers;
|
||||
|
||||
static UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data);
|
||||
|
||||
/* dup a string and uppercase it */
|
||||
static inline LPWSTR str_dup_upper( LPCWSTR str )
|
||||
{
|
||||
|
@ -117,7 +119,7 @@ LPWINE_MCIDRIVER MCI_GetDriver(UINT16 wDevID)
|
|||
/**************************************************************************
|
||||
* MCI_GetDriverFromString [internal]
|
||||
*/
|
||||
UINT MCI_GetDriverFromString(LPCWSTR lpstrName)
|
||||
static UINT MCI_GetDriverFromString(LPCWSTR lpstrName)
|
||||
{
|
||||
LPWINE_MCIDRIVER wmd;
|
||||
UINT ret = 0;
|
||||
|
@ -930,6 +932,41 @@ errCleanUp:
|
|||
return dwRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MCI_SendCommandFrom32 [internal]
|
||||
*/
|
||||
static DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
|
||||
{
|
||||
DWORD dwRet = MCIERR_INVALID_DEVICE_ID;
|
||||
LPWINE_MCIDRIVER wmd = MCI_GetDriver(wDevID);
|
||||
|
||||
if (wmd) {
|
||||
if (wmd->bIs32) {
|
||||
dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
|
||||
} else if (pFnMciMapMsg32WTo16) {
|
||||
WINMM_MapType res;
|
||||
|
||||
switch (res = pFnMciMapMsg32WTo16(wmd->wType, wMsg, dwParam1, &dwParam2)) {
|
||||
case WINMM_MAP_MSGERROR:
|
||||
TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
|
||||
dwRet = MCIERR_DRIVER_INTERNAL;
|
||||
break;
|
||||
case WINMM_MAP_NOMEM:
|
||||
TRACE("Problem mapping msg=%s from 32a to 16\n", MCI_MessageToString(wMsg));
|
||||
dwRet = MCIERR_OUT_OF_MEMORY;
|
||||
break;
|
||||
case WINMM_MAP_OK:
|
||||
case WINMM_MAP_OKMEM:
|
||||
dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
|
||||
if (res == WINMM_MAP_OKMEM)
|
||||
pFnMciUnMapMsg32WTo16(wmd->wType, wMsg, dwParam1, dwParam2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dwRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MCI_FinishOpen [internal]
|
||||
*/
|
||||
|
@ -1550,45 +1587,10 @@ BOOL WINAPI mciFreeCommandResource(UINT uTable)
|
|||
return MCI_DeleteCommandTable(uTable, FALSE);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MCI_SendCommandFrom32 [internal]
|
||||
*/
|
||||
DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
|
||||
{
|
||||
DWORD dwRet = MCIERR_INVALID_DEVICE_ID;
|
||||
LPWINE_MCIDRIVER wmd = MCI_GetDriver(wDevID);
|
||||
|
||||
if (wmd) {
|
||||
if (wmd->bIs32) {
|
||||
dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
|
||||
} else if (pFnMciMapMsg32WTo16) {
|
||||
WINMM_MapType res;
|
||||
|
||||
switch (res = pFnMciMapMsg32WTo16(wmd->wType, wMsg, dwParam1, &dwParam2)) {
|
||||
case WINMM_MAP_MSGERROR:
|
||||
TRACE("Not handled yet (%s)\n", MCI_MessageToString(wMsg));
|
||||
dwRet = MCIERR_DRIVER_INTERNAL;
|
||||
break;
|
||||
case WINMM_MAP_NOMEM:
|
||||
TRACE("Problem mapping msg=%s from 32a to 16\n", MCI_MessageToString(wMsg));
|
||||
dwRet = MCIERR_OUT_OF_MEMORY;
|
||||
break;
|
||||
case WINMM_MAP_OK:
|
||||
case WINMM_MAP_OKMEM:
|
||||
dwRet = SendDriverMessage(wmd->hDriver, wMsg, dwParam1, dwParam2);
|
||||
if (res == WINMM_MAP_OKMEM)
|
||||
pFnMciUnMapMsg32WTo16(wmd->wType, wMsg, dwParam1, dwParam2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dwRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MCI_SendCommandFrom16 [internal]
|
||||
*/
|
||||
DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
|
||||
static DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
|
||||
{
|
||||
DWORD dwRet = MCIERR_INVALID_DEVICE_ID;
|
||||
LPWINE_MCIDRIVER wmd = MCI_GetDriver(wDevID);
|
||||
|
@ -1805,7 +1807,7 @@ static DWORD MCI_Close(UINT16 wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms
|
|||
/**************************************************************************
|
||||
* MCI_WriteString [internal]
|
||||
*/
|
||||
DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr)
|
||||
static DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr)
|
||||
{
|
||||
DWORD ret = 0;
|
||||
|
||||
|
@ -2301,7 +2303,7 @@ static void MyUserYield(void)
|
|||
/**************************************************************************
|
||||
* MCI_DefYieldProc [internal]
|
||||
*/
|
||||
UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
|
||||
static UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
|
||||
{
|
||||
INT16 ret;
|
||||
|
||||
|
|
|
@ -202,14 +202,9 @@ void MMDRV_InstallMap(unsigned int, MMDRV_MAPFUNC, MMDRV_UNMAPFUNC,
|
|||
MMDRV_MAPFUNC, MMDRV_UNMAPFUNC, LPDRVCALLBACK);
|
||||
|
||||
WINE_MCIDRIVER* MCI_GetDriver(UINT16 uDevID);
|
||||
UINT MCI_GetDriverFromString(LPCWSTR str);
|
||||
DWORD MCI_WriteString(LPWSTR lpDstStr, DWORD dstSize, LPCWSTR lpSrcStr);
|
||||
const char* MCI_MessageToString(UINT wMsg);
|
||||
UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data);
|
||||
LRESULT MCI_CleanUp(LRESULT dwRet, UINT wMsg, DWORD dwParam2);
|
||||
DWORD MCI_SendCommand(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2, BOOL bFrom32);
|
||||
DWORD MCI_SendCommandFrom32(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
DWORD MCI_SendCommandFrom16(UINT wDevID, UINT16 wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
|
||||
UINT MCI_SetCommandTable(void *table, UINT uDevType);
|
||||
BOOL MCI_DeleteCommandTable(UINT uTbl, BOOL delete);
|
||||
LPWSTR MCI_strdupAtoW(LPCSTR str);
|
||||
|
|
Loading…
Reference in New Issue