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.

167 lines
4.2 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. public IRemoteSetDnsConfig,
  39. public IRemoteICFICSConfig
  40. {
  41. public:
  42. CRemCfg()
  43. {
  44. TraceSz("CRemCfg constructor");
  45. InitializeCriticalSection(&m_critsec);
  46. };
  47. ~CRemCfg();
  48. DECLARE_REGISTRY_RESOURCEID(IDR_REMCFG)
  49. BEGIN_COM_MAP(CRemCfg)
  50. COM_INTERFACE_ENTRY(IRemoteRouterConfig)
  51. COM_INTERFACE_ENTRY(IRemoteNetworkConfig)
  52. COM_INTERFACE_ENTRY(IRemoteTCPIPChangeNotify)
  53. COM_INTERFACE_ENTRY(IRemoteRouterRestart)
  54. COM_INTERFACE_ENTRY(IRemoteSetDnsConfig)
  55. COM_INTERFACE_ENTRY(IRemoteICFICSConfig)
  56. END_COM_MAP()
  57. // IRemoteTCPIPChangeNotify
  58. STDMETHOD(NotifyChanges)(/* [in] */ BOOL fEnableRouter,
  59. /* [in] */ BYTE uPerformRouterDiscovery);
  60. // IRemoteRouterConfig
  61. public:
  62. STDMETHOD(SetIpInfo)(/*[in]*/ const GUID *pGuid, /*[in]*/ REMOTE_RRAS_IPINFO *pIpInfo);
  63. STDMETHOD(GetIpInfo)(/*[in]*/ const GUID *pGuid, /*[out]*/ REMOTE_RRAS_IPINFO**ppInfo);
  64. STDMETHOD(SetIpxVirtualNetworkNumber)(/*[in]*/ DWORD dwVNetworkNumber);
  65. STDMETHOD(GetIpxVirtualNetworkNumber)(/*[out]*/ DWORD *pdwVNetworkNumber);
  66. STDMETHOD(SetRasEndpoints)(/*[in]*/ DWORD dwFlags, /*[in]*/ DWORD dwTotalEndpoints, /*[in]*/ DWORD dwTotalIncoming, /*[in]*/ DWORD dwTotalOutgoing);
  67. // IRemoteNetworkConfig
  68. public:
  69. STDMETHOD(UpgradeRouterConfig)();
  70. STDMETHOD(SetUserConfig)(/*[in]*/ LPCOLESTR pszService,
  71. /*[in]*/ LPCOLESTR pszNewGroup);
  72. // IRemoteRouterRestart
  73. public:
  74. STDMETHOD(RestartRouter)(/*[in]*/ DWORD dwFlags);
  75. // IRemoteSetDnsConfig
  76. public:
  77. STDMETHOD(SetDnsConfig)(/* [in] */ DWORD dwConfigId,
  78. /* [in] */ DWORD dwNewValue);
  79. // IRemoteICFICSConfig
  80. public:
  81. STDMETHOD(GetIcfEnabled)(/* [out] */ BOOL * status);
  82. public:
  83. STDMETHOD(GetIcsEnabled)(/* [out] */ BOOL * status);
  84. protected:
  85. CRITICAL_SECTION m_critsec;
  86. HRESULT CommitIPInfo();
  87. };
  88. HRESULT HrGetIpxPrivateInterface(INetCfg* pNetCfg,
  89. IIpxAdapterInfo** ppIpxAdapterInfo);
  90. HRESULT HrGetIpPrivateInterface(INetCfg* pNetCfg,
  91. ITcpipProperties **ppTcpProperties);
  92. HRESULT
  93. HrCreateAndInitializeINetCfg (
  94. BOOL* pfInitCom,
  95. INetCfg** ppnc,
  96. BOOL fGetWriteLock,
  97. DWORD cmsTimeout,
  98. LPCWSTR szwClientDesc,
  99. LPWSTR * ppstrClientDesc);
  100. HRESULT
  101. HrUninitializeAndReleaseINetCfg (
  102. BOOL fUninitCom,
  103. INetCfg* pnc,
  104. BOOL fHasLock);
  105. HRESULT
  106. HrUninitializeAndUnlockINetCfg (
  107. INetCfg* pnc);
  108. //
  109. // This is a private function implemented in netcfgx.dll by ShaunCo.
  110. //
  111. #ifdef __cplusplus
  112. extern "C" {
  113. #endif
  114. typedef struct _RASCONFIGENDPOINTS
  115. {
  116. DWORD dwSize;
  117. DWORD dwFlags;
  118. INT cTotalEndpoints;
  119. INT cLimitSimultaneousIncomingCalls;
  120. INT cLimitSimultaneousOutgoingCalls;
  121. } RASCONFIGENDPOINTS;
  122. typedef HRESULT (APIENTRY *PRASCONFIGUREENDPOINTS)(IN OUT RASCONFIGENDPOINTS *);
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif //__REMCFG_H_