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.

108 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. drwatson.h
  5. Abstract:
  6. Common header file for drwatson data structures.
  7. Author:
  8. Wesley Witt (wesw) 1-May-1993
  9. Environment:
  10. User Mode
  11. --*/
  12. #include <tchar.h>
  13. #include <windows.h>
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <string.h>
  17. #include <dbghelp.h>
  18. // Implemented in crashlib
  19. PWSTR AsiToUnicode(PSTR);
  20. PSTR UnicodeToAnsi(PWSTR);
  21. typedef enum _CrashDumpType {
  22. FullDump = 0,
  23. MiniDump = 1,
  24. FullMiniDump = 2,
  25. } CrashDumpType;
  26. typedef struct _tagOPTIONS {
  27. _TCHAR szLogPath[MAX_PATH];
  28. _TCHAR szWaveFile[MAX_PATH];
  29. _TCHAR szCrashDump[MAX_PATH];
  30. BOOL fDumpSymbols;
  31. BOOL fDumpAllThreads;
  32. BOOL fAppendToLogFile;
  33. BOOL fVisual;
  34. BOOL fSound;
  35. BOOL fCrash;
  36. // true: Generate user dump name in the range from fname000.dmp to fname999.dmp
  37. // false: standard behavior, always overwrite fname.dmp when generating a new
  38. // dump file.
  39. BOOL fUseSequentialNaming;
  40. // If TRUE use long file names when sequentially naming the dumps
  41. // If FALSE use 8.3 file names when sequentially naming the dumps
  42. // causes the 'n' of characters to be removed from the end of the
  43. // file name to make it fit in the 8.3 format. ie longuser.dmp -> longus00.dmp
  44. BOOL fUseLongFileNames;
  45. int nNextDumpSequence;
  46. DWORD dwInstructions;
  47. DWORD dwMaxCrashes;
  48. CrashDumpType dwType;
  49. } OPTIONS, *POPTIONS;
  50. typedef struct _tagCRASHES {
  51. _TCHAR szAppName[256];
  52. _TCHAR szFunction[256];
  53. SYSTEMTIME time;
  54. DWORD dwExceptionCode;
  55. DWORD_PTR dwAddress;
  56. } CRASHES, *PCRASHES;
  57. typedef struct _tagCRASHINFO {
  58. HWND hList;
  59. CRASHES crash;
  60. HDC hdc;
  61. DWORD cxExtent;
  62. DWORD dwIndex;
  63. DWORD dwIndexDesired;
  64. BYTE *pCrashData;
  65. DWORD dwCrashDataSize;
  66. } CRASHINFO, *PCRASHINFO;
  67. typedef struct _tagTHREADCONTEXT {
  68. LIST_ENTRY ThreadList;
  69. HANDLE hThread;
  70. DWORD dwThreadId;
  71. DWORD_PTR pc;
  72. DWORD_PTR frame;
  73. DWORD_PTR stack;
  74. CONTEXT context;
  75. DWORD_PTR stackBase;
  76. DWORD_PTR stackRA;
  77. BOOL fFaultingContext;
  78. } THREADCONTEXT, *PTHREADCONTEXT;
  79. typedef BOOL (CALLBACK* CRASHESENUMPROC)(PCRASHINFO);
  80. //
  81. // process list structure returned from GetSystemProcessList()
  82. //
  83. typedef struct _PROCESS_LIST {
  84. DWORD dwProcessId;
  85. _TCHAR ProcessName[MAX_PATH];
  86. } PROCESS_LIST, *PPROCESS_LIST;