File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -367,13 +367,17 @@ PlayLogonSound(
367367
368368static
369369VOID
370- PlayLogoffSound (
371- _In_ PWLSESSION Session )
370+ PlayLogoffShutdownSound (
371+ _In_ PWLSESSION Session ,
372+ _In_ BOOL bShutdown )
372373{
373374 if (!ImpersonateLoggedOnUser (Session -> UserToken ))
374375 return ;
375376
376- PlaySoundRoutine (L"WindowsLogoff" , FALSE, SND_ALIAS | SND_NODEFAULT );
377+ /* NOTE: Logoff and shutdown sounds play synchronously */
378+ PlaySoundRoutine (bShutdown ? L"SystemExit" : L"WindowsLogoff" ,
379+ FALSE,
380+ SND_ALIAS | SND_NODEFAULT );
377381
378382 RevertToSelf ();
379383}
@@ -848,7 +852,7 @@ HandleLogoff(
848852
849853 SwitchDesktop (Session -> WinlogonDesktop );
850854
851- PlayLogoffSound (Session );
855+ PlayLogoffShutdownSound (Session , WLX_SHUTTINGDOWN ( wlxAction ) );
852856
853857 SetWindowStationUser (Session -> InteractiveWindowStation ,
854858 & LuidNone , NULL , 0 );
You can’t perform that action at this time.
0 commit comments