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.

45 lines
1.1 KiB

  1. /*
  2. * EnumConns.hxx
  3. *
  4. * CEnumConnections - class to implement IEnumConnections
  5. *
  6. * Copyright (C) 2001 Microsoft Corporation. All rights reserved.
  7. *
  8. */
  9. #ifndef ENUMCONNS_HXX_INCLUDED
  10. #define ENUMCONNS_HXX_INCLUDED
  11. #include <ocidl.h> //to include IEnumConnections declaration
  12. class CEnumConnections : public IEnumConnections
  13. {
  14. ULONG m_ulRefCount;
  15. DWORD m_dwTotal;
  16. DWORD m_dwCurrentIndex;
  17. CONNECTDATA* m_arrCD;
  18. public:
  19. CEnumConnections();
  20. ~CEnumConnections();
  21. STDMETHOD(Init)(CONNECTDATA* parrCD, DWORD cCount, DWORD cCurPos = 0);
  22. void ReleaseCDs();
  23. //
  24. // IUnknown methods.
  25. //
  26. STDMETHOD(QueryInterface)(REFIID riid, void ** ppvObject);
  27. STDMETHOD_(ULONG, AddRef)();
  28. STDMETHOD_(ULONG, Release)();
  29. //
  30. // IEnumConnectionPoints methods.
  31. //
  32. STDMETHOD(Next)(
  33. ULONG cConnections,
  34. CONNECTDATA* rgpcd,
  35. ULONG *pcFetched);
  36. STDMETHOD(Skip)(ULONG cConnections);
  37. STDMETHOD(Reset)();
  38. STDMETHOD(Clone)(IEnumConnections** ppEnum);
  39. };
  40. #endif//ENUMCONNS_HXX_INCLUDED