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.

160 lines
5.1 KiB

  1. //NBD
  2. #ifndef TS_ALLPROC_ALREADY_SET
  3. #define TS_ALLPROC_ALREADY_SET
  4. //
  5. // No longer available in the Windows 2000 include files (but I need it to be able to
  6. // access to Hydra 4 servers).
  7. // This has no direct link with GetAllProcesses, but it is very convenient to put it here,
  8. // because apps calling GetAllProcesses will probably care about Hydra 4 compatibility.
  9. //
  10. #define CITRIX_PROCESS_INFO_MAGIC 0x23495452
  11. typedef struct _CITRIX_PROCESS_INFORMATION {
  12. ULONG MagicNumber;
  13. ULONG LogonId;
  14. PVOID ProcessSid;
  15. ULONG Pad;
  16. } CITRIX_PROCESS_INFORMATION, * PCITRIX_PROCESS_INFORMATION;
  17. // sizes of TS4.0 structures (size has changed in Windows 2000)
  18. #define SIZEOF_TS4_SYSTEM_THREAD_INFORMATION 64
  19. #define SIZEOF_TS4_SYSTEM_PROCESS_INFORMATION 136
  20. #define GAP_LEVEL_BASIC 0
  21. typedef struct _TS_UNICODE_STRING {
  22. USHORT Length;
  23. USHORT MaximumLength;
  24. #ifdef MIDL_PASS
  25. [size_is(MaximumLength),length_is(Length)]PWSTR Buffer;
  26. #else
  27. PWSTR Buffer;
  28. #endif
  29. } TS_UNICODE_STRING;
  30. // CAUTION:
  31. // TS_SYS_PROCESS_INFO is duplicated from ntexapi.h, and slightly modified.
  32. // (not nice, but necessary because the Midl compiler doesn't like PVOID !)
  33. typedef struct _TS_SYS_PROCESS_INFORMATION {
  34. ULONG NextEntryOffset;
  35. ULONG NumberOfThreads;
  36. LARGE_INTEGER SpareLi1;
  37. LARGE_INTEGER SpareLi2;
  38. LARGE_INTEGER SpareLi3;
  39. LARGE_INTEGER CreateTime;
  40. LARGE_INTEGER UserTime;
  41. LARGE_INTEGER KernelTime;
  42. TS_UNICODE_STRING ImageName;
  43. LONG BasePriority; // KPRIORITY in ntexapi.h
  44. DWORD UniqueProcessId; // HANDLE in ntexapi.h
  45. DWORD InheritedFromUniqueProcessId; // HANDLE in ntexapi.h
  46. ULONG HandleCount;
  47. ULONG SessionId;
  48. ULONG SpareUl3;
  49. SIZE_T PeakVirtualSize;
  50. SIZE_T VirtualSize;
  51. ULONG PageFaultCount;
  52. ULONG PeakWorkingSetSize;
  53. ULONG WorkingSetSize;
  54. SIZE_T QuotaPeakPagedPoolUsage;
  55. SIZE_T QuotaPagedPoolUsage;
  56. SIZE_T QuotaPeakNonPagedPoolUsage;
  57. SIZE_T QuotaNonPagedPoolUsage;
  58. SIZE_T PagefileUsage;
  59. SIZE_T PeakPagefileUsage;
  60. SIZE_T PrivatePageCount;
  61. }
  62. TS_SYS_PROCESS_INFORMATION, *PTS_SYS_PROCESS_INFORMATION;
  63. typedef struct _TS_ALL_PROCESSES_INFO {
  64. PTS_SYS_PROCESS_INFORMATION pTsProcessInfo;
  65. DWORD SizeOfSid;
  66. #ifdef MIDL_PASS
  67. [size_is(SizeOfSid)] PBYTE pSid;
  68. #else
  69. PBYTE pSid;
  70. #endif
  71. }
  72. TS_ALL_PROCESSES_INFO, *PTS_ALL_PROCESSES_INFO;
  73. //=============================================================================================
  74. // The following structures are defined for taking care of interface change in the Whistler.
  75. typedef struct _NT6_TS_UNICODE_STRING {
  76. USHORT Length;
  77. USHORT MaximumLength;
  78. #ifdef MIDL_PASS
  79. [size_is(MaximumLength / 2),length_is(Length / 2)]PWSTR Buffer;
  80. #else
  81. PWSTR Buffer;
  82. #endif
  83. } NT6_TS_UNICODE_STRING;
  84. typedef struct _TS_SYS_PROCESS_INFORMATION_NT6 {
  85. ULONG NextEntryOffset;
  86. ULONG NumberOfThreads;
  87. LARGE_INTEGER SpareLi1;
  88. LARGE_INTEGER SpareLi2;
  89. LARGE_INTEGER SpareLi3;
  90. LARGE_INTEGER CreateTime;
  91. LARGE_INTEGER UserTime;
  92. LARGE_INTEGER KernelTime;
  93. NT6_TS_UNICODE_STRING ImageName;
  94. LONG BasePriority; // KPRIORITY in ntexapi.h
  95. DWORD UniqueProcessId; // HANDLE in ntexapi.h
  96. DWORD InheritedFromUniqueProcessId; // HANDLE in ntexapi.h
  97. ULONG HandleCount;
  98. ULONG SessionId;
  99. ULONG SpareUl3;
  100. SIZE_T PeakVirtualSize;
  101. SIZE_T VirtualSize;
  102. ULONG PageFaultCount;
  103. ULONG PeakWorkingSetSize;
  104. ULONG WorkingSetSize;
  105. SIZE_T QuotaPeakPagedPoolUsage;
  106. SIZE_T QuotaPagedPoolUsage;
  107. SIZE_T QuotaPeakNonPagedPoolUsage;
  108. SIZE_T QuotaNonPagedPoolUsage;
  109. SIZE_T PagefileUsage;
  110. SIZE_T PeakPagefileUsage;
  111. SIZE_T PrivatePageCount;
  112. }
  113. TS_SYS_PROCESS_INFORMATION_NT6, *PTS_SYS_PROCESS_INFORMATION_NT6;
  114. typedef struct _TS_ALL_PROCESSES_INFO_NT6 {
  115. PTS_SYS_PROCESS_INFORMATION_NT6 pTsProcessInfo;
  116. DWORD SizeOfSid;
  117. #ifdef MIDL_PASS
  118. [size_is(SizeOfSid)] PBYTE pSid;
  119. #else
  120. PBYTE pSid;
  121. #endif
  122. }
  123. TS_ALL_PROCESSES_INFO_NT6, *PTS_ALL_PROCESSES_INFO_NT6;
  124. //=============================================================================================
  125. //
  126. // TermSrv Counter Header
  127. //
  128. typedef struct _TS_COUNTER_HEADER {
  129. DWORD dwCounterID; // identifies counter
  130. BOOLEAN bResult; // result of operation performed on counter
  131. } TS_COUNTER_HEADER, *PTS_COUNTER_HEADER;
  132. typedef struct _TS_COUNTER {
  133. TS_COUNTER_HEADER counterHead;
  134. DWORD dwValue; // returned value
  135. LARGE_INTEGER startTime; // start time for counter
  136. } TS_COUNTER, *PTS_COUNTER;
  137. #endif // TS_ALLPROC_ALREADY_SET
  138. //NBD end