Düzenle

Aracılığıyla paylaş


IMsRdpClientNonScriptable::SendKeys method

Sends a series of keystrokes to the control. The keystrokes are in scan code form, which is the keyboard data from the actual physical keys.

Syntax

HRESULT SendKeys(
  [in] LONG         numKeys,
  [in] VARIANT_BOOL *pbArrayKeyUp,
  [in] LONG         *plKeyData
);

Parameters

numKeys [in]

The number of keystrokes to send. The maximum number of keys that can be sent in one operation is 20. The method returns E_INVALIDARG if this parameter is greater than 20. For more information, see the following Remarks section.

pbArrayKeyUp [in]

An array whose size is equal to numKeys. An element is TRUE if the corresponding key is UP and FALSE if the corresponding key is DOWN.

plKeyData [in]

An array whose size is equal to numKeys. The array contains keystroke data and corresponds to the value of the lParam parameter of the WM_KEYDOWN message. The data specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag. For a description of the bits in this array, see WM_KEYDOWN.

The corresponding element in pbArrayKeyUp indicates if the key is UP or DOWN.

Return value

Return S_OK if successful.

Remarks

The SendKeys method does not mix keystrokes made by the local user with keystrokes that the method is sending. All keystrokes passed to the method are sent to the remote session in a single atomic sequence.

For more information about Remote Desktop Web Connection, see Requirements for Remote Desktop Web Connection.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Type library
MsTscAx.dll
DLL
MsTscAx.dll
IID
IID_IMsRdpClientNonScriptable is defined as 2f079c4c-87b2-4afd-97ab-20cdb43038ae

See also