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.

213 lines
6.4 KiB

  1. #ifndef RC_INVOKED
  2. #include <nt.h>
  3. #include <ntrtl.h>
  4. #include <nturtl.h>
  5. #endif
  6. #include <windows.h>
  7. #include <lm.h>
  8. #define SECURITY_WIN32
  9. #include <security.h>
  10. #include <userenv.h>
  11. #include <dsgetdc.h>
  12. #include <tchar.h>
  13. #include <stdio.h>
  14. #include <shlobj.h>
  15. #include <appmgmt.h>
  16. //
  17. // String ids
  18. //
  19. #define IDS_NEWLINE 100
  20. #define IDS_2NEWLINE 101
  21. #define IDS_LEGAL1 102
  22. #define IDS_LEGAL2 103
  23. #define IDS_USAGE1 110
  24. #define IDS_USAGE2 111
  25. #define IDS_USAGE3 112
  26. #define IDS_USAGE4 113
  27. #define IDS_USAGE5 114
  28. #define IDS_USAGE6 115
  29. #define IDS_CREATEINFO 118
  30. #define IDS_OSINFO 120
  31. #define IDS_OS_PRO 121
  32. #define IDS_OS_SRV 122
  33. #define IDS_OS_DC 123
  34. #define IDS_OS_BUILDNUMBER1 124
  35. #define IDS_OS_BUILDNUMBER2 125
  36. #define IDS_TS_REMOTEADMIN 130
  37. #define IDS_TS_APPSERVER 131
  38. #define IDS_TS_NONE 132
  39. #define IDS_TS_NOTSUPPORTED 133
  40. #define IDS_LINE 135
  41. #define IDS_LINE2 136
  42. #define IDS_COMPRESULTS1 137
  43. #define IDS_COMPRESULTS2 138
  44. #define IDS_DOMAINNAME 139
  45. #define IDS_W2KDOMAIN 140
  46. #define IDS_SITENAME 141
  47. #define IDS_LOCALCOMP 142
  48. #define IDS_NT4DOMAIN 143
  49. #define IDS_USERRESULTS1 144
  50. #define IDS_USERRESULTS2 145
  51. #define IDS_LOCALUSER 146
  52. #define IDS_LASTTIME 149
  53. #define IDS_DCNAME 150
  54. #define IDS_COMPREGPOLICY 152
  55. #define IDS_USERREGPOLICY 153
  56. #define IDS_COMPPOLICY 155
  57. #define IDS_USERPOLICY 156
  58. #define IDS_GPONAME 158
  59. #define IDS_SECEDIT 160
  60. #define IDS_NOINFO 161
  61. #define IDS_ROAMINGPROFILE 164
  62. #define IDS_NOROAMINGPROFILE 165
  63. #define IDS_LOCALPROFILE 166
  64. #define IDS_NOLOCALPROFILE 167
  65. #define IDS_SECURITYGROUPS1 170
  66. #define IDS_SECURITYGROUPS2 171
  67. #define IDS_GROUPNAME 172
  68. #define IDS_SECURITYPRIVILEGES 173
  69. #define IDS_REVISIONNUMBER1 175
  70. #define IDS_REVISIONNUMBER2 176
  71. #define IDS_UNIQUENAME 177
  72. #define IDS_DOMAINNAME2 178
  73. #define IDS_LOCALLINK 180
  74. #define IDS_SITELINK 181
  75. #define IDS_DOMAINLINK 182
  76. #define IDS_OULINK 183
  77. #define IDS_UNKNOWNLINK 184
  78. #define IDS_FOLDERREDIR 186
  79. #define IDS_IPSEC_NAME 188
  80. #define IDS_IPSEC_DESC 189
  81. #define IDS_IPSEC_PATH 190
  82. #define IDS_DQ_ENABLED1 195
  83. #define IDS_DQ_ENABLED2 196
  84. #define IDS_DQ_ENFORCED1 197
  85. #define IDS_DQ_ENFORCED2 198
  86. #define IDS_DQ_LIMIT1 199
  87. #define IDS_DQ_LIMIT2 200
  88. #define IDS_DQ_KB 201
  89. #define IDS_DQ_MB 202
  90. #define IDS_DQ_GB 203
  91. #define IDS_DQ_TB 204
  92. #define IDS_DQ_PB 205
  93. #define IDS_DQ_EB 206
  94. #define IDS_DQ_WARNING1 207
  95. #define IDS_DQ_WARNING2 208
  96. #define IDS_DQ_LIMIT_EXCEED1 209
  97. #define IDS_DQ_LIMIT_EXCEED2 210
  98. #define IDS_DQ_LIMIT_EXCEED3 211
  99. #define IDS_DQ_LIMIT_EXCEED4 212
  100. #define IDS_DQ_REMOVABLE1 213
  101. #define IDS_DQ_REMOVABLE2 214
  102. #define IDS_SCRIPTS_TITLE 216
  103. #define IDS_SCRIPTS_ENTRY 217
  104. #define IDS_APPMGMT_TITLE1 218
  105. #define IDS_APPMGMT_TITLE2 219
  106. #define IDS_APPMGMT_NAME 220
  107. #define IDS_APPMGMT_GPONAME 221
  108. #define IDS_APPMGMT_ORPHAN 222
  109. #define IDS_APPMGMT_UNINSTALL 223
  110. #define IDS_APPMGMT_NONE 224
  111. #define IDS_APPMGMT_ARP1 225
  112. #define IDS_APPMGMT_ARP2 226
  113. #define IDS_APPMGMT_TITLE3 227
  114. #define IDS_APPMGMT_STATE1 228
  115. #define IDS_APPMGMT_STATE2 229
  116. #define IDS_REGVIEW_PREF1 235
  117. #define IDS_REGVIEW_PREF2 236
  118. #define IDS_REGVIEW_PREF3 237
  119. #define IDS_REGVIEW_GPONAME 238
  120. #define IDS_REGVIEW_KEYNAME 239
  121. #define IDS_REGVIEW_VALUENAME 240
  122. #define IDS_REGVIEW_DWORD 241
  123. #define IDS_REGVIEW_DWORDDATA 242
  124. #define IDS_REGVIEW_SZ 243
  125. #define IDS_REGVIEW_SZDATA 244
  126. #define IDS_REGVIEW_EXPANDSZ 245
  127. #define IDS_REGVIEW_MULTISZ 246
  128. #define IDS_REGVIEW_MULTIDATA1 247
  129. #define IDS_REGVIEW_MULTIDATA2 248
  130. #define IDS_REGVIEW_BINARY 249
  131. #define IDS_REGVIEW_BINARYDATA1 250
  132. #define IDS_REGVIEW_BINARYFRMT 251
  133. #define IDS_REGVIEW_NEXTLINE 252
  134. #define IDS_REGVIEW_SPACE 253
  135. #define IDS_REGVIEW_STRING1 254
  136. #define IDS_REGVIEW_STRING2 255
  137. #define IDS_REGVIEW_VERBOSE 256
  138. #define IDS_REGVIEW_NONE 257
  139. #define IDS_REGVIEW_NOVALUES 258
  140. #define IDS_REGVIEW_UNKNOWN 259
  141. #define IDS_REGVIEW_UNKNOWNSIZE 260
  142. #define IDS_OPENHISTORYFAILED 1000
  143. #define IDS_QUERYKEYINFOFAILED 1001
  144. #define IDS_OPENPROCESSTOKEN 1002
  145. #define IDS_QUERYSID 1003
  146. #define IDS_QUERYVALUEFAILED 1004
  147. #define IDS_MEMALLOCFAILED 1005
  148. #define IDS_TOKENINFO 1006
  149. #define IDS_LOOKUPACCOUNT 1007
  150. #define IDS_PRIVSIZE 1008
  151. #define IDS_LOOKUPFAILED 1009
  152. #define IDS_GETFOLDERPATH 1010
  153. #define IDS_GETPRIVATEPROFILE 1011
  154. #define IDS_CREATEFILE 1012
  155. #define IDS_INVALIDSIGNATURE1 1013
  156. #define IDS_INVALIDSIGNATURE2 1014
  157. #define IDS_VERSIONNUMBER1 1015
  158. #define IDS_VERSIONNUMBER2 1016
  159. #define IDS_FAILEDFIRSTCHAR 1017
  160. #define IDS_FAILEDKEYNAMECHAR 1018
  161. #define IDS_FAILEDSEMICOLON 1019
  162. #define IDS_FAILEDVALUENAME 1020
  163. #define IDS_FAILEDTYPE 1021
  164. #define IDS_FAILEDDATALENGTH 1022
  165. #define IDS_FAILEDDATA 1023
  166. #define IDS_CLOSINGBRACKET1 1024
  167. #define IDS_CLOSINGBRACKET2 1025
  168. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  169. BOOL DisplayRegistryData (LPTSTR lpRegistry);
  170. LPTSTR GetSidString(HANDLE UserToken);
  171. VOID DeleteSidString(LPTSTR SidString);
  172. PSID GetUserSid (HANDLE UserToken);
  173. VOID DeleteUserSid(PSID Sid);
  174. NTSTATUS AllocateAndInitSidFromString (const WCHAR* lpszSidStr, PSID* ppSid);
  175. NTSTATUS LoadSidAuthFromString (const WCHAR* pString, PSID_IDENTIFIER_AUTHORITY pSidAuth);
  176. NTSTATUS GetIntFromUnicodeString (const WCHAR* szNum, ULONG Base, PULONG pValue);
  177. void PrintString(UINT uiStringId, ...);
  178. extern BOOL g_bVerbose;
  179. extern BOOL g_bSuperVerbose;