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.

61 lines
1.5 KiB

  1. // StringsEnum.h: Definition of the CStringsEnum class
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_STRINGSENUM_H__2DABC6B9_80D8_4E73_B4A9_7031AB8DF930__INCLUDED_)
  5. #define AFX_STRINGSENUM_H__2DABC6B9_80D8_4E73_B4A9_7031AB8DF930__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "resource.h" // main symbols
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CStringsEnum
  12. #include "xStrings.h"
  13. class ATL_NO_VTABLE CStringsEnum :
  14. public IStringsEnum,
  15. public CComObjectRootEx<CComSingleThreadModel>
  16. {
  17. protected:
  18. BSTR* pMultiStrings;
  19. DWORD Count;
  20. DWORD Position;
  21. public:
  22. CStringsEnum() {
  23. Position = 0;
  24. pMultiStrings = NULL;
  25. Count = 0;
  26. }
  27. ~CStringsEnum();
  28. BEGIN_COM_MAP(CStringsEnum)
  29. COM_INTERFACE_ENTRY(IEnumVARIANT)
  30. COM_INTERFACE_ENTRY(IStringsEnum)
  31. END_COM_MAP()
  32. DECLARE_NOT_AGGREGATABLE(CStringsEnum)
  33. // IStringsEnum
  34. public:
  35. BOOL CopyStrings(BSTR *pArray,DWORD Count);
  36. STDMETHOD(Next)(
  37. /*[in]*/ ULONG celt,
  38. /*[out, size_is(celt), length_is(*pCeltFetched)]*/ VARIANT * rgVar,
  39. /*[out]*/ ULONG * pCeltFetched
  40. );
  41. STDMETHOD(Skip)(
  42. /*[in]*/ ULONG celt
  43. );
  44. STDMETHOD(Reset)(
  45. );
  46. STDMETHOD(Clone)(
  47. /*[out]*/ IEnumVARIANT ** ppEnum
  48. );
  49. };
  50. #endif // !defined(AFX_STRINGSENUM_H__2DABC6B9_80D8_4E73_B4A9_7031AB8DF930__INCLUDED_)