mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[WINLOGON] Implement shutdown sound support
CORE-13951
This commit is contained in:
parent
77bfc12e0f
commit
37375fcc4d
1 changed files with 8 additions and 4 deletions
|
@ -367,13 +367,17 @@ PlayLogonSound(
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
PlayLogoffSound(
|
PlayLogoffShutdownSound(
|
||||||
_In_ PWLSESSION Session)
|
_In_ PWLSESSION Session,
|
||||||
|
_In_ BOOL bShutdown)
|
||||||
{
|
{
|
||||||
if (!ImpersonateLoggedOnUser(Session->UserToken))
|
if (!ImpersonateLoggedOnUser(Session->UserToken))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PlaySoundRoutine(L"WindowsLogoff", FALSE, SND_ALIAS | SND_NODEFAULT);
|
/* NOTE: Logoff and shutdown sounds play synchronously */
|
||||||
|
PlaySoundRoutine(bShutdown ? L"SystemExit" : L"WindowsLogoff",
|
||||||
|
FALSE,
|
||||||
|
SND_ALIAS | SND_NODEFAULT);
|
||||||
|
|
||||||
RevertToSelf();
|
RevertToSelf();
|
||||||
}
|
}
|
||||||
|
@ -848,7 +852,7 @@ HandleLogoff(
|
||||||
|
|
||||||
SwitchDesktop(Session->WinlogonDesktop);
|
SwitchDesktop(Session->WinlogonDesktop);
|
||||||
|
|
||||||
PlayLogoffSound(Session);
|
PlayLogoffShutdownSound(Session, WLX_SHUTTINGDOWN(wlxAction));
|
||||||
|
|
||||||
SetWindowStationUser(Session->InteractiveWindowStation,
|
SetWindowStationUser(Session->InteractiveWindowStation,
|
||||||
&LuidNone, NULL, 0);
|
&LuidNone, NULL, 0);
|
||||||
|
|
Loading…
Reference in a new issue