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.

150 lines
3.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: remcfg.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // RemCfg.h : Declaration of the CRemCfg
  11. #ifndef __REMCFG_H_
  12. #define __REMCFG_H_
  13. #include "resource.h" // main symbols
  14. #include "remras.h"
  15. #include "ncutil.h"
  16. /*---------------------------------------------------------------------------
  17. This structure contains a list of IP interfaces that have
  18. changed. This information will be committed in the order in
  19. which they appear in the list.
  20. ---------------------------------------------------------------------------*/
  21. class RemCfgIPEntry
  22. {
  23. public:
  24. GUID m_IPGuid;
  25. REMOTE_IPINFO m_newIPInfo;
  26. };
  27. typedef CSimpleArray<RemCfgIPEntry *> RemCfgIPEntryList;
  28. //typedef CList<RemCfgIPEntry *, RemCfgIPEntry *> RemCfgIPEntryList;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CRemCfg
  31. class ATL_NO_VTABLE CRemCfg :
  32. public CComObjectRootEx<CComSingleThreadModel>,
  33. public CComCoClass<CRemCfg, &CLSID_RemoteRouterConfig>,
  34. public IRemoteRouterConfig,
  35. public IRemoteTCPIPChangeNotify,
  36. public IRemoteNetworkConfig,
  37. public IRemoteRouterRestart
  38. {
  39. public:
  40. CRemCfg()
  41. {
  42. TraceSz("CRemCfg constructor");
  43. InitializeCriticalSection(&m_critsec);
  44. };
  45. ~CRemCfg();
  46. DECLARE_REGISTRY_RESOURCEID(IDR_REMCFG)
  47. BEGIN_COM_MAP(CRemCfg)
  48. COM_INTERFACE_ENTRY(IRemoteRouterConfig)
  49. COM_INTERFACE_ENTRY(IRemoteNetworkConfig)
  50. COM_INTERFACE_ENTRY(IRemoteTCPIPChangeNotify)
  51. COM_INTERFACE_ENTRY(IRemoteRouterRestart)
  52. END_COM_MAP()
  53. // IRemoteTCPIPChangeNotify
  54. STDMETHOD(NotifyChanges)(/* [in] */ BOOL fEnableRouter,
  55. /* [in] */ BYTE uPerformRouterDiscovery);
  56. // IRemoteRouterConfig
  57. public:
  58. STDMETHOD(SetIpInfo)(/*[in]*/ const GUID *pGuid, /*[in]*/ REMOTE_RRAS_IPINFO *pIpInfo);
  59. STDMETHOD(GetIpInfo)(/*[in]*/ const GUID *pGuid, /*[out]*/ REMOTE_RRAS_IPINFO**ppInfo);
  60. STDMETHOD(SetIpxVirtualNetworkNumber)(/*[in]*/ DWORD dwVNetworkNumber);
  61. STDMETHOD(GetIpxVirtualNetworkNumber)(/*[out]*/ DWORD *pdwVNetworkNumber);
  62. STDMETHOD(SetRasEndpoints)(/*[in]*/ DWORD dwFlags, /*[in]*/ DWORD dwTotalEndpoints, /*[in]*/ DWORD dwTotalIncoming, /*[in]*/ DWORD dwTotalOutgoing);
  63. // IRemoteNetworkConfig
  64. public:
  65. STDMETHOD(UpgradeRouterConfig)();
  66. STDMETHOD(SetUserConfig)(/*[in]*/ LPCOLESTR pszService,
  67. /*[in]*/ LPCOLESTR pszNewGroup);
  68. // IRemoteRouterRestart
  69. public:
  70. STDMETHOD(RestartRouter)(/*[in]*/ DWORD dwFlags);
  71. protected:
  72. CRITICAL_SECTION m_critsec;
  73. HRESULT CommitIPInfo();
  74. };
  75. HRESULT HrGetIpxPrivateInterface(INetCfg* pNetCfg,
  76. IIpxAdapterInfo** ppIpxAdapterInfo);
  77. HRESULT HrGetIpPrivateInterface(INetCfg* pNetCfg,
  78. ITcpipProperties **ppTcpProperties);
  79. HRESULT
  80. HrCreateAndInitializeINetCfg (
  81. BOOL* pfInitCom,
  82. INetCfg** ppnc,
  83. BOOL fGetWriteLock,
  84. DWORD cmsTimeout,
  85. LPCWSTR szwClientDesc,
  86. LPWSTR * ppstrClientDesc);
  87. HRESULT
  88. HrUninitializeAndReleaseINetCfg (
  89. BOOL fUninitCom,
  90. INetCfg* pnc,
  91. BOOL fHasLock);
  92. HRESULT
  93. HrUninitializeAndUnlockINetCfg (
  94. INetCfg* pnc);
  95. //
  96. // This is a private function implemented in netcfgx.dll by ShaunCo.
  97. //
  98. #ifdef __cplusplus
  99. extern "C" {
  100. #endif
  101. typedef struct _RASCONFIGENDPOINTS
  102. {
  103. DWORD dwSize;
  104. DWORD dwFlags;
  105. INT cTotalEndpoints;
  106. INT cLimitSimultaneousIncomingCalls;
  107. INT cLimitSimultaneousOutgoingCalls;
  108. } RASCONFIGENDPOINTS;
  109. typedef HRESULT (APIENTRY *PRASCONFIGUREENDPOINTS)(IN OUT RASCONFIGENDPOINTS *);
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113. #endif //__REMCFG_H_