[WINSRV] Fix 64 bit issues
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 4 Mar 2018 15:07:41 +0000 (16:07 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 4 Aug 2018 17:19:34 +0000 (19:19 +0200)
win32ss/user/winsrv/concfg/font.c
win32ss/user/winsrv/consrv/condrv/graphics.c
win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
win32ss/user/winsrv/consrv/subsysreg.c
win32ss/user/winsrv/usersrv/init.c

index 46f6a9f..fdc4e15 100644 (file)
@@ -28,7 +28,7 @@ CodePageToCharSet(
     IN UINT CodePage)
 {
     CHARSETINFO CharInfo;
-    if (TranslateCharsetInfo((LPDWORD)CodePage, &CharInfo, TCI_SRCCODEPAGE))
+    if (TranslateCharsetInfo(UlongToPtr(CodePage), &CharInfo, TCI_SRCCODEPAGE))
         return CharInfo.ciCharset;
     else
         return DEFAULT_CHARSET;
index a71bb3c..cc168cb 100644 (file)
@@ -50,7 +50,7 @@ GRAPHICS_BUFFER_Initialize(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
     PGRAPHICS_SCREEN_BUFFER NewBuffer = NULL;
 
     LARGE_INTEGER SectionSize;
-    ULONG ViewSize = 0;
+    SIZE_T ViewSize = 0;
 
     if (Buffer == NULL || Console == NULL || GraphicsInfo == NULL)
         return STATUS_INVALID_PARAMETER;
index b61d84e..e317334 100644 (file)
@@ -77,7 +77,7 @@ GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData,
     {
         PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
         LARGE_INTEGER SectionSize;
-        ULONG ViewSize = 0;
+        SIZE_T ViewSize = 0;
         PCONSOLE_STATE_INFO pSharedInfo = NULL;
 
         /*
@@ -262,7 +262,7 @@ GuiApplyUserSettings(PGUI_CONSOLE_DATA GuiData,
     PCONSRV_CONSOLE Console = GuiData->Console;
     PCONSOLE_PROCESS_DATA ProcessData;
     HANDLE hSection = NULL;
-    ULONG ViewSize = 0;
+    SIZE_T ViewSize = 0;
     PCONSOLE_STATE_INFO pConInfo = NULL;
 
     if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
index 6874ac6..9dd14a2 100644 (file)
@@ -38,7 +38,7 @@ CSR_API(SrvRegisterConsoleVDM)
     if (RegisterVDMRequest->RegisterFlags != 0)
     {
         LARGE_INTEGER SectionSize;
-        ULONG Size, ViewSize = 0;
+        SIZE_T Size, ViewSize = 0;
         HANDLE ProcessHandle;
 
         /*
index 8ee21e6..d70209e 100644 (file)
@@ -114,7 +114,7 @@ ULONG
 NTAPI
 CreateSystemThreads(PVOID pParam)
 {
-    NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
+    NtUserCallOneParam((DWORD_PTR)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
     RtlExitUserThread(0);
     return 0;
 }
@@ -292,9 +292,15 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
         for (i = 0; i < 2; ++i)
         {
             Status = RtlCreateUserThread(NtCurrentProcess(),
-                                         NULL, TRUE, 0, 0, 0,
+                                         NULL,
+                                         TRUE,
+                                         0,
+                                         0,
+                                         0,
                                          CreateSystemThreads,
-                                         (PVOID)i, &ServerThread, &ClientId);
+                                         UlongToPtr(i),
+                                         &ServerThread,
+                                         &ClientId);
             if (NT_SUCCESS(Status))
             {
                 NtResumeThread(ServerThread, NULL);