this should help compiling winmm without wine headers
A+
--
Eric Pouech
Name: winmm16
ChangeLog: removed some more dependencies on wine 16 specific entities
License: X11
GenDate: 2003/10/18 19:54:58 UTC
ModifiedFiles: dlls/winmm/driver.c dlls/winmm/lolvldrv.c dlls/winmm/message16.c dlls/winmm/mmio.c dlls/winmm/mmsystem.c dlls/winmm/time.c dlls/winmm/winemm.h dlls/winmm/winmm.c
AddedFiles: dlls/winmm/winemm16.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/driver.c,v
retrieving revision 1.24
diff -u -u -r1.24 driver.c
--- dlls/winmm/driver.c 15 Sep 2003 20:13:30 -0000 1.24
+++ dlls/winmm/driver.c 18 Oct 2003 19:46:18 -0000
@@ -37,10 +37,10 @@
static LPWINE_DRIVER lpDrvItemList /* = NULL */;
-WINE_MMTHREAD* (*pFnGetMMThread16)(HANDLE16 h) /* = NULL */;
+WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16 h) /* = NULL */;
LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM) /* = NULL */;
-LRESULT (*pFnCloseDriver16)(HDRVR16,LPARAM,LPARAM) /* = NULL */;
-LRESULT (*pFnSendMessage16)(HDRVR16,UINT,LPARAM,LPARAM) /* = NULL */;
+LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM) /* = NULL */;
+LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM) /* = NULL */;
/**************************************************************************
* DRIVER_GetNumberOfModuleRefs [internal]
Index: dlls/winmm/lolvldrv.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/lolvldrv.c,v
retrieving revision 1.49
diff -u -u -r1.49 lolvldrv.c
--- dlls/winmm/lolvldrv.c 15 Oct 2003 21:01:05 -0000 1.49
+++ dlls/winmm/lolvldrv.c 18 Oct 2003 19:36:58 -0000
@@ -33,7 +33,7 @@
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 */;
/* each known type of driver has an instance of this structure */
@@ -262,7 +262,7 @@
case WINMM_MAP_OKMEM:
TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
- ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
mld->uDeviceID, wMsg, mld->dwDriverInstance,
dwParam1, dwParam2);
TRACE("=> %lu\n", ret);
@@ -277,7 +277,7 @@
} else {
TRACE("Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
mld->uDeviceID, wMsg, mld->dwDriverInstance, dwParam1, dwParam2);
- ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
mld->uDeviceID, wMsg, mld->dwDriverInstance,
dwParam1, dwParam2);
TRACE("=> %lu\n", ret);
@@ -528,15 +528,15 @@
#endif
count = part->u.fnMessage32(0, wMsg, 0L, 0L, 0L);
} 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);
TRACE("DRVM_INIT => %08lx\n", ret);
#if 0
- ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_ENABLE, 0L, 0L, 0L);
TRACE("DRVM_ENABLE => %08lx\n", ret);
#endif
- count = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ count = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, wMsg, 0L, 0L, 0L);
} else {
return FALSE;
@@ -773,11 +773,11 @@
TRACE("DRVM_EXIT => %08lx\n", ret);
} else if (!lpDrv->bIs32 && part->u.fnMessage16 && pFnCallMMDrvFunc16) {
#if 0
- ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_DISABLE, 0L, 0L, 0L);
TRACE("DRVM_DISABLE => %08lx\n", ret);
#endif
- ret = pFnCallMMDrvFunc16((FARPROC16)part->u.fnMessage16,
+ ret = pFnCallMMDrvFunc16((DWORD)part->u.fnMessage16,
0, DRVM_EXIT, 0L, 0L, 0L);
TRACE("DRVM_EXIT => %08lx\n", ret);
} else {
Index: dlls/winmm/message16.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/message16.c,v
retrieving revision 1.9
diff -u -u -r1.9 message16.c
--- dlls/winmm/message16.c 5 Sep 2003 23:08:28 -0000 1.9
+++ dlls/winmm/message16.c 18 Oct 2003 19:42:22 -0000
@@ -30,7 +30,7 @@
#include "winreg.h"
#include "winver.h"
#include "wownt32.h"
-#include "winemm.h"
+#include "winemm16.h"
#include "digitalv.h"
#include "wine/debug.h"
@@ -1736,8 +1736,8 @@
* 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,
- LONG lp1, LONG lp2)
+static LRESULT MMDRV_CallMMDrvFunc16(DWORD fp16, WORD dev, WORD msg, LONG instance,
+ LONG lp1, LONG lp2)
{
WORD args[8];
DWORD ret;
@@ -1750,7 +1750,7 @@
args[2] = LOWORD(lp1);
args[1] = HIWORD(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);
}
Index: dlls/winmm/mmio.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/mmio.c,v
retrieving revision 1.42
diff -u -u -r1.42 mmio.c
--- dlls/winmm/mmio.c 16 Oct 2003 19:12:49 -0000 1.42
+++ dlls/winmm/mmio.c 18 Oct 2003 19:49:49 -0000
@@ -46,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(mmio);
-LRESULT (*pFnMmioCallback16)(SEGPTR,LPMMIOINFO,UINT,LPARAM,LPARAM) /* = NULL */;
+LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM) /* = NULL */;
/**************************************************************************
* mmioDosIOProc [internal]
@@ -355,7 +355,7 @@
switch (ioProc->type) {
case MMIO_PROC_16:
if (pFnMmioCallback16)
- result = pFnMmioCallback16((SEGPTR)ioProc->pIOProc,
+ result = pFnMmioCallback16((DWORD)ioProc->pIOProc,
mmioinfo, wMsg, lp1, lp2);
break;
case MMIO_PROC_32A:
@@ -460,8 +460,8 @@
if (wm) {
EnterCriticalSection(&WINMM_IData->cs);
/* lookup next unallocated WORD handle, with a non NULL value */
- while (++MMIO_counter == 0 || MMIO_Get(HMMIO_32(MMIO_counter)));
- wm->info.hmmio = HMMIO_32(MMIO_counter);
+ while (++MMIO_counter == 0 || MMIO_Get((HMMIO)(ULONG_PTR)MMIO_counter));
+ wm->info.hmmio = (HMMIO)(ULONG_PTR)MMIO_counter;
wm->lpNext = WINMM_IData->lpMMIO;
WINMM_IData->lpMMIO = wm;
LeaveCriticalSection(&WINMM_IData->cs);
@@ -611,7 +611,7 @@
char buffer[MAX_PATH];
if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer))
- return (HMMIO16)FALSE;
+ return (HMMIO)FALSE;
if ((dwOpenFlags & MMIO_EXIST) && (GetFileAttributesA(buffer) == INVALID_FILE_ATTRIBUTES))
return (HMMIO)FALSE;
strcpy(szFileName, buffer);
Index: dlls/winmm/mmsystem.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/mmsystem.c,v
retrieving revision 1.96
diff -u -u -r1.96 mmsystem.c
--- dlls/winmm/mmsystem.c 15 Sep 2003 20:13:30 -0000 1.96
+++ dlls/winmm/mmsystem.c 18 Oct 2003 19:42:13 -0000
@@ -41,7 +41,7 @@
#include "winnls.h"
#include "wine/winuser16.h"
-#include "winemm.h"
+#include "winemm16.h"
#include "wine/debug.h"
@@ -1894,7 +1894,7 @@
lpMMThd->dwCounter = 0;
lpMMThd->hThread = 0;
lpMMThd->dwThreadID = 0;
- lpMMThd->fpThread = fpThreadAddr;
+ lpMMThd->fpThread = (DWORD)fpThreadAddr;
lpMMThd->dwThreadPmt = dwPmt;
lpMMThd->dwSignalCount = 0;
lpMMThd->hEvent = 0;
@@ -2121,7 +2121,7 @@
TRACE("[20-%p]\n", lpMMThd->hThread);
lpMMThd->dwStatus = 0x20;
if (lpMMThd->fpThread) {
- WOWCallback16((DWORD)lpMMThd->fpThread, lpMMThd->dwThreadPmt);
+ WOWCallback16(lpMMThd->fpThread, lpMMThd->dwThreadPmt);
}
lpMMThd->dwStatus = 0x30;
TRACE("[30-%p]\n", lpMMThd->hThread);
@@ -2510,7 +2510,7 @@
if (wFlags & WINE_TIMER_IS32)
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);
}
Index: dlls/winmm/time.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/time.c,v
retrieving revision 1.21
diff -u -u -r1.21 time.c
--- dlls/winmm/time.c 15 Oct 2003 21:01:05 -0000 1.21
+++ dlls/winmm/time.c 18 Oct 2003 19:41:16 -0000
@@ -66,9 +66,9 @@
switch (lpTimer->wFlags & 0x30) {
case TIME_CALLBACK_FUNCTION:
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)
- pFnCallMMDrvFunc16(lpTimer->lpFunc, lpTimer->wTimerID, 0,
+ pFnCallMMDrvFunc16((DWORD)lpTimer->lpFunc, lpTimer->wTimerID, 0,
lpTimer->dwUser, 0, 0);
break;
case TIME_CALLBACK_EVENT_SET:
@@ -226,7 +226,7 @@
* TIME_SetEventInternal [internal]
*/
WORD TIME_SetEventInternal(UINT wDelay, UINT wResol,
- FARPROC16 lpFunc, DWORD dwUser, UINT wFlags)
+ LPTIMECALLBACK lpFunc, DWORD dwUser, UINT wFlags)
{
WORD wNewID = 0;
LPWINE_TIMERENTRY lpNewTimer;
@@ -276,7 +276,7 @@
if (wFlags & WINE_TIMER_IS32)
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);
}
Index: dlls/winmm/winemm.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/winemm.h,v
retrieving revision 1.46
diff -u -u -r1.46 winemm.h
--- dlls/winmm/winemm.h 12 Sep 2003 00:24:16 -0000 1.46
+++ dlls/winmm/winemm.h 18 Oct 2003 19:53:54 -0000
@@ -27,8 +27,6 @@
#include "windef.h"
#include "winbase.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 *MessageProc32)(UINT wDevID, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
@@ -55,7 +53,7 @@
DWORD dwDriverID;
} d32;
struct {
- HDRVR16 hDriver16;
+ UINT16 hDriver16;
} d16;
} d;
struct tagWINE_DRIVER* lpPrevItem;
@@ -128,14 +126,14 @@
DWORD dwCounter; /* 04 > 1 when in mmThread functions */
HANDLE hThread; /* 08 hThread */
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 dwSignalCount; /* 18 counter used for signaling */
HANDLE hEvent; /* 1C event */
HANDLE hVxD; /* 20 return from OpenVxDHandle */
DWORD dwStatus; /* 24 0x00, 0x10, 0x20, 0x30 */
DWORD dwFlags; /* 28 dwFlags upon creation */
- HANDLE16 hTask; /* 2C handle to created task */
+ UINT16 hTask; /* 2C handle to created task */
} WINE_MMTHREAD;
typedef struct tagWINE_MCIDRIVER {
@@ -145,7 +143,6 @@
LPSTR lpstrDeviceType;
LPSTR lpstrAlias;
HDRVR hDriver;
- DRIVERPROC16 driverProc;
DWORD dwPrivate;
YIELDPROC lpfnYieldProc;
DWORD dwYieldData;
@@ -161,7 +158,7 @@
typedef struct tagWINE_TIMERENTRY {
UINT wDelay;
UINT wResol;
- FARPROC16 lpFunc;
+ LPTIMECALLBACK lpFunc; /* can be lots of things */
DWORD dwUser;
UINT16 wFlags;
UINT16 wTimerID;
@@ -186,7 +183,7 @@
struct IOProcList* ioProc;
BOOL bTmpIOProc : 1,
bBufferLoaded : 1;
- SEGPTR segBuffer16;
+ DWORD segBuffer16;
DWORD dwFileSize;
} WINE_MMIO, *LPWINE_MMIO;
@@ -226,7 +223,6 @@
/* function prototypes */
-typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, 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_UNMAPFUNC)(UINT wMsg, LPDWORD lpdwUser, LPDWORD lpParam1, LPDWORD lpParam2, MMRESULT ret);
@@ -287,8 +283,8 @@
LPARAM lParam2, enum mmioProcType type);
LPWINE_MMIO MMIO_Get(HMMIO h);
-WORD TIME_SetEventInternal(UINT wDelay, UINT wResol,
- FARPROC16 lpFunc, DWORD dwUser, UINT wFlags);
+WORD TIME_SetEventInternal(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
+ DWORD dwUser, UINT wFlags);
void TIME_MMTimeStart(void);
void TIME_MMTimeStop(void);
@@ -298,48 +294,17 @@
/* pointers to 16 bit functions (if sibling MMSYSTEM.DLL is loaded
* NULL otherwise
*/
-extern WINE_MMTHREAD* (*pFnGetMMThread16)(HANDLE16);
+extern WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16);
extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCSTR,LPCSTR,LPARAM);
-extern LRESULT (*pFnCloseDriver16)(HDRVR16,LPARAM,LPARAM);
-extern LRESULT (*pFnSendMessage16)(HDRVR16,UINT,LPARAM,LPARAM);
+extern LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM);
+extern LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM);
extern WINMM_MapType (*pFnMciMapMsg16To32A)(WORD,WORD,DWORD*);
extern WINMM_MapType (*pFnMciUnMapMsg16To32A)(WORD,WORD,DWORD);
extern WINMM_MapType (*pFnMciMapMsg32ATo16)(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 LRESULT (*pFnMmioCallback16)(SEGPTR,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))
+extern LRESULT (*pFnMmioCallback16)(DWORD,LPMMIOINFO,UINT,LPARAM,LPARAM);
/* GetDriverFlags() returned bits is not documented (nor the call itself)
* Here are Wine only definitions of the bits
Index: dlls/winmm/winmm.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/winmm.c,v
retrieving revision 1.21
diff -u -u -r1.21 winmm.c
--- dlls/winmm/winmm.c 14 Oct 2003 20:05:42 -0000 1.21
+++ dlls/winmm/winmm.c 18 Oct 2003 19:54:38 -0000
@@ -41,6 +41,7 @@
#include "winreg.h"
#include "winternl.h"
#include "winemm.h"
+#include "wownt32.h"
#include "wine/debug.h"
@@ -708,7 +709,7 @@
*/
BOOL WINAPI mciGetErrorStringA(DWORD dwError, LPSTR lpstrBuffer, UINT uLength)
{
- BOOL16 ret = FALSE;
+ BOOL ret = FALSE;
if (lpstrBuffer != NULL && uLength > 0 &&
dwError >= MCIERR_BASE && dwError <= MCIERR_CUSTOM_DRIVER_BASE) {
--- /dev/null 1970-01-01 01:00:00.000000000 +0100
+++ dlls/winmm/winemm16.h 2003-10-18 21:54:01.000000000 +0200
@@ -0,0 +1,59 @@
+/* -*- 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))