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.

143 lines
3.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. config.h
  7. Registry Values for WINS
  8. FILE HISTORY:
  9. */
  10. #ifndef _CONFIG_H_
  11. #define _CONFIG_H_
  12. class CConfiguration
  13. {
  14. public:
  15. CConfiguration(CString strNetBIOSName = _T(""));
  16. ~CConfiguration();
  17. // operator overriding
  18. CConfiguration& operator =(const CConfiguration& configuration);
  19. public:
  20. const BOOL IsReady() const
  21. {
  22. return !m_strNetBIOSName.IsEmpty();
  23. }
  24. void SetOwner(CString strNetBIOSName)
  25. {
  26. m_strNetBIOSName = strNetBIOSName;
  27. }
  28. LPCTSTR GetOwner()
  29. {
  30. return m_strNetBIOSName;
  31. }
  32. HRESULT Touch();
  33. HRESULT Load(handle_t hBinding);
  34. HRESULT Store();
  35. DWORD GetSystemVersion();
  36. BOOL IsNt5();
  37. BOOL FSupportsOwnerId();
  38. BOOL IsAdmin();
  39. public:
  40. // entries under HKEY_LOCAL_MACHINE\system\currentcontrolset\services\wins
  41. DWORD m_dwRefreshInterval;
  42. DWORD m_dwTombstoneInterval;
  43. DWORD m_dwTombstoneTimeout;
  44. DWORD m_dwVerifyInterval;
  45. DWORD m_dwVersCountStart_LowWord;
  46. DWORD m_dwVersCountStart_HighWord;
  47. DWORD m_dwNumberOfWorkerThreads;
  48. // PUSH partner stuff
  49. BOOL m_fPushInitialReplication;
  50. BOOL m_fPushReplOnAddrChange;
  51. DWORD m_dwPushUpdateCount;
  52. DWORD m_dwPushPersistence;
  53. // PULL partner suff
  54. BOOL m_fPullInitialReplication;
  55. DWORD m_dwPullTimeInterval;
  56. DWORD m_dwPullSpTime;
  57. DWORD m_dwPullPersistence;
  58. DWORD m_dwPullRetryCount;
  59. BOOL m_fLoggingOn;
  60. BOOL m_fRplOnlyWithPartners;
  61. BOOL m_fLogDetailedEvents;
  62. BOOL m_fBackupOnTermination;
  63. BOOL m_fMigrateOn;
  64. BOOL m_fUseSelfFndPnrs;
  65. DWORD m_dwMulticastInt;
  66. DWORD m_dwMcastTtl;
  67. CString m_strBackupPath;
  68. BOOL m_fBurstHandling;
  69. DWORD m_dwBurstQueSize;
  70. // consistency checking
  71. BOOL m_fPeriodicConsistencyCheck;
  72. BOOL m_fCCUseRplPnrs;
  73. DWORD m_dwMaxRecsAtATime;
  74. DWORD m_dwCCTimeInterval;
  75. CIntlTime m_itmCCStartTime;
  76. // system version stuff
  77. DWORD m_dwMajorVersion;
  78. DWORD m_dwMinorVersion;
  79. DWORD m_dwBuildNumber;
  80. DWORD m_dwServicePack;
  81. // admin status
  82. BOOL m_fIsAdmin;
  83. // database name
  84. CString m_strDbName;
  85. CString m_strDbPath;
  86. protected:
  87. void GetAdminStatus();
  88. private:
  89. typedef CString REGKEYNAME;
  90. // Registry Names
  91. static const REGKEYNAME lpstrRoot;
  92. static const REGKEYNAME lpstrPullRoot;
  93. static const REGKEYNAME lpstrPushRoot;
  94. static const REGKEYNAME lpstrNetBIOSName;
  95. static const REGKEYNAME lpstrPersistence;
  96. // consistency checking
  97. static const REGKEYNAME lpstrCCRoot;
  98. static const REGKEYNAME lpstrCC;
  99. // default value stuff
  100. static const REGKEYNAME lpstrDefaultsRoot;
  101. static const REGKEYNAME lpstrPullDefaultsRoot;
  102. static const REGKEYNAME lpstrPushDefaultsRoot;
  103. // for determining system version
  104. static const REGKEYNAME lpstrCurrentVersion;
  105. static const REGKEYNAME lpstrWinVersion;
  106. static const REGKEYNAME lpstrSPVersion;
  107. static const REGKEYNAME lpstrBuildNumber;
  108. private:
  109. CString m_strNetBIOSName;
  110. };
  111. #endif // _CONFIG_H