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.
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 |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
WTSStartRemoteControlSessionW (Unicode) and WTSStartRemoteControlSessionA (ANSI) |