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.

60 lines
1.3 KiB

  1. // dphcidlg.h : header file
  2. //
  3. #include <pdh.h>
  4. #include <pdhmsg.h>
  5. #define ID_TIMER 2
  6. #define RAW_DATA_ITEMS 100
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CDphCounterInfoDlg dialog
  9. class CDphCounterInfoDlg : public CDialog
  10. {
  11. // Construction
  12. public:
  13. CDphCounterInfoDlg(CWnd* pParent = NULL,
  14. HCOUNTER hCounterArg = NULL,
  15. HQUERY hQueryArg = NULL); // standard constructor
  16. // Dialog Data
  17. //{{AFX_DATA(CDphCounterInfoDlg)
  18. enum { IDD = IDD_COUNTER_INFO };
  19. // NOTE: the ClassWizard will add data members here
  20. //}}AFX_DATA
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CDphCounterInfoDlg)
  24. protected:
  25. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  26. //}}AFX_VIRTUAL
  27. // Implementation
  28. protected:
  29. // Generated message map functions
  30. //{{AFX_MSG(CDphCounterInfoDlg)
  31. virtual BOOL OnInitDialog();
  32. afx_msg void OnGetNewData();
  33. afx_msg void On1secBtn();
  34. afx_msg void OnTimer(UINT nIDEvent);
  35. afx_msg void OnDestroy();
  36. //}}AFX_MSG
  37. DECLARE_MESSAGE_MAP()
  38. private:
  39. HQUERY hQuery;
  40. HCOUNTER hCounter;
  41. UINT nTimerId;
  42. BOOL bTimerRunning;
  43. BOOL bGetDefinitions;
  44. // statistical items
  45. PDH_RAW_COUNTER RawDataArray[RAW_DATA_ITEMS];
  46. DWORD dwFirstIndex;
  47. DWORD dwNextIndex;
  48. DWORD dwItemsUsed;
  49. };
  50.