From fb22c97c918a93d9b5f2d80210f802d4ef14bfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 15 Jun 2014 20:02:26 +0000 Subject: [PATCH] [EXPLORER][EXPLORER_NEW] [TASKMGR] Set a proper shutdown level (with SetProcessShutdownParameters) so that explorer and taskmgr are terminated the very last when one shutdowns ReactOS. See Windows Internals 4th page 286 (section "Shutdown") which gives the values (that I've cross-checked on Windows 2k3 too). svn path=/branches/shell-experiments/; revision=63601 --- base/shell/explorer-new/explorer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/shell/explorer-new/explorer.c b/base/shell/explorer-new/explorer.c index 4ee65b0996a..bd103740e6c 100644 --- a/base/shell/explorer-new/explorer.c +++ b/base/shell/explorer-new/explorer.c @@ -407,6 +407,12 @@ _tWinMain(IN HINSTANCE hInstance, InitCommonControls(); OleInitialize(NULL); + /* + * Set our shutdown parameters: we want to shutdown the very last, + * but before any TaskMgr instance (which has a shutdown level of 1). + */ + SetProcessShutdownParameters(2, 0); + ProcessStartupItems(); if (GetShellWindow() == NULL)