FreeRDP
libfreerdp/core/server.c File Reference
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/constants.h>
#include <freerdp/server/channels.h>
#include <freerdp/channels/drdynvc.h>
#include <freerdp/utils/drdynvc.h>
#include "rdp.h"
#include "server.h"

Macros

#define TAG   FREERDP_TAG("core.server")
 
#define DEBUG_DVC(...)
 
#define DVC_MAX_DATA_PDU_SIZE   1600
 

Functions

static rdpPeerChannel * wts_get_dvc_channel_by_id (WTSVirtualChannelManager *vcm, UINT32 ChannelId)
 
static BOOL wts_queue_receive_data (rdpPeerChannel *channel, const BYTE *Buffer, UINT32 Length)
 
static BOOL wts_queue_send_item (rdpPeerChannel *channel, BYTE *Buffer, UINT32 Length)
 
static int wts_read_variable_uint (wStream *s, int cbLen, UINT32 *val)
 
static BOOL wts_read_drdynvc_capabilities_response (rdpPeerChannel *channel, UINT32 length)
 
static BOOL wts_read_drdynvc_create_response (rdpPeerChannel *channel, wStream *s, UINT32 length)
 
static BOOL wts_read_drdynvc_data_first (rdpPeerChannel *channel, wStream *s, int cbLen, UINT32 length)
 
static BOOL wts_read_drdynvc_data (rdpPeerChannel *channel, wStream *s, UINT32 length)
 
static void wts_read_drdynvc_close_response (rdpPeerChannel *channel)
 
static BOOL wts_read_drdynvc_pdu (rdpPeerChannel *channel)
 
static int wts_write_variable_uint (wStream *s, UINT32 val)
 
static void wts_write_drdynvc_header (wStream *s, BYTE Cmd, UINT32 ChannelId)
 
static BOOL wts_write_drdynvc_create_request (wStream *s, UINT32 ChannelId, const char *ChannelName)
 
static BOOL WTSProcessChannelData (rdpPeerChannel *channel, UINT16 channelId, const BYTE *data, size_t s, UINT32 flags, size_t t)
 
static BOOL WTSReceiveChannelData (freerdp_peer *client, UINT16 channelId, const BYTE *data, size_t size, UINT32 flags, size_t totalSize)
 
BOOL WTSVirtualChannelManagerOpen (HANDLE hServer)
 
BOOL WTSVirtualChannelManagerCheckFileDescriptorEx (HANDLE hServer, BOOL autoOpen)
 
BOOL WTSVirtualChannelManagerCheckFileDescriptor (HANDLE hServer)
 
HANDLE WTSVirtualChannelManagerGetEventHandle (HANDLE hServer)
 
static rdpMcsChannel * wts_get_joined_channel_by_name (rdpMcs *mcs, const char *channel_name)
 
static rdpMcsChannel * wts_get_joined_channel_by_id (rdpMcs *mcs, const UINT16 channel_id)
 
BOOL WTSIsChannelJoinedByName (freerdp_peer *client, const char *channel_name)
 
BOOL WTSIsChannelJoinedById (freerdp_peer *client, const UINT16 channel_id)
 
BOOL WTSVirtualChannelManagerIsChannelJoined (HANDLE hServer, const char *name)
 
BYTE WTSVirtualChannelManagerGetDrdynvcState (HANDLE hServer)
 
void WTSVirtualChannelManagerSetDVCCreationCallback (HANDLE hServer, psDVCCreationStatusCallback cb, void *userdata)
 
UINT16 WTSChannelGetId (freerdp_peer *client, const char *channel_name)
 
UINT32 WTSChannelGetIdByHandle (HANDLE hChannelHandle)
 
BOOL WTSChannelSetHandleByName (freerdp_peer *client, const char *channel_name, void *handle)
 
BOOL WTSChannelSetHandleById (freerdp_peer *client, const UINT16 channel_id, void *handle)
 
void * WTSChannelGetHandleByName (freerdp_peer *client, const char *channel_name)
 
void * WTSChannelGetHandleById (freerdp_peer *client, const UINT16 channel_id)
 
const char * WTSChannelGetName (freerdp_peer *client, UINT16 channel_id)
 
char ** WTSGetAcceptedChannelNames (freerdp_peer *client, size_t *count)
 
INT64 WTSChannelGetOptions (freerdp_peer *client, UINT16 channel_id)
 
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionW (LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
 
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionA (LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
 
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExW (LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers, DWORD flags)
 
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExA (LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers, DWORD flags)
 
BOOL WINAPI FreeRDP_WTSStopRemoteControlSession (ULONG LogonId)
 
BOOL WINAPI FreeRDP_WTSConnectSessionW (ULONG LogonId, ULONG TargetLogonId, PWSTR pPassword, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSConnectSessionA (ULONG LogonId, ULONG TargetLogonId, PSTR pPassword, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSEnumerateServersW (LPWSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW *ppServerInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateServersA (LPSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA *ppServerInfo, DWORD *pCount)
 
HANDLE WINAPI FreeRDP_WTSOpenServerW (LPWSTR pServerName)
 
static void wts_virtual_channel_manager_free_message (void *obj)
 
static void channel_free (rdpPeerChannel *channel)
 
static void array_channel_free (void *ptr)
 
static BOOL dynChannelMatch (const void *v1, const void *v2)
 
static UINT32 channelId_Hash (const void *key)
 
HANDLE WINAPI FreeRDP_WTSOpenServerA (LPSTR pServerName)
 
HANDLE WINAPI FreeRDP_WTSOpenServerExW (LPWSTR pServerName)
 
HANDLE WINAPI FreeRDP_WTSOpenServerExA (LPSTR pServerName)
 
VOID WINAPI FreeRDP_WTSCloseServer (HANDLE hServer)
 
BOOL WINAPI FreeRDP_WTSEnumerateSessionsW (HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOW *ppSessionInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateSessionsA (HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOA *ppSessionInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateSessionsExW (HANDLE hServer, DWORD *pLevel, DWORD Filter, PWTS_SESSION_INFO_1W *ppSessionInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateSessionsExA (HANDLE hServer, DWORD *pLevel, DWORD Filter, PWTS_SESSION_INFO_1A *ppSessionInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateProcessesW (HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOW *ppProcessInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateProcessesA (HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOA *ppProcessInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSTerminateProcess (HANDLE hServer, DWORD ProcessId, DWORD ExitCode)
 
BOOL WINAPI FreeRDP_WTSQuerySessionInformationW (HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPWSTR *ppBuffer, DWORD *pBytesReturned)
 
BOOL WINAPI FreeRDP_WTSQuerySessionInformationA (HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPSTR *ppBuffer, DWORD *pBytesReturned)
 
BOOL WINAPI FreeRDP_WTSQueryUserConfigW (LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR *ppBuffer, DWORD *pBytesReturned)
 
BOOL WINAPI FreeRDP_WTSQueryUserConfigA (LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR *ppBuffer, DWORD *pBytesReturned)
 
BOOL WINAPI FreeRDP_WTSSetUserConfigW (LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer, DWORD DataLength)
 
BOOL WINAPI FreeRDP_WTSSetUserConfigA (LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer, DWORD DataLength)
 
BOOL WINAPI FreeRDP_WTSSendMessageW (HANDLE hServer, DWORD SessionId, LPWSTR pTitle, DWORD TitleLength, LPWSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSSendMessageA (HANDLE hServer, DWORD SessionId, LPSTR pTitle, DWORD TitleLength, LPSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSDisconnectSession (HANDLE hServer, DWORD SessionId, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSLogoffSession (HANDLE hServer, DWORD SessionId, BOOL bWait)
 
BOOL WINAPI FreeRDP_WTSShutdownSystem (HANDLE hServer, DWORD ShutdownFlag)
 
BOOL WINAPI FreeRDP_WTSWaitSystemEvent (HANDLE hServer, DWORD EventMask, DWORD *pEventFlags)
 
static void peer_channel_queue_free_message (void *obj)
 
static rdpPeerChannel * channel_new (WTSVirtualChannelManager *vcm, freerdp_peer *client, UINT32 ChannelId, UINT16 index, UINT16 type, size_t chunkSize, const char *name)
 
HANDLE WINAPI FreeRDP_WTSVirtualChannelOpen (HANDLE hServer, DWORD SessionId, LPSTR pVirtualName)
 
HANDLE WINAPI FreeRDP_WTSVirtualChannelOpenEx (DWORD SessionId, LPSTR pVirtualName, DWORD flags)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelClose (HANDLE hChannelHandle)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelRead (HANDLE hChannelHandle, ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelWrite (HANDLE hChannelHandle, PCHAR Buffer, ULONG Length, PULONG pBytesWritten)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeInput (HANDLE hChannelHandle)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeOutput (HANDLE hChannelHandle)
 
BOOL WINAPI FreeRDP_WTSVirtualChannelQuery (HANDLE hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass, PVOID *ppBuffer, DWORD *pBytesReturned)
 
VOID WINAPI FreeRDP_WTSFreeMemory (PVOID pMemory)
 
BOOL WINAPI FreeRDP_WTSFreeMemoryExW (WTS_TYPE_CLASS WTSTypeClass, PVOID pMemory, ULONG NumberOfEntries)
 
BOOL WINAPI FreeRDP_WTSFreeMemoryExA (WTS_TYPE_CLASS WTSTypeClass, PVOID pMemory, ULONG NumberOfEntries)
 
BOOL WINAPI FreeRDP_WTSRegisterSessionNotification (HWND hWnd, DWORD dwFlags)
 
BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotification (HWND hWnd)
 
BOOL WINAPI FreeRDP_WTSRegisterSessionNotificationEx (HANDLE hServer, HWND hWnd, DWORD dwFlags)
 
BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotificationEx (HANDLE hServer, HWND hWnd)
 
BOOL WINAPI FreeRDP_WTSQueryUserToken (ULONG SessionId, PHANDLE phToken)
 
BOOL WINAPI FreeRDP_WTSEnumerateProcessesExW (HANDLE hServer, DWORD *pLevel, DWORD SessionId, LPWSTR *ppProcessInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateProcessesExA (HANDLE hServer, DWORD *pLevel, DWORD SessionId, LPSTR *ppProcessInfo, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateListenersW (HANDLE hServer, PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEW pListeners, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSEnumerateListenersA (HANDLE hServer, PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEA pListeners, DWORD *pCount)
 
BOOL WINAPI FreeRDP_WTSQueryListenerConfigW (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPWSTR pListenerName, PWTSLISTENERCONFIGW pBuffer)
 
BOOL WINAPI FreeRDP_WTSQueryListenerConfigA (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPSTR pListenerName, PWTSLISTENERCONFIGA pBuffer)
 
BOOL WINAPI FreeRDP_WTSCreateListenerW (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPWSTR pListenerName, PWTSLISTENERCONFIGW pBuffer, DWORD flag)
 
BOOL WINAPI FreeRDP_WTSCreateListenerA (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPSTR pListenerName, PWTSLISTENERCONFIGA pBuffer, DWORD flag)
 
BOOL WINAPI FreeRDP_WTSSetListenerSecurityW (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
 
BOOL WINAPI FreeRDP_WTSSetListenerSecurityA (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
 
BOOL WINAPI FreeRDP_WTSGetListenerSecurityW (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded)
 
BOOL WINAPI FreeRDP_WTSGetListenerSecurityA (HANDLE hServer, PVOID pReserved, DWORD Reserved, LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded)
 
BOOL CDECL FreeRDP_WTSEnableChildSessions (BOOL bEnable)
 
BOOL CDECL FreeRDP_WTSIsChildSessionsEnabled (PBOOL pbEnabled)
 
BOOL CDECL FreeRDP_WTSGetChildSessionId (PULONG pSessionId)
 
DWORD WINAPI FreeRDP_WTSGetActiveConsoleSessionId (void)
 
BOOL WINAPI FreeRDP_WTSLogoffUser (HANDLE hServer)
 
BOOL WINAPI FreeRDP_WTSLogonUser (HANDLE hServer, LPCSTR username, LPCSTR password, LPCSTR domain)
 
void server_channel_common_free (rdpPeerChannel *channel)
 
rdpPeerChannel * server_channel_common_new (freerdp_peer *client, UINT16 index, UINT32 channelId, size_t chunkSize, const wObject *callback, const char *name)
 

Variables

static DWORD g_SessionId = 1
 
static wHashTable * g_ServerHandles = NULL
 

Macro Definition Documentation

◆ DEBUG_DVC

#define DEBUG_DVC (   ...)
Value:
do \
{ \
} while (0)

◆ DVC_MAX_DATA_PDU_SIZE

#define DVC_MAX_DATA_PDU_SIZE   1600

◆ TAG

#define TAG   FREERDP_TAG("core.server")

FreeRDP: A Remote Desktop Protocol Implementation Server Channels

Copyright 2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.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.

Function Documentation

◆ array_channel_free()

static void array_channel_free ( void *  ptr)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channel_free()

static void channel_free ( rdpPeerChannel *  channel)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channel_new()

static rdpPeerChannel* channel_new ( WTSVirtualChannelManager vcm,
freerdp_peer *  client,
UINT32  ChannelId,
UINT16  index,
UINT16  type,
size_t  chunkSize,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channelId_Hash()

static UINT32 channelId_Hash ( const void *  key)
static
Here is the caller graph for this function:

◆ dynChannelMatch()

static BOOL dynChannelMatch ( const void *  v1,
const void *  v2 
)
static
Here is the caller graph for this function:

◆ FreeRDP_WTSCloseServer()

VOID WINAPI FreeRDP_WTSCloseServer ( HANDLE  hServer)
Here is the call graph for this function:

◆ FreeRDP_WTSConnectSessionA()

BOOL WINAPI FreeRDP_WTSConnectSessionA ( ULONG  LogonId,
ULONG  TargetLogonId,
PSTR  pPassword,
BOOL  bWait 
)

◆ FreeRDP_WTSConnectSessionW()

BOOL WINAPI FreeRDP_WTSConnectSessionW ( ULONG  LogonId,
ULONG  TargetLogonId,
PWSTR  pPassword,
BOOL  bWait 
)

◆ FreeRDP_WTSCreateListenerA()

BOOL WINAPI FreeRDP_WTSCreateListenerA ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPSTR  pListenerName,
PWTSLISTENERCONFIGA  pBuffer,
DWORD  flag 
)

◆ FreeRDP_WTSCreateListenerW()

BOOL WINAPI FreeRDP_WTSCreateListenerW ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPWSTR  pListenerName,
PWTSLISTENERCONFIGW  pBuffer,
DWORD  flag 
)

◆ FreeRDP_WTSDisconnectSession()

BOOL WINAPI FreeRDP_WTSDisconnectSession ( HANDLE  hServer,
DWORD  SessionId,
BOOL  bWait 
)

◆ FreeRDP_WTSEnableChildSessions()

BOOL CDECL FreeRDP_WTSEnableChildSessions ( BOOL  bEnable)

◆ FreeRDP_WTSEnumerateListenersA()

BOOL WINAPI FreeRDP_WTSEnumerateListenersA ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
PWTSLISTENERNAMEA  pListeners,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateListenersW()

BOOL WINAPI FreeRDP_WTSEnumerateListenersW ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
PWTSLISTENERNAMEW  pListeners,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateProcessesA()

BOOL WINAPI FreeRDP_WTSEnumerateProcessesA ( HANDLE  hServer,
DWORD  Reserved,
DWORD  Version,
PWTS_PROCESS_INFOA ppProcessInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateProcessesExA()

BOOL WINAPI FreeRDP_WTSEnumerateProcessesExA ( HANDLE  hServer,
DWORD *  pLevel,
DWORD  SessionId,
LPSTR *  ppProcessInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateProcessesExW()

BOOL WINAPI FreeRDP_WTSEnumerateProcessesExW ( HANDLE  hServer,
DWORD *  pLevel,
DWORD  SessionId,
LPWSTR *  ppProcessInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateProcessesW()

BOOL WINAPI FreeRDP_WTSEnumerateProcessesW ( HANDLE  hServer,
DWORD  Reserved,
DWORD  Version,
PWTS_PROCESS_INFOW ppProcessInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateServersA()

BOOL WINAPI FreeRDP_WTSEnumerateServersA ( LPSTR  pDomainName,
DWORD  Reserved,
DWORD  Version,
PWTS_SERVER_INFOA ppServerInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateServersW()

BOOL WINAPI FreeRDP_WTSEnumerateServersW ( LPWSTR  pDomainName,
DWORD  Reserved,
DWORD  Version,
PWTS_SERVER_INFOW ppServerInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateSessionsA()

BOOL WINAPI FreeRDP_WTSEnumerateSessionsA ( HANDLE  hServer,
DWORD  Reserved,
DWORD  Version,
PWTS_SESSION_INFOA ppSessionInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateSessionsExA()

BOOL WINAPI FreeRDP_WTSEnumerateSessionsExA ( HANDLE  hServer,
DWORD *  pLevel,
DWORD  Filter,
PWTS_SESSION_INFO_1A ppSessionInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateSessionsExW()

BOOL WINAPI FreeRDP_WTSEnumerateSessionsExW ( HANDLE  hServer,
DWORD *  pLevel,
DWORD  Filter,
PWTS_SESSION_INFO_1W ppSessionInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSEnumerateSessionsW()

BOOL WINAPI FreeRDP_WTSEnumerateSessionsW ( HANDLE  hServer,
DWORD  Reserved,
DWORD  Version,
PWTS_SESSION_INFOW ppSessionInfo,
DWORD *  pCount 
)

◆ FreeRDP_WTSFreeMemory()

VOID WINAPI FreeRDP_WTSFreeMemory ( PVOID  pMemory)

◆ FreeRDP_WTSFreeMemoryExA()

BOOL WINAPI FreeRDP_WTSFreeMemoryExA ( WTS_TYPE_CLASS  WTSTypeClass,
PVOID  pMemory,
ULONG  NumberOfEntries 
)

◆ FreeRDP_WTSFreeMemoryExW()

BOOL WINAPI FreeRDP_WTSFreeMemoryExW ( WTS_TYPE_CLASS  WTSTypeClass,
PVOID  pMemory,
ULONG  NumberOfEntries 
)

◆ FreeRDP_WTSGetActiveConsoleSessionId()

DWORD WINAPI FreeRDP_WTSGetActiveConsoleSessionId ( void  )

◆ FreeRDP_WTSGetChildSessionId()

BOOL CDECL FreeRDP_WTSGetChildSessionId ( PULONG  pSessionId)

◆ FreeRDP_WTSGetListenerSecurityA()

BOOL WINAPI FreeRDP_WTSGetListenerSecurityA ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPSTR  pListenerName,
SECURITY_INFORMATION  SecurityInformation,
PSECURITY_DESCRIPTOR  pSecurityDescriptor,
DWORD  nLength,
LPDWORD  lpnLengthNeeded 
)

◆ FreeRDP_WTSGetListenerSecurityW()

BOOL WINAPI FreeRDP_WTSGetListenerSecurityW ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPWSTR  pListenerName,
SECURITY_INFORMATION  SecurityInformation,
PSECURITY_DESCRIPTOR  pSecurityDescriptor,
DWORD  nLength,
LPDWORD  lpnLengthNeeded 
)

◆ FreeRDP_WTSIsChildSessionsEnabled()

BOOL CDECL FreeRDP_WTSIsChildSessionsEnabled ( PBOOL  pbEnabled)

◆ FreeRDP_WTSLogoffSession()

BOOL WINAPI FreeRDP_WTSLogoffSession ( HANDLE  hServer,
DWORD  SessionId,
BOOL  bWait 
)

◆ FreeRDP_WTSLogoffUser()

BOOL WINAPI FreeRDP_WTSLogoffUser ( HANDLE  hServer)

◆ FreeRDP_WTSLogonUser()

BOOL WINAPI FreeRDP_WTSLogonUser ( HANDLE  hServer,
LPCSTR  username,
LPCSTR  password,
LPCSTR  domain 
)

◆ FreeRDP_WTSOpenServerA()

HANDLE WINAPI FreeRDP_WTSOpenServerA ( LPSTR  pServerName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeRDP_WTSOpenServerExA()

HANDLE WINAPI FreeRDP_WTSOpenServerExA ( LPSTR  pServerName)
Here is the call graph for this function:

◆ FreeRDP_WTSOpenServerExW()

HANDLE WINAPI FreeRDP_WTSOpenServerExW ( LPWSTR  pServerName)

◆ FreeRDP_WTSOpenServerW()

HANDLE WINAPI FreeRDP_WTSOpenServerW ( LPWSTR  pServerName)

◆ FreeRDP_WTSQueryListenerConfigA()

BOOL WINAPI FreeRDP_WTSQueryListenerConfigA ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPSTR  pListenerName,
PWTSLISTENERCONFIGA  pBuffer 
)

◆ FreeRDP_WTSQueryListenerConfigW()

BOOL WINAPI FreeRDP_WTSQueryListenerConfigW ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPWSTR  pListenerName,
PWTSLISTENERCONFIGW  pBuffer 
)

◆ FreeRDP_WTSQuerySessionInformationA()

BOOL WINAPI FreeRDP_WTSQuerySessionInformationA ( HANDLE  hServer,
DWORD  SessionId,
WTS_INFO_CLASS  WTSInfoClass,
LPSTR *  ppBuffer,
DWORD *  pBytesReturned 
)
Here is the call graph for this function:

◆ FreeRDP_WTSQuerySessionInformationW()

BOOL WINAPI FreeRDP_WTSQuerySessionInformationW ( HANDLE  hServer,
DWORD  SessionId,
WTS_INFO_CLASS  WTSInfoClass,
LPWSTR *  ppBuffer,
DWORD *  pBytesReturned 
)

◆ FreeRDP_WTSQueryUserConfigA()

BOOL WINAPI FreeRDP_WTSQueryUserConfigA ( LPSTR  pServerName,
LPSTR  pUserName,
WTS_CONFIG_CLASS  WTSConfigClass,
LPSTR *  ppBuffer,
DWORD *  pBytesReturned 
)

◆ FreeRDP_WTSQueryUserConfigW()

BOOL WINAPI FreeRDP_WTSQueryUserConfigW ( LPWSTR  pServerName,
LPWSTR  pUserName,
WTS_CONFIG_CLASS  WTSConfigClass,
LPWSTR *  ppBuffer,
DWORD *  pBytesReturned 
)

◆ FreeRDP_WTSQueryUserToken()

BOOL WINAPI FreeRDP_WTSQueryUserToken ( ULONG  SessionId,
PHANDLE  phToken 
)

◆ FreeRDP_WTSRegisterSessionNotification()

BOOL WINAPI FreeRDP_WTSRegisterSessionNotification ( HWND  hWnd,
DWORD  dwFlags 
)

◆ FreeRDP_WTSRegisterSessionNotificationEx()

BOOL WINAPI FreeRDP_WTSRegisterSessionNotificationEx ( HANDLE  hServer,
HWND  hWnd,
DWORD  dwFlags 
)

◆ FreeRDP_WTSSendMessageA()

BOOL WINAPI FreeRDP_WTSSendMessageA ( HANDLE  hServer,
DWORD  SessionId,
LPSTR  pTitle,
DWORD  TitleLength,
LPSTR  pMessage,
DWORD  MessageLength,
DWORD  Style,
DWORD  Timeout,
DWORD *  pResponse,
BOOL  bWait 
)

◆ FreeRDP_WTSSendMessageW()

BOOL WINAPI FreeRDP_WTSSendMessageW ( HANDLE  hServer,
DWORD  SessionId,
LPWSTR  pTitle,
DWORD  TitleLength,
LPWSTR  pMessage,
DWORD  MessageLength,
DWORD  Style,
DWORD  Timeout,
DWORD *  pResponse,
BOOL  bWait 
)

◆ FreeRDP_WTSSetListenerSecurityA()

BOOL WINAPI FreeRDP_WTSSetListenerSecurityA ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPSTR  pListenerName,
SECURITY_INFORMATION  SecurityInformation,
PSECURITY_DESCRIPTOR  pSecurityDescriptor 
)

◆ FreeRDP_WTSSetListenerSecurityW()

BOOL WINAPI FreeRDP_WTSSetListenerSecurityW ( HANDLE  hServer,
PVOID  pReserved,
DWORD  Reserved,
LPWSTR  pListenerName,
SECURITY_INFORMATION  SecurityInformation,
PSECURITY_DESCRIPTOR  pSecurityDescriptor 
)

◆ FreeRDP_WTSSetUserConfigA()

BOOL WINAPI FreeRDP_WTSSetUserConfigA ( LPSTR  pServerName,
LPSTR  pUserName,
WTS_CONFIG_CLASS  WTSConfigClass,
LPSTR  pBuffer,
DWORD  DataLength 
)

◆ FreeRDP_WTSSetUserConfigW()

BOOL WINAPI FreeRDP_WTSSetUserConfigW ( LPWSTR  pServerName,
LPWSTR  pUserName,
WTS_CONFIG_CLASS  WTSConfigClass,
LPWSTR  pBuffer,
DWORD  DataLength 
)

◆ FreeRDP_WTSShutdownSystem()

BOOL WINAPI FreeRDP_WTSShutdownSystem ( HANDLE  hServer,
DWORD  ShutdownFlag 
)

◆ FreeRDP_WTSStartRemoteControlSessionA()

BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionA ( LPSTR  pTargetServerName,
ULONG  TargetLogonId,
BYTE  HotkeyVk,
USHORT  HotkeyModifiers 
)

◆ FreeRDP_WTSStartRemoteControlSessionExA()

BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExA ( LPSTR  pTargetServerName,
ULONG  TargetLogonId,
BYTE  HotkeyVk,
USHORT  HotkeyModifiers,
DWORD  flags 
)

◆ FreeRDP_WTSStartRemoteControlSessionExW()

BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExW ( LPWSTR  pTargetServerName,
ULONG  TargetLogonId,
BYTE  HotkeyVk,
USHORT  HotkeyModifiers,
DWORD  flags 
)

◆ FreeRDP_WTSStartRemoteControlSessionW()

BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionW ( LPWSTR  pTargetServerName,
ULONG  TargetLogonId,
BYTE  HotkeyVk,
USHORT  HotkeyModifiers 
)

◆ FreeRDP_WTSStopRemoteControlSession()

BOOL WINAPI FreeRDP_WTSStopRemoteControlSession ( ULONG  LogonId)

◆ FreeRDP_WTSTerminateProcess()

BOOL WINAPI FreeRDP_WTSTerminateProcess ( HANDLE  hServer,
DWORD  ProcessId,
DWORD  ExitCode 
)

◆ FreeRDP_WTSUnRegisterSessionNotification()

BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotification ( HWND  hWnd)

◆ FreeRDP_WTSUnRegisterSessionNotificationEx()

BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotificationEx ( HANDLE  hServer,
HWND  hWnd 
)

◆ FreeRDP_WTSVirtualChannelClose()

BOOL WINAPI FreeRDP_WTSVirtualChannelClose ( HANDLE  hChannelHandle)
Here is the call graph for this function:

◆ FreeRDP_WTSVirtualChannelOpen()

HANDLE WINAPI FreeRDP_WTSVirtualChannelOpen ( HANDLE  hServer,
DWORD  SessionId,
LPSTR  pVirtualName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeRDP_WTSVirtualChannelOpenEx()

HANDLE WINAPI FreeRDP_WTSVirtualChannelOpenEx ( DWORD  SessionId,
LPSTR  pVirtualName,
DWORD  flags 
)
Here is the call graph for this function:

◆ FreeRDP_WTSVirtualChannelPurgeInput()

BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeInput ( HANDLE  hChannelHandle)

◆ FreeRDP_WTSVirtualChannelPurgeOutput()

BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeOutput ( HANDLE  hChannelHandle)

◆ FreeRDP_WTSVirtualChannelQuery()

BOOL WINAPI FreeRDP_WTSVirtualChannelQuery ( HANDLE  hChannelHandle,
WTS_VIRTUAL_CLASS  WtsVirtualClass,
PVOID *  ppBuffer,
DWORD *  pBytesReturned 
)
Here is the call graph for this function:

◆ FreeRDP_WTSVirtualChannelRead()

BOOL WINAPI FreeRDP_WTSVirtualChannelRead ( HANDLE  hChannelHandle,
ULONG  TimeOut,
PCHAR  Buffer,
ULONG  BufferSize,
PULONG  pBytesRead 
)
Here is the call graph for this function:

◆ FreeRDP_WTSVirtualChannelWrite()

BOOL WINAPI FreeRDP_WTSVirtualChannelWrite ( HANDLE  hChannelHandle,
PCHAR  Buffer,
ULONG  Length,
PULONG  pBytesWritten 
)
Here is the call graph for this function:

◆ FreeRDP_WTSWaitSystemEvent()

BOOL WINAPI FreeRDP_WTSWaitSystemEvent ( HANDLE  hServer,
DWORD  EventMask,
DWORD *  pEventFlags 
)

◆ peer_channel_queue_free_message()

static void peer_channel_queue_free_message ( void *  obj)
static
Here is the caller graph for this function:

◆ server_channel_common_free()

void server_channel_common_free ( rdpPeerChannel *  channel)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ server_channel_common_new()

rdpPeerChannel* server_channel_common_new ( freerdp_peer *  client,
UINT16  index,
UINT32  channelId,
size_t  chunkSize,
const wObject callback,
const char *  name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_get_dvc_channel_by_id()

static rdpPeerChannel* wts_get_dvc_channel_by_id ( WTSVirtualChannelManager vcm,
UINT32  ChannelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_get_joined_channel_by_id()

static rdpMcsChannel* wts_get_joined_channel_by_id ( rdpMcs *  mcs,
const UINT16  channel_id 
)
static
Here is the caller graph for this function:

◆ wts_get_joined_channel_by_name()

static rdpMcsChannel* wts_get_joined_channel_by_name ( rdpMcs *  mcs,
const char *  channel_name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_queue_receive_data()

static BOOL wts_queue_receive_data ( rdpPeerChannel *  channel,
const BYTE Buffer,
UINT32  Length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_queue_send_item()

static BOOL wts_queue_send_item ( rdpPeerChannel *  channel,
BYTE Buffer,
UINT32  Length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_drdynvc_capabilities_response()

static BOOL wts_read_drdynvc_capabilities_response ( rdpPeerChannel *  channel,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_drdynvc_close_response()

static void wts_read_drdynvc_close_response ( rdpPeerChannel *  channel)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_drdynvc_create_response()

static BOOL wts_read_drdynvc_create_response ( rdpPeerChannel *  channel,
wStream s,
UINT32  length 
)
static
Here is the caller graph for this function:

◆ wts_read_drdynvc_data()

static BOOL wts_read_drdynvc_data ( rdpPeerChannel *  channel,
wStream s,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_drdynvc_data_first()

static BOOL wts_read_drdynvc_data_first ( rdpPeerChannel *  channel,
wStream s,
int  cbLen,
UINT32  length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_drdynvc_pdu()

static BOOL wts_read_drdynvc_pdu ( rdpPeerChannel *  channel)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_read_variable_uint()

static int wts_read_variable_uint ( wStream s,
int  cbLen,
UINT32 *  val 
)
static
Here is the caller graph for this function:

◆ wts_virtual_channel_manager_free_message()

static void wts_virtual_channel_manager_free_message ( void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_write_drdynvc_create_request()

static BOOL wts_write_drdynvc_create_request ( wStream s,
UINT32  ChannelId,
const char *  ChannelName 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_write_drdynvc_header()

static void wts_write_drdynvc_header ( wStream s,
BYTE  Cmd,
UINT32  ChannelId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wts_write_variable_uint()

static int wts_write_variable_uint ( wStream s,
UINT32  val 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSChannelGetHandleById()

void* WTSChannelGetHandleById ( freerdp_peer *  client,
const UINT16  channel_id 
)
Here is the call graph for this function:

◆ WTSChannelGetHandleByName()

void* WTSChannelGetHandleByName ( freerdp_peer *  client,
const char *  channel_name 
)
Here is the call graph for this function:

◆ WTSChannelGetId()

UINT16 WTSChannelGetId ( freerdp_peer *  client,
const char *  channel_name 
)

Extended FreeRDP WTS functions for channel handling

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSChannelGetIdByHandle()

UINT32 WTSChannelGetIdByHandle ( HANDLE  hChannelHandle)
Here is the caller graph for this function:

◆ WTSChannelGetName()

const char* WTSChannelGetName ( freerdp_peer *  client,
UINT16  channel_id 
)
Here is the call graph for this function:

◆ WTSChannelGetOptions()

INT64 WTSChannelGetOptions ( freerdp_peer *  client,
UINT16  channel_id 
)
Here is the call graph for this function:

◆ WTSChannelSetHandleById()

BOOL WTSChannelSetHandleById ( freerdp_peer *  client,
const UINT16  channel_id,
void *  handle 
)
Here is the call graph for this function:

◆ WTSChannelSetHandleByName()

BOOL WTSChannelSetHandleByName ( freerdp_peer *  client,
const char *  channel_name,
void *  handle 
)
Here is the call graph for this function:

◆ WTSGetAcceptedChannelNames()

char** WTSGetAcceptedChannelNames ( freerdp_peer *  client,
size_t *  count 
)
Here is the caller graph for this function:

◆ WTSIsChannelJoinedById()

BOOL WTSIsChannelJoinedById ( freerdp_peer *  client,
const UINT16  channel_id 
)
Here is the call graph for this function:

◆ WTSIsChannelJoinedByName()

BOOL WTSIsChannelJoinedByName ( freerdp_peer *  client,
const char *  channel_name 
)
Here is the call graph for this function:

◆ WTSProcessChannelData()

static BOOL WTSProcessChannelData ( rdpPeerChannel *  channel,
UINT16  channelId,
const BYTE data,
size_t  s,
UINT32  flags,
size_t  t 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSReceiveChannelData()

static BOOL WTSReceiveChannelData ( freerdp_peer *  client,
UINT16  channelId,
const BYTE data,
size_t  size,
UINT32  flags,
size_t  totalSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerCheckFileDescriptor()

BOOL WTSVirtualChannelManagerCheckFileDescriptor ( HANDLE  hServer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerCheckFileDescriptorEx()

BOOL WTSVirtualChannelManagerCheckFileDescriptorEx ( HANDLE  hServer,
BOOL  autoOpen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerGetDrdynvcState()

BYTE WTSVirtualChannelManagerGetDrdynvcState ( HANDLE  hServer)
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerGetEventHandle()

HANDLE WTSVirtualChannelManagerGetEventHandle ( HANDLE  hServer)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerIsChannelJoined()

BOOL WTSVirtualChannelManagerIsChannelJoined ( HANDLE  hServer,
const char *  name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerOpen()

BOOL WTSVirtualChannelManagerOpen ( HANDLE  hServer)

WTSVirtualChannelManager functions are FreeRDP extensions to the API.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WTSVirtualChannelManagerSetDVCCreationCallback()

void WTSVirtualChannelManagerSetDVCCreationCallback ( HANDLE  hServer,
psDVCCreationStatusCallback  cb,
void *  userdata 
)

Variable Documentation

◆ g_ServerHandles

wHashTable* g_ServerHandles = NULL
static

◆ g_SessionId

DWORD g_SessionId = 1
static