jwantddpar.pas 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. {******************************************************************************}
  2. { }
  3. { Parallel Port Driver Interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: ntddpar.h , released June 2000. The original Pascal }
  9. { code is: JwaNtDdPar, released December 2003. The initial developer of the }
  10. { Pascal code is Pasha Sivtsov (ps4me att mail dott ru). }
  11. { }
  12. { The contents of this file are used with permission, subject to the Mozilla }
  13. { Public License Version 1.1 (the "License"); you may not use this file except }
  14. { in compliance with the License. You may obtain a copy of the License at }
  15. { http://www.mozilla.org/MPL/MPL-1.1.html }
  16. { }
  17. { Software distributed under the License is distributed on an "AS IS" basis, }
  18. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  19. { the specific language governing rights and limitations under the License. }
  20. { }
  21. { Alternatively, the contents of this file may be used under the terms of the }
  22. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  23. { provisions of the LGPL License are applicable instead of those above. }
  24. { If you wish to allow use of your version of this file only under the terms }
  25. { of the LGPL License and not to allow others to use your version of this file }
  26. { under the MPL, indicate your decision by deleting the provisions above and }
  27. { replace them with the notice and other provisions required by the LGPL }
  28. { License. If you do not delete the provisions above, a recipient may use }
  29. { your version of this file under either the MPL or the LGPL License. }
  30. { }
  31. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  32. { }
  33. {******************************************************************************}
  34. // $Id: JwaNtDdPar.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
  35. unit JwaNtDdPar;
  36. {$WEAKPACKAGEUNIT}
  37. {$HPPEMIT ''}
  38. {$HPPEMIT '#include "ntddk.h"'}
  39. {$HPPEMIT ''}
  40. {$I jediapilib.inc}
  41. interface
  42. uses
  43. JwaWindows, JwaWinIoctl;
  44. const
  45. // Parallel port device GUIDs
  46. GUID_DEVINTERFACE_PARALLEL: TGUID = (
  47. D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
  48. {$EXTERNALSYM GUID_DEVINTERFACE_PARALLEL}
  49. GUID_DEVINTERFACE_PARCLASS: TGUID = (
  50. D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
  51. {$EXTERNALSYM GUID_DEVINTERFACE_PARCLASS}
  52. GUID_PARALLEL_DEVICE: TGUID = (
  53. D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
  54. {$EXTERNALSYM GUID_PARALLEL_DEVICE}
  55. GUID_PARCLASS_DEVICE: TGUID = (
  56. D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
  57. {$EXTERNALSYM GUID_PARCLASS_DEVICE}
  58. IOCTL_IEEE1284_GET_MODE = (
  59. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  60. (5 shl 2) or METHOD_BUFFERED);
  61. {$EXTERNALSYM IOCTL_IEEE1284_GET_MODE}
  62. IOCTL_IEEE1284_NEGOTIATE = (
  63. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  64. (6 shl 2) or METHOD_BUFFERED);
  65. {$EXTERNALSYM IOCTL_IEEE1284_NEGOTIATE}
  66. IOCTL_PAR_GET_DEFAULT_MODES = (
  67. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  68. (10 shl 2) or METHOD_BUFFERED);
  69. {$EXTERNALSYM IOCTL_PAR_GET_DEFAULT_MODES}
  70. IOCTL_PAR_GET_DEVICE_CAPS = (
  71. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  72. (9 shl 2) or METHOD_BUFFERED);
  73. {$EXTERNALSYM IOCTL_PAR_GET_DEVICE_CAPS}
  74. IOCTL_PAR_IS_PORT_FREE = (
  75. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  76. (21 shl 2) or METHOD_BUFFERED);
  77. {$EXTERNALSYM IOCTL_PAR_IS_PORT_FREE}
  78. IOCTL_PAR_QUERY_DEVICE_ID = (
  79. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  80. (3 shl 2) or METHOD_BUFFERED);
  81. {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID}
  82. IOCTL_PAR_QUERY_DEVICE_ID_SIZE = (
  83. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  84. (4 shl 2) or METHOD_BUFFERED);
  85. {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID_SIZE}
  86. IOCTL_PAR_QUERY_INFORMATION = (
  87. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  88. (1 shl 2) or METHOD_BUFFERED);
  89. {$EXTERNALSYM IOCTL_PAR_QUERY_INFORMATION}
  90. IOCTL_PAR_QUERY_LOCATION = (
  91. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  92. (22 shl 2) or METHOD_BUFFERED);
  93. {$EXTERNALSYM IOCTL_PAR_QUERY_LOCATION}
  94. IOCTL_PAR_QUERY_RAW_DEVICE_ID = (
  95. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  96. (12 shl 2) or METHOD_BUFFERED);
  97. {$EXTERNALSYM IOCTL_PAR_QUERY_RAW_DEVICE_ID}
  98. IOCTL_PAR_SET_INFORMATION = (
  99. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  100. (2 shl 2) or METHOD_BUFFERED);
  101. {$EXTERNALSYM IOCTL_PAR_SET_INFORMATION}
  102. IOCTL_PAR_SET_READ_ADDRESS = (
  103. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  104. (8 shl 2) or METHOD_BUFFERED);
  105. {$EXTERNALSYM IOCTL_PAR_SET_READ_ADDRESS}
  106. IOCTL_PAR_SET_WRITE_ADDRESS = (
  107. (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
  108. (7 shl 2) or METHOD_BUFFERED);
  109. {$EXTERNALSYM IOCTL_PAR_SET_WRITE_ADDRESS}
  110. type
  111. PPAR_DEVICE_ID_SIZE_INFORMATION = ^PAR_DEVICE_ID_SIZE_INFORMATION;
  112. {$EXTERNALSYM PPAR_DEVICE_ID_SIZE_INFORMATION}
  113. _PAR_DEVICE_ID_SIZE_INFORMATION = record
  114. DeviceIdSize: ULONG;
  115. end;
  116. {$EXTERNALSYM _PAR_DEVICE_ID_SIZE_INFORMATION}
  117. PAR_DEVICE_ID_SIZE_INFORMATION = _PAR_DEVICE_ID_SIZE_INFORMATION;
  118. {$EXTERNALSYM PAR_DEVICE_ID_SIZE_INFORMATION}
  119. TParDeviceIdSizeInformation = PAR_DEVICE_ID_SIZE_INFORMATION;
  120. PParDeviceIdSizeInformation = PPAR_DEVICE_ID_SIZE_INFORMATION;
  121. const
  122. PARALLEL_INIT = $01;
  123. {$EXTERNALSYM PARALLEL_INIT}
  124. PARALLEL_AUTOFEED = $02;
  125. {$EXTERNALSYM PARALLEL_AUTOFEED}
  126. PARALLEL_PAPER_EMPTY = $04;
  127. {$EXTERNALSYM PARALLEL_PAPER_EMPTY}
  128. PARALLEL_OFF_LINE = $08;
  129. {$EXTERNALSYM PARALLEL_OFF_LINE}
  130. PARALLEL_POWER_OFF = $10;
  131. {$EXTERNALSYM PARALLEL_POWER_OFF}
  132. PARALLEL_NOT_CONNECTED = $20;
  133. {$EXTERNALSYM PARALLEL_NOT_CONNECTED}
  134. PARALLEL_BUSY = $40;
  135. {$EXTERNALSYM PARALLEL_BUSY}
  136. PARALLEL_SELECTED = $80;
  137. {$EXTERNALSYM PARALLEL_SELECTED}
  138. type
  139. PPAR_QUERY_INFORMATION = ^PAR_QUERY_INFORMATION;
  140. {$EXTERNALSYM PPAR_QUERY_INFORMATION}
  141. _PAR_QUERY_INFORMATION = record
  142. Status: UCHAR;
  143. end;
  144. {$EXTERNALSYM _PAR_QUERY_INFORMATION}
  145. PAR_QUERY_INFORMATION = _PAR_QUERY_INFORMATION;
  146. {$EXTERNALSYM PAR_QUERY_INFORMATION}
  147. TParQueryInformation = PAR_QUERY_INFORMATION;
  148. PParQueryInformation = PPAR_QUERY_INFORMATION;
  149. PPAR_SET_INFORMATION = ^PAR_SET_INFORMATION;
  150. {$EXTERNALSYM PPAR_SET_INFORMATION}
  151. _PAR_SET_INFORMATION = record
  152. Init: UCHAR;
  153. end;
  154. {$EXTERNALSYM _PAR_SET_INFORMATION}
  155. PAR_SET_INFORMATION = _PAR_SET_INFORMATION;
  156. {$EXTERNALSYM PAR_SET_INFORMATION}
  157. TParSetInformation = PAR_SET_INFORMATION;
  158. PParSetInformation = PPAR_SET_INFORMATION;
  159. PPARCLASS_NEGOTIATION_MASK = ^PARCLASS_NEGOTIATION_MASK;
  160. {$EXTERNALSYM PPARCLASS_NEGOTIATION_MASK}
  161. _PARCLASS_NEGOTIATION_MASK = record
  162. usReadMask: USHORT;
  163. usWriteMask: USHORT;
  164. end;
  165. {$EXTERNALSYM _PARCLASS_NEGOTIATION_MASK}
  166. PARCLASS_NEGOTIATION_MASK = _PARCLASS_NEGOTIATION_MASK;
  167. {$EXTERNALSYM PARCLASS_NEGOTIATION_MASK}
  168. TParClassNegotiationMask = PARCLASS_NEGOTIATION_MASK;
  169. PParClassNegotiationMask = PPARCLASS_NEGOTIATION_MASK;
  170. const
  171. NONE = $0000;
  172. {$EXTERNALSYM NONE}
  173. CENTRONICS = $0001;
  174. {$EXTERNALSYM CENTRONICS}
  175. IEEE_COMPATIBILITY = $0002;
  176. {$EXTERNALSYM IEEE_COMPATIBILITY}
  177. NIBBLE = $0004;
  178. {$EXTERNALSYM NIBBLE}
  179. CHANNEL_NIBBLE = $0008;
  180. {$EXTERNALSYM CHANNEL_NIBBLE}
  181. BYTE_BIDIR = $0010;
  182. {$EXTERNALSYM BYTE_BIDIR}
  183. EPP_HW = $0020;
  184. {$EXTERNALSYM EPP_HW}
  185. EPP_SW = $0040;
  186. {$EXTERNALSYM EPP_SW}
  187. EPP_ANY = $0060;
  188. {$EXTERNALSYM EPP_ANY}
  189. BOUNDED_ECP = $0080;
  190. {$EXTERNALSYM BOUNDED_ECP}
  191. ECP_HW_NOIRQ = $0100;
  192. {$EXTERNALSYM ECP_HW_NOIRQ}
  193. ECP_HW_IRQ = $0200;
  194. {$EXTERNALSYM ECP_HW_IRQ}
  195. ECP_SW = $0400;
  196. {$EXTERNALSYM ECP_SW}
  197. ECP_ANY = $0780;
  198. {$EXTERNALSYM ECP_ANY}
  199. implementation
  200. end.