imm32: Make space for a 64bit pointer in the IMM window. (2nd try)

Michael Stefaniuc mstefani at redhat.de
Wed Feb 11 09:21:11 CST 2009


---
I hope I got it this time right. Thanks to the hints from Alexandre and
Aric.

 dlls/imm32/imm.c       |    2 +-
 dlls/winex11.drv/ime.c |    4 ++--
 include/ddk/imm.h      |    2 +-
 3 files changed, 4 insertions(+), 4 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..cfb0110 100644
--- a/dlls/winex11.drv/ime.c
+++ b/dlls/winex11.drv/ime.c
@@ -135,7 +135,7 @@ static void IME_RegisterClasses(void)
     wndClass.style = CS_GLOBALCLASS | CS_IME | CS_HREDRAW | CS_VREDRAW;
     wndClass.lpfnWndProc = IME_WindowProc;
     wndClass.cbClsExtra = 0;
-    wndClass.cbWndExtra = 2 * sizeof(LONG);
+    wndClass.cbWndExtra = 2 * sizeof(LONG_PTR);
     wndClass.hInstance = x11drv_module;
     wndClass.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW);
     wndClass.hIcon = LoadIconW(NULL, (LPWSTR)IDI_APPLICATION);
@@ -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
-- 
1.6.1.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090211/09424341/attachment.pgp 


More information about the wine-patches mailing list