IMsRdpClient::RequestClose method
Requests a graceful shutdown of the Remote Desktop ActiveX control. A graceful shutdown can include ending the user's Remote Desktop Services session but it does not shut down the Remote Desktop Session Host (RD Session Host) server.
Syntax
HRESULT RequestClose( [out] ControlCloseStatus *pCloseStatus );
Parameters
- pCloseStatus [out]
-
Indicates whether the application can close the control immediately. Following is a list of possible values.
Return value
Return S_OK if successful.
Remarks
If the pCloseStatus parameter is equal to controlCloseWaitForEvents, the application should wait for one of the following events to occur before the application closes the control:
- IMsTscAxEvents::OnDisconnected. If the user is not logged on to the Remote Desktop Services session, the application can call the DestroyWindow function to destroy all windows and then close the control.
- IMsTscAxEvents::OnConfirmClose. If the user is logged on to the Remote Desktop Services session, the control fires an OnConfirmClose event. This event allows the application to prompt the user about whether to close the connection. If the user replies yes to the prompt, the container application can call DestroyWindow to destroy all windows, and close the control.
RequestClose allows a container application to prompt the user about whether to close a connection. For more information, see IMsTscAxEvents::OnConfirmClose.
For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
IID |
IID_IMsRdpClient is defined as 92b4a539-7115-4b7c-a5a9-e5d9efc2780a |
See also
- IMsRdpClient2
- IMsRdpClient3
- IMsRdpClient4
- IMsRdpClient5
- IMsRdpClient6
- IMsRdpClient7
- IMsRdpClient8
- IMsRdpClient
- IMsTscAxEvents::OnConfirmClose
- IMsTscAxEvents::OnDisconnected
Send comments about this topic to Microsoft
Build date: 10/26/2012
