Commit 3dde049f authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

imm32: All HIMCC in the InputContext should be initialized at creation.

parent 352c98d7
...@@ -496,6 +496,8 @@ BOOL WINAPI ImmConfigureIMEW( ...@@ -496,6 +496,8 @@ BOOL WINAPI ImmConfigureIMEW(
HIMC WINAPI ImmCreateContext(void) HIMC WINAPI ImmCreateContext(void)
{ {
InputContextData *new_context; InputContextData *new_context;
LPGUIDELINE gl;
LPCANDIDATEINFO ci;
new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData)); new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData));
...@@ -509,9 +511,19 @@ HIMC WINAPI ImmCreateContext(void) ...@@ -509,9 +511,19 @@ HIMC WINAPI ImmCreateContext(void)
return 0; return 0;
} }
/* hCompStr is never NULL */ /* the HIMCCs are never NULL */
new_context->IMC.hCompStr = ImmCreateBlankCompStr(); new_context->IMC.hCompStr = ImmCreateBlankCompStr();
new_context->IMC.hMsgBuf = ImmCreateIMCC(1); new_context->IMC.hMsgBuf = ImmCreateIMCC(0);
new_context->IMC.hCandInfo = ImmCreateIMCC(sizeof(CANDIDATEINFO));
ci = ImmLockIMCC(new_context->IMC.hCandInfo);
memset(ci,0,sizeof(CANDIDATEINFO));
ci->dwSize = sizeof(CANDIDATEINFO);
ImmUnlockIMCC(new_context->IMC.hCandInfo);
new_context->IMC.hGuideLine = ImmCreateIMCC(sizeof(GUIDELINE));
gl = ImmLockIMCC(new_context->IMC.hGuideLine);
memset(gl,0,sizeof(GUIDELINE));
gl->dwSize = sizeof(GUIDELINE);
ImmUnlockIMCC(new_context->IMC.hGuideLine);
/* Initialize the IME Private */ /* Initialize the IME Private */
new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize); new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize);
......
...@@ -84,6 +84,24 @@ typedef struct tagCOMPOSITIONSTRING { ...@@ -84,6 +84,24 @@ typedef struct tagCOMPOSITIONSTRING {
DWORD dwPrivateOffset; DWORD dwPrivateOffset;
} COMPOSITIONSTRING, *LPCOMPOSITIONSTRING; } COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
typedef struct tagGUIDELINE {
DWORD dwSize;
DWORD dwLevel;
DWORD dwIndex;
DWORD dwStrLen;
DWORD dwStrOffset;
DWORD dwPrivateSize;
DWORD dwPrivateOffset;
} GUIDELINE, *LPGUIDELINE;
typedef struct tagCANDIDATEINFO {
DWORD dwSize;
DWORD dwCount;
DWORD dwOffset[32];
DWORD dwPrivateSize;
DWORD dwPrivateOffset;
} CANDIDATEINFO, *LPCANDIDATEINFO;
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC); LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
BOOL WINAPI ImmUnlockIMC(HIMC); BOOL WINAPI ImmUnlockIMC(HIMC);
DWORD WINAPI ImmGetIMCLockCount(HIMC); DWORD WINAPI ImmGetIMCLockCount(HIMC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment