mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
- 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.
svn path=/trunk/; revision=22521
This commit is contained in:
parent
8727a1f7ff
commit
2c010d69e8
|
@ -56,6 +56,8 @@ DuplicateConsoleHandle(HANDLE hConsole,
|
|||
#define WIN_OBJ_DIR L"\\Windows"
|
||||
#define SESSION_DIR L"\\Sessions"
|
||||
|
||||
SYSTEM_BASIC_INFORMATION BaseCachedSysInfo;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
|
@ -382,6 +384,17 @@ DllMain(HANDLE hDll,
|
|||
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");
|
||||
|
|
Loading…
Reference in a new issue