ITSGAuthenticateUserSink::OnUserAuthenticationFailed method (tsgauthenticationengine.h)

Notifies Remote Desktop Gateway (RD Gateway) that the authentication plug-in failed to authenticate the user.

Syntax

HRESULT OnUserAuthenticationFailed(
  [in] ULONG_PTR context,
  [in] HRESULT   genericErrorCode,
  [in] HRESULT   specificErrorCode
);

Parameters

[in] context

A pointer to a ULONG that contains a value that identifies this connection. Use the value that was passed by the AuthenticateUser method.

[in] genericErrorCode

A Windows error code that specifies the cause of the authentication failure.

[in] specificErrorCode

This parameter is reserved. Always set this parameter to zero.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

You can call this method from your implementation of AuthenticateUser. If authentication requires more than 1 second, we recommend launching a separate thread to perform authentication.

For a sample that uses the OnUserAuthenticationFailed method, see the Remote Desktop Gateway Pluggable Authentication and Authorization sample.

Requirements

Requirement Value
Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header tsgauthenticationengine.h

See also

ITSGAuthenticateUserSink