42#define MAX_MM_MLDRVS (sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0]))
44#define A(_x,_y) {#_y, _x, 0, NULL, -1}
80 TRACE(
"(%s %u %u 0x%08lx 0x%08lx 0x%08lx)\n",
86 WARN(
"uDev=-1 requested on non-mappable ll type %s\n",
104 if (!(part->
nIDMin <= devID))
105 ERR(
"!(part->nIDMin(%d) <= devID(%d))\n", part->
nIDMin, devID);
106 if (!(devID < part->nIDMax))
107 ERR(
"!(devID(%d) < part->nIDMax(%d))\n", devID, part->
nIDMax);
112 TRACE(
"Calling message(dev=%u msg=%u usr=0x%08lx p1=0x%08lx p2=0x%08lx)\n",
128 TRACE(
"(%d, %04x, %p, %p, %p, %p)\n",
132 if (!mld)
return NULL;
139 ERR(
"Too many open drivers\n");
152 ERR(
"Shouldn't happen. Bad allocation scheme\n");
167 TRACE(
"(%p, %p)\n", hndl, mld);
177 ERR(
"Bad Handle %p at %p (not freed)\n", hndl, mld);
188 TRACE(
"(%p, %04x, 0x%08lx, 0x%08x)\n", mld, wMsg, dwParam1,
dwFlags);
193 TRACE(
"MAPPER mode requested !\n");
198 TRACE(
"No mapper loaded, doing it by hand\n");
230 TRACE(
"(%p, %04x)\n", mld, wMsg);
254 TRACE(
"(%p, %04x, %c)\n", _hndl,
type, bCanBeID ?
'Y' :
'N');
276 if (mld ==
NULL && bCanBeID) {
289 TRACE(
"(%p, %04x, %c, %04x)\n",
290 hndl, srcType, bSrcCanBeID ?
'Y' :
'N', dstType);
308 TRACE(
"(%p, %04x, %08lx, %08lx)\n", mld, uMsg, dwParam1, dwParam2);
319 WARN(
"NIY QueryName\n");
322 WARN(
"NIY call VxD\n");
334 if (!dwParam1 || !dwParam2)
345 case DRV_QUERYDSOUNDIFACE:
346 case DRV_QUERYDSOUNDDESC:
350 WARN(
"Unknown call %04x\n", uMsg);
365 TRACE(
"(%p, %04x, %04x)\n", lpDrv,
type, wMsg);
376 TRACE(
"DRVM_ENABLE => %08lx\n",
ret);
391 ERR(
"Two mappers for type %s (%d, %s)\n",
394 ERR(
"Strange: mapper with %d > 1 devices\n",
count);
403 TRACE(
"Setting min=%d max=%d (ttop=%d) for (%s:%s)\n",
447 TRACE(
"('%s', '%s', mapper=%c);\n", drvRegName, drvFileName, bIsMapper ?
'Y' :
'N');
459 memset(lpDrv, 0,
sizeof(*lpDrv));
462 WARN(
"Couldn't open driver '%s'\n", drvFileName);
470 WARN(
"Couldn't get the WINE internal structure for driver '%s'\n", drvFileName);
475#define AA(_h,_w,_x,_y,_z) \
476 func = (WINEMM_msgFunc##_y) _z ((_h), #_x); \
478 { lpDrv->parts[_w].fnMessage##_y = func; count++; \
479 TRACE("Got %d bit func '%s'\n", _y, #_x); }
482#define A(_x,_y) AA(d->hModule,_x,_y,32,GetProcAddress)
495 WARN(
"No message functions found\n");
518 WARN(
"Driver initialization failed\n");
535 char driver_buffer[256];
536 char mapper_buffer[256];
537 char midi_buffer[256];
550 size =
sizeof(driver_buffer);
558 char filename[
sizeof(driver_buffer)+10];
597 TRACE(
"DRVM_DISABLE => %08lx\n",
ret);
620 FIXME(
"Closing while ll-driver open\n");
std::map< E_STRING, PART_TEST > parts
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
APIENTRY DWORD auxMessage(UINT dwId, UINT uMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
MMRESULT FAR PASCAL modMessage(UINT device_id, UINT message, DWORD_PTR private_data, DWORD_PTR parameter1, DWORD_PTR parameter2)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
#define HeapFree(x, y, z)
#define __EXCEPT_PAGE_FAULT
APIENTRY DWORD midMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
#define DRV_QUERYDEVICEINTERFACESIZE
#define DRV_QUERYDRVENTRY
#define DRV_QUERYMAPPABLE
#define DRV_QUERYDEVICEINTERFACE
#define DRV_QUERYDRIVERIDS
LPWINE_DRIVER DRIVER_FindFromHDrvr(HDRVR hDrvr)
HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam)
LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
BOOL LoadRegistryMMEDrivers(char *key)
static unsigned driver_count
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD dwFlags)
DWORD MMDRV_Close(LPWINE_MLD mld, UINT wMsg)
static BOOL MMDRV_InitPerType(LPWINE_MM_DRIVER lpDrv, UINT type, UINT wMsg)
DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
LPWINE_MLD MMDRV_GetRelated(HANDLE hndl, UINT srcType, BOOL bSrcCanBeID, UINT dstType)
BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper)
static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type)
void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld)
LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD *dwFlags, DWORD_PTR *dwCallback, DWORD_PTR *dwInstance)
UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
struct tagWINE_LLTYPE WINE_LLTYPE
static WINE_MM_DRIVER MMDrvs[8]
UINT MMDRV_GetNum(UINT type)
LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
static WINE_LLTYPE llTypes[MMDRV_MAX]
static LPWINE_MLD MMDRV_GetByID(UINT uDevID, UINT type)
static LPWINE_MLD MM_MLDrvs[40]
DWORD APIENTRY wodMessage(UINT device_id, UINT message, DWORD_PTR private_handle, DWORD_PTR parameter1, DWORD_PTR parameter2)
#define DRVM_MAPPER_PREFERRED_GET
#define MMSYSERR_INVALPARAM
#define MMSYSERR_BADDEVICEID
#define sprintf(buf, format,...)
unsigned __int3264 UINT_PTR
DWORD APIENTRY mxdMessage(UINT DeviceId, UINT Message, DWORD_PTR PrivateHandle, DWORD_PTR Parameter1, DWORD_PTR Parameter2)
static unsigned __int64 next
DWORD_PTR dwClientInstance
DWORD_PTR dwDriverInstance
WINEMM_msgFunc32 fnMessage32
WINE_MM_DRIVER_PART parts[MMDRV_MAX]
DWORD APIENTRY widMessage(UINT DeviceId, UINT Message, DWORD_PTR PrivateHandle, DWORD_PTR Parameter1, DWORD_PTR Parameter2)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
#define WINE_DEFAULT_WINMM_DRIVER
struct tagWINE_MLD * LPWINE_MLD
#define NT_MME_DRIVERS_KEY
#define NT_MME_DRIVERS32_KEY
#define WINE_DEFAULT_WINMM_MIDI
#define WINE_DEFAULT_WINMM_MAPPER
DWORD(CALLBACK * WINEMM_msgFunc32)(UINT, UINT, DWORD_PTR, DWORD_PTR, DWORD_PTR)
struct tagWINE_MLD WINE_MLD
const char * WINMM_ErrorToString(MMRESULT error)
#define HKEY_CURRENT_USER