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.

169 lines
4.1 KiB

  1. //
  2. // Driver Verifier UI
  3. // Copyright (c) Microsoft Corporation, 1999
  4. //
  5. //
  6. //
  7. // module: DCntPage.h
  8. // author: DMihai
  9. // created: 11/1/00
  10. //
  11. // Description:
  12. //
  13. #if !defined(AFX_DCNTPAGE_H__49C83C54_F12D_4A9C_A6F3_D25F988B337D__INCLUDED_)
  14. #define AFX_DCNTPAGE_H__49C83C54_F12D_4A9C_A6F3_D25F988B337D__INCLUDED_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. // DCntPage.h : header file
  19. //
  20. #include "VerfPage.h"
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CDriverCountersPage dialog
  23. class CDriverCountersPage : public CVerifierPropertyPage
  24. {
  25. DECLARE_DYNCREATE(CDriverCountersPage)
  26. public:
  27. //
  28. // Construction
  29. //
  30. CDriverCountersPage();
  31. ~CDriverCountersPage();
  32. //
  33. // Methods
  34. //
  35. VOID SetParentSheet( CPropertySheet *pParentSheet )
  36. {
  37. m_pParentSheet = pParentSheet;
  38. ASSERT( m_pParentSheet != NULL );
  39. }
  40. VOID SetupListHeader();
  41. VOID FillTheList();
  42. VOID AddAllListItems( CRuntimeDriverData *pRuntimeDriverData );
  43. VOID RefreshTheList();
  44. INT AddCounterInList( INT nItemData,
  45. ULONG uIdResourceString );
  46. VOID AddCounterInList( INT nItemData,
  47. ULONG uIdResourceString,
  48. SIZE_T sizeValue );
  49. SIZE_T GetCounterValue( INT_PTR nCounterIndex,
  50. CRuntimeDriverData *pRuntimeDriverData = NULL);
  51. BOOL GetCounterName( LPARAM lItemData,
  52. TCHAR *szCounterName,
  53. ULONG uCounterNameBufferLen );
  54. VOID UpdateCounterValueInList( INT nItemIndex,
  55. LPTSTR szValue );
  56. VOID UpdateCounterValueInList( INT nItemIndex,
  57. SIZE_T sizeValue );
  58. VOID RefreshInfo();
  59. VOID RefreshCombo();
  60. VOID GetCurrentSelDriverName( CString &strName );
  61. CRuntimeDriverData *GetCurrentDrvRuntimeData();
  62. VOID SortTheList();
  63. static int CALLBACK CounterValueCmpFunc(
  64. LPARAM lParam1,
  65. LPARAM lParam2,
  66. LPARAM lParamSort);
  67. static int CALLBACK CounterNameCmpFunc(
  68. LPARAM lParam1,
  69. LPARAM lParam2,
  70. LPARAM lParamSort);
  71. protected:
  72. //
  73. // Data
  74. //
  75. CPropertySheet *m_pParentSheet;
  76. //
  77. // Dialog Data
  78. //
  79. INT m_nSortColumnIndex; // counter name (0) or counter value (1)
  80. BOOL m_bAscendSortName; // sort ascendent the counter names
  81. BOOL m_bAscendSortValue; // sort ascendent the counter values
  82. UINT_PTR m_uTimerHandler; // timer handler, returned by SetTimer()
  83. //
  84. // Runtime data (obtained from the kernel)
  85. //
  86. CRuntimeVerifierData m_RuntimeVerifierData;
  87. //
  88. // Dialog data
  89. //
  90. //{{AFX_DATA(CDriverCountersPage)
  91. enum { IDD = IDD_PERDRIVER_COUNTERS_PAGE };
  92. CComboBox m_DriversCombo;
  93. CStatic m_NextDescription;
  94. CListCtrl m_CountersList;
  95. int m_nUpdateIntervalIndex;
  96. //}}AFX_DATA
  97. protected:
  98. //
  99. // Overrides
  100. //
  101. //
  102. // All the property pages derived from this class should
  103. // provide these methods.
  104. //
  105. virtual ULONG GetDialogId() const { return IDD; }
  106. //
  107. // ClassWizard generate virtual function overrides
  108. //
  109. // ClassWizard generate virtual function overrides
  110. //{{AFX_VIRTUAL(CDriverCountersPage)
  111. public:
  112. virtual BOOL OnSetActive();
  113. protected:
  114. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  115. //}}AFX_VIRTUAL
  116. protected:
  117. // Generated message map functions
  118. //{{AFX_MSG(CDriverCountersPage)
  119. virtual BOOL OnInitDialog();
  120. afx_msg VOID OnTimer(UINT nIDEvent);
  121. afx_msg void OnSelendokDriverCombo();
  122. afx_msg void OnColumnclickPerdrvcList(NMHDR* pNMHDR, LRESULT* pResult);
  123. afx_msg LONG OnHelp( WPARAM wParam, LPARAM lParam );
  124. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  125. //}}AFX_MSG
  126. DECLARE_MESSAGE_MAP()
  127. };
  128. //{{AFX_INSERT_LOCATION}}
  129. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  130. #endif // !defined(AFX_DCNTPAGE_H__49C83C54_F12D_4A9C_A6F3_D25F988B337D__INCLUDED_)