GetUnicodeRanges Function
GetUnicodeRanges Function |
Returns the ranges of Unicode points that the recognizer supports.
Syntax
[C++]
HRESULT WINAPI GetUnicodeRanges(
HRECOGNIZER hrec,
ULONG *pcRanges,
CHARACTER_RANGE *pcr
);
Parameters
hrec
[in] Handle to the recognizer.
pcRanges
[in, out] On input, the number of ranges the pRanges buffer can hold. On output, the number of ranges the pRanges buffer contains.
pcr
[out] Array of CHARACTER_RANGE structures. Each structure contains a range of Unicode points that the recognizer supports. The order of the array is arbitrary. To determine the required size of the buffer, set pcr to NULL
; use the number of ranges to allocate the pcrbuffer.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | One of the parameters is an invalid pointer. |
TPC_E_INSUFFICIENT_BUFFER | The pcr buffer is too small. |
E_OUTOFMEMORY | Insufficient memory. |
Remarks
This function is optional.
Some recognizers do not support this capability, but may still include the GetUnicodeRanges function. For such recognizers the GetUnicodeRanges function returns E_NOTIMPL.
To control the Unicode ranges used by a specific recognizer context, use the GetEnabledUnicodeRanges and SetEnabledUnicodeRanges functions. These ranges are constrained to be a subset of the ranges returned by GetUnicodeRanges.
Microsoft gesture recognizers use Unicode characters from 0xF000 to 0xF0FF. Each single Unicode value in this range represents a single gesture. For a complete list of Unicode values for gestures, see Unicode Range Values of Gestures.