ImGetConversionString
Applications can get some information about conversion string.
Format:
APIRET APIENTRY ImGetConversionString(HIMI hIMI, ULONG ulIndex, PVOID pBuf, PULONG pulBufLen)
Parameters:
hIMI(input)
┌──────────────────────────────┬──────────────────────────────────────────────────┐ │Type │Description │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CONVERSIONATTR │Gets an attribute of the coversion string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CONVERSIONCLAUSE │Gets clause informaiton of the conversion string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_READINGATTR │Gets an attribute of a reading string of the │ │ │conversion string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_READINGCLAUSE │Gets clause information of a reading string of the│ │ │conversion string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_READINGSTRING │Gets a reading string of the conversion string. │ │ │Output is a 0-terminated string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CONVERSIONSTRING │Gets the conversion string. Output is a │ │ │0-terminated string. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CURSORPOS │Gets a cursor position in the conversion string. │ │ │Output is ULONG value. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CURSORATTR │Gets a cursor attribute in the conversion string. │ │ │Output is ULONG value. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │IMR_CONV_CHANGESTART │Gets a starting position of any changes in the │ │ │conversion string. Output is ULONG value. │ └──────────────────────────────┴──────────────────────────────────────────────────┘
The attribute of the string
┌──────────────────────────────┬──────────────────────────────────────────────────┐ │Attribute │Description │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_ATTR_INPUT │The characters are now on input, not yet │ │ │converted. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_ATTR_TARGET_CONVERTED │The characters have been converted and are │ │ │selected now. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_ATTR_CONVERTED │The characters have been converted. │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_ATTR_TARGET_NOTCONVERTED │The characters are selected and not yet converted.│ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_ATTR_INPUT_ERROR │The characters are invalid. IME can't convert │ │ │them. │ └──────────────────────────────┴──────────────────────────────────────────────────┘
Cursor attributes are,
┌──────────────────────────────┬──────────────────────────────────────────────────┐ │Attribute │Description │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_CURSORATTR_INSERT │The double-sized cursor │ ├──────────────────────────────┼──────────────────────────────────────────────────┤ │CP_CURSORATTR_INVISIBLE │Cursor is invisible. │ └──────────────────────────────┴──────────────────────────────────────────────────┘
The clause information is an array of ULONG values. The value means offset from the top of the conversion string (in bytes) for the each clause. And the last value contains length of the conversion string. The first clause always starts from off set 0, so the first value of the clause information must be 0. pBuf(output)
Zero is successful. Others are errors.