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.

102 lines
2.9 KiB

  1. #ifndef _CSMCATMANAGERENUMS_INCLUDE
  2. #define _CSMCATMANAGERENUMS_INCLUDE
  3. class CSCEnumCategories : public IEnumCATEGORYINFO
  4. {
  5. public:
  6. // IUnknown methods
  7. HRESULT _stdcall QueryInterface(REFIID riid, void** ppObject);
  8. ULONG _stdcall AddRef();
  9. ULONG _stdcall Release();
  10. // IEnumCATEGORYINFO methods
  11. HRESULT __stdcall Next(ULONG celt, CATEGORYINFO *rgelt, ULONG *pceltFetched);
  12. HRESULT __stdcall Skip(ULONG celt);
  13. HRESULT __stdcall Reset(void);
  14. HRESULT __stdcall Clone(IEnumCATEGORYINFO **ppenum);
  15. CSCEnumCategories();
  16. HRESULT Initialize(WCHAR *szCategoryName, LCID lcid);
  17. ~CSCEnumCategories();
  18. private:
  19. LCID m_lcid;
  20. ULONG m_dwRefCount;
  21. DWORD m_dwPosition;
  22. WCHAR m_szCategoryName[_MAX_PATH];
  23. HANDLE m_hADs;
  24. ADS_SEARCH_HANDLE m_hADsSearchHandle;
  25. };
  26. class CSCEnumCategoriesOfClass : public IEnumCATID
  27. {
  28. public:
  29. // IUnknown methods
  30. HRESULT _stdcall QueryInterface(REFIID riid, void** ppObject);
  31. ULONG _stdcall AddRef();
  32. ULONG _stdcall Release();
  33. // IEnumGUID methods
  34. HRESULT __stdcall Next(ULONG celt, GUID *rgelt, ULONG *pceltFetched);
  35. HRESULT __stdcall Skip(ULONG celt);
  36. HRESULT __stdcall Reset(void);
  37. HRESULT __stdcall Clone(IEnumGUID **ppenum);
  38. CSCEnumCategoriesOfClass();
  39. HRESULT Initialize(CATID catid[], ULONG cCatid);
  40. ~CSCEnumCategoriesOfClass();
  41. private:
  42. ULONG m_dwPosition;
  43. ULONG m_cCatid;
  44. CATID *m_catid;
  45. ULONG m_dwRefCount;
  46. };
  47. class CSCEnumClassesOfCategories : public IEnumCLSID
  48. {
  49. public:
  50. // IUnknown methods
  51. HRESULT _stdcall QueryInterface(REFIID riid, void** ppObject);
  52. ULONG _stdcall AddRef();
  53. ULONG _stdcall Release();
  54. // IEnumGUID methods
  55. HRESULT __stdcall Next(ULONG celt, GUID *rgelt, ULONG *pceltFetched);
  56. HRESULT __stdcall Skip(ULONG celt);
  57. HRESULT __stdcall Reset(void);
  58. HRESULT __stdcall Clone(IEnumGUID **ppenum);
  59. CSCEnumClassesOfCategories();
  60. HRESULT Initialize(ULONG cRequired, CATID rgcatidReq[],
  61. ULONG cImplemented, CATID rgcatidImpl[],
  62. WCHAR *szClassName);
  63. ~CSCEnumClassesOfCategories();
  64. private:
  65. ULONG m_dwPosition;
  66. ULONG m_dwRefCount, m_cRequired, m_cImplemented;
  67. CATID *m_rgcatidReq, *m_rgcatidImpl;
  68. HANDLE m_hADs;
  69. ADS_SEARCH_HANDLE m_hADsSearchHandle;
  70. WCHAR m_szClassName[_MAX_PATH];
  71. };
  72. // extern ULONG g_dwRefCount;
  73. HRESULT GetCategoryProperty (IADs *pADs,
  74. CATEGORYINFO *pcatinfo,
  75. LCID lcid);
  76. HRESULT ImplSatisfied(ULONG cImplemented, CATID *ImplementedList,
  77. HANDLE hADs,
  78. ADS_SEARCH_HANDLE hADsSearchHandle);
  79. HRESULT ReqSatisfied(ULONG cAvailReq, CATID *AvailReq,
  80. HANDLE hADs,
  81. ADS_SEARCH_HANDLE hADsSearchHandle);
  82. #endif
  83.