diff --git a/reactos/lib/winmm/misc/stubs.c b/reactos/lib/winmm/misc/stubs.c index 8965254d21d..2b3ec39182c 100644 --- a/reactos/lib/winmm/misc/stubs.c +++ b/reactos/lib/winmm/misc/stubs.c @@ -11,6 +11,70 @@ DECLARE_HANDLE(HWAVEOUT); // mmsystem.h +#define NEAR +#define FAR + +typedef UINT MMRESULT; // error returncode, 0 means no error +typedef UINT MCIDEVICEID; /* MCI device ID type */ +typedef DWORD MCIERROR; + +/* general constants */ +#define MAXPNAMELEN 32 /* max product name length (including NULL) */ +#define MAXERRORLENGTH 256 /* max error text length (including NULL) */ +#define MAX_JOYSTICKOEMVXDNAME 260 /* max oem vxd name length (including NULL) */ + +#define MMSYSERR_BASE 0 + +#define MMSYSERR_NOERROR 0 +#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) + +/* joystick device capabilities data structure */ +typedef struct tagJOYCAPSA { + WORD wMid; /* manufacturer ID */ + WORD wPid; /* product ID */ + CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */ + UINT wXmin; /* minimum x position value */ + UINT wXmax; /* maximum x position value */ + UINT wYmin; /* minimum y position value */ + UINT wYmax; /* maximum y position value */ + UINT wZmin; /* minimum z position value */ + UINT wZmax; /* maximum z position value */ + UINT wNumButtons; /* number of buttons */ + UINT wPeriodMin; /* minimum message period when captured */ + UINT wPeriodMax; /* maximum message period when captured */ + UINT wRmin; /* minimum r position value */ + UINT wRmax; /* maximum r position value */ + UINT wUmin; /* minimum u (5th axis) position value */ + UINT wUmax; /* maximum u (5th axis) position value */ + UINT wVmin; /* minimum v (6th axis) position value */ + UINT wVmax; /* maximum v (6th axis) position value */ + UINT wCaps; /* joystick capabilites */ + UINT wMaxAxes; /* maximum number of axes supported */ + UINT wNumAxes; /* number of axes in use */ + UINT wMaxButtons; /* maximum number of buttons supported */ + CHAR szRegKey[MAXPNAMELEN];/* registry key */ + CHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */ +} JOYCAPSA, *PJOYCAPSA, *NPJOYCAPSA, *LPJOYCAPSA; + +typedef struct joyinfoex_tag { + DWORD dwSize; /* size of structure */ + DWORD dwFlags; /* flags to indicate what to return */ + DWORD dwXpos; /* x position */ + DWORD dwYpos; /* y position */ + DWORD dwZpos; /* z position */ + DWORD dwRpos; /* rudder/4th axis position */ + DWORD dwUpos; /* 5th axis position */ + DWORD dwVpos; /* 6th axis position */ + DWORD dwButtons; /* button states */ + DWORD dwButtonNumber; /* current button number pressed */ + DWORD dwPOV; /* point of view state */ + DWORD dwReserved1; /* reserved for communication between winmm & driver */ + DWORD dwReserved2; /* reserved for future expansion */ +} JOYINFOEX, *PJOYINFOEX, NEAR *NPJOYINFOEX, FAR *LPJOYINFOEX; + + +// mmsystem.h ends here + UINT WINAPI waveOutReset(HWAVEOUT hWaveOut) @@ -156,3 +220,27 @@ timeEndPeriod(UINT uPeriod) DbgPrint("timeEndPeriod stub\n"); return 97/*TIMERR_NOCANDO*/; } + +MMRESULT WINAPI joyGetDevCapsA(UINT uJoyID, LPJOYCAPSA pjc, UINT cbjc) +{ + DbgPrint("joyGetDevCapsA stub\n"); + return MMSYSERR_ERROR; +} + +UINT WINAPI joyGetNumDevs(void) +{ + DbgPrint("joyGetNumDevs stub\n"); + return 0; +} + +MMRESULT WINAPI joyGetPosEx(UINT uJoyID, LPJOYINFOEX pji) +{ + DbgPrint("joyGetPosEx stub\n"); + return MMSYSERR_ERROR; +} + +MCIERROR WINAPI mciSendCommandA(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2) +{ + DbgPrint("mciSendCommandA stub\n"); + return MMSYSERR_ERROR; +} diff --git a/reactos/lib/winmm/winmm.def b/reactos/lib/winmm/winmm.def index 2d4307c464e..63c11d63f36 100644 --- a/reactos/lib/winmm/winmm.def +++ b/reactos/lib/winmm/winmm.def @@ -1,5 +1,9 @@ LIBRARY WINMM.DLL EXPORTS +joyGetDevCapsA@12 +joyGetNumDevs@0 +joyGetPosEx@8 +mciSendCommandA@16 midiOutReset@4 midiOutClose@4 midiOutUnprepareHeader@12 diff --git a/reactos/lib/winmm/winmm.edf b/reactos/lib/winmm/winmm.edf index cd74e47b9a8..e6b65bc9912 100644 --- a/reactos/lib/winmm/winmm.edf +++ b/reactos/lib/winmm/winmm.edf @@ -1,5 +1,9 @@ LIBRARY WINMM.DLL EXPORTS +joyGetDevCapsA=joyGetDevCapsA@12 +joyGetNumDevs=joyGetNumDevs@0 +joyGetPosEx=joyGetPosEx@8 +mciSendCommandA=mciSendCommandA@16 midiOutReset=midiOutReset@4 midiOutClose=midiOutClose@4 midiOutUnprepareHeader=midiOutUnprepareHeader@12