aio.pp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library
  4. for Netware.
  5. Copyright (c) 1999-2002 by the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. First Version of AIO, currently UNTESTED, i have to write some samples
  12. to test it.
  13. **********************************************************************}
  14. unit aio;
  15. interface
  16. const
  17. aionlm='aio.nlm';
  18. {$PACKRECORDS C}
  19. {----------------------------------------------------------------------------
  20. Predefined hardware types for use with the AIOAcquirePort function.
  21. ---------------------------------------------------------------------------- }
  22. const
  23. AIO_COMX_TYPE = 1;
  24. AIO_ARTIC_TYPE = 2;
  25. AIO_WNIM_TYPE = 3;
  26. {----------------------------------------------------------------------------
  27. Function completion code status values.
  28. Note that all error statuses are negative values.
  29. ---------------------------------------------------------------------------- }
  30. AIO_SUCCESS = 0;
  31. AIO_BAD_HANDLE = -(1);
  32. AIO_FAILURE = -(2);
  33. AIO_FUNC_NOT_SUPPORTED = -(3);
  34. AIO_INVALID_PARAMETER = -(5);
  35. AIO_PORT_NOT_AVAILABLE = -(6);
  36. AIO_QUALIFIED_SUCCESS = -(7);
  37. AIO_NO_MORE_PORTS = -(8);
  38. AIO_TYPE_NUMBER_INVALID = -(10);
  39. AIO_BOARD_NUMBER_INVALID = -(11);
  40. AIO_PORT_NUMBER_INVALID = -(12);
  41. AIO_RESOURCE_TAG_INVALID = -(13);
  42. AIO_DATA_PRESENT = -(14);
  43. AIO_BAD_REQUEST_TYPE = -(15);
  44. AIO_PORT_GONE = -(20);
  45. AIO_RTAG_INVALID = -(21);
  46. { This is only for non-CLIB application }
  47. { 'NYSA' }
  48. ASYNCIOSignature = $4E595341;
  49. {----------------------------------------------------------------------------
  50. Definitions for use with the AIOSetExternalControl function.
  51. ---------------------------------------------------------------------------- }
  52. AIO_EXTERNAL_CONTROL = 1;
  53. AIO_EXTCTRL_DTR = 1;
  54. AIO_EXTCTRL_RTS = 2;
  55. AIO_BREAK_CONTROL = 2;
  56. AIO_SET_BREAK_OFF = 0;
  57. AIO_SET_BREAK_ON = 1;
  58. AIO_FLOW_CONTROL = 3;
  59. AIO_SOFTWARE_FLOW_CONTROL_OFF = 0;
  60. AIO_SOFTWARE_FLOW_CONTROL_ON = 1;
  61. AIO_HARDWARE_FLOW_CONTROL_OFF = 0;
  62. AIO_HARDWARE_FLOW_CONTROL_ON = 2;
  63. AIO_FLOW_CONTROL_CHARACTERS = 4;
  64. AIO_SET_DEADMAN_TIMER = 5;
  65. {----------------------------------------------------------------------------
  66. Definitions for use with the AIOGetExternalStatus function.
  67. ---------------------------------------------------------------------------- }
  68. AIO_EXTSTA_RI = $00000001;
  69. AIO_EXTSTA_DCD = $00000008;
  70. AIO_EXTSTA_DSR = $00000010;
  71. AIO_EXTSTA_CTS = $00000020;
  72. AIO_EXTSTA_BREAK = $00000080;
  73. {----------------------------------------------------------------------------
  74. Definitions for use with the AIOFlushBuffers function.
  75. ---------------------------------------------------------------------------- }
  76. AIO_FLUSH_WRITE_BUFFER = 1;
  77. AIO_FLUSH_READ_BUFFER = 2;
  78. {----------------------------------------------------------------------------
  79. Definitions for use with the AIOReadStatus function.
  80. ---------------------------------------------------------------------------- }
  81. AIO_RECEIVE_ACTIVE = 0;
  82. AIO_RECEIVE_FULL = 1;
  83. {----------------------------------------------------------------------------
  84. Definitions for use with the AIOWriteStatus function.
  85. ---------------------------------------------------------------------------- }
  86. AIO_TRANSMIT_IDLE = 0;
  87. AIO_TRANSMIT_ACTIVE = 1;
  88. AIO_TRANSMIT_XOFFED = 2;
  89. {----------------------------------------------------------------------------
  90. Definitions for use with the AIOAcquirePort function.
  91. ---------------------------------------------------------------------------- }
  92. AIO_HARDWARE_TYPE_WILDCARD = -(1);
  93. AIO_BOARD_NUMBER_WILDCARD = -(1);
  94. AIO_PORT_NUMBER_WILDCARD = -(1);
  95. {----------------------------------------------------------------------------
  96. Definitions for use with the AIOConfigurePort function.
  97. ---------------------------------------------------------------------------- }
  98. { BitRate }
  99. AIO_BAUD_50 = 0;
  100. AIO_BAUD_75 = 1;
  101. AIO_BAUD_110 = 2;
  102. AIO_BAUD_134p5 = 3;
  103. AIO_BAUD_150 = 4;
  104. AIO_BAUD_300 = 5;
  105. AIO_BAUD_600 = 6;
  106. AIO_BAUD_1200 = 7;
  107. AIO_BAUD_1800 = 8;
  108. AIO_BAUD_2000 = 9;
  109. AIO_BAUD_2400 = 10;
  110. AIO_BAUD_3600 = 11;
  111. AIO_BAUD_4800 = 12;
  112. AIO_BAUD_7200 = 13;
  113. AIO_BAUD_9600 = 14;
  114. AIO_BAUD_19200 = 15;
  115. AIO_BAUD_38400 = 16;
  116. AIO_BAUD_57600 = 17;
  117. AIO_BAUD_115200 = 18;
  118. { DataBits }
  119. AIO_DATA_BITS_5 = 0;
  120. AIO_DATA_BITS_6 = 1;
  121. AIO_DATA_BITS_7 = 2;
  122. AIO_DATA_BITS_8 = 3;
  123. { StopBits }
  124. AIO_STOP_BITS_1 = 0;
  125. AIO_STOP_BITS_1p5 = 1;
  126. AIO_STOP_BITS_2 = 2;
  127. { Parity }
  128. AIO_PARITY_NONE = 0;
  129. AIO_PARITY_ODD = 1;
  130. AIO_PARITY_EVEN = 2;
  131. AIO_PARITY_MARK = 3;
  132. AIO_PARITY_SPACE = 4;
  133. { FlowControl }
  134. AIO_SOFTWARE_FLOWCONTROL_OFF = 0;
  135. AIO_SOFTWARE_FLOWCONTROL_ON = 1;
  136. AIO_HARDWARE_FLOWCONTROL_OFF = 0;
  137. AIO_HARDWARE_FLOWCONTROL_ON = 2;
  138. AIO_DROPOUT_VALUE = $FF;
  139. {----------------------------------------------------------------------------
  140. Definitions for use with AIOPORTCAPABILITIES structure.
  141. ---------------------------------------------------------------------------- }
  142. type
  143. PAIOPORTCAPABILITIES = ^TAIOPORTCAPABILITIES;
  144. TAIOPORTCAPABILITIES = record
  145. returnLength : WORD; { byte length of capabilities data }
  146. majorVersion : BYTE;
  147. minorVersion : BYTE;
  148. notSupportedMask : LONGINT;
  149. minBitRate : BYTE;
  150. maxBitRate : BYTE; { minimum bit rate index supported }
  151. minDataBits : BYTE; { minimum data bits per char index supported }
  152. maxDataBits : BYTE; { maximum data bits per char index supported }
  153. minStopBits : BYTE; { minimum stop bits per char index supported }
  154. maxStopBits : BYTE; { maximum stop bits per char index supported }
  155. minParityMode : BYTE; { minimum parity mode index supported }
  156. maxParityMode : BYTE; { maximum parity mode index supported }
  157. minFlowCtrlMode : BYTE; { minimum flow control mode index supported }
  158. maxFlowCtrlMode : BYTE; { maximum flow control mode index supported }
  159. miscCapabilities : LONGINT; { miscellaneous capability flags }
  160. minReadBufferSize : LONGINT; { minimum length of receive buffer }
  161. maxReadBufferSize : LONGINT; { maximum length of receive buffer }
  162. minWriteBufferSize : LONGINT; { minimum length of transmit buffer }
  163. maxWriteBufferSize : LONGINT; { maximum length of transmit buffer }
  164. minDeadmanTime : WORD; { minimum deadman time (seconds) }
  165. maxDeadmanTime : WORD; { maximum deadman time (seconds) }
  166. end;
  167. const
  168. AIO_PORT_NS_MINBITRATE = $80000000;
  169. AIO_PORT_NS_MAXBITRATE = $40000000;
  170. AIO_PORT_NS_MINDATABITS = $20000000;
  171. AIO_PORT_NS_MAXDATABITS = $10000000;
  172. AIO_PORT_NS_MINSTOPBITS = $08000000;
  173. AIO_PORT_NS_MAXSTOPBITS = $04000000;
  174. AIO_PORT_NS_MINPARITYMODE = $02000000;
  175. AIO_PORT_NS_MAXPARITYMODE = $01000000;
  176. AIO_PORT_NS_MINFLOWCTRLMODE = $00800000;
  177. AIO_PORT_NS_MAXFLOWCTRLMODE = $00400000;
  178. AIO_PORT_NS_MISCCAPABILITIES = $00200000;
  179. AIO_PORT_NS_MINREADBUFFERSIZE = $00100000;
  180. AIO_PORT_NS_MAXREADBUFFERSIZE = $00080000;
  181. AIO_PORT_NS_MINWRITEBUFFERSIZE = $00040000;
  182. AIO_PORT_NS_MAXWRITEBUFFERSIZE = $00020000;
  183. AIO_PORT_NS_MINDEADMANTIME = $00010000;
  184. AIO_PORT_NS_MAXDEADMANTIME = $00008000;
  185. AIO_PORT_CAPS_NOT_SUPPORTED = $00007FFF;
  186. AIO_PORT_CAPS_MAJOR_VERSION = 1;
  187. AIO_PORT_CAPS_MINOR_VERSION = 0;
  188. AIO_CAP_OUTPUT_BREAK = $00000002;
  189. AIO_CAP_FLOWCTRLCHARS = $00000004;
  190. AIO_CAP_PROGRAMMABLE = $00000008;
  191. AIO_CAP_INPUT = $00000010;
  192. AIO_CAP_OUTPUT = $00000020;
  193. { byte length of driver capabilities structure }
  194. type
  195. PAIODVRCAPABILITIES = ^TAIODVRCAPABILITIES;
  196. TAIODVRCAPABILITIES = record
  197. returnLength : WORD;
  198. byteData : array[0..1] of BYTE;
  199. end;
  200. const
  201. AIO_NO_STRUCT_DATA_RETURNED = 2;
  202. {----------------------------------------------------------------------------
  203. Definitions for use with the AIOGetPortsRollCall function.
  204. ---------------------------------------------------------------------------- }
  205. type
  206. PAIOPORTINFO = ^TAIOPORTINFO;
  207. TAIOPORTINFO = record
  208. returnLength : WORD; { byte length of port info data }
  209. majorVersion : BYTE;
  210. minorVersion : BYTE;
  211. notSupportedMask : longint;
  212. hardwareType : longint; { value used with AIOAcquirePort }
  213. boardNumber : longint; { " }
  214. portNumber : longint; { " }
  215. availability : WORD; { availability of port for acquire }
  216. externalStatus : longint; { current external status value for port }
  217. chgdExternalStatus : longint; { changed external status value for port }
  218. end;
  219. const
  220. AIO_INFO_NS_HARDWARETYPE = $80000000;
  221. AIO_INFO_NS_BOARDNUMBER = $40000000;
  222. AIO_INFO_NS_PORTNUMBER = $20000000;
  223. AIO_INFO_NS_AVAILABILITY = $10000000;
  224. AIO_INFO_NS_EXTERNALSTATUS = $08000000;
  225. AIO_INFO_NS_CHGDEXTERNALSTATUS = $04000000;
  226. AIO_PORT_INFO_NOT_SUPPORTED = $03FFFFFF;
  227. AIO_PORT_INFO_MAJOR_VERSION = 1;
  228. AIO_PORT_INFO_MINOR_VERSION = 0;
  229. AIO_AVAILABLE_FOR_ACQUIRE = 0;
  230. AIO_ALREADY_ACQUIRED = 1;
  231. AIO_UNAVAILABLE = $FF;
  232. AIO_INITIAL = 0;
  233. AIO_SUCCESSOR = 1;
  234. {----------------------------------------------------------------------------
  235. Definitions for use with the AIOGetPortConfiguration function.
  236. ---------------------------------------------------------------------------- }
  237. type
  238. PAIOPORTCONFIG = ^TAIOPORTCONFIG;
  239. TAIOPORTCONFIG = record
  240. returnLength : WORD; { byte length of port configuration data }
  241. majorVersion : BYTE;
  242. minorVersion : BYTE;
  243. notSupportedMask : LONGINT;
  244. hardwareType : longint; { value used with AIOAcquirePort }
  245. boardNumber : longint; { " " }
  246. portNumber : longint; { " " }
  247. bitRate : BYTE; { Bits per second index }
  248. dataBits : BYTE; { Bits per character index }
  249. stopBits : BYTE; { Stop bits per char index }
  250. parityMode : BYTE; { Generated parity index }
  251. flowCtrlMode : BYTE; { Flow control mode }
  252. breakMode : BYTE; { Break control mode }
  253. readSize : LONGINT; { Receive buffer size }
  254. writeSize : LONGINT; { Transmit buffer size }
  255. transmitXon : BYTE;
  256. transmitXoff : BYTE;
  257. receiveXon : BYTE;
  258. receiveXoff : BYTE;
  259. externalControl : WORD; { set with AIO_EXTERNAL_CONTROL }
  260. end;
  261. const
  262. AIO_CONFIG_NS_HARDWARETYPE = $80000000;
  263. AIO_CONFIG_NS_BOARDNUMBER = $40000000;
  264. AIO_CONFIG_NS_PORTNUMBER = $20000000;
  265. AIO_CONFIG_NS_BITRATE = $10000000;
  266. AIO_CONFIG_NS_DATABITS = $08000000;
  267. AIO_CONFIG_NS_STOPBITS = $04000000;
  268. AIO_CONFIG_NS_PARITYMODE = $02000000;
  269. AIO_CONFIG_NS_FLOWCTRLMODE = $01000000;
  270. AIO_CONFIG_NS_BREAKMODE = $00800000;
  271. AIO_CONFIG_NS_READSIZE = $00400000;
  272. AIO_CONFIG_NS_WRITESIZE = $00200000;
  273. AIO_CONFIG_NS_TRANSMITXON = $00100000;
  274. AIO_CONFIG_NS_TRANSMITXOFF = $00080000;
  275. AIO_CONFIG_NS_RECEIVEXON = $00040000;
  276. AIO_CONFIG_NS_RECEIVEXOFF = $00020000;
  277. AIO_CONFIG_NS_EXTERNALCONTROL = $00010000;
  278. AIO_PORT_CONFIG_NOT_SUPPORTED = $0007FFFF;
  279. AIO_PORT_CONFIG_MAJOR_VERSION = 1;
  280. AIO_PORT_CONFIG_MINOR_VERSION = 0;
  281. AIO_EXTCTRL_DTR_ENABLE = 1;
  282. AIO_EXTCTRL_DTR_DISABLE = 0;
  283. AIO_EXTCTRL_RTS_ENABLE = 2;
  284. AIO_EXTCTRL_RTS_DISABLE = 0;
  285. AIO_BREAK_MODE_OFF = 0;
  286. AIO_BREAK_MODE_ON = 1;
  287. type
  288. PAIODVRCONFIG = ^TAIODVRCONFIG;
  289. TAIODVRCONFIG = record
  290. returnLength : WORD; { byte length of driver config structure }
  291. byteData : array[0..1] of BYTE;
  292. end;
  293. {----------------------------------------------------------------------------
  294. Definitions for use with the AIOGetStatistics function.
  295. ---------------------------------------------------------------------------- }
  296. PAIOPORTSTATISTICS = ^TAIOPORTSTATISTICS;
  297. TAIOPORTSTATISTICS = record
  298. returnLength : WORD; { byte length of port statistics structure }
  299. majorVersion : BYTE;
  300. minorVersion : BYTE;
  301. notSupportedMask : LONGINT;
  302. receiveBytes : LONGINT; { total number of bytes received on port }
  303. transmitBytes : LONGINT; { total number of bytes transmitted from port }
  304. parityErrors : LONGINT; { number of receive parity errors }
  305. framingErrors : LONGINT; { number of receive framing errors }
  306. overrunSoftware : LONGINT; { number of software overruns (occurrences) }
  307. overrunHardware : LONGINT; { number of hardware overruns (occurrences) }
  308. end;
  309. const
  310. AIO_STATS_NS_RECEIVEBYTES = $80000000;
  311. AIO_STATS_NS_TRANSMITBYTES = $40000000;
  312. AIO_STATS_NS_PARITYERRORS = $20000000;
  313. AIO_STATS_NS_FRAMINGERRORS = $10000000;
  314. AIO_STATS_NS_OVERRUNSOFTWARE = $08000000;
  315. AIO_STATS_NS_OVERRUNHARDWARE = $04000000;
  316. AIO_PORT_STATS_NOT_SUPPORTED = $03FFFFFF;
  317. AIO_PORT_STATS_MAJOR_VERSION = 1;
  318. AIO_PORT_STATS_MINOR_VERSION = 0;
  319. type
  320. PAIODVRSTATISTICS = ^TAIODVRSTATISTICS;
  321. TAIODVRSTATISTICS = record
  322. returnLength : WORD; { byte length of driver statistics structure }
  323. byteData : array[0..1] of BYTE;
  324. end;
  325. {----------------------------------------------------------------------------
  326. Definitions for use with AIOGetDriverList function.
  327. ---------------------------------------------------------------------------- }
  328. PAIODRIVERLISTENTRY = ^TAIODRIVERLISTENTRY;
  329. TAIODRIVERLISTENTRY = record
  330. hardwareType : longint;
  331. ports : longint;
  332. name : array[0..127] of char;
  333. end;
  334. PAIODRIVERLIST = ^TAIODRIVERLIST;
  335. TAIODRIVERLIST = record
  336. returnLength : WORD;
  337. driver : array[0..0] of TAIODRIVERLISTENTRY;
  338. end;
  339. const
  340. AIO_DRIVER_LIST_GET_FIRST = -(1);
  341. {----------------------------------------------------------------------------
  342. Definitions for use with AIOGetBoardList function.
  343. ---------------------------------------------------------------------------- }
  344. type
  345. PAIOBOARDLISTENTRY = ^TAIOBOARDLISTENTRY;
  346. TAIOBOARDLISTENTRY = record
  347. boardNumber : longint;
  348. ports : longint;
  349. name : array[0..127] of char;
  350. end;
  351. PAIOBOARDLIST = ^TAIOBOARDLIST;
  352. TAIOBOARDLIST = record
  353. returnLength : WORD;
  354. board : array[0..0] of TAIOBOARDLISTENTRY;
  355. end;
  356. const
  357. AIO_BOARD_LIST_GET_FIRST = -(1);
  358. {----------------------------------------------------------------------------
  359. Definitions for use with AIOSetControlData function.
  360. ---------------------------------------------------------------------------- }
  361. { byte length of control data structure }
  362. type
  363. PAIOCONTROLDATA = ^TAIOCONTROLDATA;
  364. TAIOCONTROLDATA = record
  365. returnLength : WORD;
  366. byteData : array[0..1] of BYTE;
  367. end;
  368. {----------------------------------------------------------------------------
  369. Definitions for use with AIOGetFirstPortInfo and AIOGetNextPortInfo
  370. ---------------------------------------------------------------------------- }
  371. PAIOPORTSEARCH = ^TAIOPORTSEARCH;
  372. TAIOPORTSEARCH = record
  373. typeMask : longint;
  374. boardMask : longint;
  375. portMask : longint;
  376. reserved : array[0..5] of longint;
  377. end;
  378. {----------------------------------------------------------------------------
  379. Definition of AIO functions.
  380. ---------------------------------------------------------------------------- }
  381. function AIOAcquirePort(hardwareType:Plongint; boardNumber:Plongint; portNumber:Plongint; portHandle:Plongint):longint;cdecl;external aionlm name 'AIOAcquirePort';
  382. function AIOAcquirePort(var hardwareType,boardNumber,portNumber,portHandle:longint):longint;cdecl;external aionlm name 'AIOAcquirePort';
  383. function AIOAcquirePortWithRTag(hardwareType:Plongint; boardNumber:Plongint; portNumber:Plongint; portHandle:Plongint; RTag:longint):longint;cdecl;external aionlm name 'AIOAcquirePortWithRTag';
  384. function AIOAcquirePortWithRTag(var hardwareType,boardNumber,portNumber,portHandle:longint; RTag:longint):longint;cdecl;external aionlm name 'AIOAcquirePortWithRTag';
  385. function AIOConfigurePort(portHandle:longint; bitRate:byte; dataBits:byte; stopBits:byte; parityMode:byte;
  386. flowCtrlMode:byte):longint;cdecl;external aionlm name 'AIOConfigurePort';
  387. function AIOFlushBuffers(portHandle:longint; flushFlag:WORD):longint;cdecl;external aionlm name 'AIOFlushBuffers';
  388. function AIOGetBoardList(hardwareType:longint; boardIndex:longint; pBoardList:PAIOBOARDLIST):longint;cdecl;external aionlm name 'AIOGetBoardList';
  389. function AIOGetDriverList(lastHardwareType:longint; pDriverList:PAIODRIVERLIST):longint;cdecl;external aionlm name 'AIOGetDriverList';
  390. function AIOGetExternalStatus(portHandle:longint; extStatus:PLongint; chgdExtStatus:PLongint):longint;cdecl;external aionlm name 'AIOGetExternalStatus';
  391. function AIOGetExternalStatus(portHandle:longint; var extStatus,chgdExtStatus:Longint):longint;cdecl;external aionlm name 'AIOGetExternalStatus';
  392. function AIOGetFirstPortInfo(hardwareType:longint; boardNumber:longint; portNumber:longint; portSearchP:PAIOPORTSEARCH; portInfoP:PAIOPORTINFO;
  393. capabilitiesP:PAIOPORTCAPABILITIES; dvrCapabilitiesP:PAIODVRCAPABILITIES; NLMModuleNameP:Pchar):longint;cdecl;external aionlm name 'AIOGetFirstPortInfo';
  394. function AIOGetNextPortInfo(portSearchP:PAIOPORTSEARCH; portInfoP:PAIOPORTINFO; capabilitiesP:PAIOPORTCAPABILITIES; dvrCapabilitiesP:PAIODVRCAPABILITIES; NLMModuleNameP:Pchar):longint;cdecl;external aionlm name 'AIOGetNextPortInfo';
  395. function AIOGetName_FirstPortInfo(hardwareType:longint; boardNumber:longint; portNumber:longint; portSearchP:PAIOPORTSEARCH; portInfoP:PAIOPORTINFO;
  396. capabilitiesP:PAIOPORTCAPABILITIES; dvrCapabilitiesP:PAIODVRCAPABILITIES; NLMModuleNameP:Pchar):longint;cdecl;external aionlm name 'AIOGetName_FirstPortInfo';
  397. function AIOGetName_NextPortInfo(portSearchP:PAIOPORTSEARCH; portInfoP:PAIOPORTINFO; capabilitiesP:PAIOPORTCAPABILITIES; dvrCapabilitiesP:PAIODVRCAPABILITIES; NLMModuleNameP:Pchar):longint;cdecl;external aionlm name 'AIOGetName_NextPortInfo';
  398. function AIOGetPortCapability(portHandle:longint; pCapabilities:PAIOPORTCAPABILITIES; pDvrCapabilities:PAIODVRCAPABILITIES):longint;cdecl;external aionlm name 'AIOGetPortCapability';
  399. function AIOGetPortConfiguration(portHandle:longint; pPortConfig:PAIOPORTCONFIG; pDvrConfig:PAIODVRCONFIG):longint;cdecl;external aionlm name 'AIOGetPortConfiguration';
  400. function AIOGetPortStatus(portHandle:longint; writeCount:PLongint; writeState:PWORD; readCount:PLongint; readState:PWORD;
  401. extStatus:PLongint; chgdExtStatus:PLongint):longint;cdecl;external aionlm name 'AIOGetPortStatus';
  402. function AIOGetPortStatus(portHandle:longint; var writeCount:Longint; var writeState:WORD; var readCount:Longint; var readState:WORD;
  403. var extStatus,chgdExtStatus:Longint):longint;cdecl;external aionlm name 'AIOGetPortStatus';
  404. function AIOGetReadBufferSize(portHandle:longint; readSize:PLongint):longint;cdecl;external aionlm name 'AIOGetReadBufferSize';
  405. function AIOGetReadBufferSize(portHandle:longint; var readSize:Longint):longint;cdecl;external aionlm name 'AIOGetReadBufferSize';
  406. function AIOGetPortStatistics(portHandle:longint; pPortStatistics:PAIOPORTSTATISTICS; pDvrStatistics:PAIODVRSTATISTICS):longint;cdecl;external aionlm name 'AIOGetPortStatistics';
  407. function AIOGetPortStatistics(portHandle:longint; var pPortStatistics:TAIOPORTSTATISTICS; var pDvrStatistics:TAIODVRSTATISTICS):longint;cdecl;external aionlm name 'AIOGetPortStatistics';
  408. function AIOGetWriteBufferSize(portHandle:longint; writeSize:PLongint):longint;cdecl;external aionlm name 'AIOGetWriteBufferSize';
  409. function AIOGetWriteBufferSize(portHandle:longint; var writeSize:Longint):longint;cdecl;external aionlm name 'AIOGetWriteBufferSize';
  410. function AIOReadData(portHandle:longint; buffer:Pchar; length:longint; numberBytesRead:PLongint):longint;cdecl;external aionlm name 'AIOReadData';
  411. function AIOReadData(portHandle:longint; var buffer; length:longint; var numberBytesRead:Longint):longint;cdecl;external aionlm name 'AIOReadData';
  412. function AIOReadStatus(portHandle:longint; count:PLongint; state:PWORD):longint;cdecl;external aionlm name 'AIOReadStatus';
  413. function AIOReadStatus(portHandle:longint; var count:Longint; var state:WORD):longint;cdecl;external aionlm name 'AIOReadStatus';
  414. function AIOReleasePort(portHandle:longint):longint;cdecl;external aionlm name 'AIOReleasePort';
  415. function AIOSetControlData(portHandle:longint; requestType:longint; requestStructValue:PAIOCONTROLDATA):longint;cdecl;external aionlm name 'AIOSetControlData';
  416. function AIOSetControlData(portHandle:longint; requestType:longint; var requestStructValue:TAIOCONTROLDATA):longint;cdecl;external aionlm name 'AIOSetControlData';
  417. function AIOSetExternalControl(portHandle:longint; requestType:longint; requestValue:longint):longint;cdecl;external aionlm name 'AIOSetExternalControl';
  418. function AIOSetFlowControl(portHandle:longint; flowCtrlMode:longint):longint;cdecl;external aionlm name 'AIOSetFlowControl';
  419. function AIOSetFlowControlCharacters(portHandle:longint; transmitXon:byte; transmitXoff:byte; receiveXon:byte; receiveXoff:byte):longint;cdecl;external aionlm name 'AIOSetFlowControlCharacters';
  420. function AIOSetReadBufferSize(portHandle:longint; bufferSize:longint):longint;cdecl;external aionlm name 'AIOSetReadBufferSize';
  421. function AIOSetWriteBufferSize(portHandle:longint; bufferSize:longint):longint;cdecl;external aionlm name 'AIOSetWriteBufferSize';
  422. function AIOWriteData(portHandle:longint; buffer:Pchar; length:longint; numberBytesWritten:PLongint):longint;cdecl;external aionlm name 'AIOWriteData';
  423. function AIOWriteData(portHandle:longint; var buffer; length:longint; var numberBytesWritten:Longint):longint;cdecl;external aionlm name 'AIOWriteData';
  424. function AIOWriteStatus(portHandle:longint; count:PLongint; state:PWORD):longint;cdecl;external aionlm name 'AIOWriteStatus';
  425. function AIOWriteStatus(portHandle:longint; var count:Longint; var state:WORD):longint;cdecl;external aionlm name 'AIOWriteStatus';
  426. implementation
  427. end.
  428. {
  429. $Log$
  430. Revision 1.3 2003-05-10 21:38:22 armin
  431. * added declarations with var parameters
  432. Revision 1.2 2002/09/07 16:01:20 peter
  433. * old logs removed and tabs fixed
  434. Revision 1.1 2002/03/19 19:33:36 armin
  435. + fist version of aio added
  436. }