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

Removed some more dependencies on wine 16-bit specific entities.

parent a1cb9312
...@@ -37,10 +37,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(driver); ...@@ -37,10 +37,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(driver);
static LPWINE_DRIVER lpDrvItemList /* = NULL */; static LPWINE_DRIVER lpDrvItemList /* = NULL */;
WINE_MMTHREAD* (*pFnGetMMThread16)(HANDLE16 h) /* = NULL */; WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16 h) /* = NULL */;
LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM) /* = NULL */; LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM) /* = NULL */;
LRESULT (*pFnCloseDriver16)(HDRVR16,LPARAM,LPARAM) /* = NULL */; LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM) /* = NULL */;
LRESULT (*pFnSendMessage16)(HDRVR16,UINT,LPARAM,LPARAM) /* = NULL */; LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM) /* = NULL */;
/************************************************************************** /**************************************************************************
* DRIVER_GetNumberOfModuleRefs [internal] * DRIVER_GetNumberOfModuleRefs [internal]
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winmm); WINE_DEFAULT_DEBUG_CHANNEL(winmm);
LRESULT (*pFnCallMMDrvFunc16)(FARPROC16,WORD,WORD,LONG,LONG,LONG) /* = NULL */; LRESULT (*pFnCallMMDrvFunc16)(DWORD,WORD,WORD,LONG,LONG,LONG) /* = NULL */;
unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER) /* = NULL */; unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER) /* = NULL */;
/* each known type of driver has an instance of this structure */ /* each known type of driver has an instance of this structure */
...@@ -262,7 +262,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1, ...@@ -262,7 +262,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1,
case WINMM_MAP_OKMEM: case WINMM_MAP_OKMEM:
TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n", TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2); mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
mld->uDeviceID, wMsg, mld->dwDriverInstance, mld->uDeviceID, wMsg, mld->dwDriverInstance,
dwParam1, dwParam2); dwParam1, dwParam2);
TRACE("=> %lu\n", ret); TRACE("=> %lu\n", ret);
...@@ -277,7 +277,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1, ...@@ -277,7 +277,7 @@ DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1,
} else { } else {
TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n", TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2); mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
mld->uDeviceID, wMsg, mld->dwDriverInstance, mld->uDeviceID, wMsg, mld->dwDriverInstance,
dwParam1, dwParam2); dwParam1, dwParam2);
TRACE("=> %lu\n", ret); TRACE("=> %lu\n", ret);
...@@ -545,15 +545,15 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg) ...@@ -545,15 +545,15 @@ static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg)
#endif #endif
count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L); count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L);
} else if (!lpDrv->bIs32 && part->u.fnMessage16 && pFnCallMMDrvFunc16) { } else if (!lpDrv->bIs32 && part->u.fnMessage16 && pFnCallMMDrvFunc16) {
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_INIT, 0L, 0L, 0L); 0, DRVM_INIT, 0L, 0L, 0L);
TRACE("DRVM_INIT => %08lx\n", ret); TRACE("DRVM_INIT => %08lx\n", ret);
#if 0 #if 0
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_ENABLE, 0L, 0L, 0L); 0, DRVM_ENABLE, 0L, 0L, 0L);
TRACE("DRVM_ENABLE => %08lx\n", ret); TRACE("DRVM_ENABLE => %08lx\n", ret);
#endif #endif
count = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, count = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, wMsg, 0L, 0L, 0L); 0, wMsg, 0L, 0L, 0L);
} else { } else {
return FALSE; return FALSE;
...@@ -790,11 +790,11 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type) ...@@ -790,11 +790,11 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type)
TRACE("DRVM_EXIT => %08lx\n", ret); TRACE("DRVM_EXIT => %08lx\n", ret);
} else if (!lpDrv->bIs32 && part->u.fnMessage16 && pFnCallMMDrvFunc16) { } else if (!lpDrv->bIs32 && part->u.fnMessage16 && pFnCallMMDrvFunc16) {
#if 0 #if 0
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_DISABLE, 0L, 0L, 0L); 0, DRVM_DISABLE, 0L, 0L, 0L);
TRACE("DRVM_DISABLE => %08lx\n", ret); TRACE("DRVM_DISABLE => %08lx\n", ret);
#endif #endif
ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16, ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_EXIT, 0L, 0L, 0L); 0, DRVM_EXIT, 0L, 0L, 0L);
TRACE("DRVM_EXIT => %08lx\n", ret); TRACE("DRVM_EXIT => %08lx\n", ret);
} else { } else {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "winreg.h" #include "winreg.h"
#include "winver.h" #include "winver.h"
#include "wownt32.h" #include "wownt32.h"
#include "winemm.h" #include "winemm16.h"
#include "digitalv.h" #include "digitalv.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -1736,7 +1736,7 @@ static void CALLBACK MMDRV_WaveOut_Callback(HDRVR hDev, UINT uMsg, DWORD dwInst ...@@ -1736,7 +1736,7 @@ static void CALLBACK MMDRV_WaveOut_Callback(HDRVR hDev, UINT uMsg, DWORD dwInst
* M A P P E R S H A N D L I N G * M A P P E R S H A N D L I N G
* ================================= */ * ================================= */
static LRESULT MMDRV_CallMMDrvFunc16(FARPROC16 fp16, WORD dev, WORD msg, LONG instance, static LRESULT MMDRV_CallMMDrvFunc16(DWORD fp16, WORD dev, WORD msg, LONG instance,
LONG lp1, LONG lp2) LONG lp1, LONG lp2)
{ {
WORD args[8]; WORD args[8];
...@@ -1750,7 +1750,7 @@ static LRESULT MMDRV_CallMMDrvFunc16(FARPROC16 fp16, WORD dev, WORD msg, LON ...@@ -1750,7 +1750,7 @@ static LRESULT MMDRV_CallMMDrvFunc16(FARPROC16 fp16, WORD dev, WORD msg, LON
args[2] = LOWORD(lp1); args[2] = LOWORD(lp1);
args[1] = HIWORD(lp2); args[1] = HIWORD(lp2);
args[0] = LOWORD(lp2); args[0] = LOWORD(lp2);
WOWCallback16Ex( (DWORD)fp16, WCB16_PASCAL, sizeof(args), args, &ret ); WOWCallback16Ex( fp16, WCB16_PASCAL, sizeof(args), args, &ret );
return LOWORD(ret); return LOWORD(ret);
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(mmio); WINE_DEFAULT_DEBUG_CHANNEL(mmio);
LRESULT (*pFnMmioCallback16)(SEGPTR,LPMMIOINFO,UINT,LPARAM,LPARAM) /* = NULL */; LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM) /* = NULL */;
/************************************************************************** /**************************************************************************
* mmioDosIOProc [internal] * mmioDosIOProc [internal]
...@@ -355,7 +355,7 @@ static LRESULT send_message(struct IOProcList* ioProc, LPMMIOINFO mmioinfo, ...@@ -355,7 +355,7 @@ static LRESULT send_message(struct IOProcList* ioProc, LPMMIOINFO mmioinfo,
switch (ioProc->type) { switch (ioProc->type) {
case MMIO_PROC_16: case MMIO_PROC_16:
if (pFnMmioCallback16) if (pFnMmioCallback16)
result = pFnMmioCallback16((SEGPTR)ioProc->pIOProc, result = pFnMmioCallback16((DWORD)ioProc->pIOProc,
mmioinfo, wMsg, lp1, lp2); mmioinfo, wMsg, lp1, lp2);
break; break;
case MMIO_PROC_32A: case MMIO_PROC_32A:
...@@ -460,8 +460,8 @@ static LPWINE_MMIO MMIO_Create(void) ...@@ -460,8 +460,8 @@ static LPWINE_MMIO MMIO_Create(void)
if (wm) { if (wm) {
EnterCriticalSection(&WINMM_IData->cs); EnterCriticalSection(&WINMM_IData->cs);
/* lookup next unallocated WORD handle, with a non NULL value */ /* lookup next unallocated WORD handle, with a non NULL value */
while (++MMIO_counter == 0 || MMIO_Get(HMMIO_32(MMIO_counter))); while (++MMIO_counter == 0 || MMIO_Get((HMMIO)(ULONG_PTR)MMIO_counter));
wm->info.hmmio = HMMIO_32(MMIO_counter); wm->info.hmmio = (HMMIO)(ULONG_PTR)MMIO_counter;
wm->lpNext = WINMM_IData->lpMMIO; wm->lpNext = WINMM_IData->lpMMIO;
WINMM_IData->lpMMIO = wm; WINMM_IData->lpMMIO = wm;
LeaveCriticalSection(&WINMM_IData->cs); LeaveCriticalSection(&WINMM_IData->cs);
...@@ -611,7 +611,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags, ...@@ -611,7 +611,7 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
char buffer[MAX_PATH]; char buffer[MAX_PATH];
if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer)) if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer))
return (HMMIO16)FALSE; return (HMMIO)FALSE;
if ((dwOpenFlags & MMIO_EXIST) && (GetFileAttributesA(buffer) == INVALID_FILE_ATTRIBUTES)) if ((dwOpenFlags & MMIO_EXIST) && (GetFileAttributesA(buffer) == INVALID_FILE_ATTRIBUTES))
return (HMMIO)FALSE; return (HMMIO)FALSE;
strcpy(szFileName, buffer); strcpy(szFileName, buffer);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "winnls.h" #include "winnls.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "winemm.h" #include "winemm16.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -1923,7 +1923,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD ...@@ -1923,7 +1923,7 @@ LRESULT WINAPI mmThreadCreate16(FARPROC16 fpThreadAddr, LPHANDLE16 lpHndl, DWORD
lpMMThd->dwCounter = 0; lpMMThd->dwCounter = 0;
lpMMThd->hThread = 0; lpMMThd->hThread = 0;
lpMMThd->dwThreadID = 0; lpMMThd->dwThreadID = 0;
lpMMThd->fpThread = fpThreadAddr; lpMMThd->fpThread = (DWORD)fpThreadAddr;
lpMMThd->dwThreadPmt = dwPmt; lpMMThd->dwThreadPmt = dwPmt;
lpMMThd->dwSignalCount = 0; lpMMThd->dwSignalCount = 0;
lpMMThd->hEvent = 0; lpMMThd->hEvent = 0;
...@@ -2150,7 +2150,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt) ...@@ -2150,7 +2150,7 @@ void WINAPI WINE_mmThreadEntryPoint(DWORD _pmt)
TRACE("[20-%p]\n", lpMMThd->hThread); TRACE("[20-%p]\n", lpMMThd->hThread);
lpMMThd->dwStatus = 0x20; lpMMThd->dwStatus = 0x20;
if (lpMMThd->fpThread) { if (lpMMThd->fpThread) {
WOWCallback16((DWORD)lpMMThd->fpThread, lpMMThd->dwThreadPmt); WOWCallback16(lpMMThd->fpThread, lpMMThd->dwThreadPmt);
} }
lpMMThd->dwStatus = 0x30; lpMMThd->dwStatus = 0x30;
TRACE("[30-%p]\n", lpMMThd->hThread); TRACE("[30-%p]\n", lpMMThd->hThread);
...@@ -2539,7 +2539,7 @@ MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16 ...@@ -2539,7 +2539,7 @@ MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16
if (wFlags & WINE_TIMER_IS32) if (wFlags & WINE_TIMER_IS32)
WARN("Unknown windows flag... wine internally used.. ooch\n"); WARN("Unknown windows flag... wine internally used.. ooch\n");
return TIME_SetEventInternal(wDelay, wResol, (FARPROC16)lpFunc, return TIME_SetEventInternal(wDelay, wResol, (LPTIMECALLBACK)lpFunc,
dwUser, wFlags & ~WINE_TIMER_IS32); dwUser, wFlags & ~WINE_TIMER_IS32);
} }
......
...@@ -66,9 +66,9 @@ static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer) ...@@ -66,9 +66,9 @@ static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
switch (lpTimer->wFlags & 0x30) { switch (lpTimer->wFlags & 0x30) {
case TIME_CALLBACK_FUNCTION: case TIME_CALLBACK_FUNCTION:
if (lpTimer->wFlags & WINE_TIMER_IS32) if (lpTimer->wFlags & WINE_TIMER_IS32)
((LPTIMECALLBACK)lpTimer->lpFunc)(lpTimer->wTimerID, 0, lpTimer->dwUser, 0, 0); (lpTimer->lpFunc)(lpTimer->wTimerID, 0, lpTimer->dwUser, 0, 0);
else if (pFnCallMMDrvFunc16) else if (pFnCallMMDrvFunc16)
pFnCallMMDrvFunc16(lpTimer->lpFunc, lpTimer->wTimerID, 0, pFnCallMMDrvFunc16((DWORD)lpTimer->lpFunc, lpTimer->wTimerID, 0,
lpTimer->dwUser, 0, 0); lpTimer->dwUser, 0, 0);
break; break;
case TIME_CALLBACK_EVENT_SET: case TIME_CALLBACK_EVENT_SET:
...@@ -226,7 +226,7 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize) ...@@ -226,7 +226,7 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
* TIME_SetEventInternal [internal] * TIME_SetEventInternal [internal]
*/ */
WORD TIME_SetEventInternal(UINT wDelay, UINT wResol, WORD TIME_SetEventInternal(UINT wDelay, UINT wResol,
FARPROC16 lpFunc, DWORD dwUser, UINT wFlags) LPTIMECALLBACK lpFunc, DWORD dwUser, UINT wFlags)
{ {
WORD wNewID = 0; WORD wNewID = 0;
LPWINE_TIMERENTRY lpNewTimer; LPWINE_TIMERENTRY lpNewTimer;
...@@ -276,7 +276,7 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc, ...@@ -276,7 +276,7 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
if (wFlags & WINE_TIMER_IS32) if (wFlags & WINE_TIMER_IS32)
WARN("Unknown windows flag... wine internally used.. ooch\n"); WARN("Unknown windows flag... wine internally used.. ooch\n");
return TIME_SetEventInternal(wDelay, wResol, (FARPROC16)lpFunc, return TIME_SetEventInternal(wDelay, wResol, lpFunc,
dwUser, wFlags|WINE_TIMER_IS32); dwUser, wFlags|WINE_TIMER_IS32);
} }
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "mmddk.h" #include "mmddk.h"
#include "wine/mmsystem16.h"
#include "wownt32.h"
typedef DWORD (WINAPI *MessageProc16)(UINT16 wDevID, UINT16 wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2); typedef DWORD (WINAPI *MessageProc16)(UINT16 wDevID, UINT16 wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
typedef DWORD (WINAPI *MessageProc32)(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2); typedef DWORD (WINAPI *MessageProc32)(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
...@@ -55,7 +53,7 @@ typedef struct tagWINE_DRIVER ...@@ -55,7 +53,7 @@ typedef struct tagWINE_DRIVER
DWORD dwDriverID; DWORD dwDriverID;
} d32; } d32;
struct { struct {
HDRVR16 hDriver16; UINT16 hDriver16;
} d16; } d16;
} d; } d;
struct tagWINE_DRIVER* lpPrevItem; struct tagWINE_DRIVER* lpPrevItem;
...@@ -128,14 +126,14 @@ typedef struct { ...@@ -128,14 +126,14 @@ typedef struct {
DWORD dwCounter; /* 04 > 1 when in mmThread functions */ DWORD dwCounter; /* 04 > 1 when in mmThread functions */
HANDLE hThread; /* 08 hThread */ HANDLE hThread; /* 08 hThread */
DWORD dwThreadID; /* 0C */ DWORD dwThreadID; /* 0C */
FARPROC16 fpThread; /* 10 address of thread proc (segptr or lin depending on dwFlags) */ DWORD fpThread; /* 10 address of thread proc (segptr or lin depending on dwFlags) */
DWORD dwThreadPmt; /* 14 parameter to be passed upon thread creation to fpThread */ DWORD dwThreadPmt; /* 14 parameter to be passed upon thread creation to fpThread */
DWORD dwSignalCount; /* 18 counter used for signaling */ DWORD dwSignalCount; /* 18 counter used for signaling */
HANDLE hEvent; /* 1C event */ HANDLE hEvent; /* 1C event */
HANDLE hVxD; /* 20 return from OpenVxDHandle */ HANDLE hVxD; /* 20 return from OpenVxDHandle */
DWORD dwStatus; /* 24 0x00, 0x10, 0x20, 0x30 */ DWORD dwStatus; /* 24 0x00, 0x10, 0x20, 0x30 */
DWORD dwFlags; /* 28 dwFlags upon creation */ DWORD dwFlags; /* 28 dwFlags upon creation */
HANDLE16 hTask; /* 2C handle to created task */ UINT16 hTask; /* 2C handle to created task */
} WINE_MMTHREAD; } WINE_MMTHREAD;
typedef struct tagWINE_MCIDRIVER { typedef struct tagWINE_MCIDRIVER {
...@@ -145,7 +143,6 @@ typedef struct tagWINE_MCIDRIVER { ...@@ -145,7 +143,6 @@ typedef struct tagWINE_MCIDRIVER {
LPSTR lpstrDeviceType; LPSTR lpstrDeviceType;
LPSTR lpstrAlias; LPSTR lpstrAlias;
HDRVR hDriver; HDRVR hDriver;
DRIVERPROC16 driverProc;
DWORD dwPrivate; DWORD dwPrivate;
YIELDPROC lpfnYieldProc; YIELDPROC lpfnYieldProc;
DWORD dwYieldData; DWORD dwYieldData;
...@@ -161,7 +158,7 @@ typedef struct tagWINE_MCIDRIVER { ...@@ -161,7 +158,7 @@ typedef struct tagWINE_MCIDRIVER {
typedef struct tagWINE_TIMERENTRY { typedef struct tagWINE_TIMERENTRY {
UINT wDelay; UINT wDelay;
UINT wResol; UINT wResol;
FARPROC16 lpFunc; LPTIMECALLBACK lpFunc; /* can be lots of things */
DWORD dwUser; DWORD dwUser;
UINT16 wFlags; UINT16 wFlags;
UINT16 wTimerID; UINT16 wTimerID;
...@@ -186,7 +183,7 @@ typedef struct tagWINE_MMIO { ...@@ -186,7 +183,7 @@ typedef struct tagWINE_MMIO {
struct IOProcList* ioProc; struct IOProcList* ioProc;
BOOL bTmpIOProc : 1, BOOL bTmpIOProc : 1,
bBufferLoaded : 1; bBufferLoaded : 1;
SEGPTR segBuffer16; DWORD segBuffer16;
DWORD dwFileSize; DWORD dwFileSize;
} WINE_MMIO, *LPWINE_MMIO; } WINE_MMIO, *LPWINE_MMIO;
...@@ -226,7 +223,6 @@ typedef struct tagWINE_MM_IDATA { ...@@ -226,7 +223,6 @@ typedef struct tagWINE_MM_IDATA {
/* function prototypes */ /* function prototypes */
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
typedef LONG (*MCIPROC)(DWORD, HDRVR, DWORD, DWORD, DWORD); typedef LONG (*MCIPROC)(DWORD, HDRVR, DWORD, DWORD, DWORD);
typedef WINMM_MapType (*MMDRV_MAPFUNC)(UINT wMsg, LPDWORD lpdwUser, LPDWORD lpParam1, LPDWORD lpParam2); typedef WINMM_MapType (*MMDRV_MAPFUNC)(UINT wMsg, LPDWORD lpdwUser, LPDWORD lpParam1, LPDWORD lpParam2);
typedef WINMM_MapType (*MMDRV_UNMAPFUNC)(UINT wMsg, LPDWORD lpdwUser, LPDWORD lpParam1, LPDWORD lpParam2, MMRESULT ret); typedef WINMM_MapType (*MMDRV_UNMAPFUNC)(UINT wMsg, LPDWORD lpdwUser, LPDWORD lpParam1, LPDWORD lpParam2, MMRESULT ret);
...@@ -287,8 +283,8 @@ LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1, ...@@ -287,8 +283,8 @@ LRESULT MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1,
LPARAM lParam2, enum mmioProcType type); LPARAM lParam2, enum mmioProcType type);
LPWINE_MMIO MMIO_Get(HMMIO h); LPWINE_MMIO MMIO_Get(HMMIO h);
WORD TIME_SetEventInternal(UINT wDelay, UINT wResol, WORD TIME_SetEventInternal(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
FARPROC16 lpFunc, DWORD dwUser, UINT wFlags); DWORD dwUser, UINT wFlags);
void TIME_MMTimeStart(void); void TIME_MMTimeStart(void);
void TIME_MMTimeStop(void); void TIME_MMTimeStop(void);
...@@ -298,48 +294,17 @@ extern LPWINE_MM_IDATA WINMM_IData; ...@@ -298,48 +294,17 @@ extern LPWINE_MM_IDATA WINMM_IData;
/* pointers to 16 bit functions (if sibling MMSYSTEM.DLL is loaded /* pointers to 16 bit functions (if sibling MMSYSTEM.DLL is loaded
* NULL otherwise * NULL otherwise
*/ */
extern WINE_MMTHREAD* (*pFnGetMMThread16)(HANDLE16); extern WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16);
extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM); extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM);
extern LRESULT (*pFnCloseDriver16)(HDRVR16,LPARAM,LPARAM); extern LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM);
extern LRESULT (*pFnSendMessage16)(HDRVR16,UINT,LPARAM,LPARAM); extern LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM);
extern WINMM_MapType (*pFnMciMapMsg16To32A)(WORD,WORD,DWORD*); extern WINMM_MapType (*pFnMciMapMsg16To32A)(WORD,WORD,DWORD*);
extern WINMM_MapType (*pFnMciUnMapMsg16To32A)(WORD,WORD,DWORD); extern WINMM_MapType (*pFnMciUnMapMsg16To32A)(WORD,WORD,DWORD);
extern WINMM_MapType (*pFnMciMapMsg32ATo16)(WORD,WORD,DWORD,DWORD*); extern WINMM_MapType (*pFnMciMapMsg32ATo16)(WORD,WORD,DWORD,DWORD*);
extern WINMM_MapType (*pFnMciUnMapMsg32ATo16)(WORD,WORD,DWORD,DWORD); extern WINMM_MapType (*pFnMciUnMapMsg32ATo16)(WORD,WORD,DWORD,DWORD);
extern LRESULT (*pFnCallMMDrvFunc16)(FARPROC16,WORD,WORD,LONG,LONG,LONG); extern LRESULT (*pFnCallMMDrvFunc16)(DWORD /* in fact FARPROC16 */,WORD,WORD,LONG,LONG,LONG);
extern unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER); extern unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DRIVER);
extern LRESULT (*pFnMmioCallback16)(SEGPTR,LPMMIOINFO,UINT,LPARAM,LPARAM); extern LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM);
/* mmsystem (16 bit files) only functions */
void MMDRV_Init16(void);
void MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16);
void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32);
/* HANDLE16 -> HANDLE conversions */
#define HDRVR_32(h16) ((HDRVR)(ULONG_PTR)(h16))
#define HMIDI_32(h16) ((HMIDI)(ULONG_PTR)(h16))
#define HMIDIIN_32(h16) ((HMIDIIN)(ULONG_PTR)(h16))
#define HMIDIOUT_32(h16) ((HMIDIOUT)(ULONG_PTR)(h16))
#define HMIDISTRM_32(h16) ((HMIDISTRM)(ULONG_PTR)(h16))
#define HMIXER_32(h16) ((HMIXER)(ULONG_PTR)(h16))
#define HMIXEROBJ_32(h16) ((HMIXEROBJ)(ULONG_PTR)(h16))
#define HMMIO_32(h16) ((HMMIO)(ULONG_PTR)(h16))
#define HWAVE_32(h16) ((HWAVE)(ULONG_PTR)(h16))
#define HWAVEIN_32(h16) ((HWAVEIN)(ULONG_PTR)(h16))
#define HWAVEOUT_32(h16) ((HWAVEOUT)(ULONG_PTR)(h16))
/* HANDLE -> HANDLE16 conversions */
#define HDRVR_16(h32) (LOWORD(h32))
#define HMIDI_16(h32) (LOWORD(h32))
#define HMIDIIN_16(h32) (LOWORD(h32))
#define HMIDIOUT_16(h32) (LOWORD(h32))
#define HMIDISTRM_16(h32) (LOWORD(h32))
#define HMIXER_16(h32) (LOWORD(h32))
#define HMIXEROBJ_16(h32) (LOWORD(h32))
#define HMMIO_16(h32) (LOWORD(h32))
#define HWAVE_16(h32) (LOWORD(h32))
#define HWAVEIN_16(h32) (LOWORD(h32))
#define HWAVEOUT_16(h32) (LOWORD(h32))
/* GetDriverFlags() returned bits is not documented (nor the call itself) /* GetDriverFlags() returned bits is not documented (nor the call itself)
* Here are Wine only definitions of the bits * Here are Wine only definitions of the bits
......
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
/*****************************************************************************
* Copyright 1998, Luiz Otavio L. Zorzella
* 1999, Eric Pouech
*
* Purpose: multimedia declarations (internal to WINMM & MMSYSTEM DLLs)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************
*/
#include "winemm.h"
#include "wine/mmsystem16.h"
#include "wownt32.h"
/* mmsystem (16 bit files) only functions */
void MMDRV_Init16(void);
void MMSYSTEM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16);
void MMSYSTEM_MMTIME32to16(LPMMTIME16 mmt16, const MMTIME* mmt32);
typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
/* HANDLE16 -> HANDLE conversions */
#define HDRVR_32(h16) ((HDRVR)(ULONG_PTR)(h16))
#define HMIDI_32(h16) ((HMIDI)(ULONG_PTR)(h16))
#define HMIDIIN_32(h16) ((HMIDIIN)(ULONG_PTR)(h16))
#define HMIDIOUT_32(h16) ((HMIDIOUT)(ULONG_PTR)(h16))
#define HMIDISTRM_32(h16) ((HMIDISTRM)(ULONG_PTR)(h16))
#define HMIXER_32(h16) ((HMIXER)(ULONG_PTR)(h16))
#define HMIXEROBJ_32(h16) ((HMIXEROBJ)(ULONG_PTR)(h16))
#define HMMIO_32(h16) ((HMMIO)(ULONG_PTR)(h16))
#define HWAVE_32(h16) ((HWAVE)(ULONG_PTR)(h16))
#define HWAVEIN_32(h16) ((HWAVEIN)(ULONG_PTR)(h16))
#define HWAVEOUT_32(h16) ((HWAVEOUT)(ULONG_PTR)(h16))
/* HANDLE -> HANDLE16 conversions */
#define HDRVR_16(h32) (LOWORD(h32))
#define HMIDI_16(h32) (LOWORD(h32))
#define HMIDIIN_16(h32) (LOWORD(h32))
#define HMIDIOUT_16(h32) (LOWORD(h32))
#define HMIDISTRM_16(h32) (LOWORD(h32))
#define HMIXER_16(h32) (LOWORD(h32))
#define HMIXEROBJ_16(h32) (LOWORD(h32))
#define HMMIO_16(h32) (LOWORD(h32))
#define HWAVE_16(h32) (LOWORD(h32))
#define HWAVEIN_16(h32) (LOWORD(h32))
#define HWAVEOUT_16(h32) (LOWORD(h32))
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "winreg.h" #include "winreg.h"
#include "winternl.h" #include "winternl.h"
#include "winemm.h" #include "winemm.h"
#include "wownt32.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -718,7 +719,7 @@ BOOL WINAPI mciGetErrorStringW(DWORD wError, LPWSTR lpstrBuffer, UINT uLength) ...@@ -718,7 +719,7 @@ BOOL WINAPI mciGetErrorStringW(DWORD wError, LPWSTR lpstrBuffer, UINT uLength)
*/ */
BOOL WINAPI mciGetErrorStringA(DWORD dwError, LPSTR lpstrBuffer, UINT uLength) BOOL WINAPI mciGetErrorStringA(DWORD dwError, LPSTR lpstrBuffer, UINT uLength)
{ {
BOOL16 ret = FALSE; BOOL ret = FALSE;
if (lpstrBuffer != NULL && uLength > 0 && if (lpstrBuffer != NULL && uLength > 0 &&
dwError >= MCIERR_BASE && dwError <= MCIERR_CUSTOM_DRIVER_BASE) { dwError >= MCIERR_BASE && dwError <= MCIERR_CUSTOM_DRIVER_BASE) {
......
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