|
|
1.1 root 1: #ifdef DEFINE_GLOBALS
2:
3: #define GLOBAL
4:
5: // #include "counters.h"
6:
7: // initialize some of the globals
8: // only perfmon.c will define DEFINE_GLOBALS
9:
10: int aiIntervals [] = { 1, 5, 15, 30, 60, 120, 300, 600, 3600 } ;
11:
12:
13: // setup CVS delimiter and line ending used by Export routines
14: CHAR CommasStr[] = "," ;
15: CHAR TabStr[] = "\t" ;
16: CHAR *pDelimiter = TabStr ;
17: CHAR LineEndStr[] = "\n" ;
18:
19: // PDFN CounterFuncEntry = CounterEntry ;
20:
21:
22: #else
23: // only perfmon.c define DEFINE_GLOBALS,
24: // all other references to them as extern
25: #define GLOBAL extern
26:
27: #define NumIntervals 9
28: GLOBAL int aiIntervals [] ;
29:
30: // setup CVS delimiter and line ending used by Export routines
31: GLOBAL CHAR CommasStr[] ;
32: GLOBAL CHAR TabStr[] ;
33: GLOBAL CHAR *pDelimiter ;
34: GLOBAL CHAR LineEndStr[] ;
35: // GLOBAL PDFN CounterFuncEntry ;
36: #endif
37:
38:
39:
40: //=============================//
41: // Graph Data Information //
42: //=============================//
43:
44:
45: GLOBAL PPERFSYSTEM pSysInfo ;
46: GLOBAL PGRAPHSTRUCT pGraphs;
47:
48:
49: //=============================//
50: // Font Information //
51: //=============================//
52:
53:
54: GLOBAL HFONT hFontScales ;
55: GLOBAL HFONT hFontScalesBold ;
56: GLOBAL LONG HalfTextHeight;
57:
58: GLOBAL HFONT hFontPrinterScales ;
59: GLOBAL HFONT hFontPrinterScalesBold ;
60:
61:
62: //=============================//
63: // Control Information //
64: //=============================//
65:
66:
67: GLOBAL INT iPerfmonView ;
68: GLOBAL LANGID iLanguage ;
69: GLOBAL LANGID iEnglishLanguage ;
70: GLOBAL OPTIONS Options ;
71:
72: GLOBAL HICON hIcon ;
73: GLOBAL HANDLE hInstance;
74: GLOBAL HANDLE hAccelerators ;
75:
76: GLOBAL HMENU hMenuChart ;
77: GLOBAL HMENU hMenuAlert ;
78: GLOBAL HMENU hMenuLog ;
79: GLOBAL HMENU hMenuReport ;
80:
81:
82: //=============================//
83: // Windows //
84: //=============================//
85:
86:
87: GLOBAL HWND hWndMain ;
88: GLOBAL HWND hWndGraph ;
89: GLOBAL HWND hWndLog ;
90: GLOBAL HWND hWndAlert ;
91: GLOBAL HWND hWndReport ;
92:
93: GLOBAL HWND hWndGraphDisplay ;
94: GLOBAL HWND hWndGraphLegend ;
95: GLOBAL HWND hWndGraphStatus ;
96:
97: GLOBAL HWND hWndAlertLegend ;
98:
99: GLOBAL HWND hWndToolbar ;
100: GLOBAL HWND hWndStatus ;
101:
102:
103: //=============================//
104: // System Metrics //
105: //=============================//
106:
107:
108: GLOBAL int xScreenWidth ;
109: GLOBAL int yScreenHeight ;
110:
111: GLOBAL int xBorderWidth ;
112: GLOBAL int yBorderHeight ;
113:
114: GLOBAL int xScrollWidth ;
115: GLOBAL int yScrollHeight ;
116:
117: GLOBAL int xScrollThumbWidth ;
118: GLOBAL int yScrollThumbHeight ;
119:
120:
121: GLOBAL int xDlgBorderWidth ;
122: GLOBAL int yDlgBorderHeight ;
123:
124: GLOBAL int MinimumSize ;
125:
126: //=============================//
127: // Miscellaneous //
128: //=============================//
129:
130: GLOBAL int iUnviewedAlerts ;
131: GLOBAL COLORREF crLastUnviewedAlert ;
132:
133: GLOBAL LPTSTR pChartFileName ;
134: GLOBAL LPTSTR pChartFullFileName ;
135: GLOBAL LPTSTR pAlertFileName ;
136: GLOBAL LPTSTR pAlertFullFileName ;
137: GLOBAL LPTSTR pLogFileName ;
138: GLOBAL LPTSTR pLogFullFileName ;
139: GLOBAL LPTSTR pReportFileName ;
140: GLOBAL LPTSTR pReportFullFileName ;
141:
142:
143: // globals for perfmornance improvements
144:
145: // frequently used GDI objects
146: GLOBAL UINT ColorBtnFace ; // for concave/convex button painting
147: GLOBAL HBRUSH hBrushFace ; // for concave/convex button painting
148: GLOBAL HPEN hPenHighlight ; // for concave/convex button painting
149: GLOBAL HPEN hPenShadow ; // for concave/convex button painting
150: GLOBAL HPEN hWhitePen ; // for chart highlighting
151: GLOBAL HANDLE hbLightGray ; // for painting the background
152:
153: // bPerfmonIconic is TRUE when perfmon is minimized.
154: // Thus, we don't need to update chart or report view until
155: // it is not iconized
156: GLOBAL BOOL bPerfmonIconic ;
157:
158: // bAddLineInPorgress is TRUE when Addline dialog is up. It is used
159: // in freeing unused system during data collecting. (But not while
160: // addline dialog is still up)
161: GLOBAL BOOL bAddLineInProgress ;
162:
163: // bDelayAddAction is TRUE when reading setting files or adding more
164: // than 1 counter. This is to delay some of the costly screen adjustments
165: // until we have added all the lines.
166: GLOBAL BOOL bDelayAddAction ;
167:
168:
169: // bExplainTxtButtonHit is TRUE when the ExplainText button in addline
170: // dialog is clicked. This is to save time and memory for fetching the
171: // help text, during BuildNameTable(), unless it is needed.
172: GLOBAL BOOL bExplainTextButtonHit ;
173:
174: // globals used for WinHelp
175: GLOBAL DWORD dwCurrentDlgID ;
176: GLOBAL DWORD dwCurrentMenuID ;
177: GLOBAL LPTSTR pszHelpFile ;
178:
179: // Following includes space for trailing NULL and preceeding \\'s
180: GLOBAL TCHAR LocalComputerName[MAX_COMPUTERNAME_LENGTH + 3];
181:
182: //=============================//
183: // Log Playback Information //
184: //=============================//
185:
186: GLOBAL PLAYBACKLOG PlaybackLog ;
187:
188: GLOBAL REPORT Report ;
189: GLOBAL ALERT Alert ;
190: GLOBAL LOG Log ;
191:
192:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.