IWTSProtocolConnectionCallback::RedrawWindow method (wtsprotocol.h)

[IWTSProtocolConnectionCallback::RedrawWindow is no longer available for use as of Windows Server 2012. Instead, use IWRdsProtocolConnectionCallback::RedrawWindow.]

Requests that the Remote Desktop Services service redraw the client window.

Syntax

HRESULT RedrawWindow(
  [in, optional] WTS_SMALL_RECT *rect
);

Parameters

[in, optional] rect

A WTS_SMALL_RECT structure that contains the x and y coordinates of the screen to redraw. A value of NULL requests that the entire screen be redrawn.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following list. For a list of common error codes, see Common HRESULT Values.

Remarks

This method is typically called after the StopScreenUpdates method.

To avoid deadlocks when calling this method:

  • Create a separate thread on which to make the call. Do not make the call from inside of any protocol method that you are implementing.
  • Do not block on this method before replying to another call by the Remote Desktop Services service.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wtsprotocol.h

See also

IWTSProtocolConnectionCallback

StopScreenUpdates