home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / H_DBCS / BSEDEV.H next >
Text File  |  1995-04-14  |  17KB  |  572 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.  
  39. /* Serial-Device Control */
  40.  
  41. #define ASYNC_SETBAUDRATE       0x0041
  42. #define ASYNC_SETLINECTRL       0x0042
  43. #define ASYNC_TRANSMITIMM       0x0044
  44. #define ASYNC_SETBREAKOFF       0x0045
  45. #define ASYNC_SETMODEMCTRL      0x0046
  46. #define ASYNC_SETBREAKON        0x004B
  47. #define ASYNC_STOPTRANSMIT      0x0047
  48. #define ASYNC_STARTTRANSMIT     0x0048
  49. #define ASYNC_SETDCBINFO        0x0053
  50. #define ASYNC_GETBAUDRATE       0x0061
  51. #define ASYNC_GETLINECTRL       0x0062
  52. #define ASYNC_GETCOMMSTATUS     0x0064
  53. #define ASYNC_GETLINESTATUS     0x0065
  54. #define ASYNC_GETMODEMOUTPUT    0x0066
  55. #define ASYNC_GETMODEMINPUT     0x0067
  56. #define ASYNC_GETINQUECOUNT     0x0068
  57. #define ASYNC_GETOUTQUECOUNT    0x0069
  58. #define ASYNC_GETCOMMERROR      0x006D
  59. #define ASYNC_GETCOMMEVENT      0x0072
  60. #define ASYNC_GETDCBINFO        0x0073
  61.  
  62. /* Screen/Pointer-Draw Control */
  63.  
  64. #define SCR_ALLOCLDT            0x0070
  65. #define SCR_DEALLOCLDT          0x0071
  66. #define PTR_GETPTRDRAWADDRESS   0x0072
  67. #define SCR_ALLOCLDTOFF         0x0075
  68.  
  69. /* Keyboard Control */
  70.  
  71. #define KBD_SETTRANSTABLE       0x0050
  72. #define KBD_SETINPUTMODE        0x0051
  73. #define KBD_SETINTERIMFLAG      0x0052
  74. #define KBD_SETSHIFTSTATE       0x0053
  75. #define KBD_SETTYPAMATICRATE    0x0054
  76. #define KBD_SETFGNDSCREENGRP    0x0055
  77. #define KBD_SETSESMGRHOTKEY     0x0056
  78. #define KBD_SETFOCUS            0x0057
  79. #define KBD_SETKCB              0x0058
  80. #define KBD_SETNLS              0x005C
  81. #define KBD_CREATE              0x005D
  82. #define KBD_DESTROY             0x005E
  83. #define KBD_GETINPUTMODE        0x0071
  84. #define KBD_GETINTERIMFLAG      0x0072
  85. #define KBD_GETSHIFTSTATE       0x0073
  86. #define KBD_READCHAR            0x0074
  87. #define KBD_PEEKCHAR            0x0075
  88. #define KBD_GETSESMGRHOTKEY     0x0076
  89. #define KBD_GETKEYBDTYPE        0x0077
  90. #define KBD_GETCODEPAGEID       0x0078
  91. #define KBD_XLATESCAN           0x0079
  92.  
  93. /* Printer Control */
  94.  
  95. #define PRT_QUERYJOBHANDLE      0x0021
  96. #define PRT_SETFRAMECTL         0x0042
  97. #define PRT_SETINFINITERETRY    0x0044
  98. #define PRT_INITPRINTER         0x0046
  99. #define PRT_ACTIVATEFONT        0x0048
  100. #define PRT_GETFRAMECTL         0x0062
  101. #define PRT_GETINFINITERETRY    0x0064
  102. #define PRT_GETPRINTERSTATUS    0x0066
  103. #define PRT_QUERYACTIVEFONT     0x0069
  104. #define PRT_VERIFYFONT          0x006A
  105.  
  106. /* Pointing-Device (Mouse) Control */
  107.  
  108. #define MOU_ALLOWPTRDRAW        0x0050
  109. #define MOU_UPDATEDISPLAYMODE   0x0051
  110. #define MOU_SCREENSWITCH        0x0052
  111. #define MOU_SETSCALEFACTORS     0x0053
  112. #define MOU_SETEVENTMASK        0x0054
  113. #define MOU_SETHOTKEYBUTTON     0x0055
  114. #define MOU_SETPTRSHAPE         0x0056
  115. #define MOU_DRAWPTR             0x0057
  116. #define MOU_REMOVEPTR           0x0058
  117. #define MOU_SETPTRPOS           0x0059
  118. #define MOU_SETPROTDRAWADDRESS  0x005A
  119. #define MOU_SETREALDRAWADDRESS  0x005B
  120. #define MOU_SETMOUSTATUS        0x005C
  121. #define MOU_DISPLAYMODECHANGE   0x005D
  122. #define MOU_GETBUTTONCOUNT      0x0060
  123. #define MOU_GETMICKEYCOUNT      0x0061
  124. #define MOU_GETMOUSTATUS        0x0062
  125. #define MOU_READEVENTQUE        0x0063
  126. #define MOU_GETQUESTATUS        0x0064
  127. #define MOU_GETEVENTMASK        0x0065
  128. #define MOU_GETSCALEFACTORS     0x0066
  129. #define MOU_GETPTRPOS           0x0067
  130. #define MOU_GETPTRSHAPE         0x0068
  131. #define MOU_GETHOTKEYBUTTON     0x0069
  132. #define MOU_VER                 0x006A
  133.  
  134. /* Disk/Diskette Control */
  135.  
  136. #define DSK_LOCKDRIVE           0x0000
  137. #define DSK_UNLOCKDRIVE         0x0001
  138. #define DSK_REDETERMINEMEDIA    0x0002
  139. #define DSK_SETLOGICALMAP       0x0003
  140. #define DSK_BLOCKREMOVABLE      0x0020
  141. #define DSK_GETLOGICALMAP       0x0021
  142. #define DSK_SETDEVICEPARAMS     0x0043
  143. #define DSK_WRITETRACK          0x0044
  144. #define DSK_FORMATVERIFY        0x0045
  145. #define DSK_GETDEVICEPARAMS     0x0063
  146. #define DSK_READTRACK           0x0064
  147. #define DSK_VERIFYTRACK         0x0065
  148.  
  149. /* Physical-Disk Control */
  150.  
  151. #define PDSK_LOCKPHYSDRIVE              0x0000
  152. #define PDSK_UNLOCKPHYSDRIVE            0x0001
  153. #define PDSK_WRITEPHYSTRACK             0x0044
  154. #define PDSK_GETPHYSDEVICEPARAMS        0x0063
  155. #define PDSK_READPHYSTRACK              0x0064
  156. #define PDSK_VERIFYPHYSTRACK            0x0065
  157.  
  158. /* Character-Monitor Control */
  159.  
  160. #define MON_REGISTERMONITOR     0x0040
  161.  
  162. /* General Device Control */
  163.  
  164. #define DEV_FLUSHINPUT          0x0001
  165. #define DEV_FLUSHOUTPUT         0x0002
  166. #define DEV_QUERYMONSUPPORT     0x0060
  167.  
  168.  
  169. /* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON,
  170.  * ASYNC_SETMODEMCTRL
  171.  */
  172.  
  173. #define RX_QUE_OVERRUN          0x0001
  174. #define RX_HARDWARE_OVERRUN     0x0002
  175. #define PARITY_ERROR            0x0004
  176. #define FRAMING_ERROR           0x0008
  177.  
  178. /* ASYNC_GETCOMMEVENT */
  179.  
  180. #define CHAR_RECEIVED   0x0001
  181. #define LAST_CHAR_SENT  0x0004
  182. #define CTS_CHANGED     0x0008
  183. #define DSR_CHANGED     0x0010
  184. #define DCD_CHANGED     0x0020
  185. #define BREAK_DETECTED  0x0040
  186. #define ERROR_OCCURRED  0x0080
  187. #define RI_DETECTED     0x0100
  188.  
  189. /* ASYNC_GETCOMMSTATUS */
  190.  
  191. #define TX_WAITING_FOR_CTS              0x0001
  192. #define TX_WAITING_FOR_DSR              0x0002
  193. #define TX_WAITING_FOR_DCD              0x0004
  194. #define TX_WAITING_FOR_XON              0x0008
  195. #define TX_WAITING_TO_SEND_XON          0x0010
  196. #define TX_WAITING_WHILE_BREAK_ON       0x0020
  197. #define TX_WAITING_TO_SEND_IMM          0x0040
  198. #define RX_WAITING_FOR_DSR              0x0080
  199.  
  200. /* ASYNC_GETLINESTATUS */
  201.  
  202. #define WRITE_REQUEST_QUEUED    0x0001
  203. #define DATA_IN_TX_QUE          0x0002
  204. #define HARDWARE_TRANSMITTING   0x0004
  205. #define CHAR_READY_TO_SEND_IMM  0x0008
  206. #define WAITING_TO_SEND_XON     0x0010
  207. #define WAITING_TO_SEND_XOFF    0x0020
  208.  
  209. /* ASYNC_GETMODEMINPUT */
  210.  
  211. #define CTS_ON  0x10
  212. #define DSR_ON  0x20
  213. #define RI_ON   0x40
  214. #define DCD_ON  0x80
  215.  
  216. /* DSK_SETDEVICEPARAMS */
  217.  
  218. #define BUILD_BPB_FROM_MEDIUM   0x00
  219. #define REPLACE_BPB_FOR_DEVICE  0x01
  220. #define REPLACE_BPB_FOR_MEDIUM  0x02
  221.  
  222. /* DSK_GETDEVICEPARAMS */
  223.  
  224. #define GET_BPB_FROM_DEVICE   0x00
  225. #define GET_BPB_FROM_MEDIUM   0x01
  226.  
  227. /* KBD_GETINPUTMODE, KBD_PEEKCHAR, KBD_SETINPUTMODE*/
  228.  
  229. #define ASCII_MODE  0x00
  230. #define BINARY_MODE 0x80
  231.  
  232. /* KBD_GETINTERIMFLAG */
  233.  
  234. #define CONVERSION_REQUEST      0x20
  235. #define INTERIM_CHAR            0x80
  236.  
  237. /* KBD_GETSESMGRHOTKEY */
  238.  
  239. #define HOTKEY_MAX_COUNT        0x0000
  240. #define HOTKEY_CURRENT_COUNT    0x0001
  241.  
  242. /* KBD_PEEKCHAR */
  243.  
  244. #define KBD_DATA_RECEIVED       0x0001
  245. #define KBD_DATA_BINARY         0x8000
  246.  
  247. /* KBD_READCHAR */
  248.  
  249. #define KBD_READ_WAIT   0x0000
  250. #define KBD_READ_NOWAIT 0x8000
  251.  
  252. /* KBD_SETINPUTMODE */
  253.  
  254. #define SHIFT_REPORT_MODE  0x01
  255.  
  256. #ifndef INCL_MOU
  257.  
  258. #define MOUSE_MOTION                    0x0001
  259. #define MOUSE_MOTION_WITH_BN1_DOWN      0x0002
  260. #define MOUSE_BN1_DOWN                  0x0004
  261. #define MOUSE_MOTION_WITH_BN2_DOWN      0x0008
  262. #define MOUSE_BN2_DOWN                  0x0010
  263. #define MOUSE_MOTION_WITH_BN3_DOWN      0x0020
  264. #define MOUSE_BN3_DOWN                  0x0040
  265.  
  266. #define MHK_BUTTON1     0x0001
  267. #define MHK_BUTTON2     0x0002
  268. #define MHK_BUTTON3     0x0004
  269.  
  270. #define MOU_NOWAIT      0x0000
  271. #define MOU_WAIT        0x0001
  272.  
  273. #endif /* #ifndef INCL_MOU */
  274.  
  275. /* MOU_GETHOTKEYBUTTON, MOU_SETHOTKEYBUTTON */
  276.  
  277. #define MHK_NO_HOTKEY   0x0000
  278.  
  279. /* MOU_GETMOUSTATUS */
  280.  
  281. #define MOUSE_QUEUEBUSY         0x0001
  282. #define MOUSE_BLOCKREAD         0x0002
  283. #define MOUSE_FLUSH             0x0004
  284. #define MOUSE_UNSUPPORTED_MODE  0x0008
  285. #define MOUSE_DISABLED          0x0100
  286. #define MOUSE_MICKEYS           0x0200
  287.  
  288. /* PRT_GETPRINTERSTATUS */
  289.  
  290. #define PRINTER_TIMEOUT         0x0001
  291. #define PRINTER_IO_ERROR        0x0008
  292. #define PRINTER_SELECTED        0x0010
  293. #define PRINTER_OUT_OF_PAPER    0x0020
  294. #define PRINTER_ACKNOWLEDGED    0x0040
  295. #define PRINTER_NOT_BUSY        0x0080
  296.  
  297. /* fbCtlHndShake */
  298.  
  299. #define MODE_DTR_CONTROL        0x01
  300. #define MODE_DTR_HANDSHAKE      0x02
  301. #define MODE_CTS_HANDSHAKE      0x08
  302. #define MODE_DSR_HANDSHAKE      0x10
  303. #define MODE_DCD_HANDSHAKE      0x20
  304. #define MODE_DSR_SENSITIVITY    0x40
  305.  
  306. /* fbFlowReplace */
  307.  
  308. #define MODE_AUTO_TRANSMIT      0x01
  309. #define MODE_AUTO_RECEIVE       0x02
  310. #define MODE_ERROR_CHAR         0x04
  311. #define MODE_NULL_STRIPPING     0x08
  312. #define MODE_BREAK_CHAR         0x10
  313. #define MODE_RTS_CONTROL        0x40
  314. #define MODE_RTS_HANDSHAKE      0x80
  315. #define MODE_TRANSMIT_TOGGLE    0xC0
  316.  
  317. /* fbTimeout */
  318.  
  319. #define MODE_NO_WRITE_TIMEOUT           0x01
  320. #define MODE_READ_TIMEOUT               0x02
  321. #define MODE_WAIT_READ_TIMEOUT          0x04
  322. #define MODE_NOWAIT_READ_TIMEOUT        0x06
  323.  
  324. typedef struct _DCBINFO {       /* dcbinf */
  325.         USHORT usWriteTimeout;
  326.         USHORT usReadTimeout;
  327.         BYTE   fbCtlHndShake;
  328.         BYTE   fbFlowReplace;
  329.         BYTE   fbTimeout;
  330.         BYTE   bErrorReplacementChar;
  331.         BYTE   bBreakReplacementChar;
  332.         BYTE   bXONChar;
  333.         BYTE   bXOFFChar;
  334. } DCBINFO;
  335. typedef DCBINFO FAR *PDCBINFO;
  336.  
  337. /* XLATOFF */
  338. #pragma pack(1)
  339. /* XLATON */
  340.  
  341. typedef struct _TRACKLAYOUT {   /* trckl */
  342.         BYTE   bCommand;
  343.         USHORT usHead;
  344.         USHORT usCylinder;
  345.         USHORT usFirstSector;
  346.         USHORT cSectors;
  347.         struct {
  348.                 USHORT usSectorNumber;
  349.                 USHORT usSectorSize;
  350.         } TrackTable[1];
  351. } TRACKLAYOUT;
  352. typedef TRACKLAYOUT FAR *PTRACKLAYOUT;
  353.  
  354. /* XLATOFF */
  355. #pragma pack()
  356. /* XLATON */
  357.  
  358. #define DEVTYPE_48TPI   0x0000
  359. #define DEVTYPE_96TPI   0x0001
  360. #define DEVTYPE_35      0x0002
  361. #define DEVTYPE_8SD     0x0003
  362. #define DEVTYPE_8DD     0x0004
  363. #define DEVTYPE_FIXED   0x0005
  364. #define DEVTYPE_TAPE    0x0006
  365. #define DEVTYPE_UNKNOWN 0x0007
  366.  
  367. /* XLATOFF */
  368. #pragma pack(1)
  369. /* XLATON */
  370.  
  371. typedef struct _BIOSPARAMETERBLOCK {    /* bspblk */
  372.         USHORT usBytesPerSector;
  373.         BYTE   bSectorsPerCluster;
  374.         USHORT usReservedSectors;
  375.         BYTE   cFATs;
  376.         USHORT cRootEntries;
  377.         USHORT cSectors;
  378.         BYTE   bMedia;
  379.         USHORT usSectorsPerFAT;
  380.         USHORT usSectorsPerTrack;
  381.         USHORT cHeads;
  382.         ULONG  cHiddenSectors;
  383.         ULONG  cLargeSectors;
  384.         BYTE   abReserved[6];
  385.         USHORT cCylinders;
  386.         BYTE   bDeviceType;
  387.         USHORT fsDeviceAttr;
  388. } BIOSPARAMETERBLOCK;
  389. typedef BIOSPARAMETERBLOCK FAR *PBIOSPARAMETERBLOCK;
  390.  
  391. /* XLATOFF */
  392. #pragma pack()
  393. /* XLATON */
  394.  
  395. typedef struct _SCREENGROUP {   /* scrgrp */
  396.         USHORT idScreenGrp;
  397.         USHORT fTerminate;
  398. } SCREENGROUP;
  399. typedef SCREENGROUP FAR *PSCREENGROUP;
  400.  
  401. typedef struct _FRAME {         /* frm */
  402.         BYTE bCharsPerLine;
  403.         BYTE bLinesPerInch;
  404. } FRAME;
  405. typedef FRAME FAR *PFRAME;
  406.  
  407. typedef struct _KBDTYPE {       /* kbdtyp */
  408.         USHORT usType;
  409.         USHORT reserved1;
  410.         USHORT reserved2;
  411. } KBDTYPE;
  412. typedef KBDTYPE FAR *PKBDTYPE;
  413.  
  414. typedef struct _LINECONTROL {   /* lnctl */
  415.         BYTE bDataBits;
  416.         BYTE bParity;
  417.         BYTE bStopBits;
  418.         BYTE fTransBreak;
  419. } LINECONTROL;
  420. typedef LINECONTROL FAR *PLINECONTROL;
  421.  
  422. /* MODEMSTATUS.fbModemOn, ASYNC_GETMODEMOUTPUT */
  423.  
  424. #define DTR_ON  0x01
  425. #define RTS_ON  0x02
  426.  
  427. /* MODEMSTATUS.fbModemOff */
  428.  
  429. #define DTR_OFF  0xFE
  430. #define RTS_OFF  0xFD
  431.  
  432. typedef struct _MODEMSTATUS {   /* mdmst */
  433.         BYTE fbModemOn;
  434.         BYTE fbModemOff;
  435. } MODEMSTATUS;
  436. typedef MODEMSTATUS FAR *PMODEMSTATUS;
  437.  
  438. /* XLATOFF */
  439. #pragma pack(1)
  440. /* XLATON */
  441.  
  442. typedef struct _TRACKFORMAT {   /* trckfmt */
  443.         BYTE bCommand;
  444.         USHORT usHead;
  445.         USHORT usCylinder;
  446.         USHORT usReserved;
  447.         USHORT cSectors;
  448.         struct {
  449.                 BYTE bCylinder;
  450.                 BYTE bHead;
  451.                 BYTE idSector;
  452.                 BYTE bBytesSector;
  453.         } FormatTable[1];
  454. } TRACKFORMAT;
  455. typedef TRACKFORMAT FAR *PTRACKFORMAT;
  456.  
  457. /* XLATOFF */
  458. #pragma pack()
  459. /* XLATON */
  460.  
  461. typedef struct _RXQUEUE {       /* rxq */
  462.         USHORT cch;
  463.         USHORT cb;
  464. } RXQUEUE;
  465. typedef RXQUEUE FAR *PRXQUEUE;
  466.  
  467. typedef struct _DEVICEPARAMETERBLOCK {  /* dvpblck */
  468.         USHORT reserved1;
  469.         USHORT cCylinders;
  470.         USHORT cHeads;
  471.         USHORT cSectorsPerTrack;
  472.         USHORT reserved2;
  473.         USHORT reserved3;
  474.         USHORT reserved4;
  475.         USHORT reserved5;
  476. } DEVICEPARAMETERBLOCK;
  477. typedef DEVICEPARAMETERBLOCK FAR *PDEVICEPARAMETERBLOCK;
  478.  
  479. /* XLATOFF */
  480. #pragma pack(2)
  481. /* XLATON */
  482.  
  483. typedef struct _PTRDRAWFUNCTION {       /* ptrdfnc */
  484.         USHORT usReturnCode;
  485.         PFN pfnDraw;
  486.         PCH pchDataSeg;
  487. } PTRDRAWFUNCTION;
  488. typedef PTRDRAWFUNCTION FAR *PPTRDRAWFUNCTION;
  489.  
  490. /* XLATOFF */
  491. #pragma pack()
  492. /* XLATON */
  493.  
  494. typedef struct _PTRDRAWADDRESS {        /* ptrdaddr */
  495.         USHORT reserved;
  496.         PTRDRAWFUNCTION ptrdfnc;
  497. } PTRDRAWADDRESS;
  498. typedef PTRDRAWADDRESS FAR *PPTRDRAWADDRESS;
  499.  
  500. typedef struct _SHIFTSTATE {    /* shftst */
  501.         USHORT fsState;
  502.         BYTE   fNLS;
  503. } SHIFTSTATE;
  504. typedef SHIFTSTATE FAR *PSHIFTSTATE;
  505.  
  506. /* HOTKEY.fsHotKey/SHIFTSTATE.fsState */
  507.  
  508. #define RIGHTSHIFT      0x0001
  509. #define LEFTSHIFT       0x0002
  510. #define CONTROL         0x0004
  511. #define ALT             0x0008
  512. #define SCROLLLOCK_ON   0x0010
  513. #define NUMLOCK_ON      0x0020
  514. #define CAPSLOCK_ON     0x0040
  515. #define INSERT_ON       0x0080
  516. #define LEFTCONTROL     0x0100
  517. #define LEFTALT         0x0200
  518. #define RIGHTCONTROL    0x0400
  519. #define RIGHTALT        0x0800
  520. #define SCROLLLOCK      0x1000
  521. #define NUMLOCK         0x2000
  522. #define CAPSLOCK        0x4000
  523. #define SYSREQ          0x8000
  524.  
  525. typedef struct _HOTKEY {        /* htky */
  526.         USHORT fsHotKey;
  527.         UCHAR  uchScancodeMake;
  528.         UCHAR  uchScancodeBreak;
  529.         USHORT idHotKey;
  530. } HOTKEY;
  531. typedef HOTKEY FAR *PHOTKEY;
  532.  
  533. typedef struct _MONITORPOSITION {       /* mnpos */
  534.         USHORT fPosition;
  535.         USHORT index;
  536.         ULONG  pbInBuf;
  537.         USHORT offOutBuf;
  538. } MONITORPOSITION;
  539. typedef MONITORPOSITION FAR *PMONITORPOSITION;
  540.  
  541. typedef struct _RATEDELAY {     /* rtdly */
  542.         USHORT usDelay;
  543.         USHORT usRate;
  544. } RATEDELAY;
  545. typedef RATEDELAY FAR *PRATEDELAY;
  546.  
  547. typedef struct _CODEPAGEINFO {  /* cpi */
  548.         PBYTE pbTransTable;
  549.         USHORT idCodePage;
  550.         USHORT idTable;
  551. } CODEPAGEINFO;
  552. typedef FAR *PCODEPAGEINFO;
  553.  
  554. typedef struct _CPID {  /* cpid */
  555.         USHORT idCodePage;
  556.         USHORT Reserved;
  557. } CPID;
  558. typedef FAR *PCPID;
  559.  
  560. typedef struct _LDTADDRINFO {   /* ldtaddr */
  561.         PULONG pulPhysAddr;
  562.         USHORT cb;
  563. } LDTADDRINFO;
  564. typedef FAR *PLDTADDRINFO;
  565.  
  566. typedef struct _PTRDRAWDATA {   /* ptrdd */
  567.         USHORT cb;
  568.         USHORT usConfig;
  569.         USHORT usFlag;
  570. } PTRDRAWDATA;
  571. typedef FAR *PPTRDRAWDATA;
  572.