Professional Documents
Culture Documents
Winnt H
Winnt H
Winnt H
2 #define _WINNT_H
3 #if __GNUC__ >= 3
4 #pragma GCC system_header
5 #endif
6
7 /* translate GCC target defines to MS equivalents. Keep this synchronized
8 with windows.h. */
9 #if defined(__i686__) && !defined(_M_IX86)
10 #define _M_IX86 600
11 #elif defined(__i586__) && !defined(_M_IX86)
12 #define _M_IX86 500
13 #elif defined(__i486__) && !defined(_M_IX86)
14 #define _M_IX86 400
15 #elif defined(__i386__) && !defined(_M_IX86)
16 #define _M_IX86 300
17 #endif
18 #if defined(_M_IX86) && !defined(_X86_)
19 #define _X86_
20 #elif defined(_M_ALPHA) && !defined(_ALPHA_)
21 #define _ALPHA_
22 #elif defined(_M_PPC) && !defined(_PPC_)
23 #define _PPC_
24 #elif defined(_M_MRX000) && !defined(_MIPS_)
25 #define _MIPS_
26 #elif defined(_M_M68K) && !defined(_68K_)
27 #define _68K_
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <winerror.h>
35
36 #ifndef RC_INVOKED
37 #include <string.h>
38
39 /* FIXME: add more architectures. Is there a way to specify this in GCC? */
40 #ifdef _X86_
41 #define UNALIGNED
42 #else
43 #define UNALIGNED
44 #endif
45
46 #ifndef DECLSPEC_ALIGN
47 #ifdef __GNUC__
48 #define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
49 #else
50 #define DECLSPEC_ALIGN(x)
51 #endif
52 #endif
53
54 #ifndef DECLSPEC_SELECTANY
55 #if (__GNUC__ >= 4)
56 #define DECLSPEC_SELECTANY __attribute__((selectany))
57 #else
58 #define DECLSPEC_SELECTANY
59 #endif
60 #endif
61
62 #ifndef FORCEINLINE
63 #if (__GNUC__ >= 3)
64 #define FORCEINLINE __inline __attribute__((always_inline))
65 #else
66 #define FORCEINLINE __inline
67 #endif
68 #endif
69
70 #ifndef C_ASSERT
71 #define C_ASSERT(expr) typedef char __C_ASSERT__[(expr)?1:-1]
72 #endif
73
74 #ifndef VOID
75 #define VOID void
76 #endif
77 typedef char CHAR;
78 typedef short SHORT;
79 typedef long LONG;
80 typedef char CCHAR, *PCCHAR;
81 typedef unsigned char UCHAR,*PUCHAR;
82 typedef unsigned short USHORT,*PUSHORT;
83 typedef unsigned long ULONG,*PULONG;
84 typedef char *PSZ;
85
86 typedef void *PVOID,*LPVOID;
87
88 /* FIXME for __WIN64 */
89 #ifndef __ptr64
90 #define __ptr64
91 #endif
92 typedef void* __ptr64 PVOID64;
93
94 #ifndef _WCHAR_T_DEFINED
95 #define _WCHAR_T_DEFINED
96 #ifndef _WCHAR_T_
97 #define _WCHAR_T_
98 #undef __need_wchar_t
99 #ifndef __cplusplus
100 typedef unsigned short wchar_t;
101 #endif
102 #endif
103 #endif
104
105 typedef wchar_t WCHAR;
106 typedef WCHAR *PWCHAR,*LPWCH,*PWCH,*NWPSTR,*LPWSTR,*PWSTR;
107 typedef CONST WCHAR *LPCWCH,*PCWCH,*LPCWSTR,*PCWSTR;
108 typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR;
109 typedef CONST CHAR *LPCCH,*PCSTR,*LPCSTR;
110 #ifndef _TCHAR_DEFINED
111 #define _TCHAR_DEFINED
112 #ifdef UNICODE
113 /*
114 * NOTE: This tests UNICODE, which is different from the _UNICODE define
115 * used to differentiate standard C runtime calls.
116 */
117 typedef WCHAR TCHAR;
118 typedef WCHAR _TCHAR;
119 #else
120 typedef CHAR TCHAR;
121 typedef CHAR _TCHAR;
122 #endif
123 #endif
124 typedef TCHAR TBYTE,*PTCH,*PTBYTE;
125 typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
126 typedef const TCHAR *LPCTSTR;
127 #ifdef UNICODE
128 /*
129 * __TEXT is a private macro whose specific use is to force the expansion
of a
130 * macro passed as an argument to the macro TEXT. DO NOT use this
131 * macro within your programs. It's name and function could change without
132 * notice.
133 */
134 #define __TEXT(q) L##q
135 #else
136 #define __TEXT(q) q
137 #endif
138 /*
139 * UNICODE a constant string when UNICODE is defined, else returns the
string
140 * unmodified.
141 * The corresponding macros _TEXT() and _T() for mapping _UNICODE strings
142 * passed to C runtime functions are defined in mingw/tchar.h
143 */
144 #define TEXT(q) __TEXT(q)
145 typedef SHORT *PSHORT;
146 typedef LONG *PLONG;
147 #ifdef STRICT
148 typedef void *HANDLE;
149 #define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n
150 #else
151 typedef PVOID HANDLE;
152 #define DECLARE_HANDLE(n) typedef HANDLE n
153 #endif
154 typedef HANDLE *PHANDLE,*LPHANDLE;
155 typedef DWORD LCID;
156 typedef PDWORD PLCID;
157 typedef WORD LANGID;
158 #ifdef __GNUC__
159 #define _HAVE_INT64
160 #define _INTEGRAL_MAX_BITS 64
161 #undef __int64
162 #define __int64 long long
163 #elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) &&
_INTEGRAL_MAX_BITS >= 64 )
164 #define _HAVE_INT64
165 #endif /* __GNUC__/__WATCOMC */
166 #if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) &&
_INTEGRAL_MAX_BITS >= 64)
167 typedef __int64 LONGLONG;
168 typedef unsigned __int64 DWORDLONG;
169 #else
170 typedef double LONGLONG,DWORDLONG;
171 #endif
172 typedef LONGLONG *PLONGLONG;
173 typedef DWORDLONG *PDWORDLONG;
174 typedef DWORDLONG ULONGLONG,*PULONGLONG;
175 typedef LONGLONG USN;
176 #ifdef _HAVE_INT64
177 #define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
178 #define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
179 #define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
180 #define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
181 #define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
182 #endif
183 #define ANSI_NULL '\0'
184 #define UNICODE_NULL L'\0'
185 typedef BYTE BOOLEAN,*PBOOLEAN;
186 #endif
187 typedef BYTE FCHAR;
188 typedef WORD FSHORT;
189 typedef DWORD FLONG;
190
191 #define NTAPI __stdcall
192 #include <basetsd.h>
193 #define ACE_OBJECT_TYPE_PRESENT 0x00000001
194 #define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002
195 #define APPLICATION_ERROR_MASK 0x20000000
196 #define ERROR_SEVERITY_SUCCESS 0x00000000
197 #define ERROR_SEVERITY_INFORMATIONAL 0x40000000
198 #define ERROR_SEVERITY_WARNING 0x80000000
199 #define ERROR_SEVERITY_ERROR 0xC0000000
200 /* also in ddk/ntifs.h */
201 #define COMPRESSION_FORMAT_NONE (0x0000)
202 #define COMPRESSION_FORMAT_DEFAULT (0x0001)
203 #define COMPRESSION_FORMAT_LZNT1 (0x0002)
204 #define COMPRESSION_ENGINE_STANDARD (0x0000)
205 #define COMPRESSION_ENGINE_MAXIMUM (0x0100)
206 #define COMPRESSION_ENGINE_HIBER (0x0200)
207 #define ACCESS_ALLOWED_ACE_TYPE (0x0)
208 #define ACCESS_DENIED_ACE_TYPE (0x1)
209 #define SYSTEM_AUDIT_ACE_TYPE (0x2)
210 #define SYSTEM_ALARM_ACE_TYPE (0x3)
211 /*end ntifs.h */
212 #define ANYSIZE_ARRAY 1
213 #define OBJECT_INHERIT_ACE 1
214 #define CONTAINER_INHERIT_ACE 2
215 #define NO_PROPAGATE_INHERIT_ACE 4
216 #define INHERIT_ONLY_ACE 8
217 #define INHERITED_ACE 16
218 #define VALID_INHERIT_FLAGS \
219 | OBJECT_INHERIT_ACE \
220 | CONTAINER_INHERIT_ACE \
221 | NO_PROPAGATE_INHERIT_ACE \
222 | INHERIT_ONLY_ACE \
223 | INHERITED_ACE
224 #define SUCCESSFUL_ACCESS_ACE_FLAG 64
225 #define FAILED_ACCESS_ACE_FLAG 128
226 #define DELETE 0x00010000L
227 #define READ_CONTROL 0x20000L
228 #define WRITE_DAC 0x40000L
229 #define WRITE_OWNER 0x80000L
230 #define SYNCHRONIZE 0x100000L
231 #define STANDARD_RIGHTS_REQUIRED 0xF0000
232 #define STANDARD_RIGHTS_READ 0x20000
233 #define STANDARD_RIGHTS_WRITE 0x20000
234 #define STANDARD_RIGHTS_EXECUTE 0x20000
235 #define STANDARD_RIGHTS_ALL 0x1F0000
236 #define SPECIFIC_RIGHTS_ALL 0xFFFF
237 #define ACCESS_SYSTEM_SECURITY 0x1000000
238
239 #define MAXIMUM_ALLOWED 0x2000000
240 #define GENERIC_READ 0x80000000
241 #define GENERIC_WRITE 0x40000000
242 #define GENERIC_EXECUTE 0x20000000
243 #define GENERIC_ALL 0x10000000
244
245 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
246
247 /* Also in ddk/winddk.h */
248 #define FILE_LIST_DIRECTORY 0x00000001
249 #define FILE_READ_DATA 0x00000001
250 #define FILE_ADD_FILE 0x00000002
251 #define FILE_WRITE_DATA 0x00000002
252 #define FILE_ADD_SUBDIRECTORY 0x00000004
253 #define FILE_APPEND_DATA 0x00000004
254 #define FILE_CREATE_PIPE_INSTANCE 0x00000004
255 #define FILE_READ_EA 0x00000008
256 #define FILE_READ_PROPERTIES 0x00000008
257 #define FILE_WRITE_EA 0x00000010
258 #define FILE_WRITE_PROPERTIES 0x00000010
259 #define FILE_EXECUTE 0x00000020
260 #define FILE_TRAVERSE 0x00000020
261 #define FILE_DELETE_CHILD 0x00000040
262 #define FILE_READ_ATTRIBUTES 0x00000080
263 #define FILE_WRITE_ATTRIBUTES 0x00000100
264
265 #define FILE_SHARE_READ 0x00000001
266 #define FILE_SHARE_WRITE 0x00000002
267 #define FILE_SHARE_DELETE 0x00000004
268 #define FILE_SHARE_VALID_FLAGS 0x00000007
269
270 #define FILE_ATTRIBUTE_READONLY 0x00000001
271 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
272 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
273 #define FILE_ATTRIBUTE_DIRECTORY 0x00000010
274 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020
275 #define FILE_ATTRIBUTE_DEVICE 0x00000040
276 #define FILE_ATTRIBUTE_NORMAL 0x00000080
277 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100
278 #define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
279 #define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
280 #define FILE_ATTRIBUTE_COMPRESSED 0x00000800
281 #define FILE_ATTRIBUTE_OFFLINE 0x00001000
282 #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
283 #define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
284 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
285 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
286
287 #define FILE_COPY_STRUCTURED_STORAGE 0x00000041
288 #define FILE_STRUCTURED_STORAGE 0x00000441
289
290 #define FILE_VALID_OPTION_FLAGS 0x00ffffff
291 #define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032
292 #define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032
293 #define FILE_VALID_SET_FLAGS 0x00000036
294
295 #define FILE_SUPERSEDE 0x00000000
296 #define FILE_OPEN 0x00000001
297 #define FILE_CREATE 0x00000002
298 #define FILE_OPEN_IF 0x00000003
299 #define FILE_OVERWRITE 0x00000004
300 #define FILE_OVERWRITE_IF 0x00000005
301 #define FILE_MAXIMUM_DISPOSITION 0x00000005
302
303 #define FILE_DIRECTORY_FILE 0x00000001
304 #define FILE_WRITE_THROUGH 0x00000002
305 #define FILE_SEQUENTIAL_ONLY 0x00000004
306 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
307 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
308 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
309 #define FILE_NON_DIRECTORY_FILE 0x00000040
310 #define FILE_CREATE_TREE_CONNECTION 0x00000080
311 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100
312 #define FILE_NO_EA_KNOWLEDGE 0x00000200
313 #define FILE_OPEN_FOR_RECOVERY 0x00000400
314 #define FILE_RANDOM_ACCESS 0x00000800
315 #define FILE_DELETE_ON_CLOSE 0x00001000
316 #define FILE_OPEN_BY_FILE_ID 0x00002000
317 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
318 #define FILE_NO_COMPRESSION 0x00008000
319 #define FILE_RESERVE_OPFILTER 0x00100000
320 #define FILE_OPEN_REPARSE_POINT 0x00200000
321 #define FILE_OPEN_NO_RECALL 0x00400000
322 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
323
324 #define FILE_ALL_ACCESS \
325 (STANDARD_RIGHTS_REQUIRED | \
326 SYNCHRONIZE | \
327 0x1FF)
328
329 #define FILE_GENERIC_EXECUTE \
330 (STANDARD_RIGHTS_EXECUTE | \
331 FILE_READ_ATTRIBUTES | \
332 FILE_EXECUTE | \
333 SYNCHRONIZE)
334
335 #define FILE_GENERIC_READ \
336 (STANDARD_RIGHTS_READ | \
337 FILE_READ_DATA | \
338 FILE_READ_ATTRIBUTES | \
339 FILE_READ_EA | \
340 SYNCHRONIZE)
341
342 #define FILE_GENERIC_WRITE \
343 (STANDARD_RIGHTS_WRITE | \
344 FILE_WRITE_DATA | \
345 FILE_WRITE_ATTRIBUTES | \
346 FILE_WRITE_EA | \
347 FILE_APPEND_DATA | \
348 SYNCHRONIZE)
349 /* end winddk.h */
350 /* also in ddk/ntifs.h */
351 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
352 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
353 #define FILE_NOTIFY_CHANGE_NAME 0x00000003
354 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
355 #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
356 #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
357 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
358 #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
359 #define FILE_NOTIFY_CHANGE_EA 0x00000080
360 #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
361 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
362 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
363 #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
364 #define FILE_NOTIFY_VALID_MASK 0x00000fff
365
366 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
367 #define FILE_CASE_PRESERVED_NAMES 0x00000002
368 #define FILE_UNICODE_ON_DISK 0x00000004
369 #define FILE_PERSISTENT_ACLS 0x00000008
370 #define FILE_FILE_COMPRESSION 0x00000010
371 #define FILE_VOLUME_QUOTAS 0x00000020
372 #define FILE_SUPPORTS_SPARSE_FILES 0x00000040
373 #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
374 #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
375 #define FS_LFN_APIS 0x00004000
376 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
377 #define FILE_SUPPORTS_OBJECT_IDS 0x00010000
378 #define FILE_SUPPORTS_ENCRYPTION 0x00020000
379 #define FILE_NAMED_STREAMS 0x00040000
380 #define FILE_READ_ONLY_VOLUME 0x00080000
381 #define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
382 #define FILE_SUPPORTS_TRANSACTIONS 0x00200000
383
384
385 #define IO_COMPLETION_QUERY_STATE 0x0001
386 #define IO_COMPLETION_MODIFY_STATE 0x0002
387 #define IO_COMPLETION_ALL_ACCESS
(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
388 /* end ntifs.h */
389
390 /* also in ddk/winddk.h */
391 #define DUPLICATE_CLOSE_SOURCE 0x00000001
392 #define DUPLICATE_SAME_ACCESS 0x00000002
393 #define DUPLICATE_SAME_ATTRIBUTES 0x00000004
394 /* end winddk.k */
395
396 #define MAILSLOT_NO_MESSAGE ((DWORD)-1)
397 #define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
398 #define PROCESS_TERMINATE 1
399 #define PROCESS_CREATE_THREAD 2
400 #define PROCESS_SET_SESSIONID 4
401 #define PROCESS_VM_OPERATION 8
402 #define PROCESS_VM_READ 16
403 #define PROCESS_VM_WRITE 32
404 #define PROCESS_DUP_HANDLE 64
405 #define PROCESS_CREATE_PROCESS 128
406 #define PROCESS_SET_QUOTA 256
407 #define PROCESS_SET_INFORMATION 512
408 #define PROCESS_QUERY_INFORMATION 1024
409 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
410 #define THREAD_TERMINATE 1
411 #define THREAD_SUSPEND_RESUME 2
412 #define THREAD_GET_CONTEXT 8
413 #define THREAD_SET_CONTEXT 16
414 #define THREAD_SET_INFORMATION 32
415 #define THREAD_QUERY_INFORMATION 64
416 #define THREAD_SET_THREAD_TOKEN 128
417 #define THREAD_IMPERSONATE 256
418 #define THREAD_DIRECT_IMPERSONATION 0x200
419 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
420 #define THREAD_BASE_PRIORITY_LOWRT 15
421 #define THREAD_BASE_PRIORITY_MAX 2
422 #define THREAD_BASE_PRIORITY_MIN (-2)
423 #define THREAD_BASE_PRIORITY_IDLE (-15)
424 #define EXCEPTION_NONCONTINUABLE 1
425 #define EXCEPTION_MAXIMUM_PARAMETERS 15
426 #define MUTANT_QUERY_STATE 0x0001
427 #define MUTANT_ALL_ACCESS
(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
428 #define TIMER_QUERY_STATE 0x0001
429 #define TIMER_MODIFY_STATE 0x0002
430 #define TIMER_ALL_ACCESS
(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE)
431 /*
432 * To prevent gcc compiler warnings, bracket these defines when
initialising
433 * a SID_IDENTIFIER_AUTHORITY, eg.
434 * SID_IDENTIFIER_AUTHORITY aNullSidAuthority =
{SECURITY_NULL_SID_AUTHORITY};
435 */
436 #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
437 #define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
438 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
439 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
440 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
441 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
442 #define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16}
443 #define SECURITY_NULL_RID 0
444 #define SECURITY_WORLD_RID (0x00000000L)
445 #define SECURITY_LOCAL_RID 0
446 #define SECURITY_CREATOR_OWNER_RID 0
447 #define SECURITY_CREATOR_GROUP_RID 1
448 #define SECURITY_DIALUP_RID 1
449 #define SECURITY_NETWORK_RID 2
450 #define SECURITY_BATCH_RID 3
451 #define SECURITY_INTERACTIVE_RID 4
452 #define SECURITY_LOGON_IDS_RID 5
453 #define SECURITY_SERVICE_RID 6
454 #define SECURITY_LOCAL_SYSTEM_RID 18
455 #define SECURITY_BUILTIN_DOMAIN_RID 32
456 #define SECURITY_PRINCIPAL_SELF_RID 10
457 #define SECURITY_CREATOR_OWNER_SERVER_RID 0x2
458 #define SECURITY_CREATOR_GROUP_SERVER_RID 0x3
459 #define SECURITY_LOGON_IDS_RID_COUNT 0x3
460 #define SECURITY_ANONYMOUS_LOGON_RID 0x7
461 #define SECURITY_PROXY_RID 0x8
462 #define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x9
463 #define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
464 #define SECURITY_AUTHENTICATED_USER_RID 0xB
465 #define SECURITY_RESTRICTED_CODE_RID 0xC
466 #define SECURITY_NT_NON_UNIQUE_RID 0x15
467 #define SID_REVISION 1
468 #define DOMAIN_USER_RID_ADMIN 0x1F4L
469 #define DOMAIN_USER_RID_GUEST 0x1F5L
470 #define DOMAIN_GROUP_RID_ADMINS 0x200L
471 #define DOMAIN_GROUP_RID_USERS 0x201L
472 #define DOMAIN_ALIAS_RID_ADMINS 0x220L
473 #define DOMAIN_ALIAS_RID_USERS 0x221L
474 #define DOMAIN_ALIAS_RID_GUESTS 0x222L
475 #define DOMAIN_ALIAS_RID_POWER_USERS 0x223L
476 #define DOMAIN_ALIAS_RID_ACCOUNT_OPS 0x224L
477 #define DOMAIN_ALIAS_RID_SYSTEM_OPS 0x225L
478 #define DOMAIN_ALIAS_RID_PRINT_OPS 0x226L
479 #define DOMAIN_ALIAS_RID_BACKUP_OPS 0x227L
480 #define DOMAIN_ALIAS_RID_REPLICATOR 0x228L
481 #define SECURITY_MANDATORY_UNTRUSTED_RID 0
482 #define SECURITY_MANDATORY_LOW_RID 0x1000
483 #define SECURITY_MANDATORY_MEDIUM_RID 0x2000
484 #define SECURITY_MANDATORY_HIGH_RID 0x3000
485 #define SECURITY_MANDATORY_SYSTEM_RID 0x4000
486 #define SECURITY_MANDATORY_PROTECTED_PROCESS_RID 0x5000
487 #define SECURITY_MANDATORY_MAXIMUM_USER_RID SECURITY_MANDATORY_SYSTEM_RID
488 #define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
489 #define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
490 #define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
491 #define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
492 #define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
493 #define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
494 #define SE_TCB_NAME TEXT("SeTcbPrivilege")
495 #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
496 #define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
497 #define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
498 #define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
499 #define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
500 #define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
501 #define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
502 #define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
503 #define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
504 #define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
505 #define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
506 #define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
507 #define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
508 #define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
509 #define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
510 #define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
511 #define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
512 #define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege")
513 #define SE_UNDOCK_NAME TEXT("SeUndockPrivilege")
514 #define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege")
515 #define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege")
516 #define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege")
517 #define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege")
518 #define SE_TRUSTED_CREDMAN_ACCESS_NAME
TEXT("SeTrustedCredManAccessPrivilege")
519 #define SE_RELABEL_NAME TEXT("SeRelabelPrivilege")
520 #define SE_INCREASE_WORKING_SET_NAME TEXT("SeIncreaseWorkingSetPrivilege")
521 #define SE_TIME_ZONE_NAME TEXT("SeTimeZonePrivilege")
522 #define SE_CREATE_SYMBOLIC_LINK_NAME TEXT("SeCreateSymbolicLinkPrivilege")
523 #define SE_GROUP_MANDATORY 1
524 #define SE_GROUP_ENABLED_BY_DEFAULT 2
525 #define SE_GROUP_ENABLED 4
526 #define SE_GROUP_OWNER 8
527 #define SE_GROUP_USE_FOR_DENY_ONLY 16
528 #define SE_GROUP_INTEGRITY 32
529 #define SE_GROUP_INTEGRITY_ENABLED 64
530 #define SE_GROUP_LOGON_ID 3221225472U
531 #define SE_GROUP_RESOURCE 536870912
532 #define LANG_NEUTRAL 0x00
533 #define LANG_ARABIC 0x01
534 #define LANG_BULGARIAN 0x02
535 #define LANG_CATALAN 0x03
536 #define LANG_CHINESE 0x04
537 #define LANG_CZECH 0x05
538 #define LANG_DANISH 0x06
539 #define LANG_GERMAN 0x07
540 #define LANG_GREEK 0x08
541 #define LANG_ENGLISH 0x09
542 #define LANG_SPANISH 0x0a
543 #define LANG_FINNISH 0x0b
544 #define LANG_FRENCH 0x0c
545 #define LANG_HEBREW 0x0d
546 #define LANG_HUNGARIAN 0x0e
547 #define LANG_ICELANDIC 0x0f
548 #define LANG_ITALIAN 0x10
549 #define LANG_JAPANESE 0x11
550 #define LANG_KOREAN 0x12
551 #define LANG_DUTCH 0x13
552 #define LANG_NORWEGIAN 0x14
553 #define LANG_POLISH 0x15
554 #define LANG_PORTUGUESE 0x16
555 #define LANG_ROMANIAN 0x18
556 #define LANG_RUSSIAN 0x19
557 #define LANG_CROATIAN 0x1a
558 #define LANG_SERBIAN 0x1a
559 #define LANG_SERBIAN_NEUTRAL 0x7c1a
560 #define LANG_BOSNIAN 0x1a
561 #define LANG_BOSNIAN_NEUTRAL 0x781a
562 #define LANG_SLOVAK 0x1b
563 #define LANG_ALBANIAN 0x1c
564 #define LANG_SWEDISH 0x1d
565 #define LANG_THAI 0x1e
566 #define LANG_TURKISH 0x1f
567 #define LANG_URDU 0x20
568 #define LANG_INDONESIAN 0x21
569 #define LANG_UKRAINIAN 0x22
570 #define LANG_BELARUSIAN 0x23
571 #define LANG_SLOVENIAN 0x24
572 #define LANG_ESTONIAN 0x25
573 #define LANG_LATVIAN 0x26
574 #define LANG_LITHUANIAN 0x27
575 #define LANG_PERSIAN 0x29
576 #define LANG_FARSI LANG_PERSIAN
577 #define LANG_VIETNAMESE 0x2a
578 #define LANG_ARMENIAN 0x2b
579 #define LANG_AZERI 0x2c
580 #define LANG_BASQUE 0x2d
581 #define LANG_LOWER_SORBIAN 0x2e
582 #define LANG_UPPER_SORBIAN 0x2e
583 #define LANG_MACEDONIAN 0x2f
584 #define LANG_TSWANA 0x32
585 #define LANG_XHOSA 0x34
586 #define LANG_ZULU 0x35
587 #define LANG_AFRIKAANS 0x36
588 #define LANG_GEORGIAN 0x37
589 #define LANG_FAEROESE 0x38
590 #define LANG_HINDI 0x39
591 #define LANG_MALTESE 0x3a
592 #define LANG_SAMI 0x3b
593 #define LANG_IRISH 0x3c
594 #define LANG_MALAY 0x3e
595 #define LANG_KAZAK 0x3f
596 #define LANG_KYRGYZ 0x40
597 #define LANG_SWAHILI 0x41
598 #define LANG_UZBEK 0x43
599 #define LANG_TATAR 0x44
600 #define LANG_BENGALI 0x45
601 #define LANG_PUNJABI 0x46
602 #define LANG_GUJARATI 0x47
603 #define LANG_ORIYA 0x48
604 #define LANG_TAMIL 0x49
605 #define LANG_TELUGU 0x4a
606 #define LANG_KANNADA 0x4b
607 #define LANG_MALAYALAM 0x4c
608 #define LANG_ASSAMESE 0x4d
609 #define LANG_MARATHI 0x4e
610 #define LANG_SANSKRIT 0x4f
611 #define LANG_MONGOLIAN 0x50
612 #define LANG_TIBETAN 0x51
613 #define LANG_WELSH 0x52
614 #define LANG_KHMER 0x53
615 #define LANG_LAO 0x54
616 #define LANG_GALICIAN 0x56
617 #define LANG_KONKANI 0x57
618 #define LANG_MANIPURI 0x58
619 #define LANG_SINDHI 0x59
620 #define LANG_SYRIAC 0x5a
621 #define LANG_SINHALESE 0x5b
622 #define LANG_INUKTITUT 0x5d
623 #define LANG_AMHARIC 0x5e
624 #define LANG_TAMAZIGHT 0x5f
625 #define LANG_KASHMIRI 0x60
626 #define LANG_NEPALI 0x61
627 #define LANG_FRISIAN 0x62
628 #define LANG_PASHTO 0x63
629 #define LANG_FILIPINO 0x64
630 #define LANG_DIVEHI 0x65
631 #define LANG_HAUSA 0x68
632 #define LANG_YORUBA 0x6a
633 #define LANG_QUECHUA 0x6b
634 #define LANG_SOTHO 0x6c
635 #define LANG_BASHKIR 0x6d
636 #define LANG_LUXEMBOURGISH 0x6e
637 #define LANG_GREENLANDIC 0x6f
638 #define LANG_IGBO 0x70
639 #define LANG_TIGRIGNA 0x73
640 #define LANG_YI 0x78
641 #define LANG_MAPUDUNGUN 0x7a
642 #define LANG_MOHAWK 0x7c
643 #define LANG_BRETON 0x7e
644 #define LANG_INVARIANT 0x7f
645 #define LANG_UIGHUR 0x80
646 #define LANG_MAORI 0x81
647 #define LANG_OCCITAN 0x82
648 #define LANG_CORSICAN 0x83
649 #define LANG_ALSATIAN 0x84
650 #define LANG_YAKUT 0x85
651 #define LANG_KICHE 0x86
652 #define LANG_KINYARWANDA 0x87
653 #define LANG_WOLOF 0x88
654 #define LANG_DARI 0x8c
655 #define LANG_MALAGASY 0x8d
656 #define SUBLANG_NEUTRAL 0x00
657 #define SUBLANG_DEFAULT 0x01
658 #define SUBLANG_SYS_DEFAULT 0x02
659 #define SUBLANG_CUSTOM_DEFAULT 0x03
660 #define SUBLANG_CUSTOM_UNSPECIFIED 0x04
661 #define SUBLANG_UI_CUSTOM_DEFAULT 0x03
662 #define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
663 #define SUBLANG_ALBANIAN_ALBANIA 0x01
664 #define SUBLANG_ALSATIAN_FRANCE 0x01
665 #define SUBLANG_AMHARIC_ETHIOPIA 0x01
666 #define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
667 #define SUBLANG_ARABIC_IRAQ 0x02
668 #define SUBLANG_ARABIC_EGYPT 0x03
669 #define SUBLANG_ARABIC_LIBYA 0x04
670 #define SUBLANG_ARABIC_ALGERIA 0x05
671 #define SUBLANG_ARABIC_MOROCCO 0x06
672 #define SUBLANG_ARABIC_TUNISIA 0x07
673 #define SUBLANG_ARABIC_OMAN 0x08
674 #define SUBLANG_ARABIC_YEMEN 0x09
675 #define SUBLANG_ARABIC_SYRIA 0x0a
676 #define SUBLANG_ARABIC_JORDAN 0x0b
677 #define SUBLANG_ARABIC_LEBANON 0x0c
678 #define SUBLANG_ARABIC_KUWAIT 0x0d
679 #define SUBLANG_ARABIC_UAE 0x0e
680 #define SUBLANG_ARABIC_BAHRAIN 0x0f
681 #define SUBLANG_ARABIC_QATAR 0x10
682 #define SUBLANG_ARMENIAN_ARMENIA 0x01
683 #define SUBLANG_ASSAMESE_INDIA 0x01
684 #define SUBLANG_AZERI_LATIN 0x01
685 #define SUBLANG_AZERI_CYRILLIC 0x02
686 #define SUBLANG_BASHKIR_RUSSIA 0x01
687 #define SUBLANG_BASQUE_BASQUE 0x01
688 #define SUBLANG_BELARUSIAN_BELARUS 0x01
689 #define SUBLANG_BENGALI_INDIA 0x00
690 #define SUBLANG_BENGALI_BANGLADESH 0x01
691 #define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
692 #define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
693 #define SUBLANG_BRETON_FRANCE 0x01
694 #define SUBLANG_BULGARIAN_BULGARIA 0x01
695 #define SUBLANG_CATALAN_CATALAN 0x01
696 #define SUBLANG_CHINESE_TRADITIONAL 0x01
697 #define SUBLANG_CHINESE_SIMPLIFIED 0x02
698 #define SUBLANG_CHINESE_HONGKONG 0x03
699 #define SUBLANG_CHINESE_SINGAPORE 0x04
700 #define SUBLANG_CHINESE_MACAU 0x05
701 #define SUBLANG_CORSICAN_FRANCE 0x01
702 #define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
703 #define SUBLANG_CROATIAN_CROATIA 0x01
704 #define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
705 #define SUBLANG_DANISH_DENMARK 0x01
706 #define SUBLANG_DIVEHI_MALDIVES 0x01
707 #define SUBLANG_DUTCH 0x01
708 #define SUBLANG_DUTCH_BELGIAN 0x02
709 #define SUBLANG_ENGLISH_US 0x01
710 #define SUBLANG_ENGLISH_UK 0x02
711 #define SUBLANG_ENGLISH_AUS 0x03
712 #define SUBLANG_ENGLISH_CAN 0x04
713 #define SUBLANG_ENGLISH_NZ 0x05
714 #if (WINVER >= 0x0600)
715 #define SUBLANG_ENGLISH_IRELAND 0x06
716 #endif
717 #define SUBLANG_ENGLISH_EIRE 0x06
718 #define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
719 #define SUBLANG_ENGLISH_JAMAICA 0x08
720 #define SUBLANG_ENGLISH_CARIBBEAN 0x09
721 #define SUBLANG_ENGLISH_BELIZE 0x0a
722 #define SUBLANG_ENGLISH_TRINIDAD 0x0b
723 #define SUBLANG_ENGLISH_ZIMBABWE 0x0c
724 #define SUBLANG_ENGLISH_PHILIPPINES 0x0d
725 #define SUBLANG_ENGLISH_INDIA 0x10
726 #define SUBLANG_ENGLISH_MALAYSIA 0x11
727 #define SUBLANG_ENGLISH_SINGAPORE 0x12
728 #define SUBLANG_ESTONIAN_ESTONIA 0x01
729 #define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
730 #define SUBLANG_FILIPINO_PHILIPPINES 0x01
731 #define SUBLANG_FINNISH_FINLAND 0x01
732 #define SUBLANG_FRENCH 0x01
733 #define SUBLANG_FRENCH_BELGIAN 0x02
734 #define SUBLANG_FRENCH_CANADIAN 0x03
735 #define SUBLANG_FRENCH_SWISS 0x04
736 #define SUBLANG_FRENCH_LUXEMBOURG 0x05
737 #define SUBLANG_FRENCH_MONACO 0x06
738 #define SUBLANG_FRISIAN_NETHERLANDS 0x01
739 #define SUBLANG_GALICIAN_GALICIAN 0x01
740 #define SUBLANG_GEORGIAN_GEORGIA 0x01
741 #define SUBLANG_GERMAN 0x01
742 #define SUBLANG_GERMAN_SWISS 0x02
743 #define SUBLANG_GERMAN_AUSTRIAN 0x03
744 #define SUBLANG_GERMAN_LUXEMBOURG 0x04
745 #define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
746 #define SUBLANG_GREEK_GREECE 0x01
747 #define SUBLANG_GREENLANDIC_GREENLAND 0x01
748 #define SUBLANG_GUJARATI_INDIA 0x01
749 #define SUBLANG_HAUSA_NIGERIA 0x01
750 #define SUBLANG_HEBREW_ISRAEL 0x01
751 #define SUBLANG_HINDI_INDIA 0x01
752 #define SUBLANG_HUNGARIAN_HUNGARY 0x01
753 #define SUBLANG_ICELANDIC_ICELAND 0x01
754 #define SUBLANG_IGBO_NIGERIA 0x01
755 #define SUBLANG_INDONESIAN_INDONESIA 0x01
756 #define SUBLANG_INUKTITUT_CANADA 0x01
757 #define SUBLANG_INUKTITUT_CANADA_LATIN 0x01
758 #define SUBLANG_IRISH_IRELAND 0x01
759 #define SUBLANG_ITALIAN 0x01
760 #define SUBLANG_ITALIAN_SWISS 0x02
761 #define SUBLANG_JAPANESE_JAPAN 0x01
762 #define SUBLANG_KASHMIRI_INDIA 0x02
763 #define SUBLANG_KASHMIRI_SASIA 0x02
764 #define SUBLANG_KAZAK_KAZAKHSTAN 0x01
765 #define SUBLANG_KHMER_CAMBODIA 0x01
766 #define SUBLANG_KICHE_GUATEMALA 0x01
767 #define SUBLANG_KINYARWANDA_RWANDA 0x01
768 #define SUBLANG_KONKANI_INDIA 0x01
769 #define SUBLANG_KOREAN 0x01
770 #define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
771 #define SUBLANG_LAO_LAO_PDR 0x01
772 #define SUBLANG_LATVIAN_LATVIA 0x01
773 #if (WINVER >= 0x0600)
774 #define SUBLANG_LITHUANIAN_LITHUANIA 0x01
775 #endif
776 #define SUBLANG_LITHUANIAN 0x01
777 #define SUBLANG_LOWER_SORBIAN_GERMANY 0x01
778 #define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
779 #define SUBLANG_MACEDONIAN_MACEDONIA 0x01
780 #define SUBLANG_MALAY_MALAYSIA 0x01
781 #define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
782 #define SUBLANG_MALAYALAM_INDIA 0x01
783 #define SUBLANG_MALTESE_MALTA 0x01
784 #define SUBLANG_MAORI_NEW_ZEALAND 0x01
785 #define SUBLANG_MAPUDUNGUN_CHILE 0x01
786 #define SUBLANG_MARATHI_INDIA 0x01
787 #define SUBLANG_MOHAWK_MOHAWK 0x01
788 #define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
789 #define SUBLANG_MONGOLIAN_PRC 0x02
790 #define SUBLANG_NEPALI_NEPAL 0x01
791 #define SUBLANG_NEPALI_INDIA 0x02
792 #define SUBLANG_NORWEGIAN_BOKMAL 0x01
793 #define SUBLANG_NORWEGIAN_NYNORSK 0x02
794 #define SUBLANG_OCCITAN_FRANCE 0x01
795 #define SUBLANG_ORIYA_INDIA 0x01
796 #define SUBLANG_PASHTO_AFGHANISTAN 0x01
797 #define SUBLANG_PERSIAN_IRAN 0x01
798 #define SUBLANG_POLISH_POLAND 0x01
799 #define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
800 #if (WINVER >= 0x0600)
801 #define SUBLANG_PORTUGUESE_PORTUGAL 0x02
802 #endif
803 #define SUBLANG_PORTUGUESE 0x02
804 #define SUBLANG_PUNJABI_INDIA 0x00
805 #define SUBLANG_PUNJABI_PAKISTAN 0x01
806 #define SUBLANG_QUECHUA_BOLIVIA 0x01
807 #define SUBLANG_QUECHUA_ECUADOR 0x02
808 #define SUBLANG_QUECHUA_PERU 0x03
809 #define SUBLANG_ROMANIAN_ROMANIA 0x00
810 #define SUBLANG_ROMANIAN_MOLDOVA 0x01
811 #define SUBLANG_ROMANSH_SWITZERLAND 0x01
812 #define SUBLANG_RUSSIAN_RUSSIA 0x01
813 #define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
814 #define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
815 #define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
816 #define SUBLANG_SAMI_LULE_NORWAY 0x04
817 #define SUBLANG_SAMI_LULE_SWEDEN 0x05
818 #define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
819 #define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
820 #define SUBLANG_SAMI_SKOLT_FINLAND 0x03
821 #define SUBLANG_SAMI_INARI_FINLAND 0x03
822 #define SUBLANG_SANSKRIT_INDIA 0x01
823 #define SUBLANG_SERBIAN_LATIN 0x02
824 #define SUBLANG_SERBIAN_CYRILLIC 0x03
825 #define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06
826 #define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07
827 #define SUBLANG_SINDHI_AFGHANISTAN 0x02
828 #define SUBLANG_SINHALESE_SRI_LANKA 0x01
829 #define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01
830 #define SUBLANG_SLOVAK_SLOVAKIA 0x01
831 #define SUBLANG_SLOVENIAN_SLOVENIA 0x01
832 #define SUBLANG_SPANISH 0x01
833 #define SUBLANG_SPANISH_MEXICAN 0x02
834 #define SUBLANG_SPANISH_MODERN 0x03
835 #define SUBLANG_SPANISH_GUATEMALA 0x04
836 #define SUBLANG_SPANISH_COSTA_RICA 0x05
837 #define SUBLANG_SPANISH_PANAMA 0x06
838 #define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
839 #define SUBLANG_SPANISH_VENEZUELA 0x08
840 #define SUBLANG_SPANISH_COLOMBIA 0x09
841 #define SUBLANG_SPANISH_PERU 0x0a
842 #define SUBLANG_SPANISH_ARGENTINA 0x0b
843 #define SUBLANG_SPANISH_ECUADOR 0x0c
844 #define SUBLANG_SPANISH_CHILE 0x0d
845 #define SUBLANG_SPANISH_URUGUAY 0x0e
846 #define SUBLANG_SPANISH_PARAGUAY 0x0f
847 #define SUBLANG_SPANISH_BOLIVIA 0x10
848 #define SUBLANG_SPANISH_EL_SALVADOR 0x11
849 #define SUBLANG_SPANISH_HONDURAS 0x12
850 #define SUBLANG_SPANISH_NICARAGUA 0x13
851 #define SUBLANG_SPANISH_PUERTO_RICO 0x14
852 #define SUBLANG_SPANISH_US 0x15
853 #if (WINVER >= 0x0600)
854 #define SUBLANG_SWEDISH_SWEDEN 0x01
855 #endif
856 #define SUBLANG_SWEDISH 0x01
857 #define SUBLANG_SWEDISH_FINLAND 0x02
858 #define SUBLANG_SYRIAC 0x01
859 #define SUBLANG_TAJIK_TAJIKISTAN 0x01
860 #define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
861 #define SUBLANG_TAMIL_INDIA 0x01
862 #define SUBLANG_TATAR_RUSSIA 0x01
863 #define SUBLANG_TELUGU_INDIA 0x01
864 #define SUBLANG_THAI_THAILAND 0x01
865 #define SUBLANG_TIBETAN_PRC 0x01
866 #define SUBLANG_TIBETAN_BHUTAN 0x02
867 #define SUBLANG_TIGRIGNA_ERITREA 0x01
868 #define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
869 #define SUBLANG_TURKISH_TURKEY 0x01
870 #define SUBLANG_TURKMEN_TURKMENISTAN 0x01
871 #define SUBLANG_UIGHUR_PRC 0x01
872 #define SUBLANG_UKRAINIAN_UKRAINE 0x01
873 #define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
874 #define SUBLANG_URDU_PAKISTAN 0x01
875 #define SUBLANG_URDU_INDIA 0x02
876 #define SUBLANG_UZBEK_LATIN 0x01
877 #define SUBLANG_UZBEK_CYRILLIC 0x02
878 #define SUBLANG_VIETNAMESE_VIETNAM 0x01
879 #define SUBLANG_WELSH_UNITED_KINGDOM 0x01
880 #define SUBLANG_WOLOF_SENEGAL 0x01
881 #define SUBLANG_YORUBA_NIGERIA 0x01
882 #define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
883 #define SUBLANG_YAKUT_RUSSIA 0x01
884 #define SUBLANG_YI_PRC 0x01
885 #define SUBLANG_ZULU_SOUTH_AFRICA 0x01
886 #define NLS_VALID_LOCALE_MASK 1048575
887 #define SORT_DEFAULT 0
888 #define SORT_JAPANESE_XJIS 0
889 #define SORT_JAPANESE_UNICODE 1
890 #define SORT_CHINESE_BIG5 0
891 #define SORT_CHINESE_PRCP 0
892 #define SORT_CHINESE_UNICODE 1
893 #define SORT_CHINESE_PRC 2
894 #define SORT_CHINESE_BOPOMOFO 3
895 #define SORT_KOREAN_KSC 0
896 #define SORT_KOREAN_UNICODE 1
897 #define SORT_GERMAN_PHONE_BOOK 1
898 #define SORT_HUNGARIAN_DEFAULT 0
899 #define SORT_HUNGARIAN_TECHNICAL 1
900 #define SORT_GEORGIAN_TRADITIONAL 0
901 #define SORT_GEORGIAN_MODERN 1
902 #define MAKELANGID(p,s) ((((WORD)(s))<<10)|(WORD)(p))
903 #define MAKELCID(l,s)
((DWORD)((((DWORD)((WORD)(s)))<<16)|((DWORD)((WORD)(l)))))
904 #define PRIMARYLANGID(l) ((WORD)(l)&0x3ff)
905 #define SORTIDFROMLCID(l)
((WORD)((((DWORD)(l))&NLS_VALID_LOCALE_MASK)>>16))
906 #define SORTVERSIONFROMLCID(l) ((WORD)((((DWORD)(l))>>20)&0xf))
907 #define SUBLANGID(l) ((WORD)(l)>>10)
908 #define LANGIDFROMLCID(l) ((WORD)(l))
909 #define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT)
910 #define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT)
911 #define LOCALE_NEUTRAL
MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT)
912 #define ACL_REVISION 2
913 #define ACL_REVISION_DS 4
914 #define ACL_REVISION1 1
915 #define ACL_REVISION2 2
916 #define ACL_REVISION3 3
917 #define ACL_REVISION4 4
918 #define MIN_ACL_REVISION 2
919 #define MAX_ACL_REVISION 4
920 #define MINCHAR 0x80
921 #define MAXCHAR 0x7f
922 #define MINSHORT 0x8000
923 #define MAXSHORT 0x7fff
924 #define MINLONG 0x80000000
925 #define MAXLONG 0x7fffffff
926 #define MAXBYTE 0xff
927 #define MAXWORD 0xffff
928 #define MAXDWORD 0xffffffff
929 #define PROCESSOR_INTEL_386 386
930 #define PROCESSOR_INTEL_486 486
931 #define PROCESSOR_INTEL_PENTIUM 586
932 #define PROCESSOR_MIPS_R4000 4000
933 #define PROCESSOR_ALPHA_21064 21064
934 #define PROCESSOR_INTEL_IA64 2200
935 #define PROCESSOR_ARCHITECTURE_INTEL 0
936 #define PROCESSOR_ARCHITECTURE_MIPS 1
937 #define PROCESSOR_ARCHITECTURE_ALPHA 2
938 #define PROCESSOR_ARCHITECTURE_PPC 3
939 #define PROCESSOR_ARCHITECTURE_SHX 4
940 #define PROCESSOR_ARCHITECTURE_ARM 5
941 #define PROCESSOR_ARCHITECTURE_IA64 6
942 #define PROCESSOR_ARCHITECTURE_ALPHA64 7
943 #define PROCESSOR_ARCHITECTURE_MSIL 8
944 #define PROCESSOR_ARCHITECTURE_AMD64 9
945 #define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
946 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
947 #define PF_FLOATING_POINT_PRECISION_ERRATA 0
948 #define PF_FLOATING_POINT_EMULATED 1
949 #define PF_COMPARE_EXCHANGE_DOUBLE 2
950 #define PF_MMX_INSTRUCTIONS_AVAILABLE 3
951 #define PF_PPC_MOVEMEM_64BIT_OK 4
952 #define PF_ALPHA_BYTE_INSTRUCTIONS 5
953 #define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
954 #define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
955 #define PF_RDTSC_INSTRUCTION_AVAILABLE 8
956 #define PF_PAE_ENABLED 9
957 #define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
958 /* also in ddk/ntifs.h */
959 #define FILE_ACTION_ADDED 0x00000001
960 #define FILE_ACTION_REMOVED 0x00000002
961 #define FILE_ACTION_MODIFIED 0x00000003
962 #define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
963 #define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
964 #define FILE_ACTION_ADDED_STREAM 0x00000006
965 #define FILE_ACTION_REMOVED_STREAM 0x00000007
966 #define FILE_ACTION_MODIFIED_STREAM 0x00000008
967 #define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
968 #define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
969 #define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
970 /* end ntifs.h */
971 #define HEAP_NO_SERIALIZE 1
972 #define HEAP_GROWABLE 2
973 #define HEAP_GENERATE_EXCEPTIONS 4
974 #define HEAP_ZERO_MEMORY 8
975 #define HEAP_REALLOC_IN_PLACE_ONLY 16
976 #define HEAP_TAIL_CHECKING_ENABLED 32
977 #define HEAP_FREE_CHECKING_ENABLED 64
978 #define HEAP_DISABLE_COALESCE_ON_FREE 128
979 #define HEAP_CREATE_ALIGN_16 0x0000
980 #define HEAP_CREATE_ENABLE_TRACING 0x20000
981 #define HEAP_MAXIMUM_TAG 0xFFF
982 #define HEAP_PSEUDO_TAG_FLAG 0x8000
983 #define HEAP_TAG_SHIFT 16
984 #define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16)))
985 #define KEY_QUERY_VALUE 1
986 #define KEY_SET_VALUE 2
987 #define KEY_CREATE_SUB_KEY 4
988 #define KEY_ENUMERATE_SUB_KEYS 8
989 #define KEY_NOTIFY 16
990 #define KEY_CREATE_LINK 32
991 #define KEY_WRITE 0x20006
992 #define KEY_EXECUTE 0x20019
993 #define KEY_READ 0x20019
994 #if (_WIN32_WINNT >= 0x0502)
995 #define KEY_WOW64_64KEY 0x0100
996 #define KEY_WOW64_32KEY 0x0200
997 #endif
998 #define KEY_ALL_ACCESS 0xf003f
999 #define REG_WHOLE_HIVE_VOLATILE 1
1000 #define REG_REFRESH_HIVE 2
1001 #define REG_NO_LAZY_FLUSH 4
1002 #define REG_OPTION_RESERVED 0
1003 #define REG_OPTION_NON_VOLATILE 0
1004 #define REG_OPTION_VOLATILE 1
1005 #define REG_OPTION_CREATE_LINK 2
1006 #define REG_OPTION_BACKUP_RESTORE 4
1007 #define REG_OPTION_OPEN_LINK 8
1008 #define REG_LEGAL_OPTION 15
1009 #define OWNER_SECURITY_INFORMATION 0x00000001
1010 #define GROUP_SECURITY_INFORMATION 0x00000002
1011 #define DACL_SECURITY_INFORMATION 0x00000004
1012 #define SACL_SECURITY_INFORMATION 0x00000008
1013 #define LABEL_SECURITY_INFORMATION 0x00000010
1014 #define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000
1015 #define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000
1016 #define PROTECTED_SACL_SECURITY_INFORMATION 0x40000000
1017 #define PROTECTED_DACL_SECURITY_INFORMATION 0x80000000
1018 #define MAXIMUM_PROCESSORS 32
1019 #define PAGE_NOACCESS 0x0001
1020 #define PAGE_READONLY 0x0002
1021 #define PAGE_READWRITE 0x0004
1022 #define PAGE_WRITECOPY 0x0008
1023 #define PAGE_EXECUTE 0x0010
1024 #define PAGE_EXECUTE_READ 0x0020
1025 #define PAGE_EXECUTE_READWRITE 0x0040
1026 #define PAGE_EXECUTE_WRITECOPY 0x0080
1027 #define PAGE_GUARD 0x0100
1028 #define PAGE_NOCACHE 0x0200
1029 #define MEM_COMMIT 0x1000
1030 #define MEM_RESERVE 0x2000
1031 #define MEM_DECOMMIT 0x4000
1032 #define MEM_RELEASE 0x8000
1033 #define MEM_FREE 0x10000
1034 #define MEM_PRIVATE 0x20000
1035 #define MEM_MAPPED 0x40000
1036 #define MEM_RESET 0x80000
1037 #define MEM_TOP_DOWN 0x100000
1038 #define MEM_WRITE_WATCH 0x200000 /* 98/Me */
1039 #define MEM_PHYSICAL 0x400000
1040 #define MEM_4MB_PAGES 0x80000000
1041 /* also in ddk/ntifs.h */
1042 #define MEM_IMAGE SEC_IMAGE
1043 #define SEC_BASED 0x00200000
1044 #define SEC_NO_CHANGE 0x00400000
1045 #define SEC_FILE 0x00800000
1046 #define SEC_IMAGE 0x01000000
1047 #define SEC_VLM 0x02000000
1048 #define SEC_RESERVE 0x04000000
1049 #define SEC_COMMIT 0x08000000
1050 #define SEC_NOCACHE 0x10000000
1051 /* end ntifs.h */
1052 #define SECTION_EXTEND_SIZE 16
1053 #define SECTION_MAP_READ 4
1054 #define SECTION_MAP_WRITE 2
1055 #define SECTION_QUERY 1
1056 #define SECTION_MAP_EXECUTE 8
1057 #define SECTION_ALL_ACCESS 0xf001f
1058 #define MESSAGE_RESOURCE_UNICODE 1
1059 #define RTL_CRITSECT_TYPE 0
1060 #define RTL_RESOURCE_TYPE 1
1061 /* Also in winddk.h */
1062 #define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
1063 #ifndef CONTAINING_RECORD
1064 #define CONTAINING_RECORD(address, type, field) \
1065 ((type*)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
1066 #endif
1067 /* end winddk.h */
1068 #define IMAGE_SIZEOF_FILE_HEADER 20
1069 #define IMAGE_FILE_RELOCS_STRIPPED 1
1070 #define IMAGE_FILE_EXECUTABLE_IMAGE 2
1071 #define IMAGE_FILE_LINE_NUMS_STRIPPED 4
1072 #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8
1073 #define IMAGE_FILE_AGGRESIVE_WS_TRIM 16
1074 #define IMAGE_FILE_LARGE_ADDRESS_AWARE 32
1075 #define IMAGE_FILE_BYTES_REVERSED_LO 128
1076 #define IMAGE_FILE_32BIT_MACHINE 256
1077 #define IMAGE_FILE_DEBUG_STRIPPED 512
1078 #define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024
1079 #define IMAGE_FILE_NET_RUN_FROM_SWAP 2048
1080 #define IMAGE_FILE_SYSTEM 4096
1081 #define IMAGE_FILE_DLL 8192
1082 #define IMAGE_FILE_UP_SYSTEM_ONLY 16384
1083 #define IMAGE_FILE_BYTES_REVERSED_HI 32768
1084
1085 #define IMAGE_FILE_MACHINE_UNKNOWN 0x0000
1086 #define IMAGE_FILE_MACHINE_AM33 0x01d3 /* Matsushita AM33 */
1087 #define IMAGE_FILE_MACHINE_AMD64 0x8664 /* x64 */
1088 #define IMAGE_FILE_MACHINE_ARM 0x01c0 /* ARM little endian */
1089 #define IMAGE_FILE_MACHINE_EBC 0x0ebc /* EFI byte code */
1090 #define IMAGE_FILE_MACHINE_I386 0x014c /* Intel 386 or later processors