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.

73 lines
2.2 KiB

  1. #ifndef __LISTINTR_H
  2. #define __LISTINTR_H
  3. typedef enum tagLISTDIRECTION {
  4. LD_FORWARD = 0,
  5. LD_REVERSE = 1,
  6. LD_LASTDIRECTION = 2
  7. } LISTDIRECTION;
  8. typedef void (*IVPL_COMPAREFUNCTYPE)(void *ptrA, void *ptrB, bool *pfALessThanB, DWORD_PTR dwCookie);
  9. typedef void (*IVPL_FREEITEMFUNCTYPE)(void *ptr);
  10. typedef void (*IUL_COMPAREFUNCTYPE)(IUnknown *pIUnkA, IUnknown *pIUnkB, bool *pfALessThanB, DWORD_PTR dwCookie);
  11. interface IVoidPtrList;
  12. interface IUnknownList;
  13. HRESULT IVoidPtrList_CreateInstance(IVoidPtrList** ppList);
  14. HRESULT IUnknownList_CreateInstance(IUnknownList** ppList);
  15. interface IVoidPtrList : public IUnknown
  16. {
  17. public:
  18. virtual HRESULT STDMETHODCALLTYPE Init(
  19. IVPL_COMPAREFUNCTYPE pCompareFunc,
  20. DWORD_PTR dwCookie,
  21. IVPL_FREEITEMFUNCTYPE pFreeItemFunc,
  22. DWORD dwInitSize) PURE;
  23. virtual HRESULT STDMETHODCALLTYPE GetCount(DWORD *pdwCount) PURE;
  24. virtual HRESULT STDMETHODCALLTYPE ClearList(void) PURE;
  25. virtual HRESULT STDMETHODCALLTYPE AddItem(LPVOID ptr, DWORD *pdwHandle) PURE;
  26. virtual HRESULT STDMETHODCALLTYPE RemoveItem(DWORD dwHandle) PURE;
  27. virtual HRESULT STDMETHODCALLTYPE GetNext(
  28. LISTDIRECTION bDirection,
  29. LPVOID *pptr,
  30. DWORD *pdwHandle) PURE;
  31. virtual HRESULT STDMETHODCALLTYPE SkipNext(LISTDIRECTION bDirection, DWORD *pdwHandle) PURE;
  32. virtual HRESULT STDMETHODCALLTYPE Resort(void) PURE;
  33. };
  34. interface IUnknownList : public IUnknown
  35. {
  36. public:
  37. // IUnknownList members
  38. virtual HRESULT STDMETHODCALLTYPE Init(IUL_COMPAREFUNCTYPE pCompareFunc, DWORD_PTR dwCookie, DWORD dwInitSize) PURE;
  39. virtual HRESULT STDMETHODCALLTYPE GetCount(DWORD *pdwCount) PURE;
  40. virtual HRESULT STDMETHODCALLTYPE ClearList(void) PURE;
  41. virtual HRESULT STDMETHODCALLTYPE AddItem(IUnknown *pIUnk, DWORD *pdwHandle) PURE;
  42. virtual HRESULT STDMETHODCALLTYPE RemoveItem(DWORD dwHandle) PURE;
  43. virtual HRESULT STDMETHODCALLTYPE GetNext(LISTDIRECTION bDirection, IUnknown **ppIUnk, DWORD *pdwHandle) PURE;
  44. virtual HRESULT STDMETHODCALLTYPE SkipNext(LISTDIRECTION bDirection, DWORD *pdwHandle) PURE;
  45. virtual HRESULT STDMETHODCALLTYPE Resort(void) PURE;
  46. };
  47. #endif