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.

75 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 2000
  6. //
  7. // File: modules.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // Modules.h: interface for the CModules class.
  11. //
  12. //////////////////////////////////////////////////////////////////////
  13. #if !defined(AFX_MODULES_H__04AC8803_D1FA_11D2_8454_0010A4F1B732__INCLUDED_)
  14. #define AFX_MODULES_H__04AC8803_D1FA_11D2_8454_0010A4F1B732__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 "DmpFile.h"
  26. #include "ProgramOptions.h"
  27. // Forward Declarations
  28. class CModuleInfoCache;
  29. class CModuleInfoNode;
  30. class CFileData;
  31. class CModuleInfo;
  32. class CModules
  33. {
  34. public:
  35. CModules();
  36. virtual ~CModules();
  37. bool Initialize(CModuleInfoCache *lpModuleInfoCache, CFileData * lpInputFile, CFileData * lpOutputFile, CDmpFile * lpDmpFile);
  38. bool OutputModulesData(CollectionTypes enumCollectionType, bool fCSVFileContext);
  39. bool GetModulesData(CProgramOptions::ProgramModes enumProgramModes, bool fGetDataFromCSVFile = false);
  40. // bool EnumerateModulesFromMemoryDmpFile();
  41. bool AddNewModuleInfoObject(CModuleInfo *lpModuleInfo);
  42. protected:
  43. HANDLE m_hModuleInfoHeadMutex;
  44. enum { MAX_RECURSE_DEPTH = 30 };
  45. long m_iNumberOfModules;
  46. bool m_fInitialized;
  47. CModuleInfoCache * m_lpModuleInfoCache;
  48. CFileData * m_lpInputFile;
  49. CFileData * m_lpOutputFile;
  50. CModuleInfoNode * m_lpModuleInfoHead;
  51. CDmpFile * m_lpDmpFile;
  52. bool GetModulesDataFromDeviceDrivers();
  53. bool GetModulesDataFromFile();
  54. bool ScavengeForFiles(LPCTSTR tszSymbolPathStart, int iRecurseDepth);
  55. bool GetModulesDataFromFileSystem();
  56. bool OutputModulesDataToFile(CollectionTypes enumCollectionType);
  57. bool OutputModulesDataToStdout(CollectionTypes enumCollectionType, bool fCSVFileContext);
  58. };
  59. #endif // !defined(AFX_MODULES_H__04AC8803_D1FA_11D2_8454_0010A4F1B732__INCLUDED_)