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.

151 lines
3.4 KiB

  1. /*++
  2. File: setuplogEXE.h
  3. Purpose: To be inclusive of all header files
  4. without duplication.
  5. Revision History
  6. Created Nov 15th, 1998 WallyHo
  7. Modified Mar 31st, 1999 WallyHo for MSI installs.
  8. --*/
  9. #ifndef SETUPLOG_H
  10. #define SETUPLOG_H
  11. #include <windows.h>
  12. #include <string.h>
  13. #include <stdlib.h>
  14. #include <stdio.h>
  15. #include <string.h>
  16. #include <sys\timeb.h>
  17. #include <tchar.h>
  18. #include <time.h>
  19. #include <winperf.h>
  20. //******togther for net_api_status ****
  21. //
  22. //*************************************
  23. #include "setuplog.h" // save for DLL and XE
  24. //
  25. // Defines
  26. //
  27. #define DEBUG 0
  28. #define SAVE_FILE "c:\\setuplog.ini"
  29. #define MAX_WAVEOUT_DEVICES 2
  30. //
  31. // Struct Declarations
  32. //
  33. typedef struct _MULTIMEDIA{
  34. INT nNumWaveOutDevices; // # WaveOut Devices ie. # sound cards.
  35. TCHAR szWaveOutDesc[MAX_WAVEOUT_DEVICES][128]; // WaveOut description
  36. TCHAR szWaveDriverName[MAX_WAVEOUT_DEVICES][128]; // Wave Driver name
  37. } *LPMULTIMEDIA, MULTIMEDIA;
  38. //
  39. // GlowBall Variables.
  40. //
  41. #if DEBUG
  42. TCHAR szMsgBox [ MAX_PATH ];
  43. #endif
  44. MULTIMEDIA m;
  45. TCHAR szArch[ 20 ];
  46. TCHAR szCPU[ 6 ];
  47. OSVERSIONINFO osVer;
  48. //
  49. // GlowBall Statics to prevent multiple inclusions. W.HO
  50. //
  51. static TCHAR szCurBld[10] = {TEXT('\0')};
  52. static fnWriteData g_pfnWriteDataToFile = NULL;
  53. static LPTSTR szPlatform = TEXT("Windows NT 5.0");
  54. /*********** For GetTaskList *****************/
  55. //
  56. // manafest constants
  57. //
  58. #define TITLE_SIZE 64
  59. #define PROCESS_SIZE 16
  60. #define INITIAL_SIZE 51200
  61. #define EXTEND_SIZE 25600
  62. #define REGKEY_PERF "software\\microsoft\\windows nt\\currentversion\\perflib"
  63. #define REGSUBKEY_COUNTERS "Counters"
  64. #define PROCESS_COUNTER "process"
  65. #define PROCESSID_COUNTER "id process"
  66. #define UNKNOWN_TASK "unknown"
  67. //
  68. // task list structure
  69. //
  70. typedef struct _THREAD_INFO {
  71. ULONG ThreadState;
  72. HANDLE UniqueThread;
  73. } THREAD_INFO, *PTHREAD_INFO;
  74. typedef struct _TASK_LIST {
  75. DWORD dwProcessId;
  76. DWORD dwInheritedFromProcessId;
  77. ULARGE_INTEGER CreateTime;
  78. BOOL flags;
  79. HANDLE hwnd;
  80. LPSTR lpWinsta;
  81. LPSTR lpDesk;
  82. CHAR ProcessName[PROCESS_SIZE];
  83. CHAR WindowTitle[TITLE_SIZE];
  84. ULONG PeakVirtualSize;
  85. ULONG VirtualSize;
  86. ULONG PageFaultCount;
  87. ULONG PeakWorkingSetSize;
  88. ULONG WorkingSetSize;
  89. ULONG NumberOfThreads;
  90. PTHREAD_INFO pThreadInfo;
  91. } TASK_LIST, *PTASK_LIST;
  92. typedef struct _TASK_LIST_ENUM {
  93. PTASK_LIST tlist;
  94. DWORD numtasks;
  95. LPSTR lpWinsta;
  96. LPSTR lpDesk;
  97. BOOL bFirstLoop;
  98. } TASK_LIST_ENUM, *PTASK_LIST_ENUM;
  99. //
  100. // Prototypes.
  101. //
  102. VOID GetTargetFile (LPTSTR szOutPath, LPTSTR szBld);
  103. VOID GetNTSoundInfo(VOID);
  104. VOID ConnectAndWrite(LPTSTR MachineName, LPTSTR Buffer);
  105. VOID GetBuildNumber (LPTSTR szBld);
  106. VOID WriteMinimalData (LPTSTR szFileName);
  107. VOID DeleteDatafile (LPTSTR szDatafile);
  108. DWORD RandomMachineID(VOID);
  109. VOID GlobalInit(VOID);
  110. // MSI stuff for Joehol
  111. BOOL IsMSI(VOID);
  112. DWORD GetTaskList( PTASK_LIST pTask,DWORD dwNumTasks);
  113. #endif SETUPLOG_H