Freigeben über


IMsRdpClientNonScriptable::SendKeys (Windows CE 5.0)

Send Feedback

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.

HRESULT SendKeys(LONGnumKeys,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 Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Discodlg.h. Mstsax.idl.
Link Library: Mstsax.lib.

See Also

IMsRdpClientNonScriptable | IMsTscNonScriptable

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.