Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
4.2 KiB

  1. //**************************************************************************
  2. //
  3. // SWFORCE.H -- Xena Gaming Project
  4. //
  5. // Version 3.XX
  6. //
  7. // Copyright (c) 1998 Microsoft Corporation. All rights reserved.
  8. //
  9. // @doc
  10. // @header SWFORCE.H | Global includes and definitions for force feedback driver interface
  11. //**************************************************************************
  12. #ifndef __SWFORCE_H__
  13. #define __SWFORCE_H__
  14. #ifdef SAITEK
  15. #define SWFORCE_NAME "SAIFORCE"
  16. #else
  17. #define SWFORCE_NAME "SWFORCE"
  18. #endif
  19. //---------------------------------------------------------------------------
  20. // Types
  21. //---------------------------------------------------------------------------
  22. typedef struct
  23. {
  24. #pragma pack(1)
  25. ULONG cBytes;
  26. LONG dwXVel;
  27. LONG dwYVel;
  28. LONG dwXAccel;
  29. LONG dwYAccel;
  30. ULONG dwEffect;
  31. ULONG dwDeviceStatus;
  32. #pragma pack()
  33. } JOYCHANNELSTATUS, *PJOYCHANNELSTATUS;
  34. typedef struct
  35. {
  36. #pragma pack(1)
  37. ULONG cBytes;
  38. ULONG dwProductID;
  39. ULONG dwFWVersion;
  40. #pragma pack()
  41. } PRODUCT_ID, *PPRODUCT_ID;
  42. //---------------------------------------------------------------------------
  43. // IOCTLs
  44. //---------------------------------------------------------------------------
  45. #define IOCTL_GET_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
  46. // dwIoControlCode = IOCTL_GET_VERSION
  47. // lpvInBuffer = NULL
  48. // cbInBuffer = 0
  49. // lpvOutBuffer = PULONG (HIWORD = Ver. high, LoWord - Ver. Low)
  50. // cbOutBuffer = sizeof(ULONG)
  51. // lpcbBytesReturned = Bytes returned based on result
  52. #define IOCTL_SWFORCE_GETSTATUS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)
  53. // dwIoControlCode = IOCTL_SWFORCE_GETSTATUS
  54. // lpvInBuffer = PJOYCHANNELSTATUS
  55. // cbInBuffer = sizeof(JOYCHANNELSTATUS)
  56. // lpvOutBuffer = PJOYCHANNELSTATUS
  57. // cbOutBuffer = sizeof(JOYCHANNELSTATUS)
  58. // lpcbBytesReturned = Bytes returned based on result
  59. #define IOCTL_SWFORCE_GETID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)
  60. // dwIoControlCode = IOCTL_SWFORCE_GETID
  61. // lpvInBuffer = PPRODUCT_ID
  62. // cbInBuffer = sizeof(PRODUCT_ID)
  63. // lpvOutBuffer = PPRODUCT_ID
  64. // cbOutBuffer = sizeof(PRODUCT_ID)
  65. // lpcbBytesReturned = Bytes returned based on result
  66. #define IOCTL_SWFORCE_GETACKNACK CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)
  67. // dwIoControlCode = IOCTL_SWFORCE_GETACKNAK
  68. // lpvInBuffer = PULONG
  69. // cbInBuffer = sizeof(ULONG)
  70. // lpvOutBuffer = PULONG
  71. // cbOutBuffer = sizeof(ULONG)
  72. // lpcbBytesReturned = Bytes returned based on result
  73. #define IOCTL_SWFORCE_GETSYNC CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)
  74. // dwIoControlCode = IOCTL_SWFORCE_GETSYNC
  75. // lpvInBuffer = PULONG
  76. // cbInBuffer = sizeof(ULONG)
  77. // lpvOutBuffer = PULONG
  78. // cbOutBuffer = sizeof(ULONG)
  79. // lpcbBytesReturned = Bytes returned based on result
  80. #define IOCTL_SWFORCE_GETNACKACK CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)
  81. // dwIoControlCode = IOCTL_SWFORCE_GETNACKACK
  82. // lpvInBuffer = PULONG
  83. // cbInBuffer = sizeof(ULONG)
  84. // lpvOutBuffer = PULONG
  85. // cbOutBuffer = sizeof(ULONG)
  86. // lpcbBytesReturned = Bytes returned based on result
  87. #define IOCTL_SWFORCE_SETPORT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS)
  88. // dwIoControlCode = IOCTL_SWFORCE_SETPORT
  89. // lpvInBuffer = PULONG
  90. // cbInBuffer = sizeof(ULONG)
  91. // lpvOutBuffer = PULONG
  92. // cbOutBuffer = sizeof(ULONG)
  93. // lpcbBytesReturned = Bytes returned based on result
  94. #define IOCTL_SWFORCE_SENDDATA CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS)
  95. // dwIoControlCode = IOCTL_SWFORCE_SENDDATA
  96. // lpvInBuffer = PUCHAR
  97. // cbInBuffer = Bytes to send
  98. // lpvOutBuffer = PUCHAR
  99. // cbOutBuffer = Bytes to send
  100. // lpcbBytesReturned = Bytes sent
  101. #define IOCTL_SWFORCE_RESET CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)
  102. // dwIoControlCode = IOCTL_SWFORCE_RESET
  103. // lpvInBuffer = NULL
  104. // cbInBuffer = 0
  105. // lpvOutBuffer = LPDWORD
  106. // cbOutBuffer = sizeof(DWORD)
  107. // lpcbBytesReturned = Bytes returned based on result
  108. #endif //__SWFORCE_H__