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.

92 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: enum.hxx
  7. //
  8. // Contents: Implementation of IEnumIDList
  9. //
  10. // History: 13-Dec-95 BruceFo Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __ENUM_HXX__
  14. #define __ENUM_HXX__
  15. #include "shares.h"
  16. //////////////////////////////////////////////////////////////////////////////
  17. class CSharesEnum : public IEnumIDList
  18. {
  19. public:
  20. CSharesEnum(
  21. IN PWSTR pszMachine,
  22. IN DWORD level
  23. );
  24. HRESULT
  25. Init(
  26. ULONG uFlags
  27. );
  28. ~CSharesEnum();
  29. //
  30. // IUnknown methods
  31. //
  32. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  33. STDMETHOD_(ULONG,AddRef)();
  34. STDMETHOD_(ULONG,Release)();
  35. //
  36. // IEnumIDList methods
  37. //
  38. STDMETHOD(Next)(
  39. ULONG celt,
  40. LPITEMIDLIST* rgelt,
  41. ULONG* pceltFetched
  42. );
  43. STDMETHOD(Skip)(
  44. ULONG celt
  45. );
  46. STDMETHOD(Reset)(
  47. VOID
  48. );
  49. STDMETHOD(Clone)(
  50. IEnumIDList** ppenum
  51. );
  52. private:
  53. ULONG m_uFlags;
  54. SHARE_INFO_2* m_pShares; // may actually point to level 1 info
  55. PWSTR m_pszMachine;
  56. ULONG m_level; // 1 or 2
  57. DWORD m_dwEnumFlags;
  58. DWORD m_cShares;
  59. DWORD m_iCurrent;
  60. ULONG m_ulRefs;
  61. };
  62. //
  63. // Values for m_dwEnumFlags
  64. //
  65. #ifdef WIZARDS
  66. #define EF_SHOW_NEW_WIZARD 0x00000001
  67. #define EF_SHOW_NW_WIZARD 0x00000002
  68. #define EF_SHOW_MAC_WIZARD 0x00000004
  69. #define EF_SHOW_ALL_WIZARD 0x00000008
  70. #endif // WIZARDS
  71. #endif // __ENUM_HXX__