Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
5.1 KiB

  1. /******************************************************************************
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. faultrep.h
  5. Abstract:
  6. header for fault reporting for unhandled exceptions
  7. Revision History:
  8. created derekm 07/07/00
  9. ******************************************************************************/
  10. #ifndef FAULTREP_H
  11. #define FAULTREP_H
  12. #include "errorrep.h"
  13. ///////////////////////////////////////////////////////////////////////////////
  14. // structs
  15. typedef enum tagEFaultRepOptions
  16. {
  17. froNoDebugWait = (DWORD)-1,
  18. froNoDebug = 0,
  19. froDebug = 1,
  20. } EFaultRepOptions;
  21. typedef enum tagEDumpFlags
  22. {
  23. dfFilterThread = 0x1,
  24. dfFilterThreadEx = 0x2,
  25. dfCollectSig = 0x4,
  26. } EDumpFlags;
  27. typedef struct tagSMDumpOptions
  28. {
  29. DWORD cbSMDO;
  30. ULONG ulThread;
  31. ULONG ulThreadEx;
  32. ULONG ulMod;
  33. DWORD dwThreadID;
  34. DWORD dfOptions;
  35. UINT64 pvFaultAddr;
  36. WCHAR wszAppFullPath[MAX_PATH];
  37. WCHAR wszApp[MAX_PATH];
  38. WORD rgAppVer[4];
  39. WCHAR wszMod[MAX_PATH];
  40. WCHAR wszModFullPath[MAX_PATH];
  41. WORD rgModVer[4];
  42. UINT64 pvOffset;
  43. UINT64 pEP;
  44. BOOL fEPClient;
  45. BOOL fIncludeHeap; // Include heap in minidump
  46. } SMDumpOptions;
  47. typedef struct tagSFaultRepManifest
  48. {
  49. DWORD pidReqProcess;
  50. BOOL fIs64bit;
  51. DWORD thidFault;
  52. UINT64 pvFaultAddr;
  53. LPWSTR wszExe;
  54. UINT64 pEP;
  55. } SFaultRepManifest;
  56. typedef enum tagEEventType
  57. {
  58. eetKernelFault = 0,
  59. eetShutdown,
  60. eetUseEventInfo,
  61. } EEventType;
  62. typedef struct tagSEventInfoW
  63. {
  64. DWORD cbSEI;
  65. LPWSTR wszEventName;
  66. LPWSTR wszErrMsg;
  67. LPWSTR wszHdr;
  68. LPWSTR wszTitle;
  69. LPWSTR wszStage1;
  70. LPWSTR wszStage2;
  71. LPWSTR wszFileList;
  72. LPWSTR wszEventSrc;
  73. LPWSTR wszCorpPath;
  74. LPWSTR wszPlea;
  75. LPWSTR wszSendBtn;
  76. LPWSTR wszNoSendBtn;
  77. BOOL fUseLitePlea;
  78. BOOL fUseIEForURLs;
  79. BOOL fNoBucketLogs;
  80. BOOL fNoDefCabLimit;
  81. } SEventInfoW;
  82. ///////////////////////////////////////////////////////////////////////////////
  83. // function prototypes
  84. EFaultRepRetVal APIENTRY ReportFaultDWM(SFaultRepManifest *pfrm,
  85. LPCWSTR wszDir, HANDLE hToken,
  86. LPVOID pvEnv, PROCESS_INFORMATION *ppi,
  87. LPWSTR wszDumpFile);
  88. EFaultRepRetVal APIENTRY ReportFaultToQueue(SFaultRepManifest *pfrm);
  89. EFaultRepRetVal APIENTRY ReportFaultFromQueue(LPWSTR wszDump, BYTE *pbData,
  90. DWORD cbData);
  91. EFaultRepRetVal APIENTRY ReportKernelFaultA(LPCSTR szDump);
  92. EFaultRepRetVal APIENTRY ReportKernelFaultW(LPCWSTR wszDump);
  93. EFaultRepRetVal APIENTRY ReportKernelFaultDWW(LPCWSTR wszDump);
  94. EFaultRepRetVal APIENTRY ReportEREvent(EEventType eet, LPCWSTR wszDump,
  95. SEventInfoW *pei);
  96. EFaultRepRetVal APIENTRY ReportEREventDW(EEventType eet, LPCWSTR wszDump,
  97. SEventInfoW *pei);
  98. EFaultRepRetVal APIENTRY ReportHang(DWORD dwpid, DWORD dwtid, BOOL f64bit,
  99. HANDLE hNotify);
  100. BOOL APIENTRY CreateMinidumpA(DWORD dwpid, LPCSTR szDump, SMDumpOptions *psmdo);
  101. BOOL APIENTRY CreateMinidumpW(DWORD dwpid, LPCWSTR wszDump, SMDumpOptions *psmdo);
  102. ///////////////////////////////////////////////////////////////////////////////
  103. // function pointer typedefs
  104. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTFAULTDWM)(SFaultRepManifest *,
  105. LPCWSTR, HANDLE, LPVOID,
  106. PROCESS_INFORMATION *,
  107. LPWSTR);
  108. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTFAULTTOQ)(SFaultRepManifest *);
  109. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTFAULTFROMQ)(LPWSTR, BYTE *, DWORD);
  110. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTKERNELFAULTA)(LPCSTR);
  111. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTKERNELFAULTW)(LPCWSTR);
  112. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTKERNELFAULTDWW)(LPCWSTR);
  113. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTEREVENT)(EEventType, LPCWSTR, SEventInfoW *);
  114. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTEREVENTDW)(EEventType, LPCWSTR, SEventInfoW *);
  115. typedef EFaultRepRetVal (APIENTRY *pfn_REPORTHANG)(DWORD, DWORD, BOOL, HANDLE);
  116. typedef BOOL (APIENTRY *pfn_CREATEMINIDUMPA)(DWORD, LPCSTR, SMDumpOptions *);
  117. typedef BOOL (APIENTRY *pfn_CREATEMINIDUMPW)(DWORD, LPCWSTR, SMDumpOptions *);
  118. ///////////////////////////////////////////////////////////////////////////////
  119. // UNICODE stuff
  120. #ifdef UNICODE
  121. #define ReportKernelFault ReportKernelFaultW
  122. #define CreateMinidump CreateMinidumpW
  123. #define pfn_REPORTKERNELFAULT pfn_REPORTKERNELFAULTW
  124. #define pfn_CREATEMINIDUMP pfn_CREATEMINIDUMPW
  125. #else // not UNICODE
  126. #define ReportKernelFault ReportKernelFaultA
  127. #define CreateMinidump CreateMinidumpA
  128. #define pfn_REPORTKERNELFAULT pfn_REPORTKERNELFAULTA
  129. #define pfn_CREATEMINIDUMP pfn_CREATEMINIDUMPA
  130. #endif // UNICODE
  131. #endif // FAULTREP_H