mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 18:42:14 +00:00
[NTOSKRNL]
Fix MmGetSessionLocaleId and implement MmSetSessionLocaleId svn path=/trunk/; revision=61074
This commit is contained in:
parent
49642d5bb1
commit
d018fb6027
2 changed files with 32 additions and 2 deletions
|
@ -1798,3 +1798,8 @@ NTAPI
|
|||
MmGetSessionById(
|
||||
_In_ ULONG SessionId);
|
||||
|
||||
_IRQL_requires_max_(APC_LEVEL)
|
||||
VOID
|
||||
NTAPI
|
||||
MmSetSessionLocaleId(
|
||||
_In_ LCID LocaleId);
|
||||
|
|
|
@ -80,9 +80,9 @@ MmGetSessionLocaleId(VOID)
|
|||
Process = PsGetCurrentProcess();
|
||||
|
||||
//
|
||||
// Check if it's the Session Leader
|
||||
// Check if it's NOT the Session Leader
|
||||
//
|
||||
if (Process->Vm.Flags.SessionLeader)
|
||||
if (!Process->Vm.Flags.SessionLeader)
|
||||
{
|
||||
//
|
||||
// Make sure it has a valid Session
|
||||
|
@ -102,6 +102,31 @@ MmGetSessionLocaleId(VOID)
|
|||
return PsDefaultThreadLocaleId;
|
||||
}
|
||||
|
||||
_IRQL_requires_max_(APC_LEVEL)
|
||||
VOID
|
||||
NTAPI
|
||||
MmSetSessionLocaleId(
|
||||
_In_ LCID LocaleId)
|
||||
{
|
||||
PEPROCESS CurrentProcess;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the current process and check if it is in a session */
|
||||
CurrentProcess = PsGetCurrentProcess();
|
||||
if ((CurrentProcess->Vm.Flags.SessionLeader == 0) &&
|
||||
(CurrentProcess->Session != NULL))
|
||||
{
|
||||
/* Set the session locale Id */
|
||||
((PMM_SESSION_SPACE)CurrentProcess->Session)->LocaleId = LocaleId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set the default locale */
|
||||
PsDefaultThreadLocaleId = LocaleId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MiInitializeSessionIds(VOID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue