Windows Dev Center

IMsTscAxEvents::OnConfirmClose method

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.

Syntax


void OnConfirmClose(
  [out] VARIANT_BOOL *pfAllowClose
);

Parameters

pfAllowClose [out]

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.

Return value

This method does not return a value.

Remarks

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.

Windows Server 2003:  An alternative way to present the user with an opportunity to confirm closing the connection is for the container application to monitor for the IMsTscAxEvents::OnLoginComplete event. The application can then prompt the user for confirmation before the application attempts to destroy the control window.

For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Type library

Mstscax.dll

DLL

Mstscax.dll

IID

IMsTscAxEvents is defined as 336d5562-efa8-482e-8cb3-c5c0fc7a7db6

See also

IMsTscAxEvents

 

 

Show:
© 2015 Microsoft