This function closes the device. This includes closing the serial port,
freeing any internal objects that have been created, and freeing the
internal data structure from allocated memory. Closing the board
does not have any affect on the state of the actual I/O board. This
means that the configuration for each port is preserved, and any
output ports retain their current value. Also, any enabled events
remain enabled. If you would like the board to be reset to a
default configuration, use the
ser_sr24_reset_board()
function.
Parameters
handle:
This is the handle to the serial board; it is actually a pointer to the data
structure for the board.
Return Values
Function returns 0 unless an invalid handle is passed.
Possible error codes:
SER_INVALID_HANDLE - returned if a NULL pointer was passed for the handle
Visual Basic Notes
The Visual Basic equivalent of this function is the CloseBoard method.
Return values are listed above.
Prototype:
object.CloseBoard(
) As Long
Example:
result = object.CloseBoard() 'close the connection to the board