Leaked source code of windows server 2003
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.

75 lines
1.4 KiB

  1. #include <windows.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. ULONG
  6. __cdecl
  7. DbgPrint(
  8. PCH Format,
  9. ...
  10. );
  11. #define IDD_SIGNON 100
  12. #define IDD_EVENT 200
  13. #define IDB_HELP 666
  14. #define IDS_NORMAL IDD_SIGNON+1
  15. #define IDS_WARM IDD_SIGNON+2
  16. #define IDS_COLD IDD_SIGNON+3
  17. #define IDE_DISABLE IDD_EVENT+1
  18. #define MAX_DIR 128
  19. #define MAX_NAME 16
  20. #define MAX_BUILD_W 4
  21. #define MAX_MEM_W 8
  22. #define MAX_DATETIME 20
  23. typedef struct {
  24. DWORD Version;
  25. DWORD Idle;
  26. DWORD Busy;
  27. DWORD PercentTotal;
  28. DWORD Warm;
  29. DWORD Cold;
  30. DWORD Other;
  31. DWORD IdleConsec;
  32. } StatFileRecord;
  33. typedef struct {
  34. CHAR MachineName[MAX_NAME];
  35. CHAR Tab1;
  36. CHAR MachineType;
  37. CHAR Tab2;
  38. CHAR Build[MAX_BUILD_W];
  39. CHAR Tab3;
  40. CHAR Mem[MAX_MEM_W];
  41. CHAR Tab4;
  42. CHAR UserName[MAX_NAME];
  43. CHAR Tab5;
  44. CHAR DateAndTime[MAX_DATETIME];
  45. CHAR CRLF[2];
  46. } NameFileRecord;
  47. typedef enum {
  48. MTTF_TIME,
  49. MTTF_WARM,
  50. MTTF_COLD,
  51. MTTF_OTHER
  52. } StatType;
  53. #define UNKNOWN_CPU 'U'
  54. #define X86_CPU 'X'
  55. #define MIP_CPU 'M'
  56. #define AXP_CPU 'A'
  57. #define PPC_CPU 'P'
  58. VOID IncrementStats(StatType stattype);
  59. VOID ReadIniFile();
  60. INT_PTR SignonDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  61. INT_PTR EventDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);