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.

167 lines
4.4 KiB

  1. #ifdef DEFINE_GLOBALS
  2. #define GLOBAL
  3. // #include "counters.h"
  4. // initialize some of the globals
  5. // only perfmon.c will define DEFINE_GLOBALS
  6. int aiIntervals [] = { 1, 5, 15, 30, 60, 120, 300, 600, 3600 } ;
  7. #else
  8. // only perfmon.c define DEFINE_GLOBALS,
  9. // all other references to them as extern
  10. #define GLOBAL extern
  11. #define NumIntervals 9
  12. GLOBAL int aiIntervals [] ;
  13. #endif
  14. //=============================//
  15. // Graph Data Information //
  16. //=============================//
  17. GLOBAL PPERFSYSTEM pSysInfo ;
  18. GLOBAL PGRAPHSTRUCT pGraphs;
  19. //=============================//
  20. // Font Information //
  21. //=============================//
  22. GLOBAL HFONT hFontScales ;
  23. GLOBAL HFONT hFontScalesBold ;
  24. GLOBAL LONG HalfTextHeight;
  25. //=============================//
  26. // Control Information //
  27. //=============================//
  28. GLOBAL INT iPerfmonView ;
  29. GLOBAL LANGID iLanguage ;
  30. GLOBAL LANGID iEnglishLanguage ;
  31. GLOBAL OPTIONS Options ;
  32. GLOBAL HICON hIcon ;
  33. GLOBAL HANDLE hInstance;
  34. GLOBAL HANDLE hAccelerators ;
  35. GLOBAL HMENU hMenuChart ;
  36. //=============================//
  37. // Windows //
  38. //=============================//
  39. GLOBAL HWND hWndMain ;
  40. GLOBAL HWND hWndGraph ;
  41. GLOBAL HWND hWndGraphLegend ;
  42. GLOBAL HWND hWndToolbar ;
  43. GLOBAL HWND hWndStatus ;
  44. //=============================//
  45. // System Metrics //
  46. //=============================//
  47. GLOBAL int xScreenWidth ;
  48. GLOBAL int yScreenHeight ;
  49. GLOBAL int xBorderWidth ;
  50. GLOBAL int yBorderHeight ;
  51. GLOBAL int xScrollWidth ;
  52. GLOBAL int yScrollHeight ;
  53. GLOBAL int xScrollThumbWidth ;
  54. GLOBAL int yScrollThumbHeight ;
  55. GLOBAL int xDlgBorderWidth ;
  56. GLOBAL int yDlgBorderHeight ;
  57. GLOBAL int MinimumSize ;
  58. //=============================//
  59. // Miscellaneous //
  60. //=============================//
  61. GLOBAL int iUnviewedAlerts ;
  62. GLOBAL COLORREF crLastUnviewedAlert ;
  63. GLOBAL LPTSTR pChartFileName ;
  64. GLOBAL LPTSTR pChartFullFileName ;
  65. // globals for perfmornance improvements
  66. // frequently used GDI objects
  67. GLOBAL UINT ColorBtnFace ; // for concave/convex button painting
  68. GLOBAL HBRUSH hBrushFace ; // for concave/convex button painting
  69. GLOBAL HPEN hPenHighlight ; // for concave/convex button painting
  70. GLOBAL HPEN hPenShadow ; // for concave/convex button painting
  71. GLOBAL HPEN hWhitePen ; // for chart highlighting
  72. GLOBAL HANDLE hbLightGray ; // for painting the background
  73. // bPerfmonIconic is TRUE when perfmon is minimized.
  74. // Thus, we don't need to update chart or report view until
  75. // it is not iconized
  76. GLOBAL BOOL bPerfmonIconic ;
  77. // bAddLineInPorgress is TRUE when Addline dialog is up. It is used
  78. // in freeing unused system during data collecting. (But not while
  79. // addline dialog is still up)
  80. GLOBAL BOOL bAddLineInProgress ;
  81. // bDelayAddAction is TRUE when reading setting files or adding more
  82. // than 1 counter. This is to delay some of the costly screen adjustments
  83. // until we have added all the lines.
  84. GLOBAL BOOL bDelayAddAction ;
  85. // bExplainTxtButtonHit is TRUE when the ExplainText button in addline
  86. // dialog is clicked. This is to save time and memory for fetching the
  87. // help text, during BuildNameTable(), unless it is needed.
  88. GLOBAL BOOL bExplainTextButtonHit ;
  89. // globals used for WinHelp
  90. GLOBAL DWORD dwCurrentDlgID ;
  91. GLOBAL DWORD dwCurrentMenuID ;
  92. GLOBAL LPTSTR pszHelpFile ;
  93. // Following includes space for trailing NULL and preceeding \\'s
  94. GLOBAL TCHAR LocalComputerName[MAX_COMPUTERNAME_LENGTH + 3];
  95. // Flag to indicate if we need to close local machine
  96. GLOBAL BOOL bCloseLocalMachine ;
  97. // Timeout for data collection thread in msec
  98. GLOBAL DWORD DataTimeOut ;
  99. // flag to indicate duplicate instance names should be allowed
  100. GLOBAL BOOL bMonitorDuplicateInstances;
  101. // 20 sec for the data thread timeout
  102. #define DEFAULT_DATA_TIMEOUT 20000L
  103. //=============================//
  104. // Log Playback Information //
  105. //=============================//
  106. GLOBAL PLAYBACKLOG PlaybackLog ;
  107. GLOBAL REPORT Report ;
  108. GLOBAL ALERT Alert ;
  109. GLOBAL LOG Log ;
  110.