int GetComConnectionState (int COMPort);
Returns the connection state of the specified port.
Linux This function is not supported.
GetComConnectionState returns an error if you have not opened the port or if you pass an invalid value for COMPort.
![]() |
Note This function works only with NI Serial hardware. The function returns an Unknown System Error with other hardware ports. |
Input | ||
Name | Type | Description |
COMPort | integer | A number that indicates the COM port on which to operate. This number is paired with deviceName, which represents the COM port, during the OpenComConfig function call. Default Value: 1—COM1 Valid Range: 1—1,000 |
Name | Type | Description | ||||||
state | integer | The current state of the port. A negative value indicates that an error occurred.
|