Commit 731e9f53 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

- removed (now obsolete) driver.h file (it's content is now in mmsystem.h)

- upgraded vfw.h content
parent 83f65083
......@@ -8,7 +8,6 @@
#include "winbase.h"
#include "vfw.h"
#include "wine/winestring.h"
#include "driver.h"
#include "mmsystem.h"
#include "winerror.h"
#include "debugtools.h"
......
......@@ -19,7 +19,6 @@
#include "winbase.h"
#include "commctrl.h"
#include "driver.h"
#include "animate.h"
#include "mmsystem.h"
#include "services.h"
......
......@@ -13,7 +13,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "debugtools.h"
#include "driver.h"
#include "heap.h"
#include "mmsystem.h"
#include "msacm.h"
......
......@@ -14,7 +14,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "driver.h"
#include "heap.h"
#include "mmsystem.h"
#include "msacm.h"
......
......@@ -11,7 +11,6 @@
#include "winuser.h"
#include "winbase.h"
#include "debugtools.h"
#include "driver.h"
#include "vfw.h"
#include "windef.h"
......
......@@ -16,7 +16,6 @@
#include "winuser.h"
#include "vfw.h"
#include "wine/winestring.h"
#include "driver.h"
#include "debugtools.h"
#include "ldt.h"
#include "heap.h"
......
......@@ -18,7 +18,6 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "winemm.h"
#include "debugtools.h"
......
......@@ -40,7 +40,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "driver.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(joystick);
......
......@@ -11,7 +11,6 @@
#include "heap.h"
#include "user.h" /* should be removed asap; used in MMDRV_(Get|Alloc|Free) */
#include "selectors.h"
#include "driver.h"
#include "winver.h"
#include "module.h"
#include "winemm.h"
......@@ -2365,7 +2364,6 @@ BOOL MMDRV_Init(void)
if (MMDRV_Install("msacm.drv", num, TRUE )) num++;
if (MMDRV_Install("midimap.drv", num, TRUE )) num++;
/* be sure that size of MMDrvs matches the max number of loadable drivers !!
* if not just increase size of MMDrvs */
assert(num <= sizeof(MMDrvs)/sizeof(MMDrvs[0]));
......
......@@ -14,7 +14,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "heap.h"
#include "driver.h"
#include "winemm.h"
#include "selectors.h"
#include "digitalv.h"
......
......@@ -8,7 +8,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "debugtools.h"
......
......@@ -12,7 +12,6 @@
#include "winuser.h"
#include "mmddk.h"
#include "user.h"
#include "driver.h"
#include "digitalv.h"
#include "debugtools.h"
......
......@@ -12,7 +12,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "cdrom.h"
#include "debugtools.h"
......
......@@ -21,7 +21,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "driver.h"
#include "heap.h"
#include "debugtools.h"
......
......@@ -13,7 +13,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "heap.h"
#include "debugtools.h"
......
......@@ -8,7 +8,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "debugtools.h"
......
......@@ -22,15 +22,14 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "wownt32.h"
#include "heap.h"
#include "driver.h"
#include "winemm.h"
#include "syslevel.h"
#include "callback.h"
#include "selectors.h"
#include "module.h"
#include "debugtools.h"
#include "ntddk.h"
DEFAULT_DEBUG_CHANNEL(mmsys)
......@@ -59,7 +58,8 @@ LPWINE_MM_IDATA MULTIMEDIA_GetIData(void)
LPWINE_MM_IDATA iData = MULTIMEDIA_GetIDataNoCheck();
if (!iData) {
ERR("IData not found. Suicide !!!\n");
ERR("IData not found for pid=%08lx. Suicide !!!\n", GetCurrentProcessId());
DbgBreakPoint();
ExitProcess(0);
}
return iData;
......@@ -81,6 +81,7 @@ static BOOL MULTIMEDIA_CreateIData(HINSTANCE hInstDLL)
iData->lpNextIData = lpFirstIData;
lpFirstIData = iData;
InitializeCriticalSection(&iData->cs);
TRACE("Created IData (%p) for pid %08lx\n", iData, iData->dwThisProcess);
return TRUE;
}
......@@ -156,8 +157,8 @@ BOOL WINAPI MMSYSTEM_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds,
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
/* need to load WinMM in order to:
* - correctly initiates shared variables (MULTIMEDIA_Init())
* - correctly creates the per process WINE_MM_IDATA chunk
* - initiate correctly shared variables (MULTIMEDIA_Init())
* - create correctly the per process WINE_MM_IDATA chunk
*/
hndl = LoadLibraryA("WINMM.DLL");
......@@ -562,7 +563,7 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
!((DWORD)pszSound >> 16)) || !pszSound)) {
pszSoundA = HEAP_strdupWtoA(GetProcessHeap(), 0,pszSound);
bSound = PlaySoundA(pszSoundA, hmod, fdwSound);
HeapFree(GetProcessHeap(), 0,pszSoundA);
HeapFree(GetProcessHeap(), 0, pszSoundA);
} else
bSound = PlaySoundA((LPCSTR)pszSound, hmod, fdwSound);
......@@ -3335,7 +3336,7 @@ static MMRESULT WINAPI MMSYSTEM_MidiStream_Open(HMIDISTRM* lphMidiStrm, LPUINT l
*lphMidiStrm = hMidiOut;
/* FIXME: is lpuDevice initialized upon entering midiStreamOpen ? */
FIXME("*lpuDeviceID=%u\n", *lpuDeviceID);
FIXME("*lpuDeviceID=%x\n", *lpuDeviceID);
lpwm->mld.uDeviceID = *lpuDeviceID = 0;
ret = MMDRV_Open(&lpwm->mld, MODM_OPEN, (DWORD)&lpwm->mod, fdwOpen);
......
......@@ -14,7 +14,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "msacm.h"
#include "debugtools.h"
......
......@@ -32,7 +32,6 @@
#include "wingdi.h"
#include "winerror.h"
#include "wine/winuser16.h"
#include "driver.h"
#include "mmddk.h"
#include "dsound.h"
#include "dsdriver.h"
......
......@@ -23,7 +23,6 @@
#include "winuser.h"
#include "mmddk.h"
#include "oss.h"
#include "driver.h"
#include "debugtools.h"
#include "heap.h"
#include "ldt.h"
......
......@@ -17,7 +17,6 @@
#include <sys/ioctl.h>
#include "windef.h"
#include "user.h"
#include "driver.h"
#include "mmddk.h"
#include "oss.h"
#include "debugtools.h"
......
......@@ -15,7 +15,6 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include "windef.h"
#include "driver.h"
#include "mmddk.h"
#include "oss.h"
#include "debugtools.h"
......
......@@ -8,7 +8,6 @@
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "mmddk.h"
#include "oss.h"
......
/*
* Drivers definitions
*/
#ifndef __WINE_DRIVER_H
#define __WINE_DRIVER_H
#include "windef.h"
#define DRV_LOAD 0x0001
#define DRV_ENABLE 0x0002
#define DRV_OPEN 0x0003
#define DRV_CLOSE 0x0004
#define DRV_DISABLE 0x0005
#define DRV_FREE 0x0006
#define DRV_CONFIGURE 0x0007
#define DRV_QUERYCONFIGURE 0x0008
#define DRV_INSTALL 0x0009
#define DRV_REMOVE 0x000A
#define DRV_EXITSESSION 0x000B
#define DRV_EXITAPPLICATION 0x000C
#define DRV_POWER 0x000F
#define DRV_RESERVED 0x0800
#define DRV_USER 0x4000
#define DRVCNF_CANCEL 0x0000
#define DRVCNF_OK 0x0001
#define DRVCNF_RESTART 0x0002
#define DRVEA_NORMALEXIT 0x0001
#define DRVEA_ABNORMALEXIT 0x0002
#define DRV_SUCCESS 0x0001
#define DRV_FAILURE 0x0000
#define GND_FIRSTINSTANCEONLY 0x00000001
#define GND_FORWARD 0x00000000
#define GND_REVERSE 0x00000002
typedef struct {
DWORD dwDCISize;
LPCSTR lpszDCISectionName;
LPCSTR lpszDCIAliasName;
} DRVCONFIGINFO16, *LPDRVCONFIGINFO16;
typedef struct {
DWORD dwDCISize;
LPCWSTR lpszDCISectionName;
LPCWSTR lpszDCIAliasName;
} DRVCONFIGINFO, *LPDRVCONFIGINFO;
/* GetDriverInfo16 references this structure, so this a struct defined
* in the Win16 API.
* GetDriverInfo has been deprecated in Win32.
*/
typedef struct
{
UINT16 length;
HDRVR16 hDriver;
HINSTANCE16 hModule;
CHAR szAliasName[128];
} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
LPARAM dwParam1, LPARAM dwParam2);
LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
UINT Msg, LPARAM lParam1, LPARAM lParam2);
HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
LPARAM lParam2);
#define OpenDriver WINELIB_NAME_AW(OpenDriver)
LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
LPARAM lParam1, LPARAM lParam2 );
LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message,
LPARAM lParam1, LPARAM lParam2 );
HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
/* only win31 version for those exist */
HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD);
BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *);
DWORD WINAPI GetDriverFlags( HDRVR hDriver );
#ifdef __WINE__
/* this call (GetDriverFlags) is not documented, nor the flags returned.
* here are Wine only definitions
*/
#define WINE_GDF_EXIST 0x80000000
#define WINE_GDF_16BIT 0x10000000
#endif
#endif /* __WINE_DRIVER_H */
......@@ -151,6 +151,96 @@ typedef struct {
#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
#define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handler */
#define DRV_LOAD 0x0001
#define DRV_ENABLE 0x0002
#define DRV_OPEN 0x0003
#define DRV_CLOSE 0x0004
#define DRV_DISABLE 0x0005
#define DRV_FREE 0x0006
#define DRV_CONFIGURE 0x0007
#define DRV_QUERYCONFIGURE 0x0008
#define DRV_INSTALL 0x0009
#define DRV_REMOVE 0x000A
#define DRV_EXITSESSION 0x000B
#define DRV_EXITAPPLICATION 0x000C
#define DRV_POWER 0x000F
#define DRV_RESERVED 0x0800
#define DRV_USER 0x4000
#define DRVCNF_CANCEL 0x0000
#define DRVCNF_OK 0x0001
#define DRVCNF_RESTART 0x0002
#define DRVEA_NORMALEXIT 0x0001
#define DRVEA_ABNORMALEXIT 0x0002
#define DRV_SUCCESS 0x0001
#define DRV_FAILURE 0x0000
#define GND_FIRSTINSTANCEONLY 0x00000001
#define GND_FORWARD 0x00000000
#define GND_REVERSE 0x00000002
typedef struct {
DWORD dwDCISize;
LPCSTR lpszDCISectionName;
LPCSTR lpszDCIAliasName;
} DRVCONFIGINFO16, *LPDRVCONFIGINFO16;
typedef struct {
DWORD dwDCISize;
LPCWSTR lpszDCISectionName;
LPCWSTR lpszDCIAliasName;
} DRVCONFIGINFO, *LPDRVCONFIGINFO;
/* GetDriverInfo16 references this structure, so this a struct defined
* in the Win16 API.
* GetDriverInfo has been deprecated in Win32.
*/
typedef struct
{
UINT16 length;
HDRVR16 hDriver;
HINSTANCE16 hModule;
CHAR szAliasName[128];
} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
LPARAM dwParam1, LPARAM dwParam2);
LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
UINT Msg, LPARAM lParam1, LPARAM lParam2);
HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
LPARAM lParam2);
HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
LPARAM lParam2);
#define OpenDriver WINELIB_NAME_AW(OpenDriver)
LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI SendDriverMessage16(HDRVR16 hDriver, UINT16 message,
LPARAM lParam1, LPARAM lParam2);
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message,
LPARAM lParam1, LPARAM lParam2);
HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
/* only win31 version for those exist */
HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD);
BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *);
DWORD WINAPI GetDriverFlags(HDRVR hDriver);
#ifdef __WINE__
/* this call (GetDriverFlags) is not documented, nor the flags returned.
* here are Wine only definitions
*/
#define WINE_GDF_EXIST 0x80000000
#define WINE_GDF_16BIT 0x10000000
#endif
typedef void CALLBACK (*LPDRVCALLBACK16) (HDRVR16 h, UINT16 uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
typedef void CALLBACK (*LPDRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
......
......@@ -6,7 +6,6 @@
#define __WINE_MSACM_H
#include "windef.h"
#include "driver.h"
#include "mmsystem.h"
#include "mmreg.h"
......
#include <stdio.h>
#include <string.h>
#include "windows.h"
#include "driver.h"
#include "mmsystem.h"
#include "vfw.h"
......
......@@ -14,7 +14,6 @@
#include "wine/winbase16.h"
#include "wingdi.h"
#include "winuser.h"
#include "driver.h"
#include "ldt.h"
#include "module.h"
#include "mmddk.h"
......@@ -637,7 +636,7 @@ static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam, BOOL bCallFr
*
* Creates unique ID for 16 bit drivers.
*/
static HDRVR16 DRIVER_CreateDrvr16()
static HDRVR16 DRIVER_CreateDrvr16(void)
{
static WORD DRIVER_hDrvr16Counter = 0;
......
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