Source code of Windows XP (NT5)
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.

72 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: E N U M W . H
  7. //
  8. // Contents: Enumerator for RAS connections objects.
  9. //
  10. // Notes:
  11. //
  12. // Author: shaunco 2 Oct 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "nmbase.h"
  17. #include "nmres.h"
  18. #include <rasapip.h>
  19. class ATL_NO_VTABLE CWanConnectionManagerEnumConnection :
  20. public CComObjectRootEx <CComMultiThreadModel>,
  21. public CComCoClass <CWanConnectionManagerEnumConnection,
  22. &CLSID_WanConnectionManagerEnumConnection>,
  23. public IEnumNetConnection
  24. {
  25. private:
  26. NETCONMGR_ENUM_FLAGS m_EnumFlags;
  27. RASENUMENTRYDETAILS* m_aRasEntryName;
  28. ULONG m_cRasEntryName;
  29. ULONG m_iNextRasEntryName;
  30. BOOL m_fDone;
  31. private:
  32. HRESULT
  33. HrNextOrSkip (
  34. ULONG celt,
  35. INetConnection** rgelt,
  36. ULONG* pceltFetched);
  37. public:
  38. CWanConnectionManagerEnumConnection ();
  39. ~CWanConnectionManagerEnumConnection ();
  40. DECLARE_REGISTRY_RESOURCEID(IDR_WAN_CONMAN_ENUM)
  41. BEGIN_COM_MAP(CWanConnectionManagerEnumConnection)
  42. COM_INTERFACE_ENTRY(IEnumNetConnection)
  43. END_COM_MAP()
  44. // IEnumNetConnection
  45. STDMETHOD (Next) (
  46. ULONG celt,
  47. INetConnection** rgelt,
  48. ULONG* pceltFetched);
  49. STDMETHOD (Skip) (
  50. ULONG celt);
  51. STDMETHOD (Reset) ();
  52. STDMETHOD (Clone) (
  53. IEnumNetConnection** ppenum);
  54. public:
  55. static HRESULT CreateInstance (
  56. NETCONMGR_ENUM_FLAGS Flags,
  57. REFIID riid,
  58. void** ppv);
  59. };