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.

79 lines
2.2 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. IN BOOL fIsConfigConnection,
  37. OUT INetConnection** ppCon);
  38. HRESULT
  39. HrNextOrSkip (
  40. IN ULONG celt,
  41. OUT INetConnection** rgelt,
  42. OUT ULONG* pceltFetched);
  43. public:
  44. CInboundConnectionManagerEnumConnection () throw();
  45. ~CInboundConnectionManagerEnumConnection () throw();
  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. IN ULONG celt,
  53. OUT INetConnection** rgelt,
  54. OUT ULONG* pceltFetched);
  55. STDMETHOD (Skip) (
  56. IN ULONG celt);
  57. STDMETHOD (Reset) ();
  58. STDMETHOD (Clone) (
  59. OUT IEnumNetConnection** ppenum);
  60. public:
  61. static HRESULT CreateInstance (
  62. IN NETCONMGR_ENUM_FLAGS Flags,
  63. IN REFIID riid,
  64. OUT VOID** ppv);
  65. };