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.

79 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: E N U M I . H
  7. //
  8. // Contents: Enumerator for Inbound connection objects.
  9. //
  10. // Notes:
  11. //
  12. // Author: shaunco 12 Nov 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "nmbase.h"
  17. #include "nmres.h"
  18. #include <rasuip.h>
  19. class ATL_NO_VTABLE CInboundConnectionManagerEnumConnection :
  20. public CComObjectRootEx <CComMultiThreadModel>,
  21. public CComCoClass <CInboundConnectionManagerEnumConnection,
  22. &CLSID_WanConnectionManagerEnumConnection>,
  23. public IEnumNetConnection
  24. {
  25. private:
  26. NETCONMGR_ENUM_FLAGS m_EnumFlags;
  27. RASSRVCONN* m_aRasSrvConn;
  28. ULONG m_cRasSrvConn;
  29. ULONG m_iNextRasSrvConn;
  30. BOOL m_fFirstTime;
  31. BOOL m_fDone;
  32. BOOL m_fReturnedConfig;
  33. private:
  34. HRESULT
  35. HrCreateConfigOrCurrentEnumeratedConnection (
  36. BOOL fIsConfigConnection,
  37. INetConnection** ppCon);
  38. HRESULT
  39. HrNextOrSkip (
  40. ULONG celt,
  41. INetConnection** rgelt,
  42. ULONG* pceltFetched);
  43. public:
  44. CInboundConnectionManagerEnumConnection ();
  45. ~CInboundConnectionManagerEnumConnection ();
  46. DECLARE_REGISTRY_RESOURCEID(IDR_INBOUND_CONMAN_ENUM)
  47. BEGIN_COM_MAP(CInboundConnectionManagerEnumConnection)
  48. COM_INTERFACE_ENTRY(IEnumNetConnection)
  49. END_COM_MAP()
  50. // IEnumNetConnection
  51. STDMETHOD (Next) (
  52. ULONG celt,
  53. INetConnection** rgelt,
  54. ULONG* pceltFetched);
  55. STDMETHOD (Skip) (
  56. ULONG celt);
  57. STDMETHOD (Reset) ();
  58. STDMETHOD (Clone) (
  59. IEnumNetConnection** ppenum);
  60. public:
  61. static HRESULT CreateInstance (
  62. NETCONMGR_ENUM_FLAGS Flags,
  63. REFIID riid,
  64. VOID** ppv);
  65. };