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.

64 lines
2.5 KiB

  1. #pragma once
  2. #include "wlbscfg.h"
  3. //+----------------------------------------------------------------------------
  4. //
  5. // class CNetcfgCluster
  6. //
  7. // Description: Provide cluster config functionality for netcfg .
  8. // SetConfig caches the settings without saving to registry
  9. // and can be retrieved by GetConfig.
  10. //
  11. // History: fengsun Created Header 2/11/00
  12. //
  13. //+----------------------------------------------------------------------------
  14. HRESULT GetAdapterFromGuid(INetCfg *pNetCfg, const GUID& NetCardGuid, OUT INetCfgComponent** ppNetCardComponent);
  15. class CNetcfgCluster
  16. {
  17. public:
  18. CNetcfgCluster(CWlbsConfig* pConfig);
  19. ~CNetcfgCluster();
  20. DWORD InitializeFromRegistry(const GUID& guidAdapter, bool fBindingEnabled, bool fUpgradeFromWin2k);
  21. HRESULT InitializeFromAnswerFile(const GUID& AdapterGuid, CSetupInfFile& caf, PCWSTR answer_sections);
  22. void InitializeWithDefault(const GUID& guidAdapter);
  23. void SetConfig(const NETCFG_WLBS_CONFIG* pClusterConfig);
  24. void GetConfig(NETCFG_WLBS_CONFIG* pClusterConfig);
  25. void NotifyBindingChanges(DWORD dwChangeFlag, INetCfgBindingPath* pncbp);
  26. DWORD NotifyAdapter (INetCfgComponent * pAdapter, DWORD newStatus);
  27. DWORD ApplyRegistryChanges(bool fUninstall);
  28. DWORD ApplyPnpChanges(HANDLE hWlbsDevice);
  29. const GUID& GetAdapterGuid() { return m_AdapterGuid;}
  30. bool CheckForDuplicateClusterIPAddress (WCHAR * szOtherIP);
  31. bool IsReloadRequired () { return m_fReloadRequired; };
  32. static void ResetMSCSLatches();
  33. protected:
  34. GUID m_AdapterGuid;
  35. WLBS_REG_PARAMS m_OriginalConfig; // original config
  36. WLBS_REG_PARAMS m_CurrentConfig; // cached config
  37. bool m_fHasOriginalConfig; // whether the adapter has an original config
  38. bool m_fOriginalBindingEnabled; // whether the binding to the adapter is originally enabled
  39. bool m_fRemoveAdapter; // whether the adapter is to be removed
  40. bool m_fMacAddrChanged; // whether we need to reload the nic driver
  41. bool m_fReloadRequired; // set if changes in registry need to be picked by wlbs driver
  42. bool m_fReenableAdapter; // do we need to re-enable this adapter (did WE disable it?)
  43. static bool m_fMSCSWarningEventLatched; // Throw MSCS warning only once when binding NLB
  44. static bool m_fMSCSWarningPopupLatched; // Popup MSCS warning only once when binding NLB
  45. CWlbsConfig* m_pConfig; // pointer to access m_pWlbsApiFuncs
  46. };