Commit 73c7919c authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winmm: Restrict exposure of WINE_MMTHREAD to mmsystem.

parent c997bd84
......@@ -53,7 +53,6 @@ static LPWINE_DRIVER lpDrvItemList /* = NULL */;
static const WCHAR HKLM_BASE[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16 h) /* = NULL */;
LPWINE_DRIVER (*pFnOpenDriver16)(LPCWSTR,LPCWSTR,LPARAM) /* = NULL */;
LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM) /* = NULL */;
LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM) /* = NULL */;
......@@ -598,6 +597,10 @@ BOOL WINAPI DriverCallback(DWORD_PTR dwCallBack, DWORD uFlags, HDRVR hDev,
TRACE("Event(%08lx) !\n", dwCallBack);
SetEvent((HANDLE)dwCallBack);
break;
#if 0
/* FIXME: for now only usable in mmsystem.dll16
* If needed, should be enabled back
*/
case 6: /* I would dub it DCB_MMTHREADSIGNAL */
/* this is an undocumented DCB_ value used for mmThreads
* loword of dwCallBack contains the handle of the lpMMThd block
......@@ -614,6 +617,7 @@ BOOL WINAPI DriverCallback(DWORD_PTR dwCallBack, DWORD uFlags, HDRVR hDev,
/* some other stuff on lpMMThd->hVxD */
}
break;
#endif
#if 0
case 4:
/* this is an undocumented DCB_ value for... I don't know */
......
......@@ -87,7 +87,6 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
return FALSE;
}
/* hook in our 16 bit function pointers */
pFnGetMMThread16 = WINMM_GetmmThread;
pFnOpenDriver16 = DRIVER_OpenDriver16;
pFnCloseDriver16 = DRIVER_CloseDriver16;
pFnSendMessage16 = DRIVER_SendMessage16;
......@@ -96,7 +95,6 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
MMDRV_Init16();
break;
case DLL_PROCESS_DETACH:
pFnGetMMThread16 = NULL;
pFnOpenDriver16 = NULL;
pFnCloseDriver16 = NULL;
pFnSendMessage16 = NULL;
......
......@@ -115,24 +115,6 @@ typedef struct {
WINE_MLD mld;
} WINE_MIXER, *LPWINE_MIXER;
#define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
#define WINE_MMTHREAD_DELETED 0xDEADDEAD
typedef struct {
DWORD dwSignature; /* 00 "BSIL" when ok, 0xDEADDEAD when being deleted */
DWORD dwCounter; /* 04 > 1 when in mmThread functions */
HANDLE hThread; /* 08 hThread */
DWORD dwThreadID; /* 0C */
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 */
LONG 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 */
UINT16 hTask; /* 2C handle to created task */
} WINE_MMTHREAD;
typedef struct tagWINE_MCIDRIVER {
UINT wDeviceID;
UINT wType;
......@@ -212,7 +194,6 @@ extern HANDLE psStopEvent;
/* pointers to 16 bit functions (if sibling MMSYSTEM.DLL is loaded
* NULL otherwise
*/
extern WINE_MMTHREAD* (*pFnGetMMThread16)(UINT16);
extern LPWINE_DRIVER (*pFnOpenDriver16)(LPCWSTR,LPCWSTR,LPARAM);
extern LRESULT (*pFnCloseDriver16)(UINT16,LPARAM,LPARAM);
extern LRESULT (*pFnSendMessage16)(UINT16,UINT,LPARAM,LPARAM);
......
......@@ -79,3 +79,21 @@ extern void MMSYSTDRV_DeleteThunk(struct mmsystdrv_thunk* th
extern void MMSYSTDRV_SetHandle(struct mmsystdrv_thunk* thunk, void* h);
extern void MMSYSTDRV_CloseHandle(void* h);
extern DWORD MMSYSTDRV_Message(void* h, UINT msg, DWORD_PTR param1, DWORD_PTR param2);
#define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
#define WINE_MMTHREAD_DELETED 0xDEADDEAD
typedef struct {
DWORD dwSignature; /* 00 "BSIL" when ok, 0xDEADDEAD when being deleted */
DWORD dwCounter; /* 04 > 1 when in mmThread functions */
HANDLE hThread; /* 08 hThread */
DWORD dwThreadID; /* 0C */
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 */
LONG 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 */
UINT16 hTask; /* 2C handle to created task */
} WINE_MMTHREAD;
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