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
1.4 KiB

  1. #pragma once
  2. #include "modlist.h"
  3. class CModuleListSet;
  4. enum MTE_FLAGS
  5. {
  6. MTE_DEFAULT = 0x00000000,
  7. MTE_DELAY_LOADED = 0x00000001,
  8. };
  9. class CModuleTreeEntry
  10. {
  11. public:
  12. CModule* m_pModule;
  13. CModule* m_pImportModule;
  14. DWORD m_dwFlags; // MTE_FLAGS
  15. };
  16. // Flags for HrGetModuleBindings.
  17. //
  18. enum GMB_FLAGS
  19. {
  20. GMBF_DEFAULT = 0x00000000,
  21. GMBF_ADD_TO_MLSET = 0x00000001,
  22. };
  23. class CModuleTree : public vector<CModuleTreeEntry>
  24. {
  25. public:
  26. CModuleList Modules;
  27. public:
  28. ~CModuleTree ();
  29. HRESULT
  30. HrAddEntry (
  31. IN CModule* pMod,
  32. IN CModule* pImport,
  33. IN DWORD dwFlags);
  34. HRESULT
  35. HrGetModuleBindings (
  36. IN const CModule* pMod,
  37. IN DWORD dwFlags /* GMB_FLAGS */,
  38. OUT CModuleListSet* pSet) const;
  39. CModuleTreeEntry*
  40. PFindFirstEntryWithModule (
  41. IN const CModule* pMod) const;
  42. CModuleTreeEntry*
  43. PFindFirstEntryAfterModuleGroup (
  44. IN const CModule* pMod) const;
  45. CModuleTreeEntry*
  46. PBinarySearchEntry (
  47. IN const CModule* pMod,
  48. IN const CModule* pImport,
  49. OUT CModuleTreeEntry** pInsertPosition OPTIONAL) const;
  50. private:
  51. CModuleTreeEntry*
  52. PBinarySearchEntryByModule (
  53. IN const CModule* pMod,
  54. OUT CModuleTreeEntry** pInsertPosition OPTIONAL) const;
  55. #if DBG
  56. VOID DbgVerifySorted ();
  57. #else
  58. VOID DbgVerifySorted () {}
  59. #endif
  60. };