mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:55:41 +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(
|
MmGetSessionById(
|
||||||
_In_ ULONG SessionId);
|
_In_ ULONG SessionId);
|
||||||
|
|
||||||
|
_IRQL_requires_max_(APC_LEVEL)
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
MmSetSessionLocaleId(
|
||||||
|
_In_ LCID LocaleId);
|
||||||
|
|
|
@ -80,9 +80,9 @@ MmGetSessionLocaleId(VOID)
|
||||||
Process = PsGetCurrentProcess();
|
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
|
// Make sure it has a valid Session
|
||||||
|
@ -102,6 +102,31 @@ MmGetSessionLocaleId(VOID)
|
||||||
return PsDefaultThreadLocaleId;
|
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
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MiInitializeSessionIds(VOID)
|
MiInitializeSessionIds(VOID)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue