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.
Value Meaning - 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 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | WTSStartRemoteControlSessionW (Unicode) and WTSStartRemoteControlSessionA (ANSI) |
Send comments about this topic to Microsoft
Build date: 10/26/2012