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.

134 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. perform.h
  5. Abstract:
  6. WWW Performance Property Page definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. 11/29/2000 sergeia Changed for IIS6. Removed excessive commenting
  14. --*/
  15. #ifndef __PERFORM_H__
  16. #define __PERFORM_H__
  17. class CW3PerfPage : public CInetPropertyPage
  18. {
  19. DECLARE_DYNCREATE(CW3PerfPage)
  20. enum
  21. {
  22. RADIO_UNLIMITED,
  23. RADIO_LIMITED,
  24. };
  25. //
  26. // Construction
  27. //
  28. public:
  29. CW3PerfPage(CInetPropertySheet * pSheet = NULL);
  30. ~CW3PerfPage();
  31. //
  32. // Dialog Data
  33. //
  34. protected:
  35. //{{AFX_DATA(CW3PerfPage)
  36. enum { IDD = IDD_PERFORMANCE };
  37. BOOL m_fLimitBandwidth;
  38. CButton m_LimitBandwidth;
  39. CStatic m_MaxBandwidthTxt;
  40. CEdit m_MaxBandwidth;
  41. DWORD m_dwMaxBandwidthDisplay;
  42. CSpinButtonCtrl m_MaxBandwidthSpin;
  43. CStatic m_static_PSHED_Required;
  44. int m_nUnlimited;
  45. CStatic m_WebServiceConnGrp;
  46. CEdit m_edit_MaxConnections;
  47. CButton m_radio_Unlimited;
  48. CButton m_radio_Limited;
  49. CSpinButtonCtrl m_MaxConnectionsSpin;
  50. //}}AFX_DATA
  51. BOOL m_fLimitBandwidthInitial;
  52. DWORD m_dwMaxBandwidth;
  53. BOOL m_fUnlimitedConnections;
  54. CILong m_nMaxConnections;
  55. CILong m_nVisibleMaxConnections;
  56. //
  57. // Overrides
  58. //
  59. protected:
  60. virtual HRESULT FetchLoadedValues();
  61. virtual HRESULT SaveInfo();
  62. //{{AFX_VIRTUAL(CW3PerfPage)
  63. public:
  64. virtual BOOL OnSetActive();
  65. protected:
  66. virtual void DoDataExchange(CDataExchange * pDX);
  67. //}}AFX_VIRTUAL
  68. protected:
  69. static void
  70. ParseMaxNetworkUse(
  71. DWORD& dwMaxBandwidth,
  72. DWORD& dwMaxBandwidthDisplay,
  73. BOOL& fLimitBandwidth
  74. );
  75. static void
  76. BuildMaxNetworkUse(
  77. DWORD& dwMaxBandwidth,
  78. DWORD& dwMaxBandwidthDisplay,
  79. BOOL& fLimitBandwidth
  80. );
  81. //
  82. // Implementation
  83. //
  84. protected:
  85. //{{AFX_MSG(CW3PerfPage)
  86. virtual BOOL OnInitDialog();
  87. afx_msg void OnCheckLimitNetworkUse();
  88. afx_msg void OnRadioLimited();
  89. afx_msg void OnRadioUnlimited();
  90. //}}AFX_MSG
  91. afx_msg void OnItemChanged();
  92. DECLARE_MESSAGE_MAP()
  93. BOOL SetControlStates();
  94. };
  95. //
  96. // Inline Expansion
  97. //
  98. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  99. inline /* static */ void
  100. CW3PerfPage::BuildMaxNetworkUse(
  101. DWORD& dwMaxBandwidth,
  102. DWORD& dwMaxBandwidthDisplay,
  103. BOOL& fLimitBandwidth
  104. )
  105. {
  106. dwMaxBandwidth = fLimitBandwidth ?
  107. dwMaxBandwidthDisplay * KILOBYTE : INFINITE_BANDWIDTH;
  108. }
  109. #endif // __PERFORM_H__