Microsoft Windows CE 3.0  

KeybdDriverVKeyToUnicode

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function generates the appropriate Unicode characters and shift state flags for a specified virtual key, key state array, and driver state.

UINT32 KeybdDriverVKeyToUnicode(
UINT32
VirtualKey
,
KEY_STATE_FLAGS
KeyEvent
,
KEY_STATE
KeyState
,
void *
pKeybdDriverToUnicodeState
,
UINT32
cBufferSize
,
UINT32 *
pcCharacters
,
KEY_STATE_FLAGS *
pShiftStateBuffer
,
UINT32 *
pCharacterBuffer
);

Parameters

VirtualKey
Specifies the virtual key causing the event.
KeyEvent
KeyStateDownFlag set or cleared.
KeyState
Specifies the key state.
pKeybdDriverToUnicodeState
Driver-specific TO_UNICODE_STATE.
cBufferSize
Specifies the count of 32-bit entries in each buffer.
pcCharacters
Pointer to a count of characters generated.
pShiftStateBuffer
Pointer to a buffer into which to put the shift state information.
pCharacterBuffer
Pointer to a buffer into which to put the characters.

Remarks

If KeyStateis NULL, the driver must fill in the character corresponding to the unshifted state for the virtual key and return.

In all other cases, the KeybdDriverVKeyToUnicodefunction must update the key state array and fill in the shift state determined from the key state array and, if necessary, update TO_UNICODE_STATE. This means that the count of characters generated is always at least 1. See KEY_STATE_FLAGS in order to generate the shift state without a corresponding character.

Each character should have a corresponding shift state entered into the shift state buffer, even if it is the same as the preceding shift state.

Each entry in the character buffer is 32 bits, whereas a Unicode character is 16 bits. The driver assigns characters to the buffer to clear the high order 16-bits, as in the following code example.

*pCharacterBuffer = Unicode character; //
YES

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Keybdmdd.cpp    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

KeybdDriverGetInfo, KeybdDriverInitStates



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.