Share via


IMsRdpClientNonScriptable::SendKeys (Windows Embedded CE 6.0)

1/6/2010

This method sends a series of keystrokes to the Remote Desktop ActiveX control. The keystrokes are in scan-code form, which is the keyboard data from the physical keys.

Syntax

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

Parameters

  • numKeys
    [in] The number of keystrokes to send. The maximum number that can be sent in one operation is 20. The method returns E_INVALIDARG if this parameter is greater than 20.
  • 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 whether the key is UP or DOWN.

Return Value

The following table shows the return values for this method.

Value Description

S_OK

Keystrokes were sent.

E_INVALIDARG

A number more than 20 keystrokes was specified.

nonzero error code

An error occurred.

Remarks

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

Requirements

Header discodlg.h, mstsax.idl
Library Mstsax.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IMsRdpClientNonScriptable
IMsTscNonScriptable