crashdmp.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*++
  2. Copyright (c) 2014 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. crashdmp.h
  9. Abstract:
  10. This header contains definitions for the crash dump file.
  11. Author:
  12. Chris Stevens 26-Aug-2014
  13. --*/
  14. //
  15. // ---------------------------------------------------------------- Definitions
  16. //
  17. #define CRASH_DUMP_SIGNATURE 0x504D4443 // 'PMDC'
  18. //
  19. // ------------------------------------------------------ Data Type Definitions
  20. //
  21. typedef enum _CRASH_DUMP_TYPE {
  22. CrashDumpMinimal,
  23. CrashDumpTypeMax
  24. } CRASH_DUMP_TYPE, *PCRASH_DUMP_TYPE;
  25. /*++
  26. Structure Description:
  27. This structure defines the header for a crash dump file.
  28. Members:
  29. Signature - Stores the crash dump signature: CRASH_DUMP_SIGNATURE.
  30. Type - Stores the type of crash dump file.
  31. DumpSize - Stores the total size of the crash dump data, including the
  32. header.
  33. HeaderChecksum - Stores the one's compliment checksum of the header.
  34. MajorVersion - Stores the major version number for the OS.
  35. MinorVersion - Stores the minor version number for the OS.
  36. Revision - Stores the sub-minor version number for the OS.
  37. SerialVersion - Stores the globally increasing system version number. This
  38. value will always be greater than any previous builds.
  39. ReleaseLevel - Stores the release level of the build.
  40. DebugLevel - Stores the debug compilation level of the build.
  41. ProductNameOffset - Stores the offset from the beginning of the file to a
  42. string containing the name of the product. 0 indicates that it is not
  43. present.
  44. BuildStringOffset - Stores the offset from the beginning of the file to a
  45. string containing an identifier string for this build. 0 indicates that
  46. it is not present.
  47. BuildTime - Stores the system build time.
  48. CrashCode - Stores the reason for the system crash.
  49. Parameter1 - Stores the first parameter supplied to the crash routine.
  50. Parameter2 - Stores the second parameter supplied to the crash routine.
  51. Parameter3 - Stores the third parameter supplied to the crash routine.
  52. Parameter4 - Stores the fourth parameter supplied to the crash routine.
  53. --*/
  54. typedef struct _CRASH_DUMP_HEADER {
  55. ULONG Signature;
  56. CRASH_DUMP_TYPE Type;
  57. ULONGLONG DumpSize;
  58. USHORT HeaderChecksum;
  59. USHORT MajorVersion;
  60. USHORT MinorVersion;
  61. USHORT Revision;
  62. ULONGLONG SerialVersion;
  63. SYSTEM_RELEASE_LEVEL ReleaseLevel;
  64. SYSTEM_BUILD_DEBUG_LEVEL DebugLevel;
  65. ULONGLONG ProductNameOffset;
  66. ULONGLONG BuildStringOffset;
  67. SYSTEM_TIME BuildTime;
  68. ULONG CrashCode;
  69. ULONGLONG Parameter1;
  70. ULONGLONG Parameter2;
  71. ULONGLONG Parameter3;
  72. ULONGLONG Parameter4;
  73. } PACKED CRASH_DUMP_HEADER, *PCRASH_DUMP_HEADER;
  74. //
  75. // -------------------------------------------------------- Function Prototypes
  76. //