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.

315 lines
5.2 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. exp.h
  5. Abstract:
  6. This module contains the private (internal) header file for the
  7. executive.
  8. Author:
  9. David N. Cutler (davec) 23-May-1989
  10. Environment:
  11. Kernel mode only.
  12. Revision History:
  13. --*/
  14. #ifndef _EXP_
  15. #define _EXP_
  16. #pragma warning(disable:4214) // bit field types other than int
  17. #pragma warning(disable:4201) // nameless struct/union
  18. #pragma warning(disable:4127) // condition expression is constant
  19. #pragma warning(disable:4115) // named type definition in parentheses
  20. #pragma warning(disable:4206) // translation unit empty
  21. #pragma warning(disable:4706) // assignment within conditional
  22. #pragma warning(disable:4324) // structure was padded
  23. #pragma warning(disable:4328) // greater alignment than needed
  24. #pragma warning(disable:4054) // cast of function pointer to PVOID
  25. #include "ntos.h"
  26. #include "zwapi.h"
  27. #define NOEXTAPI
  28. #include "wdbgexts.h"
  29. #include "ntdbg.h"
  30. #include "ki.h"
  31. #include "stdio.h"
  32. #include "pool.h"
  33. #define COMPLUS_PACKAGE_KEYPATH L"\\Registry\\Machine\\SOFTWARE\\Microsoft\\.NETFramework"
  34. #define COMPLUS_PACKAGE_ENABLE64BIT L"Enable64Bit"
  35. #define COMPLUS_PACKAGE_INVALID (ULONG)-1
  36. //
  37. // Executive information initialization structure
  38. //
  39. typedef struct {
  40. PCALLBACK_OBJECT *CallBackObject;
  41. PWSTR CallbackName;
  42. } EXP_INITIALIZE_GLOBAL_CALLBACKS;
  43. typedef struct _EXP_LICENSE_INFO {
  44. HANDLE RegKey;
  45. ULONG Count;
  46. PWSTR SubKeyName;
  47. WORK_QUEUE_ITEM ExpWatchLicenseInfoWorkItem;
  48. IO_STATUS_BLOCK ExpLicenseInfoIoSb;
  49. ULONG ExpLicenseInfoChangeBuffer;
  50. } EXP_LICENSE_INFO, *PEXP_LICENSE_INFO;
  51. //
  52. // Executive object and other initialization function definitions.
  53. //
  54. NTSTATUS
  55. ExpWorkerInitialization (
  56. VOID
  57. );
  58. BOOLEAN
  59. ExpEventInitialization (
  60. VOID
  61. );
  62. BOOLEAN
  63. ExpEventPairInitialization (
  64. VOID
  65. );
  66. BOOLEAN
  67. ExpMutantInitialization (
  68. VOID
  69. );
  70. BOOLEAN
  71. ExpSemaphoreInitialization (
  72. VOID
  73. );
  74. BOOLEAN
  75. ExpTimerInitialization (
  76. VOID
  77. );
  78. BOOLEAN
  79. ExpWin32Initialization (
  80. VOID
  81. );
  82. BOOLEAN
  83. ExpResourceInitialization (
  84. VOID
  85. );
  86. PVOID
  87. ExpCheckForResource (
  88. IN PVOID p,
  89. IN SIZE_T Size
  90. );
  91. BOOLEAN
  92. ExpInitSystemPhase0 (
  93. VOID
  94. );
  95. BOOLEAN
  96. ExpInitSystemPhase1 (
  97. VOID
  98. );
  99. BOOLEAN
  100. ExpProfileInitialization (
  101. );
  102. BOOLEAN
  103. ExpUuidInitialization (
  104. );
  105. VOID
  106. ExpProfileDelete (
  107. IN PVOID Object
  108. );
  109. BOOLEAN
  110. ExpInitializeCallbacks (
  111. VOID
  112. );
  113. BOOLEAN
  114. ExpSysEventInitialization(
  115. VOID
  116. );
  117. VOID
  118. ExpCheckSystemInfoWork (
  119. IN PVOID Context
  120. );
  121. VOID
  122. ExInitSystemPhase2 (
  123. VOID
  124. );
  125. NTSTATUS
  126. ExpKeyedEventInitialization (
  127. VOID
  128. );
  129. VOID
  130. ExpCheckSystemInformation (
  131. PVOID Context,
  132. PVOID InformationClass,
  133. PVOID Argument2
  134. );
  135. VOID
  136. ExpTimeZoneWork(
  137. IN PVOID Context
  138. );
  139. VOID
  140. ExpTimeRefreshDpcRoutine(
  141. IN PKDPC Dpc,
  142. IN PVOID DeferredContext,
  143. IN PVOID SystemArgument1,
  144. IN PVOID SystemArgument2
  145. );
  146. VOID
  147. ExpTimeRefreshWork(
  148. IN PVOID Context
  149. );
  150. VOID
  151. ExpTimeZoneDpcRoutine(
  152. IN PKDPC Dpc,
  153. IN PVOID DeferredContext,
  154. IN PVOID SystemArgument1,
  155. IN PVOID SystemArgument2
  156. );
  157. VOID
  158. ExInitializeTimeRefresh(
  159. VOID
  160. );
  161. VOID
  162. ExpExpirationThread(
  163. IN PVOID StartContext
  164. );
  165. ULONG
  166. ExpComputeTickCountMultiplier(
  167. IN ULONG TimeIncrement
  168. );
  169. BOOLEAN
  170. static
  171. ExpWatchProductTypeInitialization(
  172. VOID
  173. );
  174. VOID
  175. static
  176. ExpWatchProductTypeWork(
  177. IN PVOID Context
  178. );
  179. VOID
  180. static
  181. ExpWatchLicenseInfoWork(
  182. IN PVOID Context
  183. );
  184. VOID
  185. static
  186. ExpWatchSystemPrefixWork(
  187. IN PVOID Context
  188. );
  189. VOID
  190. static
  191. ExpWatchExpirationDataWork(
  192. IN PVOID Context
  193. );
  194. VOID
  195. ExpCheckForWorker(
  196. IN PVOID p,
  197. IN SIZE_T Size
  198. );
  199. VOID
  200. ExpShutdownWorkerThreads(
  201. VOID
  202. );
  203. NTSTATUS
  204. ExpReadComPlusPackage(
  205. VOID
  206. );
  207. NTSTATUS
  208. ExpUpdateComPlusPackage(
  209. IN ULONG ComPlusPackageStatus
  210. );
  211. #if defined(_WIN64)
  212. NTSTATUS
  213. ExpGetSystemEmulationProcessorInformation (
  214. OUT PSYSTEM_PROCESSOR_INFORMATION ProcessorInformation
  215. );
  216. #endif
  217. ULONG ExpNtExpirationData[3];
  218. BOOLEAN ExpSetupModeDetected;
  219. LARGE_INTEGER ExpSetupSystemPrefix;
  220. HANDLE ExpSetupKey;
  221. BOOLEAN ExpSystemPrefixValid;
  222. #ifdef _PNP_POWER_
  223. extern WORK_QUEUE_ITEM ExpCheckSystemInfoWorkItem;
  224. extern LONG ExpCheckSystemInfoBusy;
  225. extern const WCHAR ExpWstrSystemInformation[];
  226. extern const WCHAR ExpWstrSystemInformationValue[];
  227. #endif // _PNP_POWER_
  228. extern const WCHAR ExpWstrCallback[];
  229. extern const EXP_INITIALIZE_GLOBAL_CALLBACKS ExpInitializeCallback[];
  230. extern FAST_MUTEX ExpEnvironmentLock;
  231. extern ERESOURCE ExpKeyManipLock;
  232. extern GENERAL_LOOKASIDE ExpSmallPagedPoolLookasideLists[POOL_SMALL_LISTS];
  233. extern GENERAL_LOOKASIDE ExpSmallNPagedPoolLookasideLists[POOL_SMALL_LISTS];
  234. extern LIST_ENTRY ExNPagedLookasideListHead;
  235. extern KSPIN_LOCK ExNPagedLookasideLock;
  236. extern LIST_ENTRY ExPagedLookasideListHead;
  237. extern KSPIN_LOCK ExPagedLookasideLock;
  238. extern LIST_ENTRY ExPoolLookasideListHead;
  239. extern PEPROCESS ExpDefaultErrorPortProcess;
  240. extern HANDLE ExpDefaultErrorPort;
  241. extern HANDLE ExpProductTypeKey;
  242. extern PVOID ExpControlKey[2];
  243. #endif // _EXP_