Reason.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:3k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+-------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //  File:        reason.h
  7. //
  8. //  Contents:    Shutdown reason code values.
  9. //
  10. //  History:     8-00        Created         Hughleat
  11. //
  12. //--------------------------------------------------------------------
  13. #if !defined SENTINEL_Reason
  14. # define SENTINEL_Reason
  15. // Reason flags
  16. // Flags used by the various UIs.
  17. #define SHTDN_REASON_FLAG_COMMENT_REQUIRED          0x01000000
  18. #define SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED 0x02000000
  19. #define SHTDN_REASON_FLAG_CLEAN_UI                  0x04000000
  20. #define SHTDN_REASON_FLAG_DIRTY_UI                  0x08000000
  21. // Flags that end up in the event log code.
  22. #define SHTDN_REASON_FLAG_USER_DEFINED          0x40000000
  23. #define SHTDN_REASON_FLAG_PLANNED               0x80000000
  24. // Microsoft major reasons.
  25. #define SHTDN_REASON_MAJOR_OTHER                0x00000000
  26. #define SHTDN_REASON_MAJOR_NONE                 0x00000000
  27. #define SHTDN_REASON_MAJOR_HARDWARE             0x00010000
  28. #define SHTDN_REASON_MAJOR_OPERATINGSYSTEM      0x00020000
  29. #define SHTDN_REASON_MAJOR_SOFTWARE             0x00030000
  30. #define SHTDN_REASON_MAJOR_APPLICATION          0x00040000
  31. #define SHTDN_REASON_MAJOR_SYSTEM               0x00050000
  32. #define SHTDN_REASON_MAJOR_POWER                0x00060000
  33. // Microsoft minor reasons.
  34. #define SHTDN_REASON_MINOR_OTHER                0x00000000
  35. #define SHTDN_REASON_MINOR_NONE                 0x000000ff
  36. #define SHTDN_REASON_MINOR_MAINTENANCE          0x00000001
  37. #define SHTDN_REASON_MINOR_INSTALLATION         0x00000002
  38. #define SHTDN_REASON_MINOR_UPGRADE              0x00000003
  39. #define SHTDN_REASON_MINOR_RECONFIG             0x00000004
  40. #define SHTDN_REASON_MINOR_HUNG                 0x00000005
  41. #define SHTDN_REASON_MINOR_UNSTABLE             0x00000006
  42. #define SHTDN_REASON_MINOR_DISK                 0x00000007
  43. #define SHTDN_REASON_MINOR_PROCESSOR            0x00000008
  44. #define SHTDN_REASON_MINOR_NETWORKCARD          0x00000009
  45. #define SHTDN_REASON_MINOR_POWER_SUPPLY         0x0000000a
  46. #define SHTDN_REASON_MINOR_CORDUNPLUGGED        0x0000000b
  47. #define SHTDN_REASON_MINOR_ENVIRONMENT          0x0000000c
  48. #define SHTDN_REASON_MINOR_HARDWARE_DRIVER      0x0000000d
  49. #define SHTDN_REASON_MINOR_OTHERDRIVER          0x0000000e
  50. #define SHTDN_REASON_MINOR_BLUESCREEN           0x0000000F
  51. #define SHTDN_REASON_UNKNOWN                    SHTDN_REASON_MINOR_NONE
  52. // This mask cuts out UI flags.
  53. #define SHTDN_REASON_VALID_BIT_MASK             0xc0ffffff
  54. // Convenience flags.
  55. #define PCLEANUI                (SHTDN_REASON_FLAG_PLANNED | SHTDN_REASON_FLAG_CLEAN_UI)
  56. #define UCLEANUI                (SHTDN_REASON_FLAG_CLEAN_UI)
  57. #define UDIRTYUI                (SHTDN_REASON_FLAG_DIRTY_UI)
  58.     
  59. /*
  60.  * Maximum character lengths for reason name, description, problem id, and
  61.  * comment respectively.
  62.  */
  63. #define MAX_REASON_NAME_LEN  64
  64. #define MAX_REASON_DESC_LEN  256
  65. #define MAX_REASON_BUGID_LEN 32
  66. #define MAX_REASON_COMMENT_LEN  4096
  67. #endif // !defined SENTINEL_Reason