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.

81 lines
2.3 KiB

  1. /**************************************************************************
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright 1998 Microsoft Corporation. All Rights Reserved.
  7. **************************************************************************/
  8. /**************************************************************************
  9. File: EnumIDL.h
  10. Description: CEnumIDList definitions.
  11. **************************************************************************/
  12. #ifndef ENUMIDLIST_H
  13. #define ENUMIDLIST_H
  14. #include <windows.h>
  15. #include <shlobj.h>
  16. #include "PidlMgr.h"
  17. #include "Utility.h"
  18. /**************************************************************************
  19. structure defintions
  20. **************************************************************************/
  21. typedef struct tagENUMLIST
  22. {
  23. struct tagENUMLIST *pNext;
  24. LPITEMIDLIST pidl;
  25. }ENUMLIST, FAR *LPENUMLIST;
  26. /**************************************************************************
  27. CEnumIDList class definition
  28. **************************************************************************/
  29. class CEnumIDList : public IEnumIDList
  30. {
  31. private:
  32. DWORD m_ObjRefCount;
  33. LPMALLOC m_pMalloc;
  34. LPENUMLIST m_pFirst;
  35. LPENUMLIST m_pLast;
  36. LPENUMLIST m_pCurrent;
  37. CPidlMgr *m_pPidlMgr;
  38. DWORD m_dwFlags;
  39. IXMLElement *m_pXMLRoot;
  40. IXMLDocument *m_pXMLDoc;
  41. BOOL m_fFolder;
  42. public:
  43. CEnumIDList(IXMLDocument *, DWORD);
  44. ~CEnumIDList();
  45. //IUnknown methods
  46. STDMETHOD (QueryInterface)(REFIID, LPVOID*);
  47. STDMETHOD_ (DWORD, AddRef)();
  48. STDMETHOD_ (DWORD, Release)();
  49. //IEnumIDList
  50. STDMETHOD (Next) (DWORD, LPITEMIDLIST*, LPDWORD);
  51. STDMETHOD (Skip) (DWORD);
  52. STDMETHOD (Reset) (VOID);
  53. STDMETHOD (Clone) (LPENUMIDLIST*);
  54. BOOL AddToEnumList(LPITEMIDLIST);
  55. DWORD GetFlags() {return m_dwFlags;}
  56. void SetFolder(BOOL flag) {m_fFolder = flag;}
  57. BOOL IsFolder() {return m_fFolder;}
  58. private:
  59. BOOL CreateEnumList(VOID);
  60. BOOL DeleteList(VOID);
  61. };
  62. #endif //ENUMIDLIST_H