ALLOBJECTS.RFGetLastError

long RFGetLastError()

object.GetLastError() As Long

The state of the WireLess Studio link between the user application and the client.

Return value

One of this constants.

WLNOERROR The last operation was successful. All other codes are unrecoverable errors.
WLCOMMERROR The last command was not sent to the RF terminal.
WLFUNCTIONFAILED The response to the last command was not received from the RF terminal.
WLINVALIDRETURN The response to the last command is improper.
WLNOTINITIALIZED The connection is lost. After an error, subsequent calls to any WS function return this code.

Remarks

It is necessary to check the link state in all loops to properly close the application if the link with the terminal is lost.
This method is available in all WS objects, and the error code is global (the same) for all objects.

Example

Public wsRfAuxPort As New RFAUXPORT
Public Sub Main()
Dim iRes As Long
iRes = wsRfAuxPort.RFGetLastError()
End Sub

Objects