45 lpBuf, dwBufLen /
sizeof(
WCHAR));
46 if (lpBuf && (
ret + 1) *
sizeof(
WCHAR) <= dwBufLen)
56 if (lpBuf && (
ret + 1) *
sizeof(
CHAR) <= dwBufLen)
94 return rc *
sizeof(
BYTE);
129 return rc *
sizeof(
BYTE);
146 tlen /=
sizeof(
DWORD);
148 for (
i = 0;
i < tlen; ++
i)
177 tlen /=
sizeof(
DWORD);
179 for (
i = 0;
i < tlen; ++
i)
194#define CS_StrA(pCS, Name) ((LPCSTR)(pCS) + (pCS)->dw##Name##Offset)
195#define CS_StrW(pCS, Name) ((LPCWSTR)CS_StrA(pCS, Name))
196#define CS_Attr(pCS, Name) ((const BYTE *)CS_StrA(pCS, Name))
197#define CS_Clause(pCS, Name) ((const DWORD *)CS_StrA(pCS, Name))
198#define CS_Size(pCS, Name) ((pCS)->dw##Name##Len)
199#define CS_SizeA(pCS, Name) (CS_Size(pCS, Name) * sizeof(CHAR))
200#define CS_SizeW(pCS, Name) (CS_Size(pCS, Name) * sizeof(WCHAR))
202#define CS_DoStr(pCS, Name, AorW) do { \
203 if (dwBufLen == 0) { \
204 dwBufLen = CS_Size##AorW((pCS), Name); \
206 if (dwBufLen > CS_Size##AorW((pCS), Name)) \
207 dwBufLen = CS_Size##AorW((pCS), Name); \
208 RtlCopyMemory(lpBuf, CS_Str##AorW((pCS), Name), dwBufLen); \
212#define CS_DoStrA(pCS, Name) CS_DoStr(pCS, Name, A)
213#define CS_DoStrW(pCS, Name) CS_DoStr(pCS, Name, W)
214#define CS_DoAttr CS_DoStrA
215#define CS_DoClause CS_DoStrA
227 const BYTE *pbCS = (
const BYTE *)pCS;
306 FIXME(
"0x%X\n", dwIndex);
317 lpBuf, dwBufLen, uCodePage);
325 lpBuf, dwBufLen, uCodePage);
332 lpBuf, dwBufLen, uCodePage);
338 lpBuf, dwBufLen, uCodePage);
346 lpBuf, dwBufLen, uCodePage);
353 lpBuf, dwBufLen, uCodePage);
367 lpBuf, dwBufLen, uCodePage);
372 CS_Size(pCS, ResultReadClause),
374 lpBuf, dwBufLen, uCodePage);
380 lpBuf, dwBufLen, uCodePage);
387 lpBuf, dwBufLen, uCodePage);
394 FIXME(
"0x%X\n", dwIndex);
413 lpBuf, dwBufLen, uCodePage);
421 lpBuf, dwBufLen, uCodePage);
428 lpBuf, dwBufLen, uCodePage);
434 lpBuf, dwBufLen, uCodePage);
441 lpBuf, dwBufLen, uCodePage);
448 lpBuf, dwBufLen, uCodePage);
462 lpBuf, dwBufLen, uCodePage);
467 CS_Size(pCS, ResultReadClause),
469 lpBuf, dwBufLen, uCodePage);
475 lpBuf, dwBufLen, uCodePage);
482 lpBuf, dwBufLen, uCodePage);
489 FIXME(
"0x%X\n", dwIndex);
549 FIXME(
"0x%X\n", dwIndex);
575 LPRECONVERTSTRING pRS;
580 ERR(
"Thread mismatch\n");
602 ERR(
"0x%X\n", dwIndex);
607 if (bAnsiAPI == bAnsiClient || (!pComp && !pRead))
609 ret = pImeDpi->ImeSetCompositionString(hIMC, dwIndex, pComp, dwCompLen,
691 pCompNew, cbCompNew, uCodePage);
705 pCompNew, cbCompNew, uCodePage);
723 pReadNew, cbReadNew, uCodePage);
737 pReadNew, cbReadNew, uCodePage);
754 pCompNew, cbCompNew, uCodePage);
765 pCompNew, cbCompNew, uCodePage);
781 pReadNew, cbReadNew, uCodePage);
792 pReadNew, cbReadNew, uCodePage);
809 pRS->dwSize = cbCompNew;
821 pRS->dwSize = cbCompNew;
837 pRS->dwSize = cbReadNew;
849 pRS->dwSize = cbReadNew;
863 ret = pImeDpi->ImeSetCompositionString(hIMC, dwIndex, pCompNew, cbCompNew,
864 pReadNew, cbReadNew);
914 TRACE(
"(%p, %lu, %p, %lu)\n", hIMC, dwIndex, lpBuf, dwBufLen);
962 TRACE(
"(%p, %lu, %p, %lu)\n", hIMC, dwIndex, lpBuf, dwBufLen);
1005 TRACE(
"(%p, %lu, %p, %lu, %p, %lu)\n",
1006 hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen);
1022 TRACE(
"(%p, %lu, %p, %lu, %p, %lu)\n",
1023 hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
BOOL WINAPI ImmSetCompositionStringW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp, _In_ DWORD dwCompLen, _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead, _In_ DWORD dwReadLen)
static BOOL ImmSetCompositionStringAW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Inout_updates_bytes_opt_(dwCompLen) LPVOID pComp, _In_ DWORD dwCompLen, _Inout_updates_bytes_opt_(dwReadLen) LPVOID pRead, _In_ DWORD dwReadLen, _In_ BOOL bAnsiAPI)
BOOL WINAPI ImmSetCompositionStringA(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp, _In_ DWORD dwCompLen, _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead, _In_ DWORD dwReadLen)
static INT Imm32CompClauseWideToAnsi(const DWORD *source, INT slen, LPCWSTR text, LPDWORD target, INT tlen, UINT uCodePage)
static LONG Imm32CompStrWideToAnsi(LPCWSTR psz, DWORD cb, LPSTR lpBuf, DWORD dwBufLen, UINT uCodePage)
static LONG Imm32CompStrAnsiToWide(LPCSTR psz, DWORD cb, LPWSTR lpBuf, DWORD dwBufLen, UINT uCodePage)
#define CS_SizeW(pCS, Name)
#define CS_StrW(pCS, Name)
static INT Imm32CompAttrWideToAnsi(const BYTE *src, INT src_len, LPCWSTR text, INT str_len, LPBYTE dst, INT dst_len, UINT uCodePage)
static LONG Imm32GetCompStrW(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL bAnsiClient, UINT uCodePage)
#define CS_StrA(pCS, Name)
LONG WINAPI ImmGetCompositionStringA(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf, _In_ DWORD dwBufLen)
#define CS_SizeA(pCS, Name)
static DWORD CS_DoPrivate(HIMC hIMC, const COMPOSITIONSTRING *pCS, PVOID pBuffer, DWORD dwBufLen)
#define CS_DoStrW(pCS, Name)
BOOL Imm32OpenICAndCS(HIMC hIMC, LPINPUTCONTEXT *ppIC, LPCOMPOSITIONSTRING *ppCS)
static LONG Imm32GetCompStrA(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen, BOOL bAnsiClient, UINT uCodePage)
static INT Imm32CompAttrAnsiToWide(const BYTE *src, INT src_len, LPCSTR text, INT str_len, LPBYTE dst, INT dst_len, UINT uCodePage)
#define CS_Attr(pCS, Name)
#define CS_Clause(pCS, Name)
#define CS_Size(pCS, Name)
LONG WINAPI ImmGetCompositionStringW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf, _In_ DWORD dwBufLen)
#define CS_DoStrA(pCS, Name)
static INT Imm32CompClauseAnsiToWide(const DWORD *source, INT slen, LPCSTR text, LPDWORD target, INT tlen, UINT uCodePage)
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI IsDBCSLeadByteEx(UINT codepage, BYTE testchar)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
PCLIENTIMC WINAPI ImmLockClientImc(_In_ HIMC hImc)
BOOL WINAPI CtfImmIsGuidMapEnable(_In_ HIMC hIMC)
PIMEDPI WINAPI ImmLockImeDpi(_In_ HKL hKL)
VOID WINAPI ImmUnlockImeDpi(_Inout_opt_ PIMEDPI pImeDpi)
VOID WINAPI ImmUnlockClientImc(_Inout_ PCLIENTIMC pClientImc)
#define SCS_SETRECONVERTSTRING
#define GCS_RESULTREADSTR
#define IMM_ERROR_GENERAL
#define GCS_COMPREADCLAUSE
#define SCS_CAP_SETRECONVERTSTRING
#define GCS_RESULTREADCLAUSE
#define SCS_QUERYRECONVERTSTRING
BOOL WINAPI ImmUnlockIMCC(_In_ HIMCC imcc)
LPINPUTCONTEXT WINAPI ImmLockIMC(_In_ HIMC hIMC)
BOOL WINAPI ImmUnlockIMC(_In_ HIMC hIMC)
LPVOID WINAPI ImmLockIMCC(_In_ HIMCC imcc)
DWORD_PTR NTAPI NtUserQueryInputContext(HIMC hIMC, DWORD dwType)
#define _Inout_updates_bytes_opt_(s)
#define _Out_writes_bytes_opt_(s)
_In_ DWORD _In_ DWORD dwOffset
LONG IchAnsiFromWide(LONG cchWide, LPCWSTR pchWide, UINT uCodePage)
DWORD Imm32ReconvertWideFromAnsi(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
#define ImmLocalFree(lpData)
LONG IchWideFromAnsi(LONG cchAnsi, LPCSTR pchAnsi, UINT uCodePage)
#define IS_NULL_UNEXPECTEDLY(p)
DWORD Imm32ReconvertAnsiFromWide(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
LPVOID ImmLocalAlloc(_In_ DWORD dwFlags, _In_ DWORD dwBytes)
#define ImeDpi_IsUnicode(pImeDpi)
DWORD WINAPI GetCurrentThreadId(void)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)