Compartilhar via


IIMCallback3::SendCharEvents (Compact 2013)

3/28/2014

This method sends a series of WM_KEYUP or WM_KEYDOWN messages from the input method to the active window.

Syntax

HRESULT SendCharEvents( 
  UINT uVK, 
  UINT uKeyFlags, 
  UINT uChars,
  UINT* puShift, 
  UINT* puChars
);

Parameters

  • uVK
    Virtual key code sent in the first WM_KEYUP or WM_KEYDOWN message generated by this method.
  • uKeyFlags
    Flags that describe the state of the first key sent by this method, translated into the lKeyData parameter of the first message. See Keybd.h for accepted values. This method generates a WM_KEYDOWN message if the KeyStateDownFlag bit is set,; otherwise, it generates a WM_KEYUP message.
  • uChars
    Number of characters in puChars.
  • puShift
    Pointer to a buffer containing the corresponding KEY_STATE_FLAGS for the characters in puChars. See Keybd.h for the accepted values. These flags must be identical to uKeyFlags.
  • puChars
    Pointer to a buffer containing all characters, except the first one, sent by this method.

Return Value

The following table shows the possible return values.

Value

Description

S_OK

Success.

E_INVALIDARG

Invalid method parameter.

E_FAIL

Other failure. To get more information, call GetLastError.

Remarks

Because you can associate any virtual key with any character and key state, you can use this method to set up any kind of keyboard layout.

You can also send characters to the active window by using the IIMCallback3::SendString and IIMCallback3::SendVirtualKey methods. Unlike IIMCallback3::SendVirtualKey, IIMCallback3::SendCharEvents does not affect the global key state.

Requirements

Header

sip.h

Library

uuid.lib

sysgen

SYSGEN_SOFTKB

See Also

Reference

IIMCallback3
WM_CHAR
WM_KEYDOWN
WM_KEYUP
IIMCallback3::GetInputContext
IIMCallback3::SendAlternatives2
IIMCallback3::SendString
IIMCallback3::SendVirtualKey
IIMCallback3::SetImInfo