CloseCom

Com port management function.

The CloseCom function closes the specified Com port. Not available in WinTask Lite.

Syntax

Ret = CloseCom (<num_port>)

Parameter

<num_port>: Com port number to close (from 1 to 8, Com1 to Com8).

Return value

Ret, numeric return code. If the specified Com port has been closed correctly, the function returns 0, otherwise use this return code for error management.

See also

OpenCom, WriteCom, ReadCom

Example

ret=CloseCom(1) ' Closes the serial port Com1.