| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# winsnet.htm
Constants
Structures
COMMPROP
DCB

This file can be included to program for Windows written in EuroAssembler.

It declares the most often used constant symbols and structures used for
networking and communication functions of MS Windows Application Programming Interface (WinAPI),
as they were derived from header files in [WindowsSDK].

    winsnet HEAD

↑ COMMPROP
  The COMMPROP structure is used by the GetCommProperties function to return information about a given communications driver.

    COMMPROP STRUC
    .wPacketLength       D WORD    ; Packet size, in bytes.
    .wPacketVersion      D WORD    ; Packet version.
    .dwServiceMask       D DWORD   ; Services implemented.
    .dwReserved1         D DWORD   ; Reserved.
    .dwMaxTxQueue        D DWORD   ; Max Tx bufsize, in bytes.
    .dwMaxRxQueue        D DWORD   ; Max Rx bufsize, in bytes.
    .dwMaxBaud           D DWORD   ; Max baud rate, in bps.
    .dwProvSubType       D DWORD   ; Specific provider type.
    .dwProvCapabilities  D DWORD   ; Capabilities supported.
    .dwSettableParams    D DWORD   ; Changable parameters.
    .dwSettableBaud      D DWORD   ; Allowable baud rates.
    .wSettableData       D WORD    ; Allowable byte sizes.
    .wSettableStopParity D WORD    ; Stop bits/parity allowed.
    .dwCurrentTxQueue    D DWORD   ; Tx buffer size, in bytes.
    .dwCurrentRxQueue    D DWORD   ; Rx buffer size, in bytes.
    .dwProvSpec1         D DWORD   ; Provider-specific data.
    .dwProvSpec2         D DWORD   ; Provider-specific data.
    .wcProvChar          D UNICHAR ; Provider-specific data.
     ENDTRUC COMMPROP

↑ DCB
  The Device Control Block structure defines the control setting for a serial communications device.

    DCB STRUC
    .DCBlength         DWORD SIZE#DCB
    .BaudRate          DWORD BAUD_38400
    .fBinary           DWORD 1    ; Binary mode, no EOF check.
    .fParity           DWORD 0    ; Enable parity checking.
    .fOutxCtsFlow      DWORD 0    ; CTS output flow control.
    .fOutxDsrFlow      DWORD 0    ; DSR output flow control.
    .fDtrControl       DWORD 0    ; DTR flow control type.
    .fDsrSensitivity   DWORD 0    ; DSR sensitivity.
    .fTXContinueOnXoff DWORD 1    ; XOFF continues Tx.
    .fOutX             DWORD 1    ; XON/XOFF out flow control.
    .fInX              DWORD 1    ; XON/XOFF in flow control.
    .fErrorChar        DWORD 0    ; Enable error replacement.
    .fNull             DWORD 0    ; Enable null stripping.
    .fRtsControl       DWORD 0    ; RTS flow control.
    .fAbortOnError     DWORD 0    ; Abort reads/writes on error.
    .fDummy2           DWORD 0    ; Reserved.
    .wReserved         WORD  0    ; Not currently used.
    .XonLim            WORD  4    ; Transmit XON threshold.
    .XoffLim           WORD  16   ; Transmit XOFF threshold.
    .ByteSize          BYTE  8    ; Number of bits/byte, 4..8.
    .Parity            BYTE  0    ; 0,1,2,3,4 = none,odd,even,mark,space.
    .StopBits          BYTE  0    ; 0,1,2 = 1, 1.5, 2.
    .XonChar           BYTE  0x11 ; Tx and Rx XON character.
    .XoffChar          BYTE  0x13 ; Tx and Rx XOFF character.
    .ErrorChar         BYTE  0x7F ; Error replacement character.
    .EofChar           BYTE  0x17 ; End of input character.
    .EvtChar           BYTE  0x05 ; Received event character.
    .wReserved1        WORD  0    ; Reserved, do not use.
     ENDSTRUC DCB

↑ Constants
  Encoding of constant symbols used in WinAPI.

    ; Settable baud rates in the provider.
    BAUD_075      = 0x00000001
    BAUD_110      = 0x00000002
    BAUD_134_5    = 0x00000004
    BAUD_150      = 0x00000008
    BAUD_300      = 0x00000010
    BAUD_600      = 0x00000020
    BAUD_1200     = 0x00000040
    BAUD_1800     = 0x00000080
    BAUD_2400     = 0x00000100
    BAUD_4800     = 0x00000200
    BAUD_7200     = 0x00000400
    BAUD_9600     = 0x00000800
    BAUD_14400    = 0x00001000
    BAUD_19200    = 0x00002000
    BAUD_38400    = 0x00004000
    BAUD_56K      = 0x00008000
    BAUD_128K     = 0x00010000
    BAUD_115200   = 0x00020000
    BAUD_57600    = 0x00040000
    BAUD_USER     = 0x10000000

    ; Settable Data Bits
    DATABITS_5    = 0x0001
    DATABITS_6    = 0x0002
    DATABITS_7    = 0x0004
    DATABITS_8    = 0x0008
    DATABITS_16   = 0x0010
    DATABITS_16X  = 0x0020

    ; Settable Stop and Parity bits.
    STOPBITS_10   = 0x0001
    STOPBITS_15   = 0x0002
    STOPBITS_20   = 0x0004
    PARITY_NONE   = 0x0100
    PARITY_ODD    = 0x0200
    PARITY_EVEN   = 0x0400
    PARITY_MARK   = 0x0800
    PARITY_SPACE  = 0x1000

     ENDHEAD winsnet

▲Back to the top▲