home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / share / 17 / dings_e.exe / Compiler / Include / DX7 / dinputd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-06  |  22.1 KB  |  568 lines

  1. /****************************************************************************
  2.  *
  3.  *  Copyright (C) 1995-1999 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dinputd.h
  6.  *  Content:    DirectInput include file for device driver implementors
  7.  *
  8.  ****************************************************************************/
  9. #ifndef __DINPUTD_INCLUDED__
  10. #define __DINPUTD_INCLUDED__
  11.  
  12. #ifndef DIRECTINPUT_VERSION
  13. #define DIRECTINPUT_VERSION         0x0700
  14. #endif
  15.  
  16. #include <dinput.h>
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /****************************************************************************
  23.  *
  24.  *      Interfaces
  25.  *
  26.  ****************************************************************************/
  27.  
  28. #ifndef DIJ_RINGZERO
  29.  
  30. DEFINE_GUID(IID_IDirectInputEffectDriver,   0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
  31. DEFINE_GUID(IID_IDirectInputJoyConfig,      0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
  32. DEFINE_GUID(IID_IDirectInputPIDDriver,      0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38);
  33.  
  34. #endif /* DIJ_RINGZERO */
  35.  
  36.  
  37. /****************************************************************************
  38.  *
  39.  *      IDirectInputEffectDriver
  40.  *
  41.  ****************************************************************************/
  42.  
  43. typedef struct DIOBJECTATTRIBUTES {
  44.     DWORD   dwFlags;
  45.     WORD    wUsagePage;
  46.     WORD    wUsage;
  47. } DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES;
  48. typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES;
  49.  
  50. typedef struct DIFFOBJECTATTRIBUTES {
  51.     DWORD   dwFFMaxForce;
  52.     DWORD   dwFFForceResolution;
  53. } DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES;
  54. typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES;
  55.  
  56. typedef struct DIOBJECTCALIBRATION {
  57.     LONG    lMin;
  58.     LONG    lCenter;
  59.     LONG    lMax;
  60. } DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION;
  61. typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION;
  62.  
  63. typedef struct DIEFFECTATTRIBUTES {
  64.     DWORD   dwEffectId;
  65.     DWORD   dwEffType;
  66.     DWORD   dwStaticParams;
  67.     DWORD   dwDynamicParams;
  68.     DWORD   dwCoords;
  69. } DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES;
  70. typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES;
  71.  
  72. typedef struct DIFFDEVICEATTRIBUTES {
  73.     DWORD   dwFlags;
  74.     DWORD   dwFFSamplePeriod;
  75.     DWORD   dwFFMinTimeResolution;
  76. } DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES;
  77. typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES;
  78.  
  79. typedef struct DIDRIVERVERSIONS {
  80.     DWORD   dwSize;
  81.     DWORD   dwFirmwareRevision;
  82.     DWORD   dwHardwareRevision;
  83.     DWORD   dwFFDriverVersion;
  84. } DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS;
  85. typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS;
  86.  
  87. typedef struct DIDEVICESTATE {
  88.     DWORD   dwSize;
  89.     DWORD   dwState;
  90.     DWORD   dwLoad;
  91. } DIDEVICESTATE, *LPDIDEVICESTATE;
  92.  
  93. #define DEV_STS_EFFECT_RUNNING  DIEGES_PLAYING
  94.  
  95. #ifndef DIJ_RINGZERO
  96.  
  97. typedef struct DIHIDFFINITINFO {
  98.     DWORD   dwSize;
  99.     LPWSTR  pwszDeviceInterface;
  100.     GUID    GuidInstance;
  101. } DIHIDFFINITINFO, *LPDIHIDFFINITINFO;
  102.  
  103. #undef INTERFACE
  104. #define INTERFACE IDirectInputEffectDriver
  105.  
  106. DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown)
  107. {
  108.     /*** IUnknown methods ***/
  109.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  110.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  111.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  112.  
  113.     /*** IDirectInputEffectDriver methods ***/
  114.     STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE;
  115.     STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE;
  116. // #NEED Re-implement commented shit
  117. //    STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE;
  118.     STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE;
  119.     STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE;
  120.     STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE;
  121. //    STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE;
  122.     STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE;
  123.     STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE;
  124.     STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE;
  125.     STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE;
  126. };
  127.  
  128. typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER;
  129.  
  130. #if !defined(__cplusplus) || defined(CINTERFACE)
  131. #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  132. #define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p)
  133. #define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p)
  134. #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e)
  135. #define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a)
  136. #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c)
  137. #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b)
  138. #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b)
  139. #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b)
  140. #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e)
  141. #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b)
  142. #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d)
  143. #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b)
  144. #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c)
  145. #else
  146. #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  147. #define IDirectInputEffectDriver_AddRef(p) (p)->AddRef()
  148. #define IDirectInputEffectDriver_Release(p) (p)->Release()
  149. #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e)
  150. #define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a)
  151. #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c)
  152. #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b)
  153. #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b)
  154. #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b)
  155. #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e)
  156. #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b)
  157. #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d)
  158. #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b)
  159. #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c)
  160. #endif
  161.  
  162.  
  163. #endif /* DIJ_RINGZERO */
  164.  
  165.  
  166. /****************************************************************************
  167.  *
  168.  *      IDirectInputJoyConfig
  169.  *
  170.  ****************************************************************************/
  171.  
  172. /****************************************************************************
  173.  *
  174.  *      Definitions copied from the DDK
  175.  *
  176.  ****************************************************************************/
  177.  
  178. #ifndef JOY_HW_NONE
  179.  
  180. /* pre-defined joystick types */
  181. #define JOY_HW_NONE                     0
  182. #define JOY_HW_CUSTOM                   1
  183. #define JOY_HW_2A_2B_GENERIC            2
  184. #define JOY_HW_2A_4B_GENERIC            3
  185. #define JOY_HW_2B_GAMEPAD               4
  186. #define JOY_HW_2B_FLIGHTYOKE            5
  187. #define JOY_HW_2B_FLIGHTYOKETHROTTLE    6
  188. #define JOY_HW_3A_2B_GENERIC            7
  189. #define JOY_HW_3A_4B_GENERIC            8
  190. #define JOY_HW_4B_GAMEPAD               9
  191. #define JOY_HW_4B_FLIGHTYOKE            10
  192. #define JOY_HW_4B_FLIGHTYOKETHROTTLE    11
  193. #define JOY_HW_TWO_2A_2B_WITH_Y         12
  194. #define JOY_HW_LASTENTRY                13
  195.  
  196.  
  197. /* calibration flags */
  198. #define JOY_ISCAL_XY            0x00000001l     /* XY are calibrated */
  199. #define JOY_ISCAL_Z             0x00000002l     /* Z is calibrated */
  200. #define JOY_ISCAL_R             0x00000004l     /* R is calibrated */
  201. #define JOY_ISCAL_U             0x00000008l     /* U is calibrated */
  202. #define JOY_ISCAL_V             0x00000010l     /* V is calibrated */
  203. #define JOY_ISCAL_POV           0x00000020l     /* POV is calibrated */
  204.  
  205. /* point of view constants */
  206. #define JOY_POV_NUMDIRS          4
  207. #define JOY_POVVAL_FORWARD       0
  208. #define JOY_POVVAL_BACKWARD      1
  209. #define JOY_POVVAL_LEFT          2
  210. #define JOY_POVVAL_RIGHT         3
  211.  
  212. /* Specific settings for joystick hardware */
  213. #define JOY_HWS_HASZ            0x00000001l     /* has Z info? */
  214. #define JOY_HWS_HASPOV          0x00000002l     /* point of view hat present */
  215. #define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l   /* pov done through combo of buttons */
  216. #define JOY_HWS_POVISPOLL       0x00000008l     /* pov done through polling */
  217. #define JOY_HWS_ISYOKE          0x00000010l     /* joystick is a flight yoke */
  218. #define JOY_HWS_ISGAMEPAD       0x00000020l     /* joystick is a game pad */
  219. #define JOY_HWS_ISCARCTRL       0x00000040l     /* joystick is a car controller */
  220. /* X defaults to J1 X axis */
  221. #define JOY_HWS_XISJ1Y          0x00000080l     /* X is on J1 Y axis */
  222. #define JOY_HWS_XISJ2X          0x00000100l     /* X is on J2 X axis */
  223. #define JOY_HWS_XISJ2Y          0x00000200l     /* X is on J2 Y axis */
  224. /* Y defaults to J1 Y axis */
  225. #define JOY_HWS_YISJ1X          0x00000400l     /* Y is on J1 X axis */
  226. #define JOY_HWS_YISJ2X          0x00000800l     /* Y is on J2 X axis */
  227. #define JOY_HWS_YISJ2Y          0x00001000l     /* Y is on J2 Y axis */
  228. /* Z defaults to J2 Y axis */
  229. #define JOY_HWS_ZISJ1X          0x00002000l     /* Z is on J1 X axis */
  230. #define JOY_HWS_ZISJ1Y          0x00004000l     /* Z is on J1 Y axis */
  231. #define JOY_HWS_ZISJ2X          0x00008000l     /* Z is on J2 X axis */
  232. /* POV defaults to J2 Y axis, if it is not button based */
  233. #define JOY_HWS_POVISJ1X        0x00010000l     /* pov done through J1 X axis */
  234. #define JOY_HWS_POVISJ1Y        0x00020000l     /* pov done through J1 Y axis */
  235. #define JOY_HWS_POVISJ2X        0x00040000l     /* pov done through J2 X axis */
  236. /* R defaults to J2 X axis */
  237. #define JOY_HWS_HASR            0x00080000l     /* has R (4th axis) info */
  238. #define JOY_HWS_RISJ1X          0x00100000l     /* R done through J1 X axis */
  239. #define JOY_HWS_RISJ1Y          0x00200000l     /* R done through J1 Y axis */
  240. #define JOY_HWS_RISJ2Y          0x00400000l     /* R done through J2 X axis */
  241. /* U & V for future hardware */
  242. #define JOY_HWS_HASU            0x00800000l     /* has U (5th axis) info */
  243. #define JOY_HWS_HASV            0x01000000l     /* has V (6th axis) info */
  244.  
  245. /* Usage settings */
  246. #define JOY_US_HASRUDDER        0x00000001l     /* joystick configured with rudder */
  247. #define JOY_US_PRESENT          0x00000002l     /* is joystick actually present? */
  248. #define JOY_US_ISOEM            0x00000004l     /* joystick is an OEM defined type */
  249.  
  250. /* reserved for future use -> as link to next possible dword */
  251. #define JOY_US_RESERVED         0x80000000l     /* reserved */
  252.  
  253.  
  254. /* Settings for TypeInfo Flags1 */
  255. #define JOYTYPE_ZEROGAMEENUMOEMDATA     0x00000001l /* Zero GameEnum's OEM data field */
  256. #define JOYTYPE_NOAUTODETECTGAMEPORT    0x00000002l /* Device does not support Autodetect gameport*/
  257. #define JOYTYPE_NOHIDDIRECT             0x00000004l /* Do not use HID directly for this device */
  258. #define JOYTYPE_DEFAULTPROPSHEET        0x80000000l /* CPL overrides custom property sheet */
  259.  
  260. /* struct for storing x,y, z, and rudder values */
  261. typedef struct joypos_tag {
  262.     DWORD       dwX;
  263.     DWORD       dwY;
  264.     DWORD       dwZ;
  265.     DWORD       dwR;
  266.     DWORD       dwU;
  267.     DWORD       dwV;
  268. } JOYPOS, FAR *LPJOYPOS;
  269.  
  270. /* struct for storing ranges */
  271. typedef struct joyrange_tag {
  272.     JOYPOS      jpMin;
  273.     JOYPOS      jpMax;
  274.     JOYPOS      jpCenter;
  275. } JOYRANGE,FAR *LPJOYRANGE;
  276.  
  277. /*
  278.  *  dwTimeout - value at which to timeout joystick polling
  279.  *  jrvRanges - range of values app wants returned for axes
  280.  *  jpDeadZone - area around center to be considered
  281.  *               as "dead". specified as a percentage
  282.  *               (0-100). Only X & Y handled by system driver
  283.  */
  284. typedef struct joyreguservalues_tag {
  285.     DWORD       dwTimeOut;
  286.     JOYRANGE    jrvRanges;
  287.     JOYPOS      jpDeadZone;
  288. } JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES;
  289.  
  290. typedef struct joyreghwsettings_tag {
  291.     DWORD       dwFlags;
  292.     DWORD       dwNumButtons;
  293. } JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS;
  294.  
  295. /* range of values returned by the hardware (filled in by calibration) */
  296. /*
  297.  *  jrvHardware - values returned by hardware
  298.  *  dwPOVValues - POV values returned by hardware
  299.  *  dwCalFlags  - what has been calibrated
  300.  */
  301. typedef struct joyreghwvalues_tag {
  302.     JOYRANGE    jrvHardware;
  303.     DWORD       dwPOVValues[JOY_POV_NUMDIRS];
  304.     DWORD       dwCalFlags;
  305. } JOYREGHWVALUES, FAR *LPJOYREGHWVALUES;
  306.  
  307. /* hardware configuration */
  308. /*
  309.  *  hws             - hardware settings
  310.  *  dwUsageSettings - usage settings
  311.  *  hwv             - values returned by hardware
  312.  *  dwType          - type of joystick
  313.  *  dwReserved      - reserved for OEM drivers
  314.  */
  315. typedef struct joyreghwconfig_tag {
  316.     JOYREGHWSETTINGS    hws;
  317.     DWORD               dwUsageSettings;
  318.     JOYREGHWVALUES      hwv;
  319.     DWORD               dwType;
  320.     DWORD               dwReserved;
  321. } JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG;
  322.  
  323. /* joystick calibration info structure */
  324. typedef struct joycalibrate_tag {
  325.     UINT    wXbase;
  326.     UINT    wXdelta;
  327.     UINT    wYbase;
  328.     UINT    wYdelta;
  329.     UINT    wZbase;
  330.     UINT    wZdelta;
  331. } JOYCALIBRATE;
  332. typedef JOYCALIBRATE FAR *LPJOYCALIBRATE;
  333.  
  334. #endif
  335.  
  336. #ifndef DIJ_RINGZERO
  337.  
  338. #define MAX_JOYSTRING 256
  339. typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCDIDEVICEINSTANCE, LPVOID);
  340.  
  341. #ifndef MAX_JOYSTICKOEMVXDNAME
  342. #define MAX_JOYSTICKOEMVXDNAME 260
  343. #endif
  344.  
  345. #define DITC_REGHWSETTINGS          0x00000001
  346. #define DITC_CLSIDCONFIG            0x00000002
  347. #define DITC_DISPLAYNAME            0x00000004
  348. #define DITC_CALLOUT                0x00000008
  349. #define DITC_HARDWAREID             0x00000010
  350. #define DITC_FLAGS1                 0x00000020
  351.  
  352.  
  353. /* This structure is defined for DirectX 5.0 compatibility */
  354.  
  355. typedef struct DIJOYTYPEINFO_DX5 {
  356.     DWORD dwSize;
  357.     JOYREGHWSETTINGS hws;
  358.     CLSID clsidConfig;
  359.     WCHAR wszDisplayName[MAX_JOYSTRING];
  360.     WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
  361. } DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
  362. typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
  363.  
  364. typedef struct DIJOYTYPEINFO {
  365.     DWORD dwSize;
  366.     JOYREGHWSETTINGS hws;
  367.     CLSID clsidConfig;
  368.     WCHAR wszDisplayName[MAX_JOYSTRING];
  369.     WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
  370. #if(DIRECTINPUT_VERSION >= 0x05b2)
  371.     WCHAR wszHardwareId[MAX_JOYSTRING];
  372.     DWORD dwFlags1;
  373. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  374. } DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
  375. typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
  376.  
  377. #define DIJC_GUIDINSTANCE           0x00000001
  378. #define DIJC_REGHWCONFIGTYPE        0x00000002
  379. #define DIJC_GAIN                   0x00000004
  380. #define DIJC_CALLOUT                0x00000008
  381. #define DIJC_WDMGAMEPORT            0x00000010
  382.  
  383. /* This structure is defined for DirectX 5.0 compatibility */
  384.  
  385. typedef struct DIJOYCONFIG_DX5 {
  386.     DWORD dwSize;
  387.     GUID guidInstance;
  388.     JOYREGHWCONFIG hwc;
  389.     DWORD dwGain;
  390.     WCHAR wszType[MAX_JOYSTRING];
  391.     WCHAR wszCallout[MAX_JOYSTRING];
  392. } DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
  393. typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
  394.  
  395. typedef struct DIJOYCONFIG {
  396.     DWORD dwSize;
  397.     GUID guidInstance;
  398.     JOYREGHWCONFIG hwc;
  399.     DWORD dwGain;
  400.     WCHAR wszType[MAX_JOYSTRING];
  401.     WCHAR wszCallout[MAX_JOYSTRING];
  402. #if(DIRECTINPUT_VERSION >= 0x05b2)
  403.     GUID  guidGameport;
  404. #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
  405.     } DIJOYCONFIG, *LPDIJOYCONFIG;
  406. typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
  407.  
  408.  
  409. #define DIJU_USERVALUES             0x00000001
  410. #define DIJU_GLOBALDRIVER           0x00000002
  411. #define DIJU_GAMEPORTEMULATOR       0x00000004
  412.  
  413. typedef struct DIJOYUSERVALUES {
  414.     DWORD dwSize;
  415.     JOYREGUSERVALUES ruv;
  416.     WCHAR wszGlobalDriver[MAX_JOYSTRING];
  417.     WCHAR wszGameportEmulator[MAX_JOYSTRING];
  418. } DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
  419. typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
  420.  
  421. DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  422. DEFINE_GUID(GUID_MediaClass,    0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  423. DEFINE_GUID(GUID_MouseClass,    0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
  424. DEFINE_GUID(GUID_HIDClass,      0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA);
  425.  
  426. #undef INTERFACE
  427. #define INTERFACE IDirectInputJoyConfig
  428.  
  429. DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown)
  430. {
  431.     /*** IUnknown methods ***/
  432.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  433.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  434.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  435.  
  436.     /*** IDirectInputJoyConfig methods ***/
  437.     STDMETHOD(Acquire)(THIS) PURE;
  438.     STDMETHOD(Unacquire)(THIS) PURE;
  439.     STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
  440.     STDMETHOD(SendNotify)(THIS) PURE;
  441.     STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
  442.     STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
  443.     STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE;
  444.     STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
  445.     STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
  446.     STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
  447.     STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
  448.     STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
  449.     STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
  450.     STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
  451.     STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
  452.     STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE;
  453. };
  454.  
  455. typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG;
  456.  
  457. #if !defined(__cplusplus) || defined(CINTERFACE)
  458. #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  459. #define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p)
  460. #define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p)
  461. #define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p)
  462. #define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p)
  463. #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
  464. #define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p)
  465. #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
  466. #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
  467. #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c)
  468. #define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
  469. #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
  470. #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
  471. #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
  472. #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
  473. #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
  474. #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
  475. #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
  476. #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c)
  477. #else
  478. #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  479. #define IDirectInputJoyConfig_AddRef(p) (p)->AddRef()
  480. #define IDirectInputJoyConfig_Release(p) (p)->Release()
  481. #define IDirectInputJoyConfig_Acquire(p) (p)->Acquire()
  482. #define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire()
  483. #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
  484. #define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify()
  485. #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
  486. #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
  487. #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c)
  488. #define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a)
  489. #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
  490. #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
  491. #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a)
  492. #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
  493. #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
  494. #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
  495. #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
  496. #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c)
  497. #endif
  498.  
  499. #endif /* DIJ_RINGZERO */
  500.  
  501. /****************************************************************************
  502.  *
  503.  *  Return Codes
  504.  *
  505.  ****************************************************************************/
  506.  
  507. #define DIERR_NOMOREITEMS               \
  508.     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
  509.  
  510. /*
  511.  *  Device driver-specific codes.
  512.  */
  513. #define DIERR_DRIVERFIRST               0x80040300L
  514. #define DIERR_DRIVERLAST                0x800403FFL
  515.  
  516. /*
  517.  *  Device installer errors.
  518.  */
  519.  
  520. /*
  521.  *  Registry entry or DLL for class installer invalid
  522.  *  or class installer not found.
  523.  */
  524. #define DIERR_INVALIDCLASSINSTALLER     0x80040400L
  525.  
  526. /*
  527.  *  The user cancelled the install operation.
  528.  */
  529. #define DIERR_CANCELLED                 0x80040401L
  530.  
  531. /*
  532.  *  The INF file for the selected device could not be
  533.  *  found or is invalid or is damaged.
  534.  */
  535. #define DIERR_BADINF                    0x80040402L
  536.  
  537. /*
  538.  * Device-specific errors for USB/PID force feedback devices. 
  539.  */
  540.  
  541. /*
  542.  *  The requested usage was not found.
  543.  */
  544. #define  DIERR_PID_USAGENOTFOUND    DIERR_DRIVERFIRST + 1
  545.  
  546. /*
  547.  *  The parameter block couldn't be    downloaded to the device.
  548.  */
  549. #define DIERR_PID_BLOCKLOADERROR    DIERR_DRIVERFIRST + 2
  550.  
  551. /*
  552.  *  PID initialization failed.
  553.  */
  554. #define DIERR_PID_NOTINITIALIZED    DIERR_DRIVERFIRST + 3
  555.  
  556. /*
  557.  *  The provided values couldn't be scaled.
  558.  */
  559. #define DIERR_PID_INVALIDSCALING    DIERR_DRIVERFIRST + 4
  560.  
  561.  
  562.  
  563. #ifdef __cplusplus
  564. };
  565. #endif
  566.  
  567. #endif  /* __DINPUTD_INCLUDED__ */
  568.