OpenCommConnection Method
Description
Opens a connection to the specified comm port.
Syntax
Visual Basic |
---|
Public Function OpenCommConnection( _ ByVal port As Long, _ ByVal baud As PCDBAUD, _ ByVal parity As PCDPARITY, _ ByVal Data As PCDDATABITS, _ ByVal stop As PCDSTOPBITS, _ ByVal flow As PCDHANDSHAKE _ ) As Long |
Parameters
- port
- The comm port to open. Required.
- baud
The baud rate at which to communicate with the port. Optiona. Default is PCD_BAUD_9600.Value Description PCD_BAUD_110 PCD_BAUD_1200 PCD_BAUD_128000 PCD_BAUD_14400 PCD_BAUD_19200 PCD_BAUD_2400 PCD_BAUD_256000 PCD_BAUD_300 PCD_BAUD_38400 PCD_BAUD_4800 PCD_BAUD_56000 PCD_BAUD_600 PCD_BAUD_9600 - parity
Optional. Default is PCD_NOPARITY.Value Description PCD_EVENPARITY PCD_MARKPARITY PCD_NOPARITY PCD_ODDPARITY PCD_SPACEPARITY - Data
Data Bits. Optional. Default is PCD_DATA8.Value Description PCD_DATA7 PCD_DATA8 - stop
Stop bits. Optional. Default is PCD_ONESTOPBIT.Value Description PCD_ONE5STOPBITS PCD_ONESTOPBIT PCD_TWOSTOPBITS - flow
Flow control. Optional. Default is PCD_RTSCTS.Value Description PCD_DTRDSR PCD_RTSCTS PCD_XONXOFF
Return Type
Long value. 0 if successful, -1 on error.
See Also