Windows NT 4.0 source code leak
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.

91 lines
3.5 KiB

4 years ago
  1. /***************************************************************************\
  2. * global.h
  3. *
  4. * Microsoft Confidential
  5. * Copyright (c) 1991 Microsoft Corporation
  6. *
  7. * header file with info on main global information for WINMETER application
  8. * the structures in this header file contain all the information that is
  9. * held in "extern" variables shared by different modules
  10. *
  11. * History:
  12. * Written by Hadi Partovi (t-hadip) summer 1991
  13. *
  14. * Re-written and adapted for NT by Fran Borda (v-franb) Nov.1991
  15. * for Newman Consulting
  16. * Took out all WIN-specific and bargraph code. Added 3 new
  17. * linegraphs (Mem/Paging, Process/Threads/Handles, IO), and
  18. * tailored info to that available under NT.
  19. \***************************************************************************/
  20. // main global information structure for program
  21. typedef struct {
  22. // Windows necessary information
  23. LPSTR lpszAppName; // name of application
  24. HWND hwnd; // handle to main window
  25. HANDLE hInstance; // program instance
  26. HMENU hMenu; // handle to main menu
  27. int cxChar; // character dimensions
  28. int cxCaps;
  29. int cyChar;
  30. int xWindowLeft; // window position
  31. int yWindowTop;
  32. int cxClient; // window dimensions
  33. int cyClient;
  34. int dyBar; // spacing between bars
  35. BOOL fStopQuerying; // flag set if should stop querying
  36. // LINE GRAPHS
  37. PLGRAPH plgList; // linked list of linegraphs
  38. PLGRAPH plg; // pointer to current linegraph
  39. PLGRAPH plgCPU; // pointer to CPU Usage linegraph
  40. PLGRAPH plgProcs;
  41. PLGRAPH plgIO;
  42. PLGRAPH plgMemory; // pointer to Memory Usage linegraph
  43. int LineGraph; // determines type of graph, if any
  44. // LINE GRAPH FLAGS
  45. BOOL fDisplayLegend; // flag, set if user wants to see legend
  46. BOOL fLegendFits; // flag, set if legend can fit
  47. BOOL fDisplayCalibration; // flag, set if user wants calibration marks
  48. BOOL fCalibrationFits; // flag, set if calibration marks fit
  49. BOOL fDisplayMenu; // flag, set if user wants to display menus
  50. BOOL fMenuFits; // flag, set if menus can fit
  51. // INI file / dialog information
  52. int nTimerInterval; // sampling interval (in miliseconds)
  53. BOOL fManualSampling; // a flag, set if using manual sampling
  54. BOOL fApplyChanges; // should apply changes to existing display
  55. int nRightSideOfAxis; // a percentage - the right side val of axis
  56. // Graphics
  57. int NumLines; // Number of drawable lines on screen
  58. // Brushes and pens
  59. HBRUSH BlankBrush; // set to window background color
  60. COLORREF crPalette[NUM_COLORS]; // eventually user will choose coloring
  61. HPEN hpPalette[NUM_COLORS];
  62. HBRUSH hbrPalette[NUM_COLORS];
  63. int ibrProcess; // these are indexes to hbrPalette
  64. int ibrThread;
  65. int ibrAxis;
  66. HANDLE hDefaultObject; // default object, to be restored after
  67. // all the other ones are deleted
  68. // general string loading space
  69. char szBuf[TEMP_BUF_LEN]; // general space or loading space
  70. #ifdef DEBUGDUMP
  71. // DEBUG stuff
  72. int fhDebug; // file handle for debug file
  73. OFSTRUCT ofDebug; // Open File structure
  74. char DB[255]; // temp string for dumping
  75. #endif
  76. } GLOBAL;
  77. #define DO_CPU 1
  78. #define DO_MEM 2
  79. #define DO_PROCS 3
  80. #define DO_IO 4