1 /***********************************************************************\ 2 * reason.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * by Stewart Gordon * 8 * * 9 * Placed into public domain * 10 \***********************************************************************/ 11 module win32.reason; 12 version(Windows): 13 14 private import win32.w32api, win32.windef; 15 16 static assert (_WIN32_WINNT >= 0x501, 17 "win32.reason is only available on WindowsXP and later"); 18 19 20 enum : DWORD { 21 SHTDN_REASON_MAJOR_OTHER = 0x00000000, 22 SHTDN_REASON_MAJOR_HARDWARE = 0x00010000, 23 SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000, 24 SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000, 25 SHTDN_REASON_MAJOR_APPLICATION = 0x00040000, 26 SHTDN_REASON_MAJOR_SYSTEM = 0x00050000, 27 SHTDN_REASON_MAJOR_POWER = 0x00060000, 28 SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 29 } 30 31 enum : DWORD { 32 SHTDN_REASON_MINOR_OTHER, 33 SHTDN_REASON_MINOR_MAINTENANCE, 34 SHTDN_REASON_MINOR_INSTALLATION, 35 SHTDN_REASON_MINOR_UPGRADE, 36 SHTDN_REASON_MINOR_RECONFIG, 37 SHTDN_REASON_MINOR_HUNG, 38 SHTDN_REASON_MINOR_UNSTABLE, 39 SHTDN_REASON_MINOR_DISK, 40 SHTDN_REASON_MINOR_PROCESSOR, 41 SHTDN_REASON_MINOR_NETWORKCARD, 42 SHTDN_REASON_MINOR_POWER_SUPPLY, 43 SHTDN_REASON_MINOR_CORDUNPLUGGED, 44 SHTDN_REASON_MINOR_ENVIRONMENT, 45 SHTDN_REASON_MINOR_HARDWARE_DRIVER, 46 SHTDN_REASON_MINOR_OTHERDRIVER, 47 SHTDN_REASON_MINOR_BLUESCREEN, 48 SHTDN_REASON_MINOR_SERVICEPACK, 49 SHTDN_REASON_MINOR_HOTFIX, 50 SHTDN_REASON_MINOR_SECURITYFIX, 51 SHTDN_REASON_MINOR_SECURITY, 52 SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY, 53 SHTDN_REASON_MINOR_WMI, 54 SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL, 55 SHTDN_REASON_MINOR_HOTFIX_UNINSTALL, 56 SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL, 57 SHTDN_REASON_MINOR_MMC, // = 0x00000019 58 SHTDN_REASON_MINOR_TERMSRV = 0x00000020 59 } 60 61 enum : DWORD { 62 SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000, 63 SHTDN_REASON_FLAG_PLANNED = 0x80000000 64 }