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.

88 lines
2.2 KiB

  1. // browsctr.h : header file
  2. //
  3. #ifdef _UNICODE
  4. #define LongToString _ltow
  5. #else
  6. #define LongToString _ltoa
  7. #endif
  8. typedef long (* CounterPathCallBack)(DWORD);
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CBrowsCountersDlg dialog
  11. class CBrowsCountersDlg : public CDialog
  12. {
  13. // Construction
  14. public:
  15. CBrowsCountersDlg(CWnd* pParent = NULL,
  16. UINT nTemplate = IDD_BROWSE_COUNTERS_DLG_EXT); // standard constructor
  17. // Dialog Data
  18. //{{AFX_DATA(CBrowsCountersDlg)
  19. enum { IDD = IDD_BROWSE_COUNTERS_DLG };
  20. // NOTE: the ClassWizard will add data members here
  21. //}}AFX_DATA
  22. // Overrides
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CBrowsCountersDlg)
  25. protected:
  26. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  27. //}}AFX_VIRTUAL
  28. // Implementation
  29. protected:
  30. // Generated message map functions
  31. //{{AFX_MSG(CBrowsCountersDlg)
  32. virtual BOOL OnInitDialog();
  33. virtual void OnOK();
  34. virtual void OnCancel();
  35. afx_msg void OnSetfocusMachineCombo();
  36. afx_msg void OnKillfocusMachineCombo();
  37. afx_msg void OnSelchangeObjectCombo();
  38. afx_msg void OnSelchangeCounterList();
  39. afx_msg void OnSelchangeInstanceList();
  40. afx_msg void OnUseLocalMachine();
  41. afx_msg void OnSelectMachine();
  42. afx_msg void OnAllInstances();
  43. afx_msg void OnUseInstanceList();
  44. afx_msg void OnHelp();
  45. afx_msg void OnNetwork();
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. public:
  49. // configured by caller before calling DoModal;
  50. LPTSTR szUsersPathBuffer;
  51. DWORD dwUsersPathBufferLength;
  52. CounterPathCallBack pCallBack;
  53. DWORD dwArg;
  54. BOOL bShowIndex;
  55. BOOL bSelectMultipleCounters;
  56. BOOL bAddMultipleCounters;
  57. BOOL bIncludeMachineInPath;
  58. BOOL bWildCardInstances;
  59. // configured and set by the dialog procedure
  60. PDH_COUNTER_PATH_ELEMENTS cpeLastSelection;
  61. TCHAR cpeLastPath[MAX_PATH];
  62. private:
  63. void UpdateCurrentPath ();
  64. void LoadKnownMachines ();
  65. void LoadMachineObjects (BOOL bRefresh = FALSE);
  66. void LoadCountersAndInstances ();
  67. void CompileSelectedCounters();
  68. WPARAM wpLastMachineSel;
  69. TCHAR cpeMachineName[MAX_PATH];
  70. TCHAR cpeObjectName[MAX_PATH];
  71. TCHAR cpeInstanceName[MAX_PATH];
  72. TCHAR cpeParentInstance[MAX_PATH];
  73. TCHAR cpeCounterName[MAX_PATH];
  74. };
  75.