Performs an extended function for the serial communication.
[Visual Basic] Public Function EscapeCommFunc(ByVal dwFunc As Integer) As Boolean |
Parameters
dwFunc
Extended function to be performed, this parameter can be one of the following values.
dwFunc Value |
Comment |
3 |
Sets RTS (request-to-send) line |
4 |
Clears RTS (request-to-send) line |
5 |
Sets DTR (data-terminal-ready) line |
6 |
Clears DTR (data-terminal-ready) line. |
7 |
Resets device if possible |
8 |
Sets the device break line |
9 |
Clears the device break line |
Return Value
If the function succeeds, the return value is true, otherwise the return value is false.
Remarks
If you want to shut down a phone line connection established by modem AT commands and still keep port open, you can use this function to achieve it by assigning 6 to dwFunc parameter.