Add WTSChannelGetOptions

This commit is contained in:
Richard Dymond 2022-06-02 08:34:07 -03:00 committed by akallabeth
parent 3d65e5a138
commit e1610a7524
2 changed files with 16 additions and 0 deletions

View File

@ -80,6 +80,7 @@ extern "C"
FREERDP_API void* WTSChannelGetHandleById(freerdp_peer* client, const UINT16 channel_id);
FREERDP_API const char* WTSChannelGetName(freerdp_peer* client, UINT16 channel_id);
FREERDP_API char** WTSGetAcceptedChannelNames(freerdp_peer* client, size_t* count);
FREERDP_API INT64 WTSChannelGetOptions(freerdp_peer* client, UINT16 channel_id);
#ifdef __cplusplus
}

View File

@ -805,6 +805,21 @@ char** WTSGetAcceptedChannelNames(freerdp_peer* client, size_t* count)
return names;
}
INT64 WTSChannelGetOptions(freerdp_peer* client, UINT16 channel_id)
{
rdpMcsChannel* channel;
if (!client || !client->context || !client->context->rdp)
return -1;
channel = wts_get_joined_channel_by_id(client->context->rdp->mcs, channel_id);
if (!channel)
return -1;
return (INT64)channel->options;
}
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG TargetLogonId,
BYTE HotkeyVk, USHORT HotkeyModifiers)
{