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.

244 lines
4.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: globals.hxx
  7. //
  8. // Contents: Externed Global Variables for WinNT
  9. //
  10. // Functions:
  11. //
  12. // History: 25-March-96 KrishnaG Created.
  13. // 13-August-00 AjayR Use Loadlibrary.
  14. //
  15. //----------------------------------------------------------------------------
  16. #include <crypt.h>
  17. #include <des.h>
  18. extern LPWSTR szProviderName;
  19. //
  20. // The following stringizing macro will expand the value of a
  21. // #define passed as a parameter. For example, if SOMEDEF is
  22. // #define'd to be 123, then STRINGIZE(SOMEDEF) will produce
  23. // "123", not "SOMEDEF"
  24. //
  25. #define STRINGIZE(y) _STRINGIZE_helper(y)
  26. #define _STRINGIZE_helper(z) #z
  27. //
  28. // Localized Strings.
  29. //
  30. extern WCHAR g_szBuiltin[];
  31. extern WCHAR g_szNT_Authority[];
  32. extern WCHAR g_szEveryone[];
  33. //
  34. // Dynamically loaded functions and necessary variable for them.
  35. //
  36. extern HANDLE g_hDllNetapi32;
  37. extern HANDLE g_hDllAdvapi32;
  38. extern CRITICAL_SECTION g_csLoadLibs;
  39. #ifdef UNICODE
  40. #define GETDCNAME_API "DsGetDcNameW"
  41. #else
  42. #define GETDCNAME_API "DsGetDcNameA"
  43. #endif
  44. #define CONVERT_STRING_TO_SID_API "ConvertStringSidToSidW"
  45. #define CONVERT_SID_TO_STRING_API "ConvertSidToStringSidW"
  46. PVOID LoadNetApi32Function(CHAR *functionName);
  47. PVOID LoadAdvapi32Function(CHAR *function);
  48. VOID BindToDlls();
  49. typedef BOOL (*PF_ConvertStringSidToSid)(
  50. IN LPCWSTR StringSid,
  51. OUT PSID *Sid
  52. );
  53. BOOL ConvertStringSidToSidWrapper(
  54. IN LPCWSTR StringSid,
  55. OUT PSID *Sid
  56. );
  57. typedef BOOL (*PF_ConvertSidToStringSid)(
  58. IN PSID Sid,
  59. OUT LPWSTR *StringSid
  60. );
  61. BOOL ConvertSidToStringSidWrapper(
  62. IN PSID Sid,
  63. OUT LPWSTR *StringSid
  64. );
  65. typedef NTSTATUS (*FRTLENCRYPTMEMORY) (
  66. PVOID Memory,
  67. ULONG MemoryLength,
  68. ULONG OptionFlags
  69. );
  70. extern FRTLENCRYPTMEMORY g_pRtlEncryptMemory;
  71. typedef NTSTATUS (*FRTLDECRYPTMEMORY) (
  72. PVOID Memory,
  73. ULONG MemoryLength,
  74. ULONG OptionFlags
  75. );
  76. extern FRTLDECRYPTMEMORY g_pRtlDecryptMemory;
  77. //
  78. // Static Representation of the Object Classes
  79. //
  80. // Note: These tables need to be integrated directly with the
  81. // schema global data structures that YihsinS uses for driving the
  82. // schema objects.
  83. //
  84. //
  85. // Printer Class
  86. //
  87. extern PROPERTYINFO PrintQueueClass[];
  88. extern DWORD gdwPrinterTableSize;
  89. //
  90. // Group Class
  91. //
  92. extern PROPERTYINFO GroupClass[];
  93. extern DWORD gdwGroupTableSize;
  94. //
  95. // User Class
  96. //
  97. extern PROPERTYINFO UserClass[];
  98. extern DWORD gdwUserTableSize;
  99. //
  100. // Domain Class
  101. //
  102. extern PROPERTYINFO DomainClass[];
  103. extern DWORD gdwDomainTableSize;
  104. //
  105. // Job Class
  106. //
  107. extern PROPERTYINFO PrintJobClass[];
  108. extern DWORD gdwJobTableSize;
  109. //
  110. // Service Class
  111. //
  112. extern PROPERTYINFO ServiceClass[];
  113. extern DWORD gdwServiceTableSize;
  114. //
  115. // FileService Class
  116. //
  117. extern PROPERTYINFO FileServiceClass[];
  118. extern DWORD gdwFileServiceTableSize;
  119. //
  120. // Session Class
  121. //
  122. extern PROPERTYINFO SessionClass[];
  123. extern DWORD gdwSessionTableSize;
  124. //
  125. // File Share Class
  126. //
  127. extern PROPERTYINFO FileShareClass[];
  128. extern DWORD gdwFileShareTableSize;
  129. //
  130. // Resource Class
  131. //
  132. extern PROPERTYINFO ResourceClass[];
  133. extern DWORD gdwResourceTableSize;
  134. //
  135. // FPNW FileService Class
  136. //
  137. extern PROPERTYINFO FPNWFileServiceClass[];
  138. extern DWORD gdwFPNWFileServiceTableSize;
  139. //
  140. // Session Class
  141. //
  142. extern PROPERTYINFO FPNWSessionClass[];
  143. extern DWORD gdwFPNWSessionTableSize;
  144. //
  145. // File Share Class
  146. //
  147. extern PROPERTYINFO FPNWFileShareClass[];
  148. extern DWORD gdwFPNWFileShareTableSize;
  149. //
  150. // Resource Class
  151. //
  152. extern PROPERTYINFO FPNWResourceClass[];
  153. extern DWORD gdwFPNWResourceTableSize;
  154. //
  155. // Computer Class
  156. //
  157. extern PROPERTYINFO ComputerClass[];
  158. extern DWORD gdwComputerTableSize;
  159. //
  160. // Add new classes here
  161. //
  162. extern CObjNameCache * pgPDCNameCache;
  163. //
  164. // Global Property List
  165. //
  166. extern PROPERTYINFO g_aWinNTProperties[];
  167. extern DWORD g_cWinNTProperties;