Source code of Windows XP (NT5)
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.

225 lines
6.4 KiB

  1. ; %OUT IOCTL.INC...
  2. ; THESE ARE ALL THE IMPORTANT STRUCTURES AND EQUATES FOR IOCTL
  3. ;==============================================================================
  4. ;REVISION HISTORY:
  5. ;AN000 - New for DOS Version 4.00 - J.K.
  6. ;AC000 - Changed for DOS Version 4.00 - J.K.
  7. ;AN00x - PTM number for DOS Version 4.00 - J.K.
  8. ;==============================================================================
  9. ;AN001; D241 Provide support of Multi-track Format/Verify 9/23/87 J.K.
  10. ;AN002; P1535 Unformatted hard file problem 10/15/87 J.K.
  11. ;AN003; D490 IOCTL subfunction 63h,43h,64h,44h conflicts with OS2 2/26/88 J.K.
  12. ;==============================================================================
  13. ;*** J.K.
  14. ;General Guide -
  15. ;Category Code:
  16. ; 0... .... DOS Defined
  17. ; 1... .... User defined
  18. ; .xxx xxxx Code
  19. ;Function Code:
  20. ; 0... .... Return error if unsupported
  21. ; 1... .... Ignore if unsupported
  22. ; .0.. .... Intercepted by DOS
  23. ; .1.. .... Passed to driver
  24. ; ..0. .... Sends data/commands to device
  25. ; ..1. .... Quries data/info from device
  26. ; ...x .... Subfunction
  27. ;
  28. ; Note that "Sends/queries" data bit is intended only to regularize the
  29. ; function set. It plays no critical role; some functions may contain both
  30. ; command and query elements. The convention is that such commands are
  31. ; defined as "sends data".
  32. ;*****************************;*
  33. ; BLOCK DRIVERS ;*
  34. ;*****************************;*
  35. ; IOCTL SUB-FUNCTIONS
  36. IOCTL_GET_DEVICE_INFO EQU 0
  37. IOCTL_SET_DEVICE_INFO EQU 1
  38. IOCTL_READ_HANDLE EQU 2
  39. IOCTL_WRITE_HANDLE EQU 3
  40. IOCTL_READ_DRIVE EQU 4
  41. IOCTL_WRITE_DRIVE EQU 5
  42. IOCTL_GET_INPUT_STATUS EQU 6
  43. IOCTL_GET_OUTPUT_STATUS EQU 7
  44. IOCTL_CHANGEABLE? EQU 8
  45. IOCTL_DeviceLocOrRem? EQU 9
  46. IOCTL_HandleLocOrRem? EQU 0Ah ;10
  47. IOCTL_SHARING_RETRY EQU 0Bh ;11
  48. GENERIC_IOCTL_HANDLE EQU 0Ch ;12
  49. GENERIC_IOCTL EQU 0Dh ;13
  50. IOCTL_GET_DRIVE_MAP EQU 0Eh ;14
  51. IOCTL_SET_DRIVE_MAP EQU 0Fh ;15
  52. IOCTL_QUERY_HANDLE EQU 10h ;16
  53. IOCTL_QUERY_BLOCK EQU 11h ;17
  54. ; GENERIC IOCTL CATEGORY CODES
  55. IOC_OTHER EQU 0 ; Other device control J.K. 4/29/86
  56. IOC_SE EQU 1 ; SERIAL DEVICE CONTROL
  57. IOC_TC EQU 2 ; TERMINAL CONTROL
  58. IOC_SC EQU 3 ; SCREEN CONTROL
  59. IOC_KC EQU 4 ; KEYBOARD CONTROL
  60. IOC_PC EQU 5 ; PRINTER CONTROL
  61. IOC_DC EQU 8 ; DISK CONTROL (SAME AS RAWIO)
  62. ; GENERIC IOCTL SUB-FUNCTIONS
  63. RAWIO EQU 8
  64. ; RAWIO SUB-FUNCTIONS
  65. GET_DEVICE_PARAMETERS EQU 60H
  66. SET_DEVICE_PARAMETERS EQU 40H
  67. READ_TRACK EQU 61H
  68. WRITE_TRACK EQU 41H
  69. VERIFY_TRACK EQU 62H
  70. FORMAT_TRACK EQU 42H
  71. GET_MEDIA_ID EQU 66h ;AN000;AN003;changed from 63h
  72. SET_MEDIA_ID EQU 46h ;AN000;AN003;changed from 43h
  73. GET_ACCESS_FLAG EQU 67h ;AN002;AN003;Unpublished function.Changed from 64h
  74. SET_ACCESS_FLAG EQU 47h ;AN002;AN003;Unpublished function.Changed from 44h
  75. SENSE_MEDIA_TYPE EQU 68H ;Added for 5.00
  76. ; SPECIAL FUNCTION FOR GET DEVICE PARAMETERS
  77. BUILD_DEVICE_BPB EQU 000000001B
  78. ; SPECIAL FUNCTIONS FOR SET DEVICE PARAMETERS
  79. INSTALL_FAKE_BPB EQU 000000001B
  80. ONLY_SET_TRACKLAYOUT EQU 000000010B
  81. TRACKLAYOUT_IS_GOOD EQU 000000100B
  82. ; SPECIAL FUNCTION FOR FORMAT TRACK
  83. STATUS_FOR_FORMAT EQU 000000001B
  84. DO_FAST_FORMAT equ 000000010B ;AN001;
  85. ; CODES RETURNED FROM FORMAT STATUS CALL
  86. FORMAT_NO_ROM_SUPPORT EQU 000000001B
  87. FORMAT_COMB_NOT_SUPPORTED EQU 000000010B
  88. ; DEVICETYPE VALUES
  89. MAX_SECTORS_IN_TRACK EQU 63 ; MAXIMUM SECTORS ON A DISK.(Was 40 in DOS 3.2)
  90. DEV_5INCH EQU 0
  91. DEV_5INCH96TPI EQU 1
  92. DEV_3INCH720KB EQU 2
  93. DEV_8INCHSS EQU 3
  94. DEV_8INCHDS EQU 4
  95. DEV_HARDDISK EQU 5
  96. DEV_OTHER EQU 7
  97. DEV_3INCH1440KB EQU 7
  98. DEV_3INCH2880KB EQU 9
  99. MAX_DEV_TYPE EQU 9 ; MAXIMUM DEVICE TYPE THAT WE
  100. ; CURRENTLY SUPPORT.
  101. A_SECTORTABLE STRUC
  102. ST_SECTORNUMBER DW ?
  103. ST_SECTORSIZE DW ?
  104. A_SECTORTABLE ENDS
  105. ifndef NEC_98
  106. ;A_DEVICEPARAMETERS STRUC
  107. ;DP_SPECIALFUNCTIONS DB ?
  108. ;DP_DEVICETYPE DB ?
  109. ;DP_DEVICEATTRIBUTES DW ?
  110. ;DP_CYLINDERS DW ?
  111. ;DP_MEDIATYPE DB ?
  112. ;DP_BPB DB SIZE A_BPB DUP (?)
  113. ;DP_TRACKTABLEENTRIES DW ?
  114. ;DP_SECTORTABLE DB MAX_SECTORS_IN_TRACK * SIZE A_SECTORTABLE DUP (?)
  115. ;A_DEVICEPARAMETERS ENDS
  116. else ;NEC_98
  117. A_DEVICEPARAMETERS STRUC
  118. DP_SPECIALFUNCTIONS DB ?
  119. DP_DEVICETYPE DB ?
  120. DP_DEVICEATTRIBUTES DW ?
  121. DP_CYLINDERS DW ?
  122. DP_MEDIATYPE DB ?
  123. DP_BPB DB SIZE A_BPB DUP (?)
  124. DP_TRACKTABLEENTRIES DW ?
  125. DP_SECTORTABLE DB MAX_SECTORS_IN_TRACK * SIZE A_SECTORTABLE DUP (?)
  126. A_DEVICEPARAMETERS ENDS
  127. endif ;NEC_98
  128. ;A_TRACKREADWRITEPACKET STRUC
  129. ;TRWP_SPECIALFUNCTIONS DB ?
  130. ;TRWP_HEAD DW ?
  131. ;TRWP_CYLINDER DW ?
  132. ;TRWP_FIRSTSECTOR DW ?
  133. ;TRWP_SECTORSTOREADWRITE DW ?
  134. ;TRWP_TRANSFERADDRESS DD ?
  135. ;A_TRACKREADWRITEPACKET ENDS
  136. ;AN001; - FP_TRACKCOUNT is only meaningful when FP_SPECIALFUNCTIONS bit 1 = 1.
  137. A_FORMATPACKET STRUC
  138. FP_SPECIALFUNCTIONS DB ?
  139. FP_HEAD DW ?
  140. FP_CYLINDER DW ?
  141. FP_TRACKCOUNT DW 1
  142. A_FORMATPACKET ENDS
  143. A_VERIFYPACKET STRUC
  144. VP_SPECIALFUNCTIONS DB ?
  145. VP_HEAD DW ?
  146. VP_CYLINDER DW ?
  147. A_VERIFYPACKET ENDS
  148. A_MEDIA_ID_INFO STRUC
  149. MI_LEVEL DW 0 ;J.K. 87 Info. level
  150. MI_SERIAL DD ? ;J.K. 87 Serial #
  151. MI_LABEL DB 11 DUP (' ') ;J.K. 87 volume label
  152. MI_SYSTEM DB 8 DUP (' ') ;J.K. 87 File system type
  153. A_MEDIA_ID_INFO ENDS
  154. A_DISKACCESS_CONTROL STRUC ;AN002; Unpublished function. Only for Hard file.
  155. DAC_SPECIALFUNCTIONS DB 0 ;AN002; Always 0
  156. DAC_ACCESS_FLAG DB 0 ;AN002; Non Zero - allow disk I/O to unformatted hard file
  157. A_DISKACCESS_CONTROL ENDS ;AN002; 0 - Disallow disk I/O to unformatted hard file
  158. A_MEDIA_SENSE STRUC ; Media sense structure added 5.00
  159. MS_ISDEFAULT DB ? ; If 1 type returned is drv default
  160. MS_DEVICETYPE DB ? ; Drive type
  161. MS_RESERVED1 DB ? ; RESERVED
  162. MS_RESERVED2 DB ? ; RESERVED
  163. A_MEDIA_SENSE ENDS
  164. ;********************************;*
  165. ; CHARACTER DEVICES (PRINTERS) ;*
  166. ;********************************;*
  167. ;RAWIO SUB-FUNCTIONS
  168. GET_RETRY_COUNT EQU 65H
  169. SET_RETRY_COUNT EQU 45H
  170. A_RETRYCOUNT STRUC
  171. RC_COUNT DW ?
  172. A_RETRYCOUNT ENDS
  173. ;********************************;* ;J.K. 4/29/86
  174. ; CHARACTER DEVICES (SCREEN) ;*
  175. ;********************************;* ;J.K. 4/29/86
  176. ;
  177. ;SC_MODE_INFO struc
  178. ;SC_INFO_LENGTH DW 9
  179. ;SC_MODE DB 0
  180. ;SC_COLORS DW 0
  181. ;SC_WIDTH DW 0
  182. ;SC_LENGTH DW 0
  183. ;SC_MODE_INFO ends
  184. ;
  185. ;SC_INFO_PACKET_LENGTH EQU 9 ;LENGTH OF THE INFO PACKET.
  186. ;SUBFUNCTIONS FOR CON$GENIOCTL
  187. ;GET_SC_MODE EQU 60h
  188. ;SET_SC_MODE EQU 40h
  189. ;The following subfunctions are reserved for installable CODE PAGE switch
  190. ;console devices. - J.K. 4/29/86
  191. ;Get_active_codepage equ 6Ah
  192. ;Invoke_active_codepage equ 4Ah
  193. ;Start_designate_codepage equ 4Ch
  194. ;End_designate_codepage equ 4Dh
  195. ;Get_list_of_designated_codepage equ 6Bh
  196. ;J.K. 4/29/86 *** End of Con$genioctl equates & structures
  197.