SmartCode ViewerX

ISmartCodeVNCViewer::OnAutoReconnecting Event


Fired when a client is in the process of automatically reconnecting to a VNC server.

Syntax

HRESULT OnAutoReconnecting(long attemptCount, enum AutoReconnectContinueState* pArcContinueStatus);

Parameters

attemptCount
Number of attempts that have been made in the current automatic reconnection process. This count increases by one for each attempt made.
pArcContinueStatus
Pointer to a returned code of type AutoReconnectContinueState specifying the state of the automatic reconnection process. This code can be reset to change the state of the current automatic reconnection process.

Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Implement this method in your event sink to receive notification that the control is reestablishing a connection with a VNC server.

When the state of the automatic reconnection process is changed by setting the value of the pArcContinueStatus parameter to ARCS_CONTINUE, this method functions in a purely advisory mode. Containers can listen to this event for notifications that the automatic reconnection process is proceeding. The control will automatically keep trying to re-establish a connection based on its own internal timing and attempt counts. This method is called during each automatic reconnection attempt in order to notify the container.

When the state of the automatic reconnection process is changed by setting the value of the pArcContinueStatus parameter to ARCS_STOP, the current automatic reconnection attempt will be terminated, a disconnect notification will be sent to the container, and no further automatic reconnect notifications will be issued.

Note Use the EnableAutoReconnect property to enable or disable automatic reconnection.