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.

138 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. BOOL m_fUninstallPSHED;
  44. CButton m_UninstallPSHED;
  45. CStatic m_static_PSHED_Required;
  46. int m_nUnlimited;
  47. CStatic m_WebServiceConnGrp;
  48. CStatic m_WebServiceConnTxt;
  49. CStatic m_ConnectionsTxt;
  50. CEdit m_edit_MaxConnections;
  51. CButton m_radio_Unlimited;
  52. CButton m_radio_Limited;
  53. CSpinButtonCtrl m_MaxConnectionsSpin;
  54. //}}AFX_DATA
  55. BOOL m_fLimitBandwidthInitial;
  56. DWORD m_dwMaxBandwidth;
  57. BOOL m_fUnlimitedConnections;
  58. CILong m_nMaxConnections;
  59. CILong m_nVisibleMaxConnections;
  60. //
  61. // Overrides
  62. //
  63. protected:
  64. virtual HRESULT FetchLoadedValues();
  65. virtual HRESULT SaveInfo();
  66. //{{AFX_VIRTUAL(CW3PerfPage)
  67. public:
  68. virtual BOOL OnSetActive();
  69. protected:
  70. virtual void DoDataExchange(CDataExchange * pDX);
  71. //}}AFX_VIRTUAL
  72. protected:
  73. static void
  74. ParseMaxNetworkUse(
  75. DWORD& dwMaxBandwidth,
  76. DWORD& dwMaxBandwidthDisplay,
  77. BOOL& fLimitBandwidth
  78. );
  79. static void
  80. BuildMaxNetworkUse(
  81. DWORD& dwMaxBandwidth,
  82. DWORD& dwMaxBandwidthDisplay,
  83. BOOL& fLimitBandwidth
  84. );
  85. //
  86. // Implementation
  87. //
  88. protected:
  89. //{{AFX_MSG(CW3PerfPage)
  90. virtual BOOL OnInitDialog();
  91. afx_msg void OnCheckLimitNetworkUse();
  92. afx_msg void OnRadioLimited();
  93. afx_msg void OnRadioUnlimited();
  94. //}}AFX_MSG
  95. afx_msg void OnItemChanged();
  96. DECLARE_MESSAGE_MAP()
  97. BOOL SetControlStates();
  98. };
  99. //
  100. // Inline Expansion
  101. //
  102. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  103. inline /* static */ void
  104. CW3PerfPage::BuildMaxNetworkUse(
  105. DWORD& dwMaxBandwidth,
  106. DWORD& dwMaxBandwidthDisplay,
  107. BOOL& fLimitBandwidth
  108. )
  109. {
  110. dwMaxBandwidth = fLimitBandwidth ?
  111. dwMaxBandwidthDisplay * KILOBYTE : INFINITE_BANDWIDTH;
  112. }
  113. #endif // __PERFORM_H__