Called when the client calls the IMsRdpClient::RequestClose method. In response to this event, the user should be prompted to confirm closing the connection. For more information, see the following Remarks section.
void OnConfirmClose( [out] VARIANT_BOOL *pfAllowClose );
If VARIANT_TRUE, the default, indicates that the user wants to close the connection. If VARIANT_FALSE, indicates that the user does not want to close the connection. For more information, see the following Remarks section.
This method does not return a value.
When a container application calls the IMsRdpClient::RequestClose method, that method returns a value indicating whether the container should wait for an OnConfirmClose event to occur before closing the control connection. If RequestClose returns controlCloseWaitForEvents, and the user is connected and logged on to their Remote Desktop Services session, the OnConfirmClose event fires. At that point the container application can prompt the user, asking whether the user wants to close the connection. If the user wants to close the connection, the application should set the pfAllowClose parameter to VARIANT_TRUE and proceed with closing the connection. If the user does not want to close, the application should set pfAllowClose to VARIANT_FALSE and leave the connection open.
For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.
|Minimum supported client
|Minimum supported server
||Windows Server 2008
||IMsTscAxEvents is defined as 336d5562-efa8-482e-8cb3-c5c0fc7a7db6