Leaked source code of windows server 2003
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.

69 lines
1.3 KiB

  1. #pragma once
  2. #include "mod.h"
  3. class CModuleList : public vector <CModule*>
  4. {
  5. public:
  6. USHORT m_Granularity;
  7. USHORT m_fCircular;
  8. private:
  9. VOID
  10. GrowBufferIfNeeded ();
  11. public:
  12. CModuleList()
  13. {
  14. m_Granularity = 8;
  15. m_fCircular = FALSE;
  16. }
  17. BOOL
  18. FDumpToString (
  19. OUT PSTR pszBuf,
  20. IN OUT ULONG* pcchBuf) const;
  21. BOOL
  22. FIsSameModuleListAs (
  23. IN const CModuleList* pList) const;
  24. HRESULT
  25. HrInsertModule (
  26. IN const CModule* pMod,
  27. IN DWORD dwFlags /* INS_FLAGS */);
  28. HRESULT
  29. HrInsertNewModule (
  30. IN PCSTR pszFileName,
  31. IN ULONG cbFileSize,
  32. IN DWORD dwFlags, /* INS_FLAGS */
  33. OUT CModule** ppMod);
  34. CModule*
  35. PBinarySearchModuleByName (
  36. IN PCSTR pszFileName,
  37. OUT CModuleList::iterator* pInsertPosition OPTIONAL);
  38. BOOL
  39. FLinearFindModuleByPointer (
  40. IN const CModule* pMod) const
  41. {
  42. Assert (this);
  43. Assert (pMod);
  44. return (find (begin(), end(), pMod) != end());
  45. }
  46. CModule*
  47. PLinearFindModuleByName (
  48. IN PCSTR pszFileName);
  49. CModule*
  50. RemoveLastModule ();
  51. #if DBG
  52. VOID DbgVerifySorted ();
  53. #else
  54. VOID DbgVerifySorted () {}
  55. #endif
  56. };