ketypes.inc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {%MainUnit ndk.pas}
  2. {
  3. Native Development Kit for Native NT
  4. This file is part of the Free Pascal run time library.
  5. This unit contains types used by the Kernel.
  6. Copyright (c) 2010 by Sven Barth
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. const
  14. //
  15. // Maximum WOW64 Entries in KUSER_SHARED_DATA
  16. //
  17. MAX_WOW64_SHARED_ENTRIES = 16;
  18. //
  19. // Maximum Processor Features supported in KUSER_SHARED_DATA
  20. //
  21. PROCESSOR_FEATURE_MAX = 64;
  22. type
  23. //
  24. // NT Product and Architecture Types
  25. //
  26. _NT_PRODUCT_TYPE = (
  27. NtProductWinNt = 1,
  28. NtProductLanManNt,
  29. NtProductServer
  30. );
  31. NT_PRODUCT_TYPE = _NT_PRODUCT_TYPE;
  32. PNT_PRODUCT_TYPE = ^NT_PRODUCT_TYPE;
  33. _ALTERNATIVE_ARCHITECTURE_TYPE = (
  34. StandardDesign,
  35. NEC98x86,
  36. EndAlternatives
  37. );
  38. ALTERNATIVE_ARCHITECTURE_TYPE = _ALTERNATIVE_ARCHITECTURE_TYPE;
  39. PALTERNATIVE_ARCHITECTURE_TYPE = ^ALTERNATIVE_ARCHITECTURE_TYPE;
  40. //
  41. // System Time Structure
  42. //
  43. _KSYSTEM_TIME = packed record
  44. LowPart: ULONG;
  45. High1Time: LONG;
  46. High2Time: LONG;
  47. end;
  48. KSYSTEM_TIME = _KSYSTEM_TIME;
  49. PKSYSTEM_TIME = ^KSYSTEM_TIME;
  50. //
  51. // Shared Kernel User Data
  52. //
  53. _KUSER_SHARED_DATA = packed record
  54. TickCountLowDeprecated: ULONG;
  55. TickCountMultiplier: ULONG;
  56. InterruptTime: KSYSTEM_TIME; {volatile}
  57. SystemTime: KSYSTEM_TIME; {volatile}
  58. TimeZoneBias: KSYSTEM_TIME; {volatile }
  59. ImageNumberLow: USHORT;
  60. ImageNumberHigh: USHORT;
  61. NtSystemRoot: array[0..259] of WideChar;
  62. MaxStackTraceDepth: ULONG;
  63. CryptoExponent: ULONg;
  64. TimeZoneId: ULONG;
  65. LargePageMinimum: ULONG;
  66. Reserved2: array[0..6] of ULONG;
  67. NtProductType: NT_PRODUCT_TYPE;
  68. ProductTypeIsValid: BOOLEAN;
  69. NtMajorVersion: ULONG;
  70. NtMinorVersion: ULONG;
  71. ProcessorFeature: array[0..PROCESSOR_FEATURE_MAX - 1] of BOOLEAN;
  72. Reserved1: ULONG;
  73. Reserved3: ULONG;
  74. TimeSlip: ULONG; {volatile}
  75. AlternativeArchitecture: ALTERNATIVE_ARCHITECTURE_TYPE;
  76. SystemExpirationDate: LARGE_INTEGER;
  77. SuiteMask: ULONG;
  78. KdDebuggerEnabled: BOOLEAN;
  79. { from here on the structures differ by 1 Byte depending on the version -.- }
  80. end;
  81. KUSER_SHARED_DATA = _KUSER_SHARED_DATA;
  82. PKUSER_SHARED_DATA = ^KUSER_SHARED_DATA;
  83. //
  84. // Dereferencable pointer to KUSER_SHARED_DATA in User-Mode
  85. //
  86. function SharedUserData: PKUSER_SHARED_DATA; inline; register;