[USER32] Fix 64 bit issues
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 4 Mar 2018 16:44:13 +0000 (17:44 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 4 Aug 2018 17:19:34 +0000 (19:19 +0200)
win32ss/user/user32/misc/desktop.c
win32ss/user/user32/misc/dllmain.c
win32ss/user/user32/windows/cursoricon.c
win32ss/user/user32/windows/defwnd.c
win32ss/user/user32/windows/dialog.c
win32ss/user/user32/windows/messagebox.c

index edf17e8..bd3ca78 100644 (file)
@@ -563,7 +563,7 @@ GetThreadDesktop(
     }
 
     return NtUserGetThreadDesktop(dwThreadId,
-                                  (DWORD)GetThreadConsoleDesktopRequest->ConsoleDesktop);
+                                  (DWORD_PTR)GetThreadConsoleDesktopRequest->ConsoleDesktop);
 }
 
 
index 5bf6855..704cb2c 100644 (file)
@@ -574,7 +574,7 @@ User32CallGetCharsetInfo(PVOID Arguments, ULONG ArgumentLength)
 
   TRACE("GetCharsetInfo\n");
 
-  Ret = TranslateCharsetInfo((DWORD *)pgci->Locale, &pgci->Cs, TCI_SRCLOCALE);
+  Ret = TranslateCharsetInfo((DWORD *)(ULONG_PTR)pgci->Locale, &pgci->Cs, TCI_SRCLOCALE);
 
   return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
 }
index ee28658..ad0ac4d 100644 (file)
@@ -281,7 +281,7 @@ create_alpha_bitmap(
     HDC hdc = NULL, hdcScreen;
     unsigned char *ptr;
     void *bits = NULL;
-    size_t size;
+    ULONG size;
 
     hdcScreen = CreateDCW(DISPLAYW, NULL, NULL, NULL);
     if (!hdcScreen)
index ac9fd93..ad2bbbb 100644 (file)
@@ -869,7 +869,7 @@ RealDefWindowProcA(HWND hWnd,
         {
             PWSTR buf = NULL;
             PSTR outbuf = (PSTR)lParam;
-            UINT copy;
+            SIZE_T copy;
 
             if (Wnd != NULL && wParam != 0)
             {
index 7042f45..3cf8371 100644 (file)
@@ -2532,7 +2532,7 @@ IsDialogMessageW(
                             WCHAR *buffer = HeapAlloc (GetProcessHeap(), 0, maxlen * sizeof(WCHAR));
                             if (buffer)
                             {
-                                INT length;
+                                SIZE_T length;
                                 SendMessageW (hwndNext, WM_GETTEXT, maxlen, (LPARAM) buffer);
                                 length = strlenW (buffer);
                                 HeapFree (GetProcessHeap(), 0, buffer);
index 2ceb24f..0b94c6c 100644 (file)
@@ -387,7 +387,7 @@ MessageBoxTimeoutIndirectW(
     else if (IS_INTRESOURCE(lpMsgBoxParams->lpszCaption))
     {
         /* User-defined resource string */
-        caplen = LoadStringW(lpMsgBoxParams->hInstance, (UINT)lpMsgBoxParams->lpszCaption, (LPWSTR)&caption, 0);
+        caplen = LoadStringW(lpMsgBoxParams->hInstance, PtrToUlong(lpMsgBoxParams->lpszCaption), (LPWSTR)&caption, 0);
     }
     else
     {
@@ -405,7 +405,7 @@ MessageBoxTimeoutIndirectW(
     else if (IS_INTRESOURCE(lpMsgBoxParams->lpszText))
     {
         /* User-defined resource string */
-        textlen = LoadStringW(lpMsgBoxParams->hInstance, (UINT)lpMsgBoxParams->lpszText, (LPWSTR)&text, 0);
+        textlen = LoadStringW(lpMsgBoxParams->hInstance, PtrToUlong(lpMsgBoxParams->lpszText), (LPWSTR)&text, 0);
     }
     else
     {