I am not a 64 bit expert but i do not think this is going to work.
ddk/imm.h is a Microsoft header so IMEs and programs compiled with the
original header will not have the expanded space.
To fix this properly (I assume you are trying to support 64 bit) is that
we will probibly have to store a handle instead of a pointer in the LONG
value. The IME is expecting a HIMC in that value.
Which leads to a more general question. What is the suggested way to
generate handles like that? Working toward 64 bit means that everywhere
that we are using pointers as LONG handles is going to have problems.
-aric
Michael Stefaniuc wrote:
> ---
> Next try at fixing this problem. I didn't find any other place where
> IMMGWL_IMC is used and the window classes are not my area of expertise.
>
>
>
> dlls/imm32/imm.c | 2 +-
> dlls/winex11.drv/ime.c | 2 +-
> include/ddk/imm.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
> index 14178c3..bb50e5e 100644
> --- a/dlls/imm32/imm.c
> +++ b/dlls/imm32/imm.c
> @@ -2291,7 +2291,7 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
> data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW,
> data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0,
> 0, data->immKbd->hIME, 0);
> - SetWindowLongW(data->imeWnd, IMMGWL_IMC, (LONG)data);
> + SetWindowLongPtrW(data->imeWnd, IMMGWL_IMC, (LONG_PTR)data);
> IMM_GetThreadData()->hwndDefault = data->imeWnd;
> }
>
> diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c
> index 87d4faa..6d083d1 100644
> --- a/dlls/winex11.drv/ime.c
> +++ b/dlls/winex11.drv/ime.c
> @@ -1326,7 +1326,7 @@ static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT msg, WPARAM wParam,
> * messages.
> */
>
> - hIMC = (HIMC)GetWindowLongW(hwnd,IMMGWL_IMC);
> + hIMC = (HIMC)GetWindowLongPtrW(hwnd,IMMGWL_IMC);
> if (!hIMC)
> hIMC = RealIMC(FROM_X11);
>
> diff --git a/include/ddk/imm.h b/include/ddk/imm.h
> index 6e4d42f..bc9617e 100644
> --- a/include/ddk/imm.h
> +++ b/include/ddk/imm.h
> @@ -114,7 +114,7 @@ HIMCC WINAPI ImmReSizeIMCC(HIMCC, DWORD);
> DWORD WINAPI ImmGetIMCCSize(HIMCC);
>
> #define IMMGWL_IMC 0
> -#define IMMGWL_PRIVATE (sizeof(LONG))
> +#define IMMGWL_PRIVATE (sizeof(LONG_PTR))
>
> /* IME Property bits */
> #define IME_PROP_END_UNLOAD 0x0001
>
>
> ------------------------------------------------------------------------
>
>