Notifies Remote Desktop Gateway (RD Gateway) about the result of an attempt to authorize a resource.
HRESULT OnChannelAuthorized( HRESULT hrIn, GUID mainSessionId, int subSessionId, BSTR *allowedResourceNames, ULONG numAllowedResourceNames, BSTR *failedResourceNames, ULONG numFailedResourceNames );
The result of the authorization attempt. Specify S_OK to indicate that the attempt succeeded. Specify any other value to indicate that the attempt failed.
A unique identifier assigned to the connection request by RD Gateway.
A unique identifier assigned to the subsession by RD Gateway. A subsession is a session launched from another session.
A pointer to a BSTR that contains a list of resources that were successfully authorized.
The number of resources referenced by the allowedResourceNames parameter. If the function succeeds, this parameter must be one or more.
A pointer to a BSTR that contains a list of resources that failed authorization.
The number of resources referenced by the failedResourceNames parameter.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
You can call this method from your implementation of AuthorizeResource. If authorization requires more than 1 second, we recommend launching a separate thread to perform authentication.
For an example that uses the OnChannelAuthorized method, see Remote Desktop Gateway Pluggable Authentication and Authorization Sample.
|Windows version||Windows 7 Windows Server 2008 R2|