https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3323d117c351cc26122a7…
commit 3323d117c351cc26122a7749d9d214c59b66de7c
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Mar 4 16:07:41 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Aug 4 19:19:34 2018 +0200
[WINSRV] Fix 64 bit issues
---
win32ss/user/winsrv/concfg/font.c | 2 +-
win32ss/user/winsrv/consrv/condrv/graphics.c | 2 +-
win32ss/user/winsrv/consrv/frontends/gui/guisettings.c | 4 ++--
win32ss/user/winsrv/consrv/subsysreg.c | 2 +-
win32ss/user/winsrv/usersrv/init.c | 12 +++++++++---
5 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/win32ss/user/winsrv/concfg/font.c b/win32ss/user/winsrv/concfg/font.c
index 46f6a9f7da..fdc4e15f84 100644
--- a/win32ss/user/winsrv/concfg/font.c
+++ b/win32ss/user/winsrv/concfg/font.c
@@ -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;
diff --git a/win32ss/user/winsrv/consrv/condrv/graphics.c
b/win32ss/user/winsrv/consrv/condrv/graphics.c
index a71bb3c73a..cc168cb893 100644
--- a/win32ss/user/winsrv/consrv/condrv/graphics.c
+++ b/win32ss/user/winsrv/consrv/condrv/graphics.c
@@ -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;
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
index b61d84e86c..e317334790 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
@@ -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;
diff --git a/win32ss/user/winsrv/consrv/subsysreg.c
b/win32ss/user/winsrv/consrv/subsysreg.c
index 6874ac6d9d..9dd14a25dd 100644
--- a/win32ss/user/winsrv/consrv/subsysreg.c
+++ b/win32ss/user/winsrv/consrv/subsysreg.c
@@ -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;
/*
diff --git a/win32ss/user/winsrv/usersrv/init.c b/win32ss/user/winsrv/usersrv/init.c
index 8ee21e6417..d70209e688 100644
--- a/win32ss/user/winsrv/usersrv/init.c
+++ b/win32ss/user/winsrv/usersrv/init.c
@@ -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);