mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +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
1 changed files with 13 additions and 0 deletions
|
@ -56,6 +56,8 @@ DuplicateConsoleHandle(HANDLE hConsole,
|
||||||
#define WIN_OBJ_DIR L"\\Windows"
|
#define WIN_OBJ_DIR L"\\Windows"
|
||||||
#define SESSION_DIR L"\\Sessions"
|
#define SESSION_DIR L"\\Sessions"
|
||||||
|
|
||||||
|
SYSTEM_BASIC_INFORMATION BaseCachedSysInfo;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -382,6 +384,17 @@ DllMain(HANDLE hDll,
|
||||||
return FALSE;
|
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! */
|
/* Insert more dll attach stuff here! */
|
||||||
DllInitialized = TRUE;
|
DllInitialized = TRUE;
|
||||||
DPRINT("Initialization complete\n");
|
DPRINT("Initialization complete\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue