; #INDEX# =======================================================================================================================
; Name ..........: CommAPIStructures.au3
; Title .........: Communications structures of Windows API
; Description ...: Communications structures of Windows API calls that have been translated to AutoIt structures.
; Version Date ..: 2013-10-24
; AutoIt Version : 3.3.8.1
; Link ..........: http://msdn.microsoft.com/en-us/library/aa363199(v=vs.85).aspx
; Tag(s) ........: RS-232, serial port, COM port
; Author(s) .....:
; Dll(s) ........: kernel32.dll
; ===============================================================================================================================
#include-once
#NoAutoIt3Execute
#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7
Global Const $tagCOMMPROP = _
"WORD wPacketLength;" & _
"WORD wPacketVersion;" & _
"DWORD dwServiceMask;" & _
"DWORD dwReserved1;" & _
"DWORD dwMaxTxQueue;" & _
"DWORD dwMaxRxQueue;" & _
"DWORD dwMaxBaud;" & _
"DWORD dwProvSubType;" & _
"DWORD dwProvCapabilities;" & _
"DWORD dwSettableParams;" & _
"DWORD dwSettableBaud;" & _
"WORD wSettableData;" & _
"WORD wSettableStopParity;" & _
"DWORD dwCurrentTxQueue;" & _
"DWORD dwCurrentRxQueue;" & _
"DWORD dwProvSpec1;" & _
"DWORD dwProvSpec2;" & _
"WCHAR wcProvChar[1];"
Global Const $tagCOMMTIMEOUTS = _
"DWORD ReadIntervalTimeout;" & _
"DWORD ReadTotalTimeoutMultiplier;" & _
"DWORD ReadTotalTimeoutConstant;" & _
"DWORD WriteTotalTimeoutMultiplier;" & _
"DWORD WriteTotalTimeoutConstant;"
#cs
http://msdn.microsoft.com/en-us/library/aa363200(v=vs.85).aspx
The eight actual COMSTAT bit-sized data fields within the four bytes of fBitFields can be manipulated by bitwise logical And/Or operations.
FieldName Bits Description
----------------- ----- ---------------------------
fCtsHold 1 Tx waiting for CTS signal
fDsrHold 2 Tx waiting for DSR signal
fRlsdHold 3 Tx waiting for RLSD signal
fXoffHold 4 Tx waiting, XOFF char rec'd
fXoffSent 5 Tx waiting, XOFF char sent
fEof 6 EOF character sent
fTxim 7 character waiting for Tx
fReserved 8-32 reserved (25 bits)
#ce
Global Const $tagCOMSTAT = _
"DWORD fBitFields;" & _ ; see comment above
"DWORD cbInQue;" & _
"DWORD cbOutQue;"
#cs
http://msdn.microsoft.com/en-us/library/aa363214(v=vs.85).aspx
The fourteen actual DCB bit-sized data fields within the four bytes of fBitFields can be manipulated by bitwise logical And/Or operations.
FieldName Bits Description
----------------- ----- ---------------------------
fBinary 1 binary mode, no EOF check
fParity 2 enable parity checking
fOutxCtsFlow 3 CTS output flow control
fOutxDsrFlow 4 DSR output flow control
fDtrControl 5-6 DTR flow control type
fDsrSensitivity 7 DSR sensitivity
fTXContinueOnXoff 8 XOFF continues Tx
fOutX 9 XON/XOFF out flow control
fInX 10 XON/XOFF in flow control
fErrorCHAR 11 enable error replacement
fNull 12 enable null stripping
fRtsControl 13-14 RTS flow control
fAbortOnError 15 abort reads/writes on error
fDummy2 16-32 reserved (17 bits)
#ce
Global Const $tagDCB = _
"DWORD DCBlength;" & _
"DWORD BaudRate;" & _
"DWORD fBitFields;" & _ ; see comment above
"WORD wReserved;" & _
"WORD XonLim;" & _
"WORD XoffLim;" & _
"BYTE ByteSize;" & _
"BYTE Parity;" & _
"BYTE StopBits;" & _
"CHAR XonChar;" & _
"CHAR XoffChar;" & _
"CHAR ErrorChar;" & _
"CHAR EofChar;" & _
"CHAR EvtChar;" & _
"WORD wReserved1;"
Global Const $tagMODEMDEVCAPS = _
"DWORD dwActualSize;" & _
"DWORD dwRequiredSize;" & _
"DWORD dwDevSpecificOffset;" & _
"DWORD dwDevSpecificSize;" & _
"DWORD dwModemProviderVersion;" & _
"DWORD dwModemManufacturerOffset;" & _
"DWORD dwModemManufacturerSize;" & _
"DWORD dwModemModelOffset;" & _
"DWORD dwModemModelSize;" & _
"DWORD dwModemVersionOffset;" & _
"DWORD dwModemVersionSize;" & _
"DWORD dwDialOptions;" & _
"DWORD dwCallSetupFailTimer;" & _
"DWORD dwInactivityTimeout;" & _
"DWORD dwSpeakerVolume;" & _
"DWORD dwSpeakerMode;" & _
"DWORD dwModemOptions;" & _
"DWORD dwMaxDTERate;" & _
"DWORD dwMaxDCERate;" & _
"BYTE abVariablePortion[1];"
Global Const $tagMODEMSETTINGS = _
"DWORD dwActualSize;" & _
"DWORD dwRequiredSize;" & _
"DWORD dwDevSpecificOffset;" & _
"DWORD dwDevSpecificSize;" & _
"DWORD dwCallSetupFailTimer;" & _
"DWORD dwInactivityTimeout;" & _
"DWORD dwSpeakerVolume;" & _
"DWORD dwSpeakerMode;" & _
"DWORD dwPreferredModemOptions;" & _
"DWORD dwNegotiatedModemOptions;" & _
"DWORD dwNegotiatedDCERate;" & _
"BYTE abVariablePortion[1];"