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.

59 lines
2.0 KiB

  1. /*---------------------------------------------------------------------------
  2. File: NT4Enum.h
  3. Comments: interface for the CNT4Enum class.
  4. (c) Copyright 1999, Mission Critical Software, Inc., All Rights Reserved
  5. Proprietary and confidential to Mission Critical Software, Inc.
  6. REVISION LOG ENTRY
  7. Revision By: Sham Chauthani
  8. Revised on 07/02/99 12:40:00
  9. ---------------------------------------------------------------------------
  10. */
  11. #if !defined(AFX_NT4ENUM_H__C0171FA0_1AB3_11D3_8C81_0090270D48D1__INCLUDED_)
  12. #define AFX_NT4ENUM_H__C0171FA0_1AB3_11D3_8C81_0090270D48D1__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. #include "AttrNode.h"
  17. class CNT4Enum : public IEnumVARIANT
  18. {
  19. public:
  20. TNodeList * m_pNodeList;
  21. TNodeListEnum m_listEnum;
  22. CNT4Enum(TNodeList * pNodeList);
  23. virtual ~CNT4Enum();
  24. HRESULT STDMETHODCALLTYPE Next(unsigned long celt, VARIANT FAR* rgvar, unsigned long FAR* pceltFetched);
  25. HRESULT STDMETHODCALLTYPE Skip(unsigned long celt){ return E_NOTIMPL; }
  26. HRESULT STDMETHODCALLTYPE Reset(){ return E_NOTIMPL; }
  27. HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT FAR* FAR* ppenum){ return E_NOTIMPL; }
  28. HRESULT STDMETHODCALLTYPE QueryInterface(const struct _GUID &,void ** ){ return E_NOTIMPL; }
  29. ULONG STDMETHODCALLTYPE AddRef(void){ return E_NOTIMPL; }
  30. ULONG STDMETHODCALLTYPE Release(void)
  31. {
  32. if ( m_pNodeList )
  33. {
  34. TAttrNode * pNode = (TAttrNode *)m_pNodeList->Head();
  35. TAttrNode * temp;
  36. for ( pNode = (TAttrNode*)m_listEnum.OpenFirst(m_pNodeList) ; pNode; pNode = temp )
  37. {
  38. temp = (TAttrNode *)m_listEnum.Next();
  39. m_pNodeList->Remove(pNode);
  40. delete pNode;
  41. }
  42. m_listEnum.Close();
  43. delete m_pNodeList;
  44. m_pNodeList = NULL;
  45. delete this;
  46. }
  47. return 0;
  48. }
  49. };
  50. #endif // !defined(AFX_NT4ENUM_H__C0171FA0_1AB3_11D3_8C81_0090270D48D1__INCLUDED_)