ImmGetCompositionStringA function (imm.h)
Retrieves information about the composition string.
Syntax
LONG ImmGetCompositionStringA(
HIMC unnamedParam1,
DWORD unnamedParam2,
[out, optional] LPVOID lpBuf,
[in] DWORD dwBufLen
);
Parameters
unnamedParam1
unnamedParam2
[out, optional] lpBuf
Pointer to a buffer in which the function retrieves the composition string information.
[in] dwBufLen
Size, in bytes, of the output buffer, even if the output is a Unicode string. The application sets this parameter to 0 if the function is to return the size of the required output buffer.
Return value
Returns the number of bytes copied to the output buffer. If dwBufLen is set to 0, the function returns the buffer size, in bytes, required to receive all requested information, excluding the terminating null character. The return value is always the size, in bytes, even if the requested data is a Unicode string.
This function returns one of the following negative error codes if it does not succeed:
- IMM_ERROR_NODATA. Composition data is not ready in the input context.
- IMM_ERROR_GENERAL. General error detected by IME.
Remarks
An application calls this function in response to the WM_IME_COMPOSITION or WM_IME_STARTCOMPOSITION message. The IMM removes the information when the application calls the ImmReleaseContext function.
Note
The imm.h header defines ImmGetCompositionString as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only],East Asian language support installed. |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | imm.h (include Immdev.h, Windows.h) |
Library | Imm32.lib |
DLL | Imm32.dll |