Closes a communication port. Any Cicode tasks that are waiting for a read or write operation to complete (or that are retrying to read or write) return with a range error. Citect SCADA automatically closes all communication ports at shutdown.
This function can only be called from an I/O Server.
The communication port handle, returned from the ComOpen() function. This handle identifies the table where all data on the associated communication port is stored.
0 if the port is successfully closed, or an error if the port is already closed or if the port number is invalid.
ComOpen, ComRead, ComWrite
Published June 2018