ser_sr24_close


int   ser_sr24_close(
     ser_sr24 handle   //serial board handle
     );

Summary

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:

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



Back to Contents Winford Engineering (2000)