FreeRDP
Loading...
Searching...
No Matches
wts_services.h File Reference
#include <winpr/com.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  IWTSPluginServiceProviderVtbl
 
struct  IWTSPluginServiceProvider
 
struct  BITMAP_RENDERER_STATISTICS
 
struct  WTS_RECT
 same layout as Win32's RECT, which winpr doesn't have on POSIX More...
 
struct  IWTSBitmapRendererVtbl
 
struct  IWTSBitmapRenderer
 
struct  IWTSBitmapRendererCallbackVtbl
 
struct  IWTSBitmapRendererCallback
 
struct  IWTSBitmapRenderServiceVtbl
 
struct  IWTSBitmapRenderService
 
struct  WTS_WINDOW_INFO
 40 bytes on x64 More...
 
struct  IWTSWindowChangedCallbackVtbl
 
struct  IWTSWindowChangedCallback
 
struct  IWTSWindowInfoServiceVtbl
 
struct  IWTSWindowInfoService
 

Enumerations

enum  WTS_RDP_SESSION_TYPE { WTS_RDP_SESSION_TYPE_DESKTOP = 0 , WTS_RDP_SESSION_TYPE_REMOTEAPP = 1 }
 

Functions

 WINPR_COM_DEFINE_GUID (IID_IWTSPluginServiceProvider, 0xd3e07363, 0x087c, 0x476c, 0x86, 0xa7, 0xdb, 0xb1, 0x5f, 0x46, 0xdd, 0xb4)
 
 WINPR_COM_DEFINE_GUID (RDCLIENT_BITMAP_RENDER_SERVICE, 0xe4cc08cb, 0x942e, 0x4b19, 0x85, 0x04, 0xbd, 0x5a, 0x89, 0xa7, 0x47, 0xf5)
 
 WINPR_COM_DEFINE_GUID (IID_IWTSBitmapRenderService, 0xea326091, 0x05fe, 0x40c1, 0xb4, 0x9c, 0x3d, 0x2e, 0xf4, 0x62, 0x6a, 0x0e)
 
 WINPR_COM_DEFINE_GUID (IID_IWTSBitmapRenderer, 0x5b7acc97, 0xf3c9, 0x46f7, 0x8c, 0x5b, 0xfa, 0x68, 0x5d, 0x34, 0x41, 0xb1)
 
 WINPR_COM_DEFINE_GUID (IID_IWTSBitmapRendererCallback, 0xd782928e, 0xfe4e, 0x4e77, 0xae, 0x90, 0x9c, 0xd0, 0xb3, 0xe3, 0xb3, 0x53)
 
 WINPR_COM_DEFINE_GUID (RDCLIENT_WINDOW_INFO_SERVICE, 0xa9a17a6b, 0xcdb3, 0x4e81, 0xb5, 0xc8, 0xbd, 0x63, 0x82, 0x2a, 0x8d, 0x6c)
 
 WINPR_COM_DEFINE_GUID (IID_IWTSWindowInfoService, 0x2a002c7b, 0x0120, 0x4d04, 0xbf, 0xb1, 0x3c, 0x73, 0x11, 0x0c, 0x85, 0x81)
 

Detailed Description

FreeRDP: A Remote Desktop Protocol Implementation Client services for virtual channel plugins (Microsoft COM interfaces)

Copyright 2026 David Fort conta.nosp@m.ct@h.nosp@m.arden.nosp@m.ing-.nosp@m.consu.nosp@m.ltin.nosp@m.g.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The services Microsoft's clients (mstscax.dll, rdclientax.dll) offer to virtual channel plugins through IWTSPluginServiceProvider::GetService(serviceKey), with their exact binary layout, so that the same objects serve FreeRDP's own channels and native plugins on Windows.

The names follow the Windows SDK (tsvirtualchannels.h) where it has them. That header is not included anywhere: it also defines IWTSVirtualChannelManager & co, which clash with freerdp/dvc.h.

The interfaces are only declared in C form (see winpr/com.h), in C and in C++: their vtables start with a wIUnknownVtbl iunknown, called with the WINPR_COM_* macros, and the other methods are called with ->lpVtbl->Method(This, ...). The objects GetService hands out are wIUnknown*: in C++ that is the C++ form, called directly.

Layouts are x64 ones. IWTSWindowInfoService is undocumented and only exists in rdclientax.dll (Windows App / AVD client), not in mstscax.dll.

Where they live (rdp_context in freerdp/freerdp.h):

  • the client implements IWTSWindowInfoService and IWTSBitmapRenderService with the behaviour described below, and stores one of each in rdpContext::windowInfoService and rdpContext::bitmapRenderService (holding one reference) before connecting. It releases them and resets the fields to nullptr in its ContextFree. Channels and plugins may hold objects of it after that: they must then answer E_UNEXPECTED instead of using the client's state. The core is the only subscriber of the client's window info service.
  • consumers are virtual channel plugins: FreeRDP's own channels, or channels built and shipped separately against the installed headers. They get the provider with freerdp_get_plugin_service_provider() from the rdpContext of their entry points, call GetService() and QueryInterface() the result, as with Microsoft's clients. Only these interfaces and the provider are needed: a plugin needs no access to the client's internals. A service the client didn't set answers E_NOINTERFACE. Each GetService of the window info service gives a new object with its own subscriber (see below).
  • native Windows plugins expect the provider by QueryInterface(IID_IWTSPluginServiceProvider) on the IWTSVirtualChannelManager given to IWTSPlugin::Initialize: a loader for them can hand out the same object.

Threads: the services may be called from any thread (a channel's own, a decoder's). The client's implementations must be thread safe and must not block for long in Render().

Since
version 3.34.0

Definition in file wts_services.h.


Data Structure Documentation

◆ IWTSPluginServiceProviderVtbl

struct IWTSPluginServiceProviderVtbl

Definition at line 85 of file wts_services.h.

Collaboration diagram for IWTSPluginServiceProviderVtbl:
Data Fields
wIUnknownVtbl iunknown
IWTSPluginServiceProvider GUID wIUnknown ** ppunkObject
IWTSPluginServiceProvider GUID ServiceId
IWTSPluginServiceProvider * This

◆ IWTSPluginServiceProvider

struct IWTSPluginServiceProvider

Definition at line 96 of file wts_services.h.

Collaboration diagram for IWTSPluginServiceProvider:
Data Fields
const IWTSPluginServiceProviderVtbl * lpVtbl

◆ BITMAP_RENDERER_STATISTICS

struct BITMAP_RENDERER_STATISTICS

Definition at line 114 of file wts_services.h.

Data Fields
DWORD dwFramesDelivered
DWORD dwFramesDropped

◆ WTS_RECT

struct WTS_RECT

same layout as Win32's RECT, which winpr doesn't have on POSIX

Definition at line 121 of file wts_services.h.

Data Fields
LONG bottom
LONG left
LONG right
LONG top

◆ IWTSBitmapRenderer

struct IWTSBitmapRenderer

Definition at line 142 of file wts_services.h.

Collaboration diagram for IWTSBitmapRenderer:
Data Fields
const IWTSBitmapRendererVtbl * lpVtbl

◆ IWTSBitmapRendererCallbackVtbl

struct IWTSBitmapRendererCallbackVtbl

Definition at line 147 of file wts_services.h.

Collaboration diagram for IWTSBitmapRendererCallbackVtbl:
Data Fields
wIUnknownVtbl iunknown
IWTSBitmapRendererCallback WTS_RECT rcNewSize
IWTSBitmapRendererCallback * This

◆ IWTSBitmapRendererCallback

struct IWTSBitmapRendererCallback

Definition at line 156 of file wts_services.h.

Collaboration diagram for IWTSBitmapRendererCallback:
Data Fields
const IWTSBitmapRendererCallbackVtbl * lpVtbl

◆ IWTSBitmapRenderServiceVtbl

struct IWTSBitmapRenderServiceVtbl

Definition at line 161 of file wts_services.h.

Collaboration diagram for IWTSBitmapRenderServiceVtbl:
Data Fields
wIUnknownVtbl iunknown
IWTSBitmapRenderService UINT64 mappingId
IWTSBitmapRenderService UINT64 IWTSBitmapRendererCallback * pMappedRendererCallback
IWTSBitmapRenderService UINT64 IWTSBitmapRendererCallback IWTSBitmapRenderer ** ppMappedRenderer
IWTSBitmapRenderService * This

◆ IWTSBitmapRenderService

struct IWTSBitmapRenderService

Definition at line 172 of file wts_services.h.

Collaboration diagram for IWTSBitmapRenderService:
Data Fields
const IWTSBitmapRenderServiceVtbl * lpVtbl

◆ WTS_WINDOW_INFO

struct WTS_WINDOW_INFO

40 bytes on x64

Definition at line 202 of file wts_services.h.

Data Fields
HWND hwnd
INT32 remoteHeight
INT32 remoteWidth
float scale
INT32 scrollX
INT32 scrollY
INT32 viewHeight
INT32 viewWidth

◆ IWTSWindowChangedCallbackVtbl

struct IWTSWindowChangedCallbackVtbl

Definition at line 220 of file wts_services.h.

Collaboration diagram for IWTSWindowChangedCallbackVtbl:
Data Fields
wIUnknownVtbl iunknown
IWTSWindowChangedCallback * This
IWTSWindowChangedCallback const WTS_WINDOW_INFO * windowInfo

◆ IWTSWindowChangedCallback

struct IWTSWindowChangedCallback

Definition at line 229 of file wts_services.h.

Collaboration diagram for IWTSWindowChangedCallback:
Data Fields
const IWTSWindowChangedCallbackVtbl * lpVtbl

◆ IWTSWindowInfoService

struct IWTSWindowInfoService

Definition at line 252 of file wts_services.h.

Collaboration diagram for IWTSWindowInfoService:
Data Fields
const IWTSWindowInfoServiceVtbl * lpVtbl

Enumeration Type Documentation

◆ WTS_RDP_SESSION_TYPE

enum WTS_RDP_SESSION_TYPE

Definition at line 195 of file wts_services.h.

196 {
197 WTS_RDP_SESSION_TYPE_DESKTOP = 0,
198 WTS_RDP_SESSION_TYPE_REMOTEAPP = 1, /* the client's "RailMode" property */
199 } WTS_RDP_SESSION_TYPE;