Author: ion
Date: Fri Jun 23 03:44:17 2006
New Revision: 22521
URL:
http://svn.reactos.ru/svn/reactos?rev=22521&view=rev
Log:
- Cache system static information, such as PAGE_SIZE at kernel32 startup, so we can
reference it in our code without always quertying the system for it.
Modified:
trunk/reactos/dll/win32/kernel32/misc/dllmain.c
Modified: trunk/reactos/dll/win32/kernel32/misc/dllmain.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/dll…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/dllmain.c (original)
+++ trunk/reactos/dll/win32/kernel32/misc/dllmain.c Fri Jun 23 03:44:17 2006
@@ -55,6 +55,8 @@
#define WIN_OBJ_DIR L"\\Windows"
#define SESSION_DIR L"\\Sessions"
+
+SYSTEM_BASIC_INFORMATION BaseCachedSysInfo;
/* FUNCTIONS *****************************************************************/
@@ -382,6 +384,17 @@
return FALSE;
}
+ /* Cache static system information */
+ Status = ZwQuerySystemInformation(SystemBasicInformation,
+ &BaseCachedSysInfo,
+ sizeof(BaseCachedSysInfo),
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("Failure to get system information\n");
+ return FALSE;
+ }
+
/* Insert more dll attach stuff here! */
DllInitialized = TRUE;
DPRINT("Initialization complete\n");