Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

WTSStartRemoteControlSession function

Starts the remote control of another Remote Desktop Services session. You must call this function from a remote session.

Syntax


BOOL WINAPI WTSStartRemoteControlSession(
  _In_  LPTSTR pTargetServerName,
  _In_  ULONG TargetLogonId,
  _In_  BYTE HotkeyVk,
  _In_  USHORT HotkeyModifiers
);

Parameters

pTargetServerName [in]

A pointer to the name of the server where the session that you want remote control of exists.

TargetLogonId [in]

The logon ID of the session that you want remote control of.

HotkeyVk [in]

The virtual-key code that represents the key to press to stop remote control of the session. The key that is defined in this parameter is used with the HotkeyModifiers parameter.

HotkeyModifiers [in]

The virtual modifier that represents the key to press to stop remote control of the session. The virtual modifier is used with the HotkeyVk parameter.

For example, if the WTSStartRemoteControlSession function is called with HotkeyVk set to VK_MULTIPLY and HotkeyModifiers set to REMOTECONTROL_KBDCTRL_HOTKEY, the user who has remote control of the target session can press CTRL + * to stop remote control of the session and return to their own session.

ValueMeaning
REMOTECONTROL_KBDSHIFT_HOTKEY

The SHIFT key

REMOTECONTROL_KBDCTRL_HOTKEY

The CTRL key

REMOTECONTROL_KBDALT_HOTKEY

The ALT key

 

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows Vista with SP1

Minimum supported server

Windows Server 2008

Header

Wtsapi32.h

Library

Wtsapi32.lib

DLL

Wtsapi32.dll

Unicode and ANSI names

WTSStartRemoteControlSessionW (Unicode) and WTSStartRemoteControlSessionA (ANSI)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.