Index: base/applications/taskmgr/CMakeLists.txt =================================================================== --- base/applications/taskmgr/CMakeLists.txt (revision 64200) +++ base/applications/taskmgr/CMakeLists.txt (working copy) @@ -23,6 +23,6 @@ add_executable(taskmgr ${SOURCE} taskmgr.rc) set_module_type(taskmgr win32gui UNICODE) -add_importlibs(taskmgr advapi32 user32 gdi32 shell32 comctl32 msvcrt kernel32 ntdll) +add_importlibs(taskmgr advapi32 user32 gdi32 shell32 powrprof comctl32 msvcrt kernel32 ntdll) add_pch(taskmgr precomp.h SOURCE) add_cd_file(TARGET taskmgr DESTINATION reactos/system32 FOR all) Index: base/applications/taskmgr/taskmgr.c =================================================================== --- base/applications/taskmgr/taskmgr.c (revision 64200) +++ base/applications/taskmgr/taskmgr.c (working copy) @@ -29,6 +29,8 @@ #include "debug.h" #include "priority.h" +#include + #define STATUS_WINDOW 2001 /* Global Variables: */ @@ -649,6 +651,14 @@ hUpdateSpeedMenu = GetSubMenu(hViewMenu, 1); hCPUHistoryMenu = GetSubMenu(hViewMenu, 7); + /* Check to see if the system supports Stand By or Hibernate */ + if (IsPwrSuspendAllowed() == FALSE) { + EnableMenuItem(hMenu, ID_SHUTDOWN_STANDBY, MF_GRAYED); + } + if (IsPwrHibernateAllowed() == FALSE) { + EnableMenuItem(hMenu, ID_SHUTDOWN_HIBERNATE, MF_GRAYED); + } + /* Check or uncheck the always on top menu item */ if (TaskManagerSettings.AlwaysOnTop) { CheckMenuItem(hEditMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_CHECKED);