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.

100 lines
2.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 2000
  6. //
  7. // File: dmpfile.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // DmpFile.h: interface for the CDmpFile class.
  11. //
  12. //////////////////////////////////////////////////////////////////////
  13. #if !defined(AFX_DMPFILE_H__8BCD59C6_0CEA_11D3_84F0_000000000000__INCLUDED_)
  14. #define AFX_DMPFILE_H__8BCD59C6_0CEA_11D3_84F0_000000000000__INCLUDED_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. #ifndef NO_STRICT
  19. #ifndef STRICT
  20. #define STRICT 1
  21. #endif
  22. #endif /* NO_STRICT */
  23. #include <windows.h>
  24. #include <tchar.h>
  25. #include "globals.h"
  26. // Forward Declarations
  27. class CProcessInfo;
  28. class CModules;
  29. class CModuleInfoCache;
  30. class CFileData;
  31. // Let's implement the DebugOutputCallback for the DBGENG... it'll be cool to have the debugger
  32. // spit out info to us when it is running...
  33. class OutputCallbacks : public IDebugOutputCallbacks
  34. {
  35. // IUnknown.
  36. STDMETHOD(QueryInterface)(
  37. THIS_
  38. IN REFIID InterfaceId,
  39. OUT PVOID* Interface
  40. );
  41. STDMETHOD_(ULONG, AddRef)(
  42. THIS
  43. );
  44. STDMETHOD_(ULONG, Release)(
  45. THIS
  46. );
  47. // IDebugOutputCallbacks.
  48. // This method is only called if the supplied mask
  49. // is allowed by the clients output control.
  50. // The return value is ignored.
  51. STDMETHOD(Output)(
  52. THIS_
  53. IN ULONG Mask,
  54. IN PCSTR Text
  55. );
  56. };
  57. class CDmpFile
  58. {
  59. public:
  60. CDmpFile();
  61. virtual ~CDmpFile();
  62. bool Initialize(CFileData * lpOutputFile);
  63. bool CollectData(CProcessInfo ** lplpProcessInfo, CModules ** lplpModules, CModuleInfoCache * lpModuleInfoCache);
  64. inline bool IsUserDmpFile() {
  65. return (m_DumpClass == DEBUG_CLASS_USER_WINDOWS);
  66. };
  67. IDebugSymbols * m_pIDebugSymbols;
  68. IDebugDataSpaces * m_pIDebugDataSpaces;
  69. protected:
  70. bool m_fDmpInitialized;
  71. CFileData * m_lpOutputFile;
  72. LPSTR m_szDmpFilePath;
  73. LPSTR m_szSymbolPath;
  74. IDebugClient * m_pIDebugClient;
  75. IDebugControl * m_pIDebugControl;
  76. ULONG m_DumpClass;
  77. ULONG m_DumpClassQualifier;
  78. // LPTSTR EnumerateModulesFromDump(CModuleInfoCache * lpModuleInfoCache, CFileData * lpInputFile, CFileData * lpOutputFile);
  79. bool EumerateModulesFromDmp(CModuleInfoCache * lpModuleInfoCache, CProcessInfo * lpProcessInfo, CModules * lpModules);
  80. };
  81. #endif // !defined(AFX_DMPFILE_H__8BCD59C6_0CEA_11D3_84F0_000000000000__INCLUDED_)