IWTSVirtualChannelCallback::OnClose method

Notifies the user that the channel has been closed. There are three ways for the channel to be closed:

  • The user has called the IWTSVirtualChannel::Close method.
  • The Remote Desktop Connection (RDC) client has disconnected from the Remote Desktop Session Host (RD Session Host) server.
  • The server has called the WTSVirtualChannel::Close method on the channel.

Regardless of how the channel has been closed, there is no need to call IWTSVirtualChannel::Close() when this call is received. If such a call is made, it is possible that if the plug-in is running out of process, that a call to IWTSVirtualChannel::Close() may cause a deadlock. A deadlock may occur because the caller of OnClose() holds a channel list lock, and the Close() method will try to acquire the same lock on a different thread.

Syntax


HRESULT OnClose();

Parameters

This method has no parameters.

Return value

Returns S_OK on success. Results in no action if the call fails.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

TsVirtualChannels.h

IDL

TsVirtualChannels.idl

See also

IWTSVirtualChannelCallback

 

 

Show: