SmartCode ViewerX

ISmartCodeVNCViewer::AuthenticationFailed Event


Fired in case if ViewerX has failed to authenticate with VNC server. The caller can use this even to suppress the default password prompt dialog box as well as the "authentication failed" message box.

Syntax

HRESULT AuthenticationFailed(VARIANT_BOOL* pbCancelAndDontPromptForPassword);

Parameters

pbCancelAndDontPromptForPassword
Pointer to a variable of type VARIANT_BOOL* that allows the cancellation of the default password prompt dialog. If VARIANT_TRUE, the password dialog and the "authentication failed" message boxes are suppressed; VARIANT_FALSE allows those dialog boxes to be displayed.
Default value: VARIANT_FALSE

Remarks

If attempt to establish connection was performed using asynchronous connection with either ConnectAsync() or ConnectAsyncEx() methods, then the event sink callback function will be executed in the non-GUI thread.

Do not attempt to re-establish a connection inside the AuthenticationFailed event sink callback function body.

Return Value

Returns S_OK if successful, or an error value otherwise.