home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / BSEDEV.H < prev    next >
Text File  |  1995-04-14  |  27KB  |  772 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)bsedev.h   6.4 91/11/07";*/
  14. /*static char *SCCSID = "@(#)bsedev.h   6.4 91/11/07";*/
  15. /**************************************************************************\
  16. *
  17. * Module Name: BSEDEV.H
  18. *
  19. * OS/2 Structures and constants for use with DosDevIOCtl
  20. *
  21. *
  22. \**************************************************************************/
  23.  
  24. #define BSEDEV_INCLUDED
  25.  
  26. /* Input and Output Control Categories */
  27.  
  28. #define IOCTL_ASYNC                        0x0001
  29. #define IOCTL_SCR_AND_PTRDRAW              0x0003
  30. #define IOCTL_KEYBOARD                     0x0004
  31. #define IOCTL_PRINTER                      0x0005
  32. #define IOCTL_LIGHTPEN                     0x0006
  33. #define IOCTL_POINTINGDEVICE               0x0007
  34. #define IOCTL_DISK                         0x0008
  35. #define IOCTL_PHYSICALDISK                 0x0009
  36. #define IOCTL_MONITOR                      0x000A
  37. #define IOCTL_GENERAL                      0x000B
  38. #define IOCTL_POWER                        0x000C
  39. #define IOCTL_OEMHLP                       0x0080
  40. #define IOCTL_TESTCFG_SYS                  0x0080
  41. #define IOCTL_CDROMDISK                    0x0080
  42. #define IOCTL_CDROMAUDIO                   0x0081
  43. #define IOCTL_TOUCH_DEVDEP                 0x0081
  44. #define IOCTL_TOUCH_DEVINDEP               0x0081
  45.  
  46. /* Serial-Device Control */
  47.  
  48. #define ASYNC_SETBAUDRATE                  0x0041
  49. #define ASYNC_SETLINECTRL                  0x0042
  50. #define ASYNC_EXTSETBAUDRATE               0x0043
  51. #define ASYNC_TRANSMITIMM                  0x0044
  52. #define ASYNC_SETBREAKOFF                  0x0045
  53. #define ASYNC_SETMODEMCTRL                 0x0046
  54. #define ASYNC_SETBREAKON                   0x004B
  55. #define ASYNC_STOPTRANSMIT                 0x0047
  56. #define ASYNC_STARTTRANSMIT                0x0048
  57. #define ASYNC_SETDCBINFO                   0x0053
  58. #define ASYNC_SETENHANCEDMODEPARMS         0x0054
  59. #define ASYNC_GETBAUDRATE                  0x0061
  60. #define ASYNC_GETLINECTRL                  0x0062
  61. #define ASYNC_EXTGETBAUDRATE               0X0063
  62. #define ASYNC_GETCOMMSTATUS                0x0064
  63. #define ASYNC_GETLINESTATUS                0x0065
  64. #define ASYNC_GETMODEMOUTPUT               0x0066
  65. #define ASYNC_GETMODEMINPUT                0x0067
  66. #define ASYNC_GETINQUECOUNT                0x0068
  67. #define ASYNC_GETOUTQUECOUNT               0x0069
  68. #define ASYNC_GETCOMMERROR                 0x006D
  69. #define ASYNC_GETCOMMEVENT                 0x0072
  70. #define ASYNC_GETDCBINFO                   0x0073
  71. #define ASYNC_GETENHANCEDMODEPARMS         0x0074
  72.  
  73. /* Screen/Pointer-Draw Control */
  74.  
  75. #define SCR_ALLOCLDT                       0x0070
  76. #define SCR_DEALLOCLDT                     0x0071
  77. #define PTR_GETPTRDRAWADDRESS              0x0072
  78. #define VID_INITCALLVECTOR                 0X0073
  79. #define SCR_ABIOSPASSTHRU                  0X0074
  80. #define SCR_ALLOCLDTOFF                    0x0075
  81. #define SCR_ALLOCLDTBGVAL                  0X0076
  82. #define SCR_ALLOCVIDEOBUFFER               0X007E
  83. #define SCR_GETROMFONTADDR                 0X007F
  84.  
  85. /* Keyboard Control */
  86.  
  87. #define KBD_SETTRANSTABLE                  0x0050
  88. #define KBD_SETINPUTMODE                   0x0051
  89. #define KBD_SETINTERIMFLAG                 0x0052
  90. #define KBD_SETSHIFTSTATE                  0x0053
  91. #define KBD_SETTYPAMATICRATE               0x0054
  92. #define KBD_SETFGNDSCREENGRP               0x0055
  93. #define KBD_SETSESMGRHOTKEY                0x0056
  94. #define KBD_SETFOCUS                       0x0057
  95. #define KBD_SETKCB                         0x0058
  96. #define KBD_SETREADNOTIFICATION            0X0059
  97. #define KBD_ALTERKBDLED                    0X005A
  98. #define KBD_SETNLS                         0x005C
  99. #define KBD_CREATE                         0x005D
  100. #define KBD_DESTROY                        0x005E
  101. #define KBD_GETINPUTMODE                   0x0071
  102. #define KBD_GETINTERIMFLAG                 0x0072
  103. #define KBD_GETSHIFTSTATE                  0x0073
  104. #define KBD_READCHAR                       0x0074
  105. #define KBD_PEEKCHAR                       0x0075
  106. #define KBD_GETSESMGRHOTKEY                0x0076
  107. #define KBD_GETKEYBDTYPE                   0x0077
  108. #define KBD_GETCODEPAGEID                  0x0078
  109. #define KBD_XLATESCAN                      0x0079
  110. #define KBD_QUERYKBDHARDWAREID             0X007A
  111. #define KBD_QUERYKBDCODEPAGESUPPORT        0X007B
  112.  
  113. /* Printer Control */
  114.  
  115. #define PRT_QUERYJOBHANDLE                 0x0021
  116. #define PRT_SETFRAMECTL                    0x0042
  117. #define PRT_SETINFINITERETRY               0x0044
  118. #define PRT_INITPRINTER                    0x0046
  119. #define PRT_ACTIVATEFONT                   0x0048
  120. #define PRT_SETPRINTJOBTITLE               0X004D
  121. #define PRT_SETIRQTIMEOUT                  0X004E
  122. #define PRT_GETFRAMECTL                    0x0062
  123. #define PRT_GETINFINITERETRY               0x0064
  124. #define PRT_GETPRINTERSTATUS               0x0066
  125. #define PRT_QUERYACTIVEFONT                0x0069
  126. #define PRT_VERIFYFONT                     0x006A
  127. #define PRT_QUERYIRQTIMEOUT                0X006E
  128.  
  129. /* Pointing-Device (Mouse) Control */
  130.  
  131. #define MOU_ALLOWPTRDRAW                   0x0050
  132. #define MOU_UPDATEDISPLAYMODE              0x0051
  133. #define MOU_SCREENSWITCH                   0x0052
  134. #define MOU_SETSCALEFACTORS                0x0053
  135. #define MOU_SETEVENTMASK                   0x0054
  136. #define MOU_SETHOTKEYBUTTON                0x0055
  137. #define MOU_REASSIGNTHRESHOLDVALUES        0X0055
  138. #define MOU_SETPTRSHAPE                    0x0056
  139. #define MOU_DRAWPTR                        0x0057
  140. #define MOU_UNMARKCOLLISIONAREA            0X0057
  141. #define MOU_REMOVEPTR                      0x0058
  142. #define MOU_MARKCOLLISIONAREA              0X0058
  143. #define MOU_SETPTRPOS                      0x0059
  144. #define MOU_SETPROTDRAWADDRESS             0x005A
  145. #define MOU_SETREALDRAWADDRESS             0x005B
  146. #define MOU_SETMOUSTATUS                   0x005C
  147. #define MOU_DISPLAYMODECHANGE              0x005D
  148. #define MOU_GETBUTTONCOUNT                 0x0060
  149. #define MOU_GETMICKEYCOUNT                 0x0061
  150. #define MOU_GETMOUSTATUS                   0x0062
  151. #define MOU_READEVENTQUE                   0x0063
  152. #define MOU_GETQUESTATUS                   0x0064
  153. #define MOU_GETEVENTMASK                   0x0065
  154. #define MOU_GETSCALEFACTORS                0x0066
  155. #define MOU_GETPTRPOS                      0x0067
  156. #define MOU_GETPTRSHAPE                    0x0068
  157. #define MOU_GETHOTKEYBUTTON                0x0069
  158. #define MOU_QUERYTHRESHOLDVALUES           0x0069
  159. #define MOU_VER                            0x006A
  160. #define MOU_QUERYPOINTERID                 0X006B
  161.  
  162. /* Disk/Diskette Control */
  163.  
  164. #define DSK_LOCKDRIVE                      0x0000
  165. #define DSK_UNLOCKDRIVE                    0x0001
  166. #define DSK_REDETERMINEMEDIA               0x0002
  167. #define DSK_SETLOGICALMAP                  0x0003
  168. #define DSK_BEGINFORMAT                    0X0004
  169. #define DSK_BLOCKREMOVABLE                 0x0020
  170. #define DSK_GETLOGICALMAP                  0x0021
  171. #define DSK_UNLOCKEJECTMEDIA               0X0040
  172. #define DSK_SETDEVICEPARAMS                0x0043
  173. #define DSK_WRITETRACK                     0x0044
  174. #define DSK_FORMATVERIFY                   0x0045
  175. #define DSK_DISKETTECONTROL                0X005D
  176. #define DSK_QUERYMEDIASENSE                0X0060
  177. #define DSK_GETDEVICEPARAMS                0x0063
  178. #define DSK_READTRACK                      0x0064
  179. #define DSK_VERIFYTRACK                    0x0065
  180. #define DSK_GETLOCKSTATUS                  0X0066
  181.  
  182. /* Physical-Disk Control */
  183.  
  184. #define PDSK_LOCKPHYSDRIVE                 0x0000
  185. #define PDSK_UNLOCKPHYSDRIVE               0x0001
  186. #define PDSK_WRITEPHYSTRACK                0x0044
  187. #define PDSK_GETPHYSDEVICEPARAMS           0x0063
  188. #define PDSK_READPHYSTRACK                 0x0064
  189. #define PDSK_VERIFYPHYSTRACK               0x0065
  190.  
  191. /* Character-Monitor Control */
  192. #define MON_REGISTERMONITOR                0x0040
  193.  
  194. /* General Device Control */
  195.  
  196. #define DEV_FLUSHINPUT                     0x0001
  197. #define DEV_FLUSHOUTPUT                    0x0002
  198. #define DEV_SYSTEMNOTIFYPDD                0X0041
  199. #define DEV_QUERYMONSUPPORT                0x0060
  200.  
  201. /* Advanced Power Management */
  202.  
  203. #define POWER_SENDPOWEREVENT               0X0040
  204. #define POWER_SETPOWEREVENTRES             0X0041
  205. #define POWER_GETPOWERSTATUS               0X0060
  206. #define POWER_GETPOWEREVENT                0X0061
  207. #define POWER_GETPOWERINFO                 0X0062
  208.  
  209. /* OEMHlp */
  210.  
  211. #define OEMHLP_GETOEMADAPTIONINFO          0X0000
  212. #define OEMHLP_GETMACHINEINFO              0X0001
  213. #define OEMHLP_GETDISPLAYCOMBCODE          0X0002
  214. #define OEMHLP_GETVIDEOFONTS               0X0003
  215. #define OEMHLP_READEISACONFIGINFO          0X0004
  216. #define OEMHLP_GETROMBIOSINFO              0X0005
  217. #define OEMHLP_GETMISCVIDEOINFO            0X0006
  218. #define OEMHLP_GETVIDEOADAPTER             0X0007
  219. #define OEMHLP_GETSVGAINFO                 0X0008
  220. #define OEMHLP_GETMEMINFO                  0X0009
  221. #define OEMHLP_GETDMQSINFO                 0X000A
  222. #define OEMHLP_PCI                         0x000B
  223.  
  224.  /* Test System Config */
  225.  
  226. #define TESTCFG_SYS_GETBIOSADAPTER         0x0040
  227. #define TESTCFG_SYS_ISSUEINIOINSTR         0x0041
  228. #define TESTCFG_SYS_ISSUEOUTIOINSTR        0x0042
  229. #define TESTCFG_SYS_GETBUSARCH             0x0060
  230. #define TESTCFG_SYS_GETALLPOSIDS           0x0061
  231. #define TESTCFG_SYS_GETALLEISAIDS          0x0062
  232.  
  233. /* CDROM Drive and Disk */
  234.  
  235. #define CDROMDISK_RESETDRIVE               0X0040
  236. #define CDROMDISK_EJECTDISK                0X0044
  237. #define CDROMDISK_LOCKUNLOCKDOOR           0X0046
  238. #define CDROMDISK_SEEK                     0X0050
  239. #define CDROMDISK_DEVICESTATUS             0X0060
  240. #define CDROMDISK_GETDRIVER                0X0061
  241. #define CDROMDISK_GETSECTORSIZE            0X0063
  242. #define CDROMDISK_GETHEADLOC               0X0070
  243. #define CDROMDISK_READLONG                 0X0072
  244. #define CDROMDISK_GETVOLUMESIZE            0X0078
  245. #define CDROMDISK_GETUPC                   0X0079
  246.  
  247. /* CDROM Audio */
  248.  
  249. #define CDROMAUDIO_SETCHANNELCTRL          0X0040
  250. #define CDROMAUDIO_PLAYAUDIO               0X0050
  251. #define CDROMAUDIO_STOPAUDIO               0X0051
  252. #define CDROMAUDIO_RESUMEAUDIO             0X0052
  253. #define CDROMAUDIO_GETCHANNEL              0X0060
  254. #define CDROMAUDIO_GETAUDIODISK            0X0061
  255. #define CDROMAUDIO_GETAUDIOTRACK           0X0062
  256. #define CDROMAUDIO_GETSUBCHANNELQ          0X0063
  257. #define CDROMAUDIO_GETAUDIOSTATUS          0X0065
  258.  
  259. /* Touch device-dependent IOCtls */
  260.  
  261. #define TOUCH_DEVDEP_SETCALIBCONST         0X0052
  262. #define TOUCH_DEVDEP_READDATA              0X0053
  263. #define TOUCH_DEVDEP_SETDATAMODE           0X0054
  264. #define TOUCH_DEVDEP_SETCLICKLOCK          0X0055
  265. #define TOUCH_DEVDEP_SETTOUCHTHRESHOLD     0X0056
  266. #define TOUCH_DEVDEP_SETEMULXY             0X0057
  267. #define TOUCH_DEVDEP_SETDATAREPORTRATE     0X0058
  268. #define TOUCH_DEVDEP_SETLOWPASSFILTER      0X0059
  269. #define TOUCH_DEVDEP_WRITEMEMLOC           0X005A
  270. #define TOUCH_DEVDEP_GETCALIBCONST         0X0060
  271. #define TOUCH_DEVDEP_GETDATAMODE           0X0061
  272. #define TOUCH_DEVDEP_GETCLICKLOCK          0X0062
  273. #define TOUCH_DEVDEP_GETTOUCHTHRESHOLD     0X0063
  274. #define TOUCH_DEVDEP_GETEMULXY             0X0064
  275. #define TOUCH_DEVDEP_GETDATAREPORTRATE     0X0065
  276. #define TOUCH_DEVDEP_GETLOWPASSFILTER      0X0066
  277. #define TOUCH_DEVDEP_READMEMLOC            0X0067
  278.  
  279. /* Touch device-INdependent IOCtls */
  280.  
  281. #define TOUCH_DEVINDEP_SETCOORDSYS         0X0050
  282. #define TOUCH_DEVINDEP_SETSELECTMECH       0X0052
  283. #define TOUCH_DEVINDEP_SETEVENTMASK        0X0053
  284. #define TOUCH_DEVINDEP_SETQUEUESIZE        0X0054
  285. #define TOUCH_DEVINDEP_SETEMULSTATE        0X0055
  286. #define TOUCH_DEVINDEP_GETCOORDSYS         0X0060
  287. #define TOUCH_DEVINDEP_GETSELECTMECH       0X0062
  288. #define TOUCH_DEVINDEP_GETEVENTMASK        0X0063
  289. #define TOUCH_DEVINDEP_GETQUEUESIZE        0X0064
  290. #define TOUCH_DEVINDEP_GETEMULSTATE        0X0065
  291. #define TOUCH_DEVINDEP_GETREADEVENTQUEUE   0X0066
  292.  
  293. /* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON,
  294.  * ASYNC_SETMODEMCTRL
  295.  */
  296.  
  297. #define RX_QUE_OVERRUN                     0x0001
  298. #define RX_HARDWARE_OVERRUN                0x0002
  299. #define PARITY_ERROR                       0x0004
  300. #define FRAMING_ERROR                      0x0008
  301.  
  302. /* ASYNC_GETCOMMEVENT */
  303.  
  304. #define CHAR_RECEIVED                      0x0001
  305. #define LAST_CHAR_SENT                     0x0004
  306. #define CTS_CHANGED                        0x0008
  307. #define DSR_CHANGED                        0x0010
  308. #define DCD_CHANGED                        0x0020
  309. #define BREAK_DETECTED                     0x0040
  310. #define ERROR_OCCURRED                     0x0080
  311. #define RI_DETECTED                        0x0100
  312.  
  313. /* ASYNC_GETCOMMSTATUS */
  314.  
  315. #define TX_WAITING_FOR_CTS                 0x0001
  316. #define TX_WAITING_FOR_DSR                 0x0002
  317. #define TX_WAITING_FOR_DCD                 0x0004
  318. #define TX_WAITING_FOR_XON                 0x0008
  319. #define TX_WAITING_TO_SEND_XON             0x0010
  320. #define TX_WAITING_WHILE_BREAK_ON          0x0020
  321. #define TX_WAITING_TO_SEND_IMM             0x0040
  322. #define RX_WAITING_FOR_DSR                 0x0080
  323.  
  324. /* ASYNC_GETLINESTATUS */
  325.  
  326. #define WRITE_REQUEST_QUEUED               0x0001
  327. #define DATA_IN_TX_QUE                     0x0002
  328. #define HARDWARE_TRANSMITTING              0x0004
  329. #define CHAR_READY_TO_SEND_IMM             0x0008
  330. #define WAITING_TO_SEND_XON                0x0010
  331. #define WAITING_TO_SEND_XOFF               0x0020
  332.  
  333. /* ASYNC_GETMODEMINPUT */
  334.  
  335. #define CTS_ON  0x10
  336. #define DSR_ON  0x20
  337. #define RI_ON   0x40
  338. #define DCD_ON  0x80
  339.  
  340. /* DSK_SETDEVICEPARAMS */
  341.  
  342. #define BUILD_BPB_FROM_MEDIUM   0x00
  343. #define REPLACE_BPB_FOR_DEVICE  0x01
  344. #define REPLACE_BPB_FOR_MEDIUM  0x02
  345.  
  346. /* DSK_GETDEVICEPARAMS */
  347.  
  348. #define GET_BPB_FROM_DEVICE   0x00
  349. #define GET_BPB_FROM_MEDIUM   0x01
  350.  
  351. /* KBD_GETINPUTMODE, KBD_PEEKCHAR, KBD_SETINPUTMODE*/
  352.  
  353. #define ASCII_MODE  0x00
  354. #define BINARY_MODE 0x80
  355.  
  356. /* KBD_GETINTERIMFLAG */
  357.  
  358. #define CONVERSION_REQUEST      0x20
  359. #define INTERIM_CHAR            0x80
  360.  
  361. /* KBD_GETSESMGRHOTKEY */
  362.  
  363. #define HOTKEY_MAX_COUNT        0x0000
  364. #define HOTKEY_CURRENT_COUNT    0x0001
  365.  
  366. /* KBD_PEEKCHAR */
  367.  
  368. #define KBD_DATA_RECEIVED       0x0001
  369. #define KBD_DATA_BINARY         0x8000
  370.  
  371. /* KBD_READCHAR */
  372.  
  373. #define KBD_READ_WAIT   0x0000
  374. #define KBD_READ_NOWAIT 0x8000
  375.  
  376. /* KBD_SETINPUTMODE */
  377.  
  378. #define SHIFT_REPORT_MODE  0x01
  379.  
  380. #ifndef INCL_MOU
  381.  
  382. #define MOUSE_MOTION                    0x0001
  383. #define MOUSE_MOTION_WITH_BN1_DOWN      0x0002
  384. #define MOUSE_BN1_DOWN                  0x0004
  385. #define MOUSE_MOTION_WITH_BN2_DOWN      0x0008
  386. #define MOUSE_BN2_DOWN                  0x0010
  387. #define MOUSE_MOTION_WITH_BN3_DOWN      0x0020
  388. #define MOUSE_BN3_DOWN                  0x0040
  389.  
  390. #define MHK_BUTTON1     0x0001
  391. #define MHK_BUTTON2     0x0002
  392. #define MHK_BUTTON3     0x0004
  393.  
  394. #define MOU_NOWAIT      0x0000
  395. #define MOU_WAIT        0x0001
  396.  
  397. #endif /* #ifndef INCL_MOU */
  398.  
  399. /* MOU_GETHOTKEYBUTTON, MOU_SETHOTKEYBUTTON */
  400.  
  401. #define MHK_NO_HOTKEY   0x0000
  402.  
  403. /* MOU_GETMOUSTATUS */
  404.  
  405. #define MOUSE_QUEUEBUSY         0x0001
  406. #define MOUSE_BLOCKREAD         0x0002
  407. #define MOUSE_FLUSH             0x0004
  408. #define MOUSE_UNSUPPORTED_MODE  0x0008
  409. #define MOUSE_DISABLED          0x0100
  410. #define MOUSE_MICKEYS           0x0200
  411.  
  412. /* PRT_GETPRINTERSTATUS */
  413.  
  414. #define PRINTER_TIMEOUT         0x0001
  415. #define PRINTER_IO_ERROR        0x0008
  416. #define PRINTER_SELECTED        0x0010
  417. #define PRINTER_OUT_OF_PAPER    0x0020
  418. #define PRINTER_ACKNOWLEDGED    0x0040
  419. #define PRINTER_NOT_BUSY        0x0080
  420.  
  421. /* fbCtlHndShake */
  422.  
  423. #define MODE_DTR_CONTROL        0x01
  424. #define MODE_DTR_HANDSHAKE      0x02
  425. #define MODE_CTS_HANDSHAKE      0x08
  426. #define MODE_DSR_HANDSHAKE      0x10
  427. #define MODE_DCD_HANDSHAKE      0x20
  428. #define MODE_DSR_SENSITIVITY    0x40
  429.  
  430. /* fbFlowReplace */
  431.  
  432. #define MODE_AUTO_TRANSMIT      0x01
  433. #define MODE_AUTO_RECEIVE       0x02
  434. #define MODE_ERROR_CHAR         0x04
  435. #define MODE_NULL_STRIPPING     0x08
  436. #define MODE_BREAK_CHAR         0x10
  437. #define MODE_RTS_CONTROL        0x40
  438. #define MODE_RTS_HANDSHAKE      0x80
  439. #define MODE_TRANSMIT_TOGGLE    0xC0
  440.  
  441. /* fbTimeout */
  442.  
  443. #define MODE_NO_WRITE_TIMEOUT           0x01
  444. #define MODE_READ_TIMEOUT               0x02
  445. #define MODE_WAIT_READ_TIMEOUT          0x04
  446. #define MODE_NOWAIT_READ_TIMEOUT        0x06
  447.  
  448. typedef struct _DCBINFO {       /* dcbinf */
  449.         USHORT usWriteTimeout;
  450.         USHORT usReadTimeout;
  451.         BYTE   fbCtlHndShake;
  452.         BYTE   fbFlowReplace;
  453.         BYTE   fbTimeout;
  454.         BYTE   bErrorReplacementChar;
  455.         BYTE   bBreakReplacementChar;
  456.         BYTE   bXONChar;
  457.         BYTE   bXOFFChar;
  458. } DCBINFO;
  459. typedef DCBINFO FAR *PDCBINFO;
  460.  
  461. /* XLATOFF */
  462. #pragma pack(1)
  463. /* XLATON */
  464.  
  465. typedef struct _TRACKLAYOUT {   /* trckl */
  466.         BYTE   bCommand;
  467.         USHORT usHead;
  468.         USHORT usCylinder;
  469.         USHORT usFirstSector;
  470.         USHORT cSectors;
  471.         struct {
  472.                 USHORT usSectorNumber;
  473.                 USHORT usSectorSize;
  474.         } TrackTable[1];
  475. } TRACKLAYOUT;
  476. typedef TRACKLAYOUT FAR *PTRACKLAYOUT;
  477.  
  478. /* XLATOFF */
  479. #pragma pack()
  480. /* XLATON */
  481.  
  482. #define DEVTYPE_48TPI   0x0000
  483. #define DEVTYPE_96TPI   0x0001
  484. #define DEVTYPE_35      0x0002
  485. #define DEVTYPE_8SD     0x0003
  486. #define DEVTYPE_8DD     0x0004
  487. #define DEVTYPE_FIXED   0x0005
  488. #define DEVTYPE_TAPE    0x0006
  489. #define DEVTYPE_UNKNOWN 0x0007
  490.  
  491. /* XLATOFF */
  492. #pragma pack(1)
  493. /* XLATON */
  494.  
  495. typedef struct _BIOSPARAMETERBLOCK {    /* bspblk */
  496.         USHORT usBytesPerSector;
  497.         BYTE   bSectorsPerCluster;
  498.         USHORT usReservedSectors;
  499.         BYTE   cFATs;
  500.         USHORT cRootEntries;
  501.         USHORT cSectors;
  502.         BYTE   bMedia;
  503.         USHORT usSectorsPerFAT;
  504.         USHORT usSectorsPerTrack;
  505.         USHORT cHeads;
  506.         ULONG  cHiddenSectors;
  507.         ULONG  cLargeSectors;
  508.         BYTE   abReserved[6];
  509.         USHORT cCylinders;
  510.         BYTE   bDeviceType;
  511.         USHORT fsDeviceAttr;
  512. } BIOSPARAMETERBLOCK;
  513. typedef BIOSPARAMETERBLOCK FAR *PBIOSPARAMETERBLOCK;
  514.  
  515. /* XLATOFF */
  516. #pragma pack()
  517. /* XLATON */
  518.  
  519. typedef struct _SCREENGROUP {   /* scrgrp */
  520.         USHORT idScreenGrp;
  521.         USHORT fTerminate;
  522. } SCREENGROUP;
  523. typedef SCREENGROUP FAR *PSCREENGROUP;
  524.  
  525. typedef struct _FRAME {         /* frm */
  526.         BYTE bCharsPerLine;
  527.         BYTE bLinesPerInch;
  528. } FRAME;
  529. typedef FRAME FAR *PFRAME;
  530.  
  531. typedef struct _KBDTYPE {       /* kbdtyp */
  532.         USHORT usType;
  533.         USHORT reserved1;
  534.         USHORT reserved2;
  535. } KBDTYPE;
  536. typedef KBDTYPE FAR *PKBDTYPE;
  537.  
  538. typedef struct _LINECONTROL {   /* lnctl */
  539.         BYTE bDataBits;
  540.         BYTE bParity;
  541.         BYTE bStopBits;
  542.         BYTE fTransBreak;
  543. } LINECONTROL;
  544. typedef LINECONTROL FAR *PLINECONTROL;
  545.  
  546. /* MODEMSTATUS.fbModemOn, ASYNC_GETMODEMOUTPUT */
  547.  
  548. #define DTR_ON  0x01
  549. #define RTS_ON  0x02
  550.  
  551. /* MODEMSTATUS.fbModemOff */
  552.  
  553. #define DTR_OFF  0xFE
  554. #define RTS_OFF  0xFD
  555.  
  556. typedef struct _MODEMSTATUS {   /* mdmst */
  557.         BYTE fbModemOn;
  558.         BYTE fbModemOff;
  559. } MODEMSTATUS;
  560. typedef MODEMSTATUS FAR *PMODEMSTATUS;
  561.  
  562. /* XLATOFF */
  563. #pragma pack(1)
  564. /* XLATON */
  565.  
  566. typedef struct _TRACKFORMAT {   /* trckfmt */
  567.         BYTE bCommand;
  568.         USHORT usHead;
  569.         USHORT usCylinder;
  570.         USHORT usReserved;
  571.         USHORT cSectors;
  572.         struct {
  573.                 BYTE bCylinder;
  574.                 BYTE bHead;
  575.                 BYTE idSector;
  576.                 BYTE bBytesSector;
  577.         } FormatTable[1];
  578. } TRACKFORMAT;
  579. typedef TRACKFORMAT FAR *PTRACKFORMAT;
  580.  
  581. /* XLATOFF */
  582. #pragma pack()
  583. /* XLATON */
  584.  
  585. typedef struct _RXQUEUE {       /* rxq */
  586.         USHORT cch;
  587.         USHORT cb;
  588. } RXQUEUE;
  589. typedef RXQUEUE FAR *PRXQUEUE;
  590.  
  591. typedef struct _DEVICEPARAMETERBLOCK {  /* dvpblck */
  592.         USHORT reserved1;
  593.         USHORT cCylinders;
  594.         USHORT cHeads;
  595.         USHORT cSectorsPerTrack;
  596.         USHORT reserved2;
  597.         USHORT reserved3;
  598.         USHORT reserved4;
  599.         USHORT reserved5;
  600. } DEVICEPARAMETERBLOCK;
  601. typedef DEVICEPARAMETERBLOCK FAR *PDEVICEPARAMETERBLOCK;
  602.  
  603. /* XLATOFF */
  604. #pragma pack(2)
  605. /* XLATON */
  606.  
  607. typedef struct _PTRDRAWFUNCTION {       /* ptrdfnc */
  608.         USHORT usReturnCode;
  609.         PFN pfnDraw;
  610.         PCH pchDataSeg;
  611. } PTRDRAWFUNCTION;
  612. typedef PTRDRAWFUNCTION FAR *PPTRDRAWFUNCTION;
  613.  
  614. /* XLATOFF */
  615. #pragma pack()
  616. /* XLATON */
  617.  
  618. typedef struct _PTRDRAWADDRESS {        /* ptrdaddr */
  619.         USHORT reserved;
  620.         PTRDRAWFUNCTION ptrdfnc;
  621. } PTRDRAWADDRESS;
  622. typedef PTRDRAWADDRESS FAR *PPTRDRAWADDRESS;
  623.  
  624. typedef struct _SHIFTSTATE {    /* shftst */
  625.         USHORT fsState;
  626.         BYTE   fNLS;
  627. } SHIFTSTATE;
  628. typedef SHIFTSTATE FAR *PSHIFTSTATE;
  629.  
  630. /* HOTKEY.fsHotKey/SHIFTSTATE.fsState */
  631.  
  632. #define RIGHTSHIFT      0x0001
  633. #define LEFTSHIFT       0x0002
  634. #define CONTROL         0x0004
  635. #define ALT             0x0008
  636. #define SCROLLLOCK_ON   0x0010
  637. #define NUMLOCK_ON      0x0020
  638. #define CAPSLOCK_ON     0x0040
  639. #define INSERT_ON       0x0080
  640. #define LEFTCONTROL     0x0100
  641. #define LEFTALT         0x0200
  642. #define RIGHTCONTROL    0x0400
  643. #define RIGHTALT        0x0800
  644. #define SCROLLLOCK      0x1000
  645. #define NUMLOCK         0x2000
  646. #define CAPSLOCK        0x4000
  647. #define SYSREQ          0x8000
  648.  
  649. typedef struct _HOTKEY {        /* htky */
  650.         USHORT fsHotKey;
  651.         UCHAR  uchScancodeMake;
  652.         UCHAR  uchScancodeBreak;
  653.         USHORT idHotKey;
  654. } HOTKEY;
  655. typedef HOTKEY FAR *PHOTKEY;
  656.  
  657. typedef struct _MONITORPOSITION {       /* mnpos */
  658.         USHORT fPosition;
  659.         USHORT index;
  660.         ULONG  pbInBuf;
  661.         USHORT offOutBuf;
  662. } MONITORPOSITION;
  663. typedef MONITORPOSITION FAR *PMONITORPOSITION;
  664.  
  665. typedef struct _RATEDELAY {     /* rtdly */
  666.         USHORT usDelay;
  667.         USHORT usRate;
  668. } RATEDELAY;
  669. typedef RATEDELAY FAR *PRATEDELAY;
  670.  
  671. typedef struct _CODEPAGEINFO {  /* cpi */
  672.         PBYTE pbTransTable;
  673.         USHORT idCodePage;
  674.         USHORT idTable;
  675. } CODEPAGEINFO;
  676. typedef FAR *PCODEPAGEINFO;
  677.  
  678. typedef struct _CPID {  /* cpid */
  679.         USHORT idCodePage;
  680.         USHORT Reserved;
  681. } CPID;
  682. typedef FAR *PCPID;
  683.  
  684. typedef struct _LDTADDRINFO {   /* ldtaddr */
  685.         PULONG pulPhysAddr;
  686.         USHORT cb;
  687. } LDTADDRINFO;
  688. typedef FAR *PLDTADDRINFO;
  689.  
  690. typedef struct _PTRDRAWDATA {   /* ptrdd */
  691.         USHORT cb;
  692.         USHORT usConfig;
  693.         USHORT usFlag;
  694. } PTRDRAWDATA;
  695. typedef FAR *PPTRDRAWDATA;
  696.  
  697. /*
  698.  * SCREENDD IOCTL definitions
  699.  */
  700. #define SCREENDD_GETCURRENTBANK         0x00    /* Get current bank */
  701. #define SCREENDD_SETCURRENTBANK         0x01    /* Set current bank */
  702. #define SCREENDD_SVGA_ID                0x08    /* Get SVGA info IOCTL */
  703. #define SCREENDD_SVGA_OEM               0x09    /* Get OEM info IOCTL */
  704. #define SCREENDD_UPDATEMEMORY           0x0A    /* Update Memory    IOCTl   */
  705. #define SCREENDD_GETLINEARACCESS        0x0B    /* GetLinearAccess  IOCTl   */
  706. #define SCREENDD_GETGLOBALACCESS        0x0C    /* GetGlobalAccess  IOCTl   */
  707. #define SCREENDD_FREEGLOBALACCESS       0x0D    /* FreeGlobalAccess IOCTl   */
  708. #define SCREENDD_REGISTER_RING0_CALLER  0x0E    /* Register VVID as Ring0 PMI caller */
  709. #define SCREENDD_WAIT_ON_RING0_CALLER   0x0F    /* Wait for RING0 caller to register */
  710. #define SCREENDD_CATEGORY               0x80
  711. #define SCREENDD_NAME                   "SCREEN$"
  712.  
  713. #define GETLINEAR_FLAG_MAPPHYSICAL      0x00000010L
  714. #define GETLINEAR_FLAG_MAPPROCESS       0x00000020L
  715. #define GETLINEAR_FLAG_MAPSHARED        0x00000400L
  716. #define GETLINEAR_FLAG_MAPATTACH        0x80000000L
  717.  
  718. #define EGA_BIT         4                /* EGA */
  719. #define VGA_BIT         8                /* VGA */
  720. #define EGAVGA_BIT      (EGA_BIT+VGA_BIT)/* EGA/VGA */
  721.  
  722.                                        /* SCREENDD_GETLINEARACCESS */
  723. typedef struct _GETLINIOCTLDATA {  /* */
  724.         ULONG   PacketLength;
  725.         ULONG   PhysicalAddress;
  726.         ULONG   ApertureSize;
  727.         PBYTE   LinearAddress;
  728.         ULONG   LinearFlags;
  729. } GETLINIOCTLDATA;
  730. typedef GETLINIOCTLDATA *PGETLINIOCTLDATA;
  731.  
  732.                                 /*  SCREENDD_SETCURRENTBANK/GETCURRENTBANK */
  733. typedef struct _BANKINFO {     /* */
  734.         ULONG  ulBankLength;
  735.         USHORT usBank;
  736.         USHORT usVideoModeType;
  737.         USHORT usReadWriteMode;
  738. } BANKINFO;
  739.  
  740. #define READ_BANK    0
  741. #define WRITE_BANK   1
  742. #define MODE_TEXT    0
  743. #define MODE_PLANAR  1
  744. #define MODE_LINEAR  2
  745.  
  746.                                  /* SCREENDD_GETGLOBALACCESS */
  747. typedef struct _GLOBALIOCTLDATA {   /* */
  748.         ULONG   ProcessAddress;
  749.         ULONG   AddressLength;
  750.         ULONG   GlobalAddress;
  751. } GLOBALIOCTLDATA;
  752.                                            /* data packet for SCREENDD_SVGA_ID */
  753. typedef struct _OEMSVGAINFO { /* */
  754.         USHORT AdapterType;
  755.         USHORT ChipType;
  756.         ULONG  Memory;
  757. } OEMSVGAINFO;
  758.                                            /* data packet for SCREENDD_SVGA_OEM */
  759. /* OEM data packet format must contain total length in bytes as its first word. */
  760. /* The rest of it can be in manufacturer/adapter specific format. */
  761.  
  762. typedef struct _OEMINFO {    /* */
  763.         ULONG  OEMLength;
  764.         USHORT Manufacturer;
  765.         ULONG  ManufacturerData;
  766. } OEMINFO;
  767.                                           /* paramter packet for GETGLOBALACCESS */
  768. typedef struct _GETGLOBALPACKET {  /* */
  769.         ULONG   GlobalPktLength;
  770.         GLOBALIOCTLDATA GlobalPktData[1];
  771. } GETGLOBALPACKET;
  772.