From c4f0f3c668e8269678beab8b2ad8e53ed010314b Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 30 May 2008 06:13:52 +0000 Subject: [PATCH] Move the init of server info after heap is init. svn path=/trunk/; revision=33766 --- reactos/subsystems/win32/win32k/include/ntuser.h | 1 + reactos/subsystems/win32/win32k/ntuser/event.c | 1 - reactos/subsystems/win32/win32k/ntuser/metric.c | 1 - reactos/subsystems/win32/win32k/ntuser/misc.c | 1 - reactos/subsystems/win32/win32k/ntuser/ntuser.c | 3 +++ reactos/subsystems/win32/win32k/ntuser/window.c | 3 --- reactos/subsystems/win32/win32k/objects/stockobj.c | 1 - 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/reactos/subsystems/win32/win32k/include/ntuser.h b/reactos/subsystems/win32/win32k/include/ntuser.h index 256aa6b85eb..e11eece5ba0 100644 --- a/reactos/subsystems/win32/win32k/include/ntuser.h +++ b/reactos/subsystems/win32/win32k/include/ntuser.h @@ -10,6 +10,7 @@ #define UserEnterCo UserEnterExclusive #define UserLeaveCo UserLeave +extern PSERVERINFO gpsi; NTSTATUS FASTCALL InitUserImpl(VOID); VOID FASTCALL CleanupUserImpl(VOID); diff --git a/reactos/subsystems/win32/win32k/ntuser/event.c b/reactos/subsystems/win32/win32k/ntuser/event.c index 76c34f6a193..bdec573132e 100644 --- a/reactos/subsystems/win32/win32k/ntuser/event.c +++ b/reactos/subsystems/win32/win32k/ntuser/event.c @@ -4,7 +4,6 @@ #define NDEBUG #include -extern PSERVERINFO gpsi; //static PEVENTTABLE GlobalEvents; diff --git a/reactos/subsystems/win32/win32k/ntuser/metric.c b/reactos/subsystems/win32/win32k/ntuser/metric.c index ce9cc4fbc05..ffa41b79951 100644 --- a/reactos/subsystems/win32/win32k/ntuser/metric.c +++ b/reactos/subsystems/win32/win32k/ntuser/metric.c @@ -34,7 +34,6 @@ #define NDEBUG #include -extern PSERVERINFO gpsi; static BOOL Setup = FALSE; diff --git a/reactos/subsystems/win32/win32k/ntuser/misc.c b/reactos/subsystems/win32/win32k/ntuser/misc.c index 3b24ad77133..365debf64d0 100644 --- a/reactos/subsystems/win32/win32k/ntuser/misc.c +++ b/reactos/subsystems/win32/win32k/ntuser/misc.c @@ -13,7 +13,6 @@ #define NDEBUG #include -extern PSERVERINFO gpsi; /* * @unimplemented diff --git a/reactos/subsystems/win32/win32k/ntuser/ntuser.c b/reactos/subsystems/win32/win32k/ntuser/ntuser.c index a354c8a2805..25dc1ce0cf0 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntuser.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntuser.c @@ -57,6 +57,9 @@ NTSTATUS FASTCALL InitUserImpl(VOID) return Status; } + gpsi = UserHeapAlloc(sizeof(SERVERINFO)); + if (gpsi) RtlZeroMemory(gpsi, sizeof(SERVERINFO)); + return STATUS_SUCCESS; } diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index c249571d486..9e1cb31b11a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -33,7 +33,6 @@ #define NDEBUG #include -extern PSERVERINFO gpsi; /* dialog resources appear to pass this in 16 bits, handle them properly */ #define CW_USEDEFAULT16 (0x8000) @@ -51,8 +50,6 @@ extern PSERVERINFO gpsi; NTSTATUS FASTCALL InitWindowImpl(VOID) { - gpsi = UserHeapAlloc(sizeof(SERVERINFO)); - if (gpsi) RtlZeroMemory(gpsi, sizeof(SERVERINFO)); return STATUS_SUCCESS; } diff --git a/reactos/subsystems/win32/win32k/objects/stockobj.c b/reactos/subsystems/win32/win32k/objects/stockobj.c index a0d3525b99a..1d550cf2ac0 100644 --- a/reactos/subsystems/win32/win32k/objects/stockobj.c +++ b/reactos/subsystems/win32/win32k/objects/stockobj.c @@ -27,7 +27,6 @@ #define NDEBUG #include -extern PSERVERINFO gpsi; static COLORREF SysColors[] = {