4 #pragma GCC system_header
7 /* translate GCC target defines to MS equivalents. Keep this synchronized
9 #if defined(__i686__) && !defined(_M_IX86)
11 #elif defined(__i586__) && !defined(_M_IX86)
13 #elif defined(__i486__) && !defined(_M_IX86)
15 #elif defined(__i386__) && !defined(_M_IX86)
18 #if defined(_M_IX86) && !defined(_X86_)
20 #elif defined(_M_ALPHA) && !defined(_ALPHA_)
22 #elif defined(_M_PPC) && !defined(_PPC_)
24 #elif defined(_M_MRX000) && !defined(_MIPS_)
26 #elif defined(_M_M68K) && !defined(_68K_)
39 /* FIXME: add more architectures. Is there a way to specify this in GCC? */
53 typedef unsigned char UCHAR
,*PUCHAR
;
54 typedef unsigned short USHORT
,*PUSHORT
;
55 typedef unsigned long ULONG
,*PULONG
;
58 #ifndef _WCHAR_T_DEFINED
59 #define _WCHAR_T_DEFINED
64 typedef unsigned short wchar_t;
69 typedef wchar_t WCHAR
;
70 typedef WCHAR
*PWCHAR
,*LPWCH
,*PWCH
,*NWPSTR
,*LPWSTR
,*PWSTR
;
71 typedef CONST WCHAR
*LPCWCH
,*PCWCH
,*LPCWSTR
,*PCWSTR
;
72 typedef CHAR
*PCHAR
,*LPCH
,*PCH
,*NPSTR
,*LPSTR
,*PSTR
;
73 typedef CONST CHAR
*LPCCH
,*PCSTR
,*LPCSTR
;
74 #ifndef _TCHAR_DEFINED
75 #define _TCHAR_DEFINED
78 * NOTE: This tests UNICODE, which is different from the _UNICODE define
79 * used to differentiate standard C runtime calls.
88 typedef TCHAR TBYTE
,*PTCH
,*PTBYTE
;
89 typedef TCHAR
*LPTCH
,*PTSTR
,*LPTSTR
,*LP
,*PTCHAR
;
90 typedef const TCHAR
*LPCTSTR
;
93 * __TEXT is a private macro whose specific use is to force the expansion of a
94 * macro passed as an argument to the macro TEXT. DO NOT use this
95 * macro within your programs. It's name and function could change without
98 #define __TEXT(q) L##q
103 * UNICODE a constant string when UNICODE is defined, else returns the string
105 * The corresponding macros _TEXT() and _T() for mapping _UNICODE strings
106 * passed to C runtime functions are defined in mingw/tchar.h
108 #define TEXT(q) __TEXT(q)
109 typedef SHORT
*PSHORT
;
111 typedef void *HANDLE
;
112 typedef HANDLE
*PHANDLE
,*LPHANDLE
;
114 #define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n
116 #define DECLARE_HANDLE(n) typedef HANDLE n
119 typedef PDWORD PLCID
;
123 #define _INTEGRAL_MAX_BITS 64
125 #define __int64 long long
126 #elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
128 #endif /* __GNUC__/__WATCOMC */
129 #if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
130 typedef __int64 LONGLONG
;
131 typedef unsigned __int64 DWORDLONG
;
133 typedef double LONGLONG
,DWORDLONG
;
135 typedef LONGLONG
*PLONGLONG
;
136 typedef DWORDLONG
*PDWORDLONG
;
137 typedef DWORDLONG ULONGLONG
,*PULONGLONG
;
138 typedef LONGLONG USN
;
140 #define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
141 #define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
142 #define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
143 #define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
144 #define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
146 #define ANSI_NULL '\0'
147 #define UNICODE_NULL L'\0'
148 typedef BYTE BOOLEAN
,*PBOOLEAN
;
151 #define NTAPI __stdcall
153 #define APPLICATION_ERROR_MASK 0x20000000
154 #define ERROR_SEVERITY_SUCCESS 0x00000000
155 #define ERROR_SEVERITY_INFORMATIONAL 0x40000000
156 #define ERROR_SEVERITY_WARNING 0x80000000
157 #define ERROR_SEVERITY_ERROR 0xC0000000
158 #define COMPRESSION_FORMAT_NONE 0
159 #define COMPRESSION_FORMAT_DEFAULT 1
160 #define COMPRESSION_FORMAT_LZNT1 2
161 #define COMPRESSION_ENGINE_STANDARD 0
162 #define COMPRESSION_ENGINE_MAXIMUM 256
163 #define ACCESS_ALLOWED_ACE_TYPE 0
164 #define ACCESS_DENIED_ACE_TYPE 1
165 #define ANYSIZE_ARRAY 1
166 #define SYSTEM_AUDIT_ACE_TYPE 2
167 #define SYSTEM_ALARM_ACE_TYPE 3
168 #define OBJECT_INHERIT_ACE 1
169 #define CONTAINER_INHERIT_ACE 2
170 #define NO_PROPAGATE_INHERIT_ACE 4
171 #define INHERIT_ONLY_ACE 8
172 #define VALID_INHERIT_FLAGS 16
173 #define SUCCESSFUL_ACCESS_ACE_FLAG 64
174 #define FAILED_ACCESS_ACE_FLAG 128
175 #define DELETE 0x00010000L
176 #define READ_CONTROL 0x20000L
177 #define WRITE_DAC 0x40000L
178 #define WRITE_OWNER 0x80000L
179 #define SYNCHRONIZE 0x100000L
180 #define STANDARD_RIGHTS_REQUIRED 0xF0000
181 #define STANDARD_RIGHTS_READ 0x20000
182 #define STANDARD_RIGHTS_WRITE 0x20000
183 #define STANDARD_RIGHTS_EXECUTE 0x20000
184 #define STANDARD_RIGHTS_ALL 0x1F0000
185 #define SPECIFIC_RIGHTS_ALL 0xFFFF
186 #define ACCESS_SYSTEM_SECURITY 0x1000000
187 #define MAXIMUM_ALLOWED 0x2000000
188 #define GENERIC_READ 0x80000000
189 #define GENERIC_WRITE 0x40000000
190 #define GENERIC_EXECUTE 0x20000000
191 #define GENERIC_ALL 0x10000000
192 #define FILE_READ_DATA 1
193 #define FILE_LIST_DIRECTORY 1
194 #define FILE_WRITE_DATA 2
195 #define FILE_ADD_FILE 2
196 #define FILE_APPEND_DATA 4
197 #define FILE_ADD_SUBDIRECTORY 4
198 #define FILE_CREATE_PIPE_INSTANCE 4
199 #define FILE_READ_EA 8
200 #define FILE_READ_PROPERTIES 8
201 #define FILE_WRITE_EA 16
202 #define FILE_WRITE_PROPERTIES 16
203 #define FILE_EXECUTE 32
204 #define FILE_TRAVERSE 32
205 #define FILE_DELETE_CHILD 64
206 #define FILE_READ_ATTRIBUTES 128
207 #define FILE_WRITE_ATTRIBUTES 256
208 #define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1FF)
209 #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ|FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA|SYNCHRONIZE)
210 #define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE|FILE_WRITE_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|FILE_APPEND_DATA|SYNCHRONIZE)
211 #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE|FILE_READ_ATTRIBUTES|FILE_EXECUTE|SYNCHRONIZE)
212 #define FILE_SHARE_READ 1
213 #define FILE_SHARE_WRITE 2
214 #define FILE_SHARE_DELETE 4
215 #define FILE_ATTRIBUTE_READONLY 1
216 #define FILE_ATTRIBUTE_HIDDEN 2
217 #define FILE_ATTRIBUTE_SYSTEM 4
218 #define FILE_ATTRIBUTE_DIRECTORY 16
219 #define FILE_ATTRIBUTE_ARCHIVE 32
220 #define FILE_ATTRIBUTE_DEVICE 64
221 #define FILE_ATTRIBUTE_NORMAL 128
222 #define FILE_ATTRIBUTE_TEMPORARY 256
223 #define FILE_ATTRIBUTE_SPARSE_FILE 512
224 #define FILE_ATTRIBUTE_REPARSE_POINT 1024
225 #define FILE_ATTRIBUTE_COMPRESSED 2048
226 #define FILE_ATTRIBUTE_OFFLINE 0x1000
227 #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x2000
228 #define FILE_ATTRIBUTE_ENCRYPTED 0x4000
229 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
230 #define FILE_NOTIFY_CHANGE_FILE_NAME 1
231 #define FILE_NOTIFY_CHANGE_DIR_NAME 2
232 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 4
233 #define FILE_NOTIFY_CHANGE_SIZE 8
234 #define FILE_NOTIFY_CHANGE_LAST_WRITE 16
235 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 32
236 #define FILE_NOTIFY_CHANGE_CREATION 64
237 #define FILE_NOTIFY_CHANGE_SECURITY 256
238 #define MAILSLOT_NO_MESSAGE ((DWORD)-1)
239 #define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
240 #define FILE_CASE_SENSITIVE_SEARCH 1
241 #define FILE_CASE_PRESERVED_NAMES 2
242 #define FILE_UNICODE_ON_DISK 4
243 #define FILE_PERSISTENT_ACLS 8
244 #define FILE_FILE_COMPRESSION 16
245 #define FILE_VOLUME_QUOTAS 32
246 #define FILE_SUPPORTS_SPARSE_FILES 64
247 #define FILE_SUPPORTS_REPARSE_POINTS 128
248 #define FILE_SUPPORTS_REMOTE_STORAGE 256
249 #define FILE_VOLUME_IS_COMPRESSED 0x8000
250 #define FILE_SUPPORTS_OBJECT_IDS 0x10000
251 #define FILE_SUPPORTS_ENCRYPTION 0x20000
252 #define FILE_NAMED_STREAMS 0x40000
253 #define IO_COMPLETION_MODIFY_STATE 2
254 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|3)
255 #define DUPLICATE_CLOSE_SOURCE 1
256 #define DUPLICATE_SAME_ACCESS 2
257 #define PROCESS_TERMINATE 1
258 #define PROCESS_CREATE_THREAD 2
259 #define PROCESS_VM_OPERATION 8
260 #define PROCESS_VM_READ 16
261 #define PROCESS_VM_WRITE 32
262 #define PROCESS_DUP_HANDLE 64
263 #define PROCESS_CREATE_PROCESS 128
264 #define PROCESS_SET_QUOTA 256
265 #define PROCESS_SET_INFORMATION 512
266 #define PROCESS_QUERY_INFORMATION 1024
267 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
268 #define THREAD_TERMINATE 1
269 #define THREAD_SUSPEND_RESUME 2
270 #define THREAD_GET_CONTEXT 8
271 #define THREAD_SET_CONTEXT 16
272 #define THREAD_SET_INFORMATION 32
273 #define THREAD_QUERY_INFORMATION 64
274 #define THREAD_SET_THREAD_TOKEN 128
275 #define THREAD_IMPERSONATE 256
276 #define THREAD_DIRECT_IMPERSONATION 0x200
277 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
278 #define EXCEPTION_NONCONTINUABLE 1
279 #define EXCEPTION_MAXIMUM_PARAMETERS 15
281 * To prevent gcc compiler warnings, bracket these defines when initialising
282 * a SID_IDENTIFIER_AUTHORITY, eg.
283 * SID_IDENTIFIER_AUTHORITY aNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY};
285 #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
286 #define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
287 #define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
288 #define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
289 #define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
290 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
291 #define SECURITY_NULL_RID 0
292 #define SECURITY_WORLD_RID 0
293 #define SECURITY_LOCAL_RID 0
294 #define SECURITY_CREATOR_OWNER_RID 0
295 #define SECURITY_CREATOR_GROUP_RID 1
296 #define SECURITY_DIALUP_RID 1
297 #define SECURITY_NETWORK_RID 2
298 #define SECURITY_BATCH_RID 3
299 #define SECURITY_INTERACTIVE_RID 4
300 #define SECURITY_LOGON_IDS_RID 5
301 #define SECURITY_SERVICE_RID 6
302 #define SECURITY_LOCAL_SYSTEM_RID 18
303 #define SECURITY_BUILTIN_DOMAIN_RID 32
304 #define SECURITY_PRINCIPAL_SELF_RID 10
305 #define SID_REVISION 1
306 #define DOMAIN_USER_RID_ADMIN 0x1F4L
307 #define DOMAIN_USER_RID_GUEST 0x1F5L
308 #define DOMAIN_GROUP_RID_ADMINS 0x200L
309 #define DOMAIN_GROUP_RID_USERS 0x201L
310 #define DOMAIN_ALIAS_RID_ADMINS 0x220L
311 #define DOMAIN_ALIAS_RID_USERS 0x221L
312 #define DOMAIN_ALIAS_RID_GUESTS 0x222L
313 #define DOMAIN_ALIAS_RID_POWER_USERS 0x223L
314 #define DOMAIN_ALIAS_RID_ACCOUNT_OPS 0x224L
315 #define DOMAIN_ALIAS_RID_SYSTEM_OPS 0x225L
316 #define DOMAIN_ALIAS_RID_PRINT_OPS 0x226L
317 #define DOMAIN_ALIAS_RID_BACKUP_OPS 0x227L
318 #define DOMAIN_ALIAS_RID_REPLICATOR 0x228L
319 #define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
320 #define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
321 #define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
322 #define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
323 #define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
324 #define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
325 #define SE_TCB_NAME TEXT("SeTcbPrivilege")
326 #define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
327 #define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
328 #define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
329 #define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
330 #define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
331 #define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
332 #define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
333 #define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
334 #define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
335 #define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
336 #define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
337 #define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
338 #define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
339 #define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
340 #define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
341 #define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
342 #define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
343 #define SE_GROUP_MANDATORY 1
344 #define SE_GROUP_ENABLED_BY_DEFAULT 2
345 #define SE_GROUP_ENABLED 4
346 #define SE_GROUP_OWNER 8
347 #define SE_GROUP_USE_FOR_DENY_ONLY 16
348 #define SE_GROUP_LOGON_ID 3221225472U
349 #define SE_GROUP_RESOURCE 536870912
350 #define LANG_NEUTRAL 0x00
351 #define LANG_ARABIC 0x01
352 #define LANG_BULGARIAN 0x02
353 #define LANG_CATALAN 0x03
354 #define LANG_CHINESE 0x04
355 #define LANG_CZECH 0x05
356 #define LANG_DANISH 0x06
357 #define LANG_GERMAN 0x07
358 #define LANG_GREEK 0x08
359 #define LANG_ENGLISH 0x09
360 #define LANG_SPANISH 0x0a
361 #define LANG_FINNISH 0x0b
362 #define LANG_FRENCH 0x0c
363 #define LANG_HEBREW 0x0d
364 #define LANG_HUNGARIAN 0x0e
365 #define LANG_ICELANDIC 0x0f
366 #define LANG_ITALIAN 0x10
367 #define LANG_JAPANESE 0x11
368 #define LANG_KOREAN 0x12
369 #define LANG_DUTCH 0x13
370 #define LANG_NORWEGIAN 0x14
371 #define LANG_POLISH 0x15
372 #define LANG_PORTUGUESE 0x16
373 #define LANG_ROMANIAN 0x18
374 #define LANG_RUSSIAN 0x19
375 #define LANG_CROATIAN 0x1a
376 #define LANG_SERBIAN 0x1a
377 #define LANG_SLOVAK 0x1b
378 #define LANG_ALBANIAN 0x1c
379 #define LANG_SWEDISH 0x1d
380 #define LANG_THAI 0x1e
381 #define LANG_TURKISH 0x1f
382 #define LANG_URDU 0x20
383 #define LANG_INDONESIAN 0x21
384 #define LANG_UKRAINIAN 0x22
385 #define LANG_BELARUSIAN 0x23
386 #define LANG_SLOVENIAN 0x24
387 #define LANG_ESTONIAN 0x25
388 #define LANG_LATVIAN 0x26
389 #define LANG_LITHUANIAN 0x27
390 #define LANG_FARSI 0x29
391 #define LANG_VIETNAMESE 0x2a
392 #define LANG_ARMENIAN 0x2b
393 #define LANG_AZERI 0x2c
394 #define LANG_BASQUE 0x2d
395 #define LANG_MACEDONIAN 0x2f
396 #define LANG_AFRIKAANS 0x36
397 #define LANG_GEORGIAN 0x37
398 #define LANG_FAEROESE 0x38
399 #define LANG_HINDI 0x39
400 #define LANG_MALAY 0x3e
401 #define LANG_KAZAK 0x3f
402 #define LANG_SWAHILI 0x41
403 #define LANG_UZBEK 0x43
404 #define LANG_TATAR 0x44
405 #define LANG_BENGALI 0x45
406 #define LANG_PUNJABI 0x46
407 #define LANG_GUJARATI 0x47
408 #define LANG_ORIYA 0x48
409 #define LANG_TAMIL 0x49
410 #define LANG_TELUGU 0x4a
411 #define LANG_KANNADA 0x4b
412 #define LANG_MALAYALAM 0x4c
413 #define LANG_ASSAMESE 0x4d
414 #define LANG_MARATHI 0x4e
415 #define LANG_SANSKRIT 0x4f
416 #define LANG_KONKANI 0x57
417 #define LANG_MANIPURI 0x58
418 #define LANG_SINDHI 0x59
419 #define LANG_KASHMIRI 0x60
420 #define LANG_NEPALI 0x61
421 #define SUBLANG_NEUTRAL 0x00
422 #define SUBLANG_DEFAULT 0x01
423 #define SUBLANG_SYS_DEFAULT 0x02
424 #define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
425 #define SUBLANG_ARABIC_IRAQ 0x02
426 #define SUBLANG_ARABIC_EGYPT 0x03
427 #define SUBLANG_ARABIC_LIBYA 0x04
428 #define SUBLANG_ARABIC_ALGERIA 0x05
429 #define SUBLANG_ARABIC_MOROCCO 0x06
430 #define SUBLANG_ARABIC_TUNISIA 0x07
431 #define SUBLANG_ARABIC_OMAN 0x08
432 #define SUBLANG_ARABIC_YEMEN 0x09
433 #define SUBLANG_ARABIC_SYRIA 0x0a
434 #define SUBLANG_ARABIC_JORDAN 0x0b
435 #define SUBLANG_ARABIC_LEBANON 0x0c
436 #define SUBLANG_ARABIC_KUWAIT 0x0d
437 #define SUBLANG_ARABIC_UAE 0x0e
438 #define SUBLANG_ARABIC_BAHRAIN 0x0f
439 #define SUBLANG_ARABIC_QATAR 0x10
440 #define SUBLANG_AZERI_CYRILLIC 0x01
441 #define SUBLANG_AZERI_LATIN 0x02
442 #define SUBLANG_CHINESE_TRADITIONAL 0x01
443 #define SUBLANG_CHINESE_SIMPLIFIED 0x02
444 #define SUBLANG_CHINESE_HONGKONG 0x03
445 #define SUBLANG_CHINESE_SINGAPORE 0x04
446 #define SUBLANG_CHINESE_MACAU 0x05
447 #define SUBLANG_DUTCH 0x01
448 #define SUBLANG_DUTCH_BELGIAN 0x02
449 #define SUBLANG_ENGLISH_US 0x01
450 #define SUBLANG_ENGLISH_UK 0x02
451 #define SUBLANG_ENGLISH_AUS 0x03
452 #define SUBLANG_ENGLISH_CAN 0x04
453 #define SUBLANG_ENGLISH_NZ 0x05
454 #define SUBLANG_ENGLISH_EIRE 0x06
455 #define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
456 #define SUBLANG_ENGLISH_JAMAICA 0x08
457 #define SUBLANG_ENGLISH_CARIBBEAN 0x09
458 #define SUBLANG_ENGLISH_BELIZE 0x0a
459 #define SUBLANG_ENGLISH_TRINIDAD 0x0b
460 #define SUBLANG_ENGLISH_PHILIPPINES 0x0c
461 #define SUBLANG_ENGLISH_ZIMBABWE 0x0d
462 #define SUBLANG_FRENCH 0x01
463 #define SUBLANG_FRENCH_BELGIAN 0x02
464 #define SUBLANG_FRENCH_CANADIAN 0x03
465 #define SUBLANG_FRENCH_SWISS 0x04
466 #define SUBLANG_FRENCH_LUXEMBOURG 0x05
467 #define SUBLANG_FRENCH_MONACO 0x06
468 #define SUBLANG_GERMAN 0x01
469 #define SUBLANG_GERMAN_SWISS 0x02
470 #define SUBLANG_GERMAN_AUSTRIAN 0x03
471 #define SUBLANG_GERMAN_LUXEMBOURG 0x04
472 #define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
473 #define SUBLANG_ITALIAN 0x01
474 #define SUBLANG_ITALIAN_SWISS 0x02
475 #define SUBLANG_KASHMIRI_INDIA 0x02
476 #define SUBLANG_KOREAN 0x01
477 #define SUBLANG_LITHUANIAN 0x01
478 #define SUBLANG_MALAY_MALAYSIA 0x01
479 #define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
480 #define SUBLANG_NEPALI_INDIA 0x02
481 #define SUBLANG_NORWEGIAN_BOKMAL 0x01
482 #define SUBLANG_NORWEGIAN_NYNORSK 0x02
483 #define SUBLANG_PORTUGUESE 0x01
484 #define SUBLANG_PORTUGUESE_BRAZILIAN 0x02
485 #define SUBLANG_SERBIAN_LATIN 0x02
486 #define SUBLANG_SERBIAN_CYRILLIC 0x03
487 #define SUBLANG_SPANISH 0x01
488 #define SUBLANG_SPANISH_MEXICAN 0x02
489 #define SUBLANG_SPANISH_MODERN 0x03
490 #define SUBLANG_SPANISH_GUATEMALA 0x04
491 #define SUBLANG_SPANISH_COSTA_RICA 0x05
492 #define SUBLANG_SPANISH_PANAMA 0x06
493 #define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
494 #define SUBLANG_SPANISH_VENEZUELA 0x08
495 #define SUBLANG_SPANISH_COLOMBIA 0x09
496 #define SUBLANG_SPANISH_PERU 0x0a
497 #define SUBLANG_SPANISH_ARGENTINA 0x0b
498 #define SUBLANG_SPANISH_ECUADOR 0x0c
499 #define SUBLANG_SPANISH_CHILE 0x0d
500 #define SUBLANG_SPANISH_URUGUAY 0x0e
501 #define SUBLANG_SPANISH_PARAGUAY 0x0f
502 #define SUBLANG_SPANISH_BOLIVIA 0x10
503 #define SUBLANG_SPANISH_EL_SALVADOR 0x11
504 #define SUBLANG_SPANISH_HONDURAS 0x12
505 #define SUBLANG_SPANISH_NICARAGUA 0x13
506 #define SUBLANG_SPANISH_PUERTO_RICO 0x14
507 #define SUBLANG_SWEDISH 0x01
508 #define SUBLANG_SWEDISH_FINLAND 0x02
509 #define SUBLANG_URDU_PAKISTAN 0x01
510 #define SUBLANG_URDU_INDIA 0x02
511 #define SUBLANG_UZBEK_LATIN 0x01
512 #define SUBLANG_UZBEK_CYRILLIC 0x02
513 #define NLS_VALID_LOCALE_MASK 1048575
514 #define SORT_DEFAULT 0
515 #define SORT_JAPANESE_XJIS 0
516 #define SORT_JAPANESE_UNICODE 1
517 #define SORT_CHINESE_BIG5 0
518 #define SORT_CHINESE_PRCP 0
519 #define SORT_CHINESE_UNICODE 1
520 #define SORT_CHINESE_PRC 2
521 #define SORT_CHINESE_BOPOMOFO 3
522 #define SORT_KOREAN_KSC 0
523 #define SORT_KOREAN_UNICODE 1
524 #define SORT_GERMAN_PHONE_BOOK 1
525 #define SORT_HUNGARIAN_DEFAULT 0
526 #define SORT_HUNGARIAN_TECHNICAL 1
527 #define SORT_GEORGIAN_TRADITIONAL 0
528 #define SORT_GEORGIAN_MODERN 1
529 #define MAKELANGID(p,s) ((((WORD)(s))<<10)|(WORD)(p))
530 #define MAKELCID(l,s) ((DWORD)((((DWORD)((WORD)(s)))<<16)|((DWORD)((WORD)(l)))))
531 #define PRIMARYLANGID(l) ((WORD)(l)&0x3ff)
532 #define SORTIDFROMLCID(l) ((WORD)((((DWORD)(l))&NLS_VALID_LOCALE_MASK)>>16))
533 #define SORTVERSIONFROMLCID(l) ((WORD)((((DWORD)(l))>>20)&0xf))
534 #define SUBLANGID(l) ((WORD)(l)>>10)
535 #define LANGIDFROMLCID(l) ((WORD)(l))
536 #define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT)
537 #define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT)
538 #define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT)
539 #define ACL_REVISION 2
540 #define ACL_REVISION_DS 4
541 #define ACL_REVISION1 1
542 #define ACL_REVISION2 2
543 #define ACL_REVISION3 3
544 #define ACL_REVISION4 4
545 #define MIN_ACL_REVISION 2
546 #define MAX_ACL_REVISION 4
549 #define MINSHORT 0x8000
550 #define MAXSHORT 0x7fff
551 #define MINLONG 0x80000000
552 #define MAXLONG 0x7fffffff
554 #define MAXWORD 0xffff
555 #define MAXDWORD 0xffffffff
556 #define PROCESSOR_INTEL_386 386
557 #define PROCESSOR_INTEL_486 486
558 #define PROCESSOR_INTEL_PENTIUM 586
559 #define PROCESSOR_MIPS_R4000 4000
560 #define PROCESSOR_ALPHA_21064 21064
561 #define PROCESSOR_ARCHITECTURE_INTEL 0
562 #define PROCESSOR_ARCHITECTURE_MIPS 1
563 #define PROCESSOR_ARCHITECTURE_ALPHA 2
564 #define PROCESSOR_ARCHITECTURE_PPC 3
565 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
566 #define PF_FLOATING_POINT_PRECISION_ERRATA 0
567 #define PF_FLOATING_POINT_EMULATED 1
568 #define PF_COMPARE_EXCHANGE_DOUBLE 2
569 #define PF_MMX_INSTRUCTIONS_AVAILABLE 3
570 #define PF_PPC_MOVEMEM_64BIT_OK 4
571 #define PF_ALPHA_BYTE_INSTRUCTIONS 5
572 #define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
573 #define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
574 #define PF_RDTSC_INSTRUCTION_AVAILABLE 8
575 #define PF_PAE_ENABLED 9
576 #define PAGE_READONLY 2
577 #define PAGE_READWRITE 4
578 #define PAGE_WRITECOPY 8
579 #define FILE_ACTION_ADDED 1
580 #define FILE_ACTION_REMOVED 2
581 #define FILE_ACTION_MODIFIED 3
582 #define FILE_ACTION_RENAMED_OLD_NAME 4
583 #define FILE_ACTION_RENAMED_NEW_NAME 5
584 #define HEAP_NO_SERIALIZE 1
585 #define HEAP_GROWABLE 2
586 #define HEAP_GENERATE_EXCEPTIONS 4
587 #define HEAP_ZERO_MEMORY 8
588 #define HEAP_REALLOC_IN_PLACE_ONLY 16
589 #define HEAP_TAIL_CHECKING_ENABLED 32
590 #define HEAP_FREE_CHECKING_ENABLED 64
591 #define HEAP_DISABLE_COALESCE_ON_FREE 128
592 #define HEAP_CREATE_ALIGN_16 0x0000
593 #define HEAP_CREATE_ENABLE_TRACING 0x20000
594 #define HEAP_MAXIMUM_TAG 0xFFF
595 #define HEAP_PSEUDO_TAG_FLAG 0x8000
596 #define HEAP_TAG_SHIFT 16
597 #define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16)))
598 #define KEY_QUERY_VALUE 1
599 #define KEY_SET_VALUE 2
600 #define KEY_CREATE_SUB_KEY 4
601 #define KEY_ENUMERATE_SUB_KEYS 8
602 #define KEY_NOTIFY 16
603 #define KEY_CREATE_LINK 32
604 #define KEY_WRITE 0x20006
605 #define KEY_EXECUTE 0x20019
606 #define KEY_READ 0x20019
607 #define KEY_ALL_ACCESS 0xf003f
608 #define REG_WHOLE_HIVE_VOLATILE 1
609 #define REG_REFRESH_HIVE 2
610 #define REG_NO_LAZY_FLUSH 4
611 #define REG_OPTION_RESERVED 0
612 #define REG_OPTION_NON_VOLATILE 0
613 #define REG_OPTION_VOLATILE 1
614 #define REG_OPTION_CREATE_LINK 2
615 #define REG_OPTION_BACKUP_RESTORE 4
616 #define REG_OPTION_OPEN_LINK 8
617 #define REG_LEGAL_OPTION 15
618 #define OWNER_SECURITY_INFORMATION 1
619 #define GROUP_SECURITY_INFORMATION 2
620 #define DACL_SECURITY_INFORMATION 4
621 #define SACL_SECURITY_INFORMATION 8
622 #define MAXIMUM_PROCESSORS 32
623 #define PAGE_EXECUTE 16
624 #define PAGE_EXECUTE_READ 32
625 #define PAGE_EXECUTE_READWRITE 64
626 #define PAGE_GUARD 256
627 #define PAGE_NOACCESS 1
628 #define PAGE_NOCACHE 512
629 #define MEM_COMMIT 0x1000
630 #define MEM_RESERVE 0x2000
631 #define MEM_DECOMMIT 0x4000
632 #define MEM_RELEASE 0x8000
633 #define MEM_FREE 0x10000
634 #define MEM_PRIVATE 0x20000
635 #define MEM_MAPPED 0x40000
636 #define MEM_RESET 0x80000
637 #define MEM_TOP_DOWN 0x100000
638 #define MEM_WRITE_WATCH 0x200000 /* 98/Me */
639 #define MEM_PHYSICAL 0x400000
640 #define MEM_4MB_PAGES 0x80000000
641 #define MEM_IMAGE 16777216
642 #define SEC_FILE 0x800000
643 #define SEC_IMAGE 0x1000000
644 #define SEC_VLM 0x2000000
645 #define SEC_RESERVE 0x4000000
646 #define SEC_COMMIT 0x8000000
647 #define SEC_NOCACHE 0x10000000
648 #define PAGE_EXECUTE_WRITECOPY 128
649 #define SECTION_EXTEND_SIZE 16
650 #define SECTION_MAP_READ 4
651 #define SECTION_MAP_WRITE 2
652 #define SECTION_QUERY 1
653 #define SECTION_ALL_ACCESS 0xf001f
654 #define MESSAGE_RESOURCE_UNICODE 1
655 #define RTL_CRITSECT_TYPE 0
656 #define RTL_RESOURCE_TYPE 1
657 #define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
658 #define IMAGE_SIZEOF_FILE_HEADER 20
659 #define IMAGE_FILE_RELOCS_STRIPPED 1
660 #define IMAGE_FILE_EXECUTABLE_IMAGE 2
661 #define IMAGE_FILE_LINE_NUMS_STRIPPED 4
662 #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8
663 #define IMAGE_FILE_BYTES_REVERSED_LO 128
664 #define IMAGE_FILE_32BIT_MACHINE 256
665 #define IMAGE_FILE_DEBUG_STRIPPED 512
666 #define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024
667 #define IMAGE_FILE_NET_RUN_FROM_SWAP 2048
668 #define IMAGE_FILE_SYSTEM 4096
669 #define IMAGE_FILE_DLL 8192
670 #define IMAGE_FILE_UP_SYSTEM_ONLY 16384
671 #define IMAGE_FILE_BYTES_REVERSED_HI 32768
672 #define IMAGE_FILE_MACHINE_UNKNOWN 0
673 #define IMAGE_FILE_MACHINE_I386 332
674 #define IMAGE_FILE_MACHINE_R3000 354
675 #define IMAGE_FILE_MACHINE_R4000 358
676 #define IMAGE_FILE_MACHINE_R10000 360
677 #define IMAGE_FILE_MACHINE_ALPHA 388
678 #define IMAGE_FILE_MACHINE_POWERPC 496
679 #define IMAGE_DOS_SIGNATURE 0x5A4D
680 #define IMAGE_OS2_SIGNATURE 0x454E
681 #define IMAGE_OS2_SIGNATURE_LE 0x454C
682 #define IMAGE_VXD_SIGNATURE 0x454C
683 #define IMAGE_NT_SIGNATURE 0x00004550
684 #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
685 #define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
686 #define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
687 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
688 #define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56
689 #define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
690 #define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224
691 #define IMAGE_SIZEOF_SHORT_NAME 8
692 #define IMAGE_SIZEOF_SECTION_HEADER 40
693 #define IMAGE_SIZEOF_SYMBOL 18
694 #define IMAGE_SIZEOF_AUX_SYMBOL 18
695 #define IMAGE_SIZEOF_RELOCATION 10
696 #define IMAGE_SIZEOF_BASE_RELOCATION 8
697 #define IMAGE_SIZEOF_LINENUMBER 6
698 #define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
699 #define SIZEOF_RFPO_DATA 16
700 #define IMAGE_SUBSYSTEM_UNKNOWN 0
701 #define IMAGE_SUBSYSTEM_NATIVE 1
702 #define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
703 #define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
704 #define IMAGE_SUBSYSTEM_OS2_CUI 5
705 #define IMAGE_SUBSYSTEM_POSIX_CUI 7
706 #define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
707 #define IMAGE_DIRECTORY_ENTRY_EXPORT 0
708 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1
709 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
710 #define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
711 #define IMAGE_DIRECTORY_ENTRY_SECURITY 4
712 #define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
713 #define IMAGE_DIRECTORY_ENTRY_DEBUG 6
714 #define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
715 #define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
716 #define IMAGE_DIRECTORY_ENTRY_TLS 9
717 #define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
718 #define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
719 #define IMAGE_DIRECTORY_ENTRY_IAT 12
720 #define IMAGE_SCN_TYPE_NO_PAD 8
721 #define IMAGE_SCN_CNT_CODE 32
722 #define IMAGE_SCN_CNT_INITIALIZED_DATA 64
723 #define IMAGE_SCN_CNT_UNINITIALIZED_DATA 128
724 #define IMAGE_SCN_LNK_OTHER 256
725 #define IMAGE_SCN_LNK_INFO 512
726 #define IMAGE_SCN_LNK_REMOVE 2048
727 #define IMAGE_SCN_LNK_COMDAT 4096
728 #define IMAGE_SCN_MEM_FARDATA 0x8000
729 #define IMAGE_SCN_MEM_PURGEABLE 0x20000
730 #define IMAGE_SCN_MEM_16BIT 0x20000
731 #define IMAGE_SCN_MEM_LOCKED 0x40000
732 #define IMAGE_SCN_MEM_PRELOAD 0x80000
733 #define IMAGE_SCN_ALIGN_1BYTES 0x100000
734 #define IMAGE_SCN_ALIGN_2BYTES 0x200000
735 #define IMAGE_SCN_ALIGN_4BYTES 0x300000
736 #define IMAGE_SCN_ALIGN_8BYTES 0x400000
737 #define IMAGE_SCN_ALIGN_16BYTES 0x500000
738 #define IMAGE_SCN_ALIGN_32BYTES 0x600000
739 #define IMAGE_SCN_ALIGN_64BYTES 0x700000
740 #define IMAGE_SCN_LNK_NRELOC_OVFL 0x1000000
741 #define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
742 #define IMAGE_SCN_MEM_NOT_CACHED 0x4000000
743 #define IMAGE_SCN_MEM_NOT_PAGED 0x8000000
744 #define IMAGE_SCN_MEM_SHARED 0x10000000
745 #define IMAGE_SCN_MEM_EXECUTE 0x20000000
746 #define IMAGE_SCN_MEM_READ 0x40000000
747 #define IMAGE_SCN_MEM_WRITE 0x80000000
748 #define IMAGE_SYM_UNDEFINED 0
749 #define IMAGE_SYM_ABSOLUTE (-1)
750 #define IMAGE_SYM_DEBUG (-2)
751 #define IMAGE_SYM_TYPE_NULL 0
752 #define IMAGE_SYM_TYPE_VOID 1
753 #define IMAGE_SYM_TYPE_CHAR 2
754 #define IMAGE_SYM_TYPE_SHORT 3
755 #define IMAGE_SYM_TYPE_INT 4
756 #define IMAGE_SYM_TYPE_LONG 5
757 #define IMAGE_SYM_TYPE_FLOAT 6
758 #define IMAGE_SYM_TYPE_DOUBLE 7
759 #define IMAGE_SYM_TYPE_STRUCT 8
760 #define IMAGE_SYM_TYPE_UNION 9
761 #define IMAGE_SYM_TYPE_ENUM 10
762 #define IMAGE_SYM_TYPE_MOE 11
763 #define IMAGE_SYM_TYPE_BYTE 12
764 #define IMAGE_SYM_TYPE_WORD 13
765 #define IMAGE_SYM_TYPE_UINT 14
766 #define IMAGE_SYM_TYPE_DWORD 15
767 #define IMAGE_SYM_TYPE_PCODE 32768
768 #define IMAGE_SYM_DTYPE_NULL 0
769 #define IMAGE_SYM_DTYPE_POINTER 1
770 #define IMAGE_SYM_DTYPE_FUNCTION 2
771 #define IMAGE_SYM_DTYPE_ARRAY 3
772 #define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1)
773 #define IMAGE_SYM_CLASS_NULL 0
774 #define IMAGE_SYM_CLASS_AUTOMATIC 1
775 #define IMAGE_SYM_CLASS_EXTERNAL 2
776 #define IMAGE_SYM_CLASS_STATIC 3
777 #define IMAGE_SYM_CLASS_REGISTER 4
778 #define IMAGE_SYM_CLASS_EXTERNAL_DEF 5
779 #define IMAGE_SYM_CLASS_LABEL 6
780 #define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
781 #define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
782 #define IMAGE_SYM_CLASS_ARGUMENT 9
783 #define IMAGE_SYM_CLASS_STRUCT_TAG 10
784 #define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
785 #define IMAGE_SYM_CLASS_UNION_TAG 12
786 #define IMAGE_SYM_CLASS_TYPE_DEFINITION 13
787 #define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
788 #define IMAGE_SYM_CLASS_ENUM_TAG 15
789 #define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
790 #define IMAGE_SYM_CLASS_REGISTER_PARAM 17
791 #define IMAGE_SYM_CLASS_BIT_FIELD 18
792 #define IMAGE_SYM_CLASS_FAR_EXTERNAL 68
793 #define IMAGE_SYM_CLASS_BLOCK 100
794 #define IMAGE_SYM_CLASS_FUNCTION 101
795 #define IMAGE_SYM_CLASS_END_OF_STRUCT 102
796 #define IMAGE_SYM_CLASS_FILE 103
797 #define IMAGE_SYM_CLASS_SECTION 104
798 #define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
799 #define IMAGE_COMDAT_SELECT_NODUPLICATES 1
800 #define IMAGE_COMDAT_SELECT_ANY 2
801 #define IMAGE_COMDAT_SELECT_SAME_SIZE 3
802 #define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
803 #define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
804 #define IMAGE_COMDAT_SELECT_LARGEST 6
805 #define IMAGE_COMDAT_SELECT_NEWEST 7
806 #define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
807 #define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
808 #define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
809 #define IMAGE_REL_I386_ABSOLUTE 0
810 #define IMAGE_REL_I386_DIR16 1
811 #define IMAGE_REL_I386_REL16 2
812 #define IMAGE_REL_I386_DIR32 6
813 #define IMAGE_REL_I386_DIR32NB 7
814 #define IMAGE_REL_I386_SEG12 9
815 #define IMAGE_REL_I386_SECTION 10
816 #define IMAGE_REL_I386_SECREL 11
817 #define IMAGE_REL_I386_REL32 20
818 #define IMAGE_REL_MIPS_ABSOLUTE 0
819 #define IMAGE_REL_MIPS_REFHALF 1
820 #define IMAGE_REL_MIPS_REFWORD 2
821 #define IMAGE_REL_MIPS_JMPADDR 3
822 #define IMAGE_REL_MIPS_REFHI 4
823 #define IMAGE_REL_MIPS_REFLO 5
824 #define IMAGE_REL_MIPS_GPREL 6
825 #define IMAGE_REL_MIPS_LITERAL 7
826 #define IMAGE_REL_MIPS_SECTION 10
827 #define IMAGE_REL_MIPS_SECREL 11
828 #define IMAGE_REL_MIPS_SECRELLO 12
829 #define IMAGE_REL_MIPS_SECRELHI 13
830 #define IMAGE_REL_MIPS_REFWORDNB 34
831 #define IMAGE_REL_MIPS_PAIR 35
832 #define IMAGE_REL_ALPHA_ABSOLUTE 0
833 #define IMAGE_REL_ALPHA_REFLONG 1
834 #define IMAGE_REL_ALPHA_REFQUAD 2
835 #define IMAGE_REL_ALPHA_GPREL32 3
836 #define IMAGE_REL_ALPHA_LITERAL 4
837 #define IMAGE_REL_ALPHA_LITUSE 5
838 #define IMAGE_REL_ALPHA_GPDISP 6
839 #define IMAGE_REL_ALPHA_BRADDR 7
840 #define IMAGE_REL_ALPHA_HINT 8
841 #define IMAGE_REL_ALPHA_INLINE_REFLONG 9
842 #define IMAGE_REL_ALPHA_REFHI 10
843 #define IMAGE_REL_ALPHA_REFLO 11
844 #define IMAGE_REL_ALPHA_PAIR 12
845 #define IMAGE_REL_ALPHA_MATCH 13
846 #define IMAGE_REL_ALPHA_SECTION 14
847 #define IMAGE_REL_ALPHA_SECREL 15
848 #define IMAGE_REL_ALPHA_REFLONGNB 16
849 #define IMAGE_REL_ALPHA_SECRELLO 17
850 #define IMAGE_REL_ALPHA_SECRELHI 18
851 #define IMAGE_REL_PPC_ABSOLUTE 0
852 #define IMAGE_REL_PPC_ADDR64 1
853 #define IMAGE_REL_PPC_ADDR32 2
854 #define IMAGE_REL_PPC_ADDR24 3
855 #define IMAGE_REL_PPC_ADDR16 4
856 #define IMAGE_REL_PPC_ADDR14 5
857 #define IMAGE_REL_PPC_REL24 6
858 #define IMAGE_REL_PPC_REL14 7
859 #define IMAGE_REL_PPC_TOCREL16 8
860 #define IMAGE_REL_PPC_TOCREL14 9
861 #define IMAGE_REL_PPC_ADDR32NB 10
862 #define IMAGE_REL_PPC_SECREL 11
863 #define IMAGE_REL_PPC_SECTION 12
864 #define IMAGE_REL_PPC_IFGLUE 13
865 #define IMAGE_REL_PPC_IMGLUE 14
866 #define IMAGE_REL_PPC_SECREL16 15
867 #define IMAGE_REL_PPC_REFHI 16
868 #define IMAGE_REL_PPC_REFLO 17
869 #define IMAGE_REL_PPC_PAIR 18
870 #define IMAGE_REL_PPC_TYPEMASK 255
871 #define IMAGE_REL_PPC_NEG 256
872 #define IMAGE_REL_PPC_BRTAKEN 512
873 #define IMAGE_REL_PPC_BRNTAKEN 1024
874 #define IMAGE_REL_PPC_TOCDEFN 2048
875 #define IMAGE_REL_BASED_ABSOLUTE 0
876 #define IMAGE_REL_BASED_HIGH 1
877 #define IMAGE_REL_BASED_LOW 2
878 #define IMAGE_REL_BASED_HIGHLOW 3
879 #define IMAGE_REL_BASED_HIGHADJ 4
880 #define IMAGE_REL_BASED_MIPS_JMPADDR 5
881 #define IMAGE_ARCHIVE_START_SIZE 8
882 #define IMAGE_ARCHIVE_START "!<arch>\n"
883 #define IMAGE_ARCHIVE_END "`\n"
884 #define IMAGE_ARCHIVE_PAD "\n"
885 #define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
886 #define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
887 #define IMAGE_ORDINAL_FLAG 0x80000000
888 #define IMAGE_SNAP_BY_ORDINAL(o) ((o&IMAGE_ORDINAL_FLAG)!=0)
889 #define IMAGE_ORDINAL(o) (o&0xffff)
890 #define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
891 #define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
892 #define IMAGE_DEBUG_TYPE_UNKNOWN 0
893 #define IMAGE_DEBUG_TYPE_COFF 1
894 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
895 #define IMAGE_DEBUG_TYPE_FPO 3
896 #define IMAGE_DEBUG_TYPE_MISC 4
897 #define IMAGE_DEBUG_TYPE_EXCEPTION 5
898 #define IMAGE_DEBUG_TYPE_FIXUP 6
899 #define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
900 #define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
904 #define FRAME_NONFPO 3
905 #define IMAGE_DEBUG_MISC_EXENAME 1
906 #define N_BTMASK 0x000F
907 #define N_TMASK 0x0030
908 #define N_TMASK1 0x00C0
909 #define N_TMASK2 0x00F0
912 #define IS_TEXT_UNICODE_ASCII16 1
913 #define IS_TEXT_UNICODE_REVERSE_ASCII16 16
914 #define IS_TEXT_UNICODE_STATISTICS 2
915 #define IS_TEXT_UNICODE_REVERSE_STATISTICS 32
916 #define IS_TEXT_UNICODE_CONTROLS 4
917 #define IS_TEXT_UNICODE_REVERSE_CONTROLS 64
918 #define IS_TEXT_UNICODE_SIGNATURE 8
919 #define IS_TEXT_UNICODE_REVERSE_SIGNATURE 128
920 #define IS_TEXT_UNICODE_ILLEGAL_CHARS 256
921 #define IS_TEXT_UNICODE_ODD_LENGTH 512
922 #define IS_TEXT_UNICODE_NULL_BYTES 4096
923 #define IS_TEXT_UNICODE_UNICODE_MASK 15
924 #define IS_TEXT_UNICODE_REVERSE_MASK 240
925 #define IS_TEXT_UNICODE_NOT_UNICODE_MASK 3840
926 #define IS_TEXT_UNICODE_NOT_ASCII_MASK 61440
927 #define SERVICE_KERNEL_DRIVER 1
928 #define SERVICE_FILE_SYSTEM_DRIVER 2
929 #define SERVICE_ADAPTER 4
930 #define SERVICE_RECOGNIZER_DRIVER 8
931 #define SERVICE_DRIVER (SERVICE_KERNEL_DRIVER|SERVICE_FILE_SYSTEM_DRIVER|SERVICE_RECOGNIZER_DRIVER)
932 #define SERVICE_WIN32_OWN_PROCESS 16
933 #define SERVICE_WIN32_SHARE_PROCESS 32
934 #define SERVICE_WIN32 (SERVICE_WIN32_OWN_PROCESS|SERVICE_WIN32_SHARE_PROCESS)
935 #define SERVICE_INTERACTIVE_PROCESS 256
936 #define SERVICE_TYPE_ALL (SERVICE_WIN32|SERVICE_ADAPTER|SERVICE_DRIVER|SERVICE_INTERACTIVE_PROCESS)
937 #define SERVICE_BOOT_START 0
938 #define SERVICE_SYSTEM_START 1
939 #define SERVICE_AUTO_START 2
940 #define SERVICE_DEMAND_START 3
941 #define SERVICE_DISABLED 4
942 #define SERVICE_ERROR_IGNORE 0
943 #define SERVICE_ERROR_NORMAL 1
944 #define SERVICE_ERROR_SEVERE 2
945 #define SERVICE_ERROR_CRITICAL 3
946 #define SE_OWNER_DEFAULTED 1
947 #define SE_GROUP_DEFAULTED 2
948 #define SE_DACL_PRESENT 4
949 #define SE_DACL_DEFAULTED 8
950 #define SE_SACL_PRESENT 16
951 #define SE_SACL_DEFAULTED 32
952 #define SE_DACL_AUTO_INHERIT_REQ 256
953 #define SE_SACL_AUTO_INHERIT_REQ 512
954 #define SE_DACL_AUTO_INHERITED 1024
955 #define SE_SACL_AUTO_INHERITED 2048
956 #define SE_DACL_PROTECTED 4096
957 #define SE_SACL_PROTECTED 8192
958 #define SE_SELF_RELATIVE 0x8000
959 #define SECURITY_DESCRIPTOR_MIN_LENGTH 20
960 #define SECURITY_DESCRIPTOR_REVISION 1
961 #define SECURITY_DESCRIPTOR_REVISION1 1
962 #define SE_PRIVILEGE_ENABLED_BY_DEFAULT 1
963 #define SE_PRIVILEGE_ENABLED 2
964 #define SE_PRIVILEGE_USED_FOR_ACCESS 0x80000000
965 #define PRIVILEGE_SET_ALL_NECESSARY 1
966 #define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
967 #define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
968 #define SECURITY_DYNAMIC_TRACKING TRUE
969 #define SECURITY_STATIC_TRACKING FALSE
970 #define TOKEN_SOURCE_LENGTH 8
971 #define TOKEN_ADJUST_DEFAULT 128
972 #define TOKEN_ADJUST_GROUPS 64
973 #define TOKEN_ADJUST_PRIVILEGES 32
974 #define TOKEN_ALL_ACCESS 0xf00ff
975 #define TOKEN_ASSIGN_PRIMARY 1
976 #define TOKEN_DUPLICATE 2
977 #define TOKEN_EXECUTE 0x20000
978 #define TOKEN_IMPERSONATE 4
979 #define TOKEN_QUERY 8
980 #define TOKEN_QUERY_SOURCE 16
981 #define TOKEN_READ 0x20008
982 #define TOKEN_WRITE 0x200e0
983 #define DLL_PROCESS_DETACH 0
984 #define DLL_PROCESS_ATTACH 1
985 #define DLL_THREAD_ATTACH 2
986 #define DLL_THREAD_DETACH 3
987 #define DBG_CONTINUE 0x10002
988 #define DBG_TERMINATE_THREAD 0x40010003
989 #define DBG_TERMINATE_PROCESS 0x40010004
990 #define DBG_CONTROL_C 0x40010005
991 #define DBG_CONTROL_BREAK 0x40010008
992 #define DBG_EXCEPTION_NOT_HANDLED 0x80010001
993 #define TAPE_ABSOLUTE_POSITION 0
994 #define TAPE_LOGICAL_POSITION 1
995 #define TAPE_PSEUDO_LOGICAL_POSITION 2
996 #define TAPE_REWIND 0
997 #define TAPE_ABSOLUTE_BLOCK 1
998 #define TAPE_LOGICAL_BLOCK 2
999 #define TAPE_PSEUDO_LOGICAL_BLOCK 3
1000 #define TAPE_SPACE_END_OF_DATA 4
1001 #define TAPE_SPACE_RELATIVE_BLOCKS 5
1002 #define TAPE_SPACE_FILEMARKS 6
1003 #define TAPE_SPACE_SEQUENTIAL_FMKS 7
1004 #define TAPE_SPACE_SETMARKS 8
1005 #define TAPE_SPACE_SEQUENTIAL_SMKS 9
1006 #define TAPE_DRIVE_FIXED 1
1007 #define TAPE_DRIVE_SELECT 2
1008 #define TAPE_DRIVE_INITIATOR 4
1009 #define TAPE_DRIVE_ERASE_SHORT 16
1010 #define TAPE_DRIVE_ERASE_LONG 32
1011 #define TAPE_DRIVE_ERASE_BOP_ONLY 64
1012 #define TAPE_DRIVE_ERASE_IMMEDIATE 128
1013 #define TAPE_DRIVE_TAPE_CAPACITY 256
1014 #define TAPE_DRIVE_TAPE_REMAINING 512
1015 #define TAPE_DRIVE_FIXED_BLOCK 1024
1016 #define TAPE_DRIVE_VARIABLE_BLOCK 2048
1017 #define TAPE_DRIVE_WRITE_PROTECT 4096
1018 #define TAPE_DRIVE_EOT_WZ_SIZE 8192
1019 #define TAPE_DRIVE_ECC 0x10000
1020 #define TAPE_DRIVE_COMPRESSION 0x20000
1021 #define TAPE_DRIVE_PADDING 0x40000
1022 #define TAPE_DRIVE_REPORT_SMKS 0x80000
1023 #define TAPE_DRIVE_GET_ABSOLUTE_BLK 0x100000
1024 #define TAPE_DRIVE_GET_LOGICAL_BLK 0x200000
1025 #define TAPE_DRIVE_SET_EOT_WZ_SIZE 0x400000
1026 #define TAPE_DRIVE_EJECT_MEDIA 0x1000000
1027 #define TAPE_DRIVE_CLEAN_REQUESTS 0x2000000
1028 #define TAPE_DRIVE_SET_CMP_BOP_ONLY 0x4000000
1029 #define TAPE_DRIVE_RESERVED_BIT 0x80000000
1030 #define TAPE_DRIVE_LOAD_UNLOAD 0x80000001
1031 #define TAPE_DRIVE_TENSION 0x80000002
1032 #define TAPE_DRIVE_LOCK_UNLOCK 0x80000004
1033 #define TAPE_DRIVE_REWIND_IMMEDIATE 0x80000008
1034 #define TAPE_DRIVE_SET_BLOCK_SIZE 0x80000010
1035 #define TAPE_DRIVE_LOAD_UNLD_IMMED 0x80000020
1036 #define TAPE_DRIVE_TENSION_IMMED 0x80000040
1037 #define TAPE_DRIVE_LOCK_UNLK_IMMED 0x80000080
1038 #define TAPE_DRIVE_SET_ECC 0x80000100
1039 #define TAPE_DRIVE_SET_COMPRESSION 0x80000200
1040 #define TAPE_DRIVE_SET_PADDING 0x80000400
1041 #define TAPE_DRIVE_SET_REPORT_SMKS 0x80000800
1042 #define TAPE_DRIVE_ABSOLUTE_BLK 0x80001000
1043 #define TAPE_DRIVE_ABS_BLK_IMMED 0x80002000
1044 #define TAPE_DRIVE_LOGICAL_BLK 0x80004000
1045 #define TAPE_DRIVE_LOG_BLK_IMMED 0x80008000
1046 #define TAPE_DRIVE_END_OF_DATA 0x80010000
1047 #define TAPE_DRIVE_RELATIVE_BLKS 0x80020000
1048 #define TAPE_DRIVE_FILEMARKS 0x80040000
1049 #define TAPE_DRIVE_SEQUENTIAL_FMKS 0x80080000
1050 #define TAPE_DRIVE_SETMARKS 0x80100000
1051 #define TAPE_DRIVE_SEQUENTIAL_SMKS 0x80200000
1052 #define TAPE_DRIVE_REVERSE_POSITION 0x80400000
1053 #define TAPE_DRIVE_SPACE_IMMEDIATE 0x80800000
1054 #define TAPE_DRIVE_WRITE_SETMARKS 0x81000000
1055 #define TAPE_DRIVE_WRITE_FILEMARKS 0x82000000
1056 #define TAPE_DRIVE_WRITE_SHORT_FMKS 0x84000000
1057 #define TAPE_DRIVE_WRITE_LONG_FMKS 0x88000000
1058 #define TAPE_DRIVE_WRITE_MARK_IMMED 0x90000000
1059 #define TAPE_DRIVE_FORMAT 0xA0000000
1060 #define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000
1061 #define TAPE_DRIVE_HIGH_FEATURES 0x80000000
1062 #define TAPE_FIXED_PARTITIONS 0
1063 #define TAPE_INITIATOR_PARTITIONS 2
1064 #define TAPE_SELECT_PARTITIONS 1
1065 #define TAPE_FILEMARKS 1
1066 #define TAPE_LONG_FILEMARKS 3
1067 #define TAPE_SETMARKS 0
1068 #define TAPE_SHORT_FILEMARKS 2
1069 #define TAPE_ERASE_LONG 1
1070 #define TAPE_ERASE_SHORT 0
1072 #define TAPE_UNLOAD 1
1073 #define TAPE_TENSION 2
1075 #define TAPE_UNLOCK 4
1076 #define TAPE_FORMAT 5
1077 #define VER_PLATFORM_WIN32s 0
1078 #define VER_PLATFORM_WIN32_WINDOWS 1
1079 #define VER_PLATFORM_WIN32_NT 2
1080 #define VER_NT_WORKSTATION 1
1081 #define VER_NT_DOMAIN_CONTROLLER 2
1082 #define VER_NT_SERVER 3
1083 #define VER_SUITE_SMALLBUSINESS 1
1084 #define VER_SUITE_ENTERPRISE 2
1085 #define VER_SUITE_BACKOFFICE 4
1086 #define VER_SUITE_TERMINAL 16
1087 #define VER_SUITE_SMALLBUSINESS_RESTRICTED 32
1088 #define VER_SUITE_DATACENTER 128
1089 #define VER_SUITE_PERSONAL 512
1090 #define BTYPE(x) ((x)&N_BTMASK)
1091 #define ISPTR(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT))
1092 #define ISFCN(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_FUNCTION<<N_BTSHFT))
1093 #define ISARY(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_ARRAY<<N_BTSHFT))
1094 #define ISTAG(x) ((x)==IMAGE_SYM_CLASS_STRUCT_TAG||(x)==IMAGE_SYM_CLASS_UNION_TAG||(x)==IMAGE_SYM_CLASS_ENUM_TAG)
1095 #define INCREF(x) ((((x)&~N_BTMASK)<<N_TSHIFT)|(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT)|((x)&N_BTMASK))
1096 #define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
1097 #define TLS_MINIMUM_AVAILABLE 64
1098 #define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
1099 #define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer)
1100 #define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384
1101 #define IO_REPARSE_TAG_RESERVED_ZERO 0
1102 #define IO_REPARSE_TAG_RESERVED_ONE 1
1103 #define IO_REPARSE_TAG_RESERVED_RANGE IO_REPARSE_TAG_RESERVED_ONE
1104 #define IsReparseTagMicrosoft(x) ((x)&0x80000000)
1105 #define IsReparseTagHighLatency(x) ((x)&0x40000000)
1106 #define IsReparseTagNameSurrogate(x) ((x)&0x20000000)
1107 #define IO_REPARSE_TAG_VALID_VALUES 0xE000FFFF
1108 #define IsReparseTagValid(x) (!((x)&~IO_REPARSE_TAG_VALID_VALUES)&&((x)>IO_REPARSE_TAG_RESERVED_RANGE))
1109 #define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO
1110 #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
1112 typedef DWORD ACCESS_MASK
, *PACCESS_MASK
;
1113 #ifndef _GUID_DEFINED /* also defined in basetyps.h */
1114 #define _GUID_DEFINED
1115 typedef struct _GUID
{
1116 unsigned long Data1
;
1117 unsigned short Data2
;
1118 unsigned short Data3
;
1119 unsigned char Data4
[8];
1120 } GUID
, *REFGUID
, *LPGUID
;
1121 #define SYSTEM_LUID { QuadPart:999 }
1122 #endif /* _GUID_DEFINED */
1123 typedef struct _GENERIC_MAPPING
{
1124 ACCESS_MASK GenericRead
;
1125 ACCESS_MASK GenericWrite
;
1126 ACCESS_MASK GenericExecute
;
1127 ACCESS_MASK GenericAll
;
1128 } GENERIC_MAPPING
, *PGENERIC_MAPPING
;
1129 typedef struct _ACE_HEADER
{
1134 typedef struct _ACCESS_ALLOWED_ACE
{
1138 } ACCESS_ALLOWED_ACE
;
1139 typedef struct _ACCESS_DENIED_ACE
{
1143 } ACCESS_DENIED_ACE
;
1144 typedef struct _SYSTEM_AUDIT_ACE
{
1149 typedef SYSTEM_AUDIT_ACE
*PSYSTEM_AUDIT_ACE
;
1150 typedef struct _SYSTEM_ALARM_ACE
{
1154 } SYSTEM_ALARM_ACE
,*PSYSTEM_ALARM_ACE
;
1155 typedef struct _ACCESS_ALLOWED_OBJECT_ACE
{
1160 GUID InheritedObjectType
;
1162 } ACCESS_ALLOWED_OBJECT_ACE
,*PACCESS_ALLOWED_OBJECT_ACE
;
1163 typedef struct _ACCESS_DENIED_OBJECT_ACE
{
1168 GUID InheritedObjectType
;
1170 } ACCESS_DENIED_OBJECT_ACE
,*PACCESS_DENIED_OBJECT_ACE
;
1171 typedef struct _SYSTEM_AUDIT_OBJECT_ACE
{
1176 GUID InheritedObjectType
;
1178 } SYSTEM_AUDIT_OBJECT_ACE
,*PSYSTEM_AUDIT_OBJECT_ACE
;
1179 typedef struct _SYSTEM_ALARM_OBJECT_ACE
{
1184 GUID InheritedObjectType
;
1186 } SYSTEM_ALARM_OBJECT_ACE
,*PSYSTEM_ALARM_OBJECT_ACE
;
1187 typedef struct _ACL
{
1194 typedef struct _ACL_REVISION_INFORMATION
{
1196 } ACL_REVISION_INFORMATION
;
1197 typedef struct _ACL_SIZE_INFORMATION
{
1199 DWORD AclBytesInUse
;
1201 } ACL_SIZE_INFORMATION
;
1203 /* FIXME: add more machines */
1205 #define SIZE_OF_80387_REGISTERS 80
1206 #define CONTEXT_i386 0x10000
1207 #define CONTEXT_i486 0x10000
1208 #define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L)
1209 #define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L)
1210 #define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L)
1211 #define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L)
1212 #define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L)
1213 #define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L)
1214 #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
1215 #define MAXIMUM_SUPPORTED_EXTENSION 512
1216 typedef struct _FLOATING_SAVE_AREA
{
1221 DWORD ErrorSelector
;
1224 BYTE RegisterArea
[80];
1226 } FLOATING_SAVE_AREA
;
1227 typedef struct _CONTEXT
{
1235 FLOATING_SAVE_AREA FloatSave
;
1252 BYTE ExtendedRegisters
[MAXIMUM_SUPPORTED_EXTENSION
];
1254 #elif defined(_PPC_)
1255 #define CONTEXT_CONTROL 1L
1256 #define CONTEXT_FLOATING_POINT 2L
1257 #define CONTEXT_INTEGER 4L
1258 #define CONTEXT_DEBUG_REGISTERS 8L
1259 #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
1343 #elif defined(_ALPHA_)
1344 #define CONTEXT_ALPHA 0x20000
1345 #define CONTEXT_CONTROL (CONTEXT_ALPHA|1L)
1346 #define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L)
1347 #define CONTEXT_INTEGER (CONTEXT_ALPHA|4L)
1348 #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
1349 typedef struct _CONTEXT
{
1423 /* These are the debug or break registers on the SH3 */
1424 typedef struct _DEBUG_REGISTERS
{
1437 } DEBUG_REGISTERS
, *PDEBUG_REGISTERS
;
1439 /* The following flags control the contents of the CONTEXT structure. */
1441 #define CONTEXT_SH3 0x00000040
1442 #define CONTEXT_SH4 0x000000c0 /* CONTEXT_SH3 | 0x80 - must contain the SH3 bits */
1445 #define CONTEXT_CONTROL (CONTEXT_SH3 | 0x00000001L)
1446 #define CONTEXT_INTEGER (CONTEXT_SH3 | 0x00000002L)
1447 #define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH3 | 0x00000008L)
1448 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS)
1450 #define CONTEXT_CONTROL (CONTEXT_SH4 | 0x00000001L)
1451 #define CONTEXT_INTEGER (CONTEXT_SH4 | 0x00000002L)
1452 #define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH4 | 0x00000008L)
1453 #define CONTEXT_FLOATING_POINT (CONTEXT_SH4 | 0x00000004L)
1454 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT)
1459 /* This frame is used to store a limited processor context into the */
1460 /* Thread structure for CPUs which have no floating point support. */
1462 typedef struct _CONTEXT
{
1463 /* The flags values within this flag control the contents of */
1464 /* a CONTEXT record. */
1466 /* If the context record is used as an input parameter, then */
1467 /* for each portion of the context record controlled by a flag */
1468 /* whose value is set, it is assumed that that portion of the */
1469 /* context record contains valid context. If the context record */
1470 /* is being used to modify a thread's context, then only that */
1471 /* portion of the threads context will be modified. */
1473 /* If the context record is used as an IN OUT parameter to capture */
1474 /* the context of a thread, then only those portions of the thread's */
1475 /* context corresponding to set flags will be returned. */
1477 /* The context record is never used as an OUT only parameter. */
1482 /* This section is specified/returned if the ContextFlags word contains */
1483 /* the flag CONTEXT_INTEGER. */
1485 /* N.B. The registers RA and R15 are defined in this section, but are */
1486 /* considered part of the control context rather than part of the integer */
1510 /* This section is specified/returned if the ContextFlags word contains */
1511 /* the flag CONTEXT_CONTROL. */
1513 /* N.B. The registers r15 and ra are defined in the integer section, */
1514 /* but are considered part of the control context rather than part of */
1515 /* the integer context. */
1520 #if !defined(SH3e) && !defined(SH4)
1522 DEBUG_REGISTERS DebugRegisters
;
1535 /* The following flags control the contents of the CONTEXT structure. */
1537 #define CONTEXT_R4000 0x00010000 /* r4000 context */
1539 #define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001L)
1540 #define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002L)
1541 #define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004L)
1543 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
1547 /* N.B. This frame must be exactly a multiple of 16 bytes in length. */
1549 /* This frame has a several purposes: 1) it is used as an argument to */
1550 /* NtContinue, 2) it is used to constuct a call frame for APC delivery, */
1551 /* 3) it is used to construct a call frame for exception dispatching */
1552 /* in user mode, and 4) it is used in the user level thread creation */
1555 /* The layout of the record conforms to a standard call frame. */
1558 typedef struct _CONTEXT
{
1560 /* This section is always present and is used as an argument build */
1565 /* This section is specified/returned if the ContextFlags word contains */
1566 /* the flag CONTEXT_FLOATING_POINT. */
1601 /* This section is specified/returned if the ContextFlags word contains */
1602 /* the flag CONTEXT_INTEGER. */
1604 /* N.B. The registers gp, sp, and ra are defined in this section, but are */
1605 /* considered part of the control context rather than part of the integer */
1608 /* N.B. Register zero is not stored in the frame. */
1645 /* This section is specified/returned if the ContextFlags word contains */
1646 /* the flag CONTEXT_FLOATING_POINT. */
1650 /* This section is specified/returned if the ContextFlags word contains */
1651 /* the flag CONTEXT_CONTROL. */
1653 /* N.B. The registers gp, sp, and ra are defined in the integer section, */
1654 /* but are considered part of the control context rather than part of */
1655 /* the integer context. */
1660 /* The flags values within this flag control the contents of */
1661 /* a CONTEXT record. */
1663 /* If the context record is used as an input parameter, then */
1664 /* for each portion of the context record controlled by a flag */
1665 /* whose value is set, it is assumed that that portion of the */
1666 /* context record contains valid context. If the context record */
1667 /* is being used to modify a thread's context, then only that */
1668 /* portion of the threads context will be modified. */
1670 /* If the context record is used as an IN OUT parameter to capture */
1671 /* the context of a thread, then only those portions of the thread's */
1672 /* context corresponding to set flags will be returned. */
1674 /* The context record is never used as an OUT only parameter. */
1683 /* The following flags control the contents of the CONTEXT structure. */
1685 #define CONTEXT_ARM 0x0000040
1686 #define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L)
1687 #define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L)
1689 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
1691 typedef struct _CONTEXT
{
1692 /* The flags values within this flag control the contents of
1695 If the context record is used as an input parameter, then
1696 for each portion of the context record controlled by a flag
1697 whose value is set, it is assumed that that portion of the
1698 context record contains valid context. If the context record
1699 is being used to modify a thread's context, then only that
1700 portion of the threads context will be modified.
1702 If the context record is used as an IN OUT parameter to capture
1703 the context of a thread, then only those portions of the thread's
1704 context corresponding to set flags will be returned.
1706 The context record is never used as an OUT only parameter. */
1710 /* This section is specified/returned if the ContextFlags word contains
1711 the flag CONTEXT_INTEGER. */
1733 #error "undefined processor type"
1735 typedef CONTEXT
*PCONTEXT
,*LPCONTEXT
;
1736 typedef struct _EXCEPTION_RECORD
{
1737 DWORD ExceptionCode
;
1738 DWORD ExceptionFlags
;
1739 struct _EXCEPTION_RECORD
*ExceptionRecord
;
1740 PVOID ExceptionAddress
;
1741 DWORD NumberParameters
;
1742 DWORD ExceptionInformation
[EXCEPTION_MAXIMUM_PARAMETERS
];
1743 } EXCEPTION_RECORD
,*PEXCEPTION_RECORD
;
1744 typedef struct _EXCEPTION_POINTERS
{
1745 PEXCEPTION_RECORD ExceptionRecord
;
1746 PCONTEXT ContextRecord
;
1747 } EXCEPTION_POINTERS
,*PEXCEPTION_POINTERS
,*LPEXCEPTION_POINTERS
;
1748 typedef union _LARGE_INTEGER
{
1753 #if ! defined(NONAMELESSUNION) || defined(__cplusplus)
1754 _ANONYMOUS_STRUCT
struct {
1758 #endif /* NONAMELESSUNION */
1760 } LARGE_INTEGER
, *PLARGE_INTEGER
;
1761 typedef union _ULARGE_INTEGER
{
1766 #if ! defined(NONAMELESSUNION) || defined(__cplusplus)
1767 _ANONYMOUS_STRUCT
struct {
1771 #endif /* NONAMELESSUNION */
1773 } ULARGE_INTEGER
, *PULARGE_INTEGER
;
1774 typedef LARGE_INTEGER LUID
,*PLUID
;
1775 #pragma pack(push,4)
1776 typedef struct _LUID_AND_ATTRIBUTES
{
1779 } LUID_AND_ATTRIBUTES
;
1781 typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY
[ANYSIZE_ARRAY
];
1782 typedef LUID_AND_ATTRIBUTES_ARRAY
*PLUID_AND_ATTRIBUTES_ARRAY
;
1783 typedef struct _PRIVILEGE_SET
{
1784 DWORD PrivilegeCount
;
1786 LUID_AND_ATTRIBUTES Privilege
[ANYSIZE_ARRAY
];
1787 } PRIVILEGE_SET
,*PPRIVILEGE_SET
;
1788 typedef struct _SECURITY_ATTRIBUTES
{
1790 LPVOID lpSecurityDescriptor
;
1791 BOOL bInheritHandle
;
1792 } SECURITY_ATTRIBUTES
,*PSECURITY_ATTRIBUTES
,*LPSECURITY_ATTRIBUTES
;
1793 typedef enum _SECURITY_IMPERSONATION_LEVEL
{
1795 SecurityIdentification
,
1796 SecurityImpersonation
,
1798 } SECURITY_IMPERSONATION_LEVEL
;
1799 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE
,*PSECURITY_CONTEXT_TRACKING_MODE
;
1800 typedef struct _SECURITY_QUALITY_OF_SERVICE
{
1802 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
;
1803 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
;
1804 BOOLEAN EffectiveOnly
;
1805 } SECURITY_QUALITY_OF_SERVICE
,*PSECURITY_QUALITY_OF_SERVICE
;
1806 typedef PVOID PACCESS_TOKEN
;
1807 typedef struct _SE_IMPERSONATION_STATE
{
1808 PACCESS_TOKEN Token
;
1810 BOOLEAN EffectiveOnly
;
1811 SECURITY_IMPERSONATION_LEVEL Level
;
1812 } SE_IMPERSONATION_STATE
,*PSE_IMPERSONATION_STATE
;
1813 typedef struct _SID_IDENTIFIER_AUTHORITY
{
1815 } SID_IDENTIFIER_AUTHORITY
,*PSID_IDENTIFIER_AUTHORITY
,*LPSID_IDENTIFIER_AUTHORITY
;
1817 typedef struct _SID
{
1819 BYTE SubAuthorityCount
;
1820 SID_IDENTIFIER_AUTHORITY IdentifierAuthority
;
1821 DWORD SubAuthority
[ANYSIZE_ARRAY
];
1823 typedef struct _SID_AND_ATTRIBUTES
{
1826 } SID_AND_ATTRIBUTES
;
1827 typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY
[ANYSIZE_ARRAY
];
1828 typedef SID_AND_ATTRIBUTES_ARRAY
*PSID_AND_ATTRIBUTES_ARRAY
;
1829 typedef struct _TOKEN_SOURCE
{
1830 CHAR SourceName
[TOKEN_SOURCE_LENGTH
];
1831 LUID SourceIdentifier
;
1832 } TOKEN_SOURCE
,*PTOKEN_SOURCE
;
1833 typedef struct _TOKEN_CONTROL
{
1835 LUID AuthenticationId
;
1837 TOKEN_SOURCE TokenSource
;
1838 } TOKEN_CONTROL
,*PTOKEN_CONTROL
;
1839 typedef struct _TOKEN_DEFAULT_DACL
{
1841 } TOKEN_DEFAULT_DACL
,*PTOKEN_DEFAULT_DACL
;
1842 typedef struct _TOKEN_GROUPS
{
1844 SID_AND_ATTRIBUTES Groups
[ANYSIZE_ARRAY
];
1845 } TOKEN_GROUPS
,*PTOKEN_GROUPS
,*LPTOKEN_GROUPS
;
1846 typedef struct _TOKEN_OWNER
{
1848 } TOKEN_OWNER
,*PTOKEN_OWNER
;
1849 typedef struct _TOKEN_PRIMARY_GROUP
{
1851 } TOKEN_PRIMARY_GROUP
,*PTOKEN_PRIMARY_GROUP
;
1852 typedef struct _TOKEN_PRIVILEGES
{
1853 DWORD PrivilegeCount
;
1854 LUID_AND_ATTRIBUTES Privileges
[ANYSIZE_ARRAY
];
1855 } TOKEN_PRIVILEGES
,*PTOKEN_PRIVILEGES
,*LPTOKEN_PRIVILEGES
;
1856 typedef enum tagTOKEN_TYPE
{ TokenPrimary
=1,TokenImpersonation
}TOKEN_TYPE
;
1857 typedef struct _TOKEN_STATISTICS
{
1859 LUID AuthenticationId
;
1860 LARGE_INTEGER ExpirationTime
;
1861 TOKEN_TYPE TokenType
;
1862 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
;
1863 DWORD DynamicCharged
;
1864 DWORD DynamicAvailable
;
1866 DWORD PrivilegeCount
;
1869 typedef struct _TOKEN_USER
{
1870 SID_AND_ATTRIBUTES User
;
1871 } TOKEN_USER
, *PTOKEN_USER
;
1872 typedef DWORD SECURITY_INFORMATION
,*PSECURITY_INFORMATION
;
1873 typedef WORD SECURITY_DESCRIPTOR_CONTROL
,*PSECURITY_DESCRIPTOR_CONTROL
;
1874 typedef struct _SECURITY_DESCRIPTOR
{
1877 SECURITY_DESCRIPTOR_CONTROL Control
;
1882 } SECURITY_DESCRIPTOR
, *PSECURITY_DESCRIPTOR
, *PISECURITY_DESCRIPTOR
;
1883 typedef enum _TOKEN_INFORMATION_CLASS
{
1884 TokenUser
=1,TokenGroups
,TokenPrivileges
,TokenOwner
,
1885 TokenPrimaryGroup
,TokenDefaultDacl
,TokenSource
,TokenType
,
1886 TokenImpersonationLevel
,TokenStatistics
,TokenRestrictedSids
,
1888 } TOKEN_INFORMATION_CLASS
;
1889 typedef enum _SID_NAME_USE
{
1890 SidTypeUser
=1,SidTypeGroup
,SidTypeDomain
,SidTypeAlias
,SidTypeWellKnownGroup
,
1891 SidTypeDeletedAccount
,SidTypeInvalid
,SidTypeUnknown
1892 } SID_NAME_USE
,*PSID_NAME_USE
;
1893 typedef struct _QUOTA_LIMITS
{
1894 SIZE_T PagedPoolLimit
;
1895 SIZE_T NonPagedPoolLimit
;
1896 SIZE_T MinimumWorkingSetSize
;
1897 SIZE_T MaximumWorkingSetSize
;
1898 SIZE_T PagefileLimit
;
1899 LARGE_INTEGER TimeLimit
;
1900 } QUOTA_LIMITS
,*PQUOTA_LIMITS
;
1901 typedef struct _IO_COUNTERS
{
1902 ULONGLONG ReadOperationCount
;
1903 ULONGLONG WriteOperationCount
;
1904 ULONGLONG OtherOperationCount
;
1905 ULONGLONG ReadTransferCount
;
1906 ULONGLONG WriteTransferCount
;
1907 ULONGLONG OtherTransferCount
;
1908 } IO_COUNTERS
, *PIO_COUNTERS
;
1909 typedef struct _FILE_NOTIFY_INFORMATION
{
1910 DWORD NextEntryOffset
;
1912 DWORD FileNameLength
;
1914 } FILE_NOTIFY_INFORMATION
,*PFILE_NOTIFY_INFORMATION
;
1915 typedef struct _TAPE_ERASE
{
1918 } TAPE_ERASE
,*PTAPE_ERASE
;
1919 typedef struct _TAPE_GET_DRIVE_PARAMETERS
{
1921 BOOLEAN Compression
;
1922 BOOLEAN DataPadding
;
1923 BOOLEAN ReportSetmarks
;
1924 DWORD DefaultBlockSize
;
1925 DWORD MaximumBlockSize
;
1926 DWORD MinimumBlockSize
;
1927 DWORD MaximumPartitionCount
;
1930 DWORD EOTWarningZoneSize
;
1931 } TAPE_GET_DRIVE_PARAMETERS
,*PTAPE_GET_DRIVE_PARAMETERS
;
1932 typedef struct _TAPE_GET_MEDIA_PARAMETERS
{
1933 LARGE_INTEGER Capacity
;
1934 LARGE_INTEGER Remaining
;
1936 DWORD PartitionCount
;
1937 BOOLEAN WriteProtected
;
1938 } TAPE_GET_MEDIA_PARAMETERS
,*PTAPE_GET_MEDIA_PARAMETERS
;
1939 typedef struct _TAPE_GET_POSITION
{
1944 } TAPE_GET_POSITION
,*PTAPE_GET_POSITION
;
1945 typedef struct _TAPE_PREPARE
{
1948 } TAPE_PREPARE
,*PTAPE_PREPARE
;
1949 typedef struct _TAPE_SET_DRIVE_PARAMETERS
{
1951 BOOLEAN Compression
;
1952 BOOLEAN DataPadding
;
1953 BOOLEAN ReportSetmarks
;
1954 ULONG EOTWarningZoneSize
;
1955 } TAPE_SET_DRIVE_PARAMETERS
,*PTAPE_SET_DRIVE_PARAMETERS
;
1956 typedef struct _TAPE_SET_MEDIA_PARAMETERS
{
1958 } TAPE_SET_MEDIA_PARAMETERS
,*PTAPE_SET_MEDIA_PARAMETERS
;
1959 typedef struct _TAPE_SET_POSITION
{
1962 LARGE_INTEGER Offset
;
1964 } TAPE_SET_POSITION
,*PTAPE_SET_POSITION
;
1965 typedef struct _TAPE_WRITE_MARKS
{
1969 } TAPE_WRITE_MARKS
,*PTAPE_WRITE_MARKS
;
1970 typedef struct _TAPE_CREATE_PARTITION
{
1974 } TAPE_CREATE_PARTITION
,*PTAPE_CREATE_PARTITION
;
1975 typedef struct _MEMORY_BASIC_INFORMATION
{
1977 PVOID AllocationBase
;
1978 DWORD AllocationProtect
;
1983 } MEMORY_BASIC_INFORMATION
,*PMEMORY_BASIC_INFORMATION
;
1984 typedef struct _MESSAGE_RESOURCE_ENTRY
{
1988 } MESSAGE_RESOURCE_ENTRY
,*PMESSAGE_RESOURCE_ENTRY
;
1989 typedef struct _MESSAGE_RESOURCE_BLOCK
{
1992 DWORD OffsetToEntries
;
1993 } MESSAGE_RESOURCE_BLOCK
,*PMESSAGE_RESOURCE_BLOCK
;
1994 typedef struct _MESSAGE_RESOURCE_DATA
{
1995 DWORD NumberOfBlocks
;
1996 MESSAGE_RESOURCE_BLOCK Blocks
[1];
1997 } MESSAGE_RESOURCE_DATA
,*PMESSAGE_RESOURCE_DATA
;
1998 typedef struct _LIST_ENTRY
{
1999 struct _LIST_ENTRY
*Flink
;
2000 struct _LIST_ENTRY
*Blink
;
2001 } LIST_ENTRY
,*PLIST_ENTRY
;
2002 typedef struct _RTL_CRITICAL_SECTION_DEBUG
{
2004 WORD CreatorBackTraceIndex
;
2005 struct _RTL_CRITICAL_SECTION
*CriticalSection
;
2006 LIST_ENTRY ProcessLocksList
;
2008 DWORD ContentionCount
;
2010 } RTL_CRITICAL_SECTION_DEBUG
,*PRTL_CRITICAL_SECTION_DEBUG
;
2011 typedef struct _RTL_CRITICAL_SECTION
{
2012 PRTL_CRITICAL_SECTION_DEBUG DebugInfo
;
2014 LONG RecursionCount
;
2015 HANDLE OwningThread
;
2016 HANDLE LockSemaphore
;
2018 } RTL_CRITICAL_SECTION
,*PRTL_CRITICAL_SECTION
;
2019 typedef struct _EVENTLOGRECORD
{
2023 DWORD TimeGenerated
;
2030 DWORD ClosingRecordNumber
;
2032 DWORD UserSidLength
;
2033 DWORD UserSidOffset
;
2036 } EVENTLOGRECORD
,*PEVENTLOGRECORD
;
2037 typedef struct _OSVERSIONINFOA
{
2038 DWORD dwOSVersionInfoSize
;
2039 DWORD dwMajorVersion
;
2040 DWORD dwMinorVersion
;
2041 DWORD dwBuildNumber
;
2043 CHAR szCSDVersion
[128];
2044 } OSVERSIONINFOA
,*POSVERSIONINFOA
,*LPOSVERSIONINFOA
;
2045 typedef struct _OSVERSIONINFOW
{
2046 DWORD dwOSVersionInfoSize
;
2047 DWORD dwMajorVersion
;
2048 DWORD dwMinorVersion
;
2049 DWORD dwBuildNumber
;
2051 WCHAR szCSDVersion
[128];
2052 } OSVERSIONINFOW
,*POSVERSIONINFOW
,*LPOSVERSIONINFOW
;
2053 typedef struct _OSVERSIONINFOEXA
{
2054 DWORD dwOSVersionInfoSize
;
2055 DWORD dwMajorVersion
;
2056 DWORD dwMinorVersion
;
2057 DWORD dwBuildNumber
;
2059 CHAR szCSDVersion
[128];
2060 WORD wServicePackMajor
;
2061 WORD wServicePackMinor
;
2065 } OSVERSIONINFOEXA
, *POSVERSIONINFOEXA
, *LPOSVERSIONINFOEXA
;
2066 typedef struct _OSVERSIONINFOEXW
{
2067 DWORD dwOSVersionInfoSize
;
2068 DWORD dwMajorVersion
;
2069 DWORD dwMinorVersion
;
2070 DWORD dwBuildNumber
;
2072 WCHAR szCSDVersion
[128];
2073 WORD wServicePackMajor
;
2074 WORD wServicePackMinor
;
2078 } OSVERSIONINFOEXW
, *POSVERSIONINFOEXW
, *LPOSVERSIONINFOEXW
;
2079 #pragma pack(push,2)
2080 typedef struct _IMAGE_VXD_HEADER
{
2095 DWORD e32_lastpagesize
;
2096 DWORD e32_fixupsize
;
2113 DWORD e32_impmodcnt
;
2119 DWORD e32_cbnrestab
;
2122 DWORD e32_debuginfo
;
2124 DWORD e32_instpreload
;
2125 DWORD e32_instdemand
;
2128 DWORD e32_winresoff
;
2129 DWORD e32_winreslen
;
2132 } IMAGE_VXD_HEADER
,*PIMAGE_VXD_HEADER
;
2134 #pragma pack(push,4)
2135 typedef struct _IMAGE_FILE_HEADER
{
2137 WORD NumberOfSections
;
2138 DWORD TimeDateStamp
;
2139 DWORD PointerToSymbolTable
;
2140 DWORD NumberOfSymbols
;
2141 WORD SizeOfOptionalHeader
;
2142 WORD Characteristics
;
2143 } IMAGE_FILE_HEADER
, *PIMAGE_FILE_HEADER
;
2144 typedef struct _IMAGE_DATA_DIRECTORY
{
2145 DWORD VirtualAddress
;
2147 } IMAGE_DATA_DIRECTORY
,*PIMAGE_DATA_DIRECTORY
;
2148 typedef struct _IMAGE_OPTIONAL_HEADER
{
2150 BYTE MajorLinkerVersion
;
2151 BYTE MinorLinkerVersion
;
2153 DWORD SizeOfInitializedData
;
2154 DWORD SizeOfUninitializedData
;
2155 DWORD AddressOfEntryPoint
;
2159 DWORD SectionAlignment
;
2160 DWORD FileAlignment
;
2161 WORD MajorOperatingSystemVersion
;
2162 WORD MinorOperatingSystemVersion
;
2163 WORD MajorImageVersion
;
2164 WORD MinorImageVersion
;
2165 WORD MajorSubsystemVersion
;
2166 WORD MinorSubsystemVersion
;
2169 DWORD SizeOfHeaders
;
2172 WORD DllCharacteristics
;
2173 DWORD SizeOfStackReserve
;
2174 DWORD SizeOfStackCommit
;
2175 DWORD SizeOfHeapReserve
;
2176 DWORD SizeOfHeapCommit
;
2178 DWORD NumberOfRvaAndSizes
;
2179 IMAGE_DATA_DIRECTORY DataDirectory
[IMAGE_NUMBEROF_DIRECTORY_ENTRIES
];
2180 } IMAGE_OPTIONAL_HEADER
,*PIMAGE_OPTIONAL_HEADER
;
2181 typedef struct _IMAGE_ROM_OPTIONAL_HEADER
{
2183 BYTE MajorLinkerVersion
;
2184 BYTE MinorLinkerVersion
;
2186 DWORD SizeOfInitializedData
;
2187 DWORD SizeOfUninitializedData
;
2188 DWORD AddressOfEntryPoint
;
2195 } IMAGE_ROM_OPTIONAL_HEADER
,*PIMAGE_ROM_OPTIONAL_HEADER
;
2197 #pragma pack(push,2)
2198 typedef struct _IMAGE_DOS_HEADER
{
2218 } IMAGE_DOS_HEADER
,*PIMAGE_DOS_HEADER
;
2219 typedef struct _IMAGE_OS2_HEADER
{
2245 BYTE ne_flagsothers
;
2247 WORD ne_psegrefbytes
;
2250 } IMAGE_OS2_HEADER
,*PIMAGE_OS2_HEADER
;
2252 #pragma pack(push,4)
2253 typedef struct _IMAGE_NT_HEADERS
{
2255 IMAGE_FILE_HEADER FileHeader
;
2256 IMAGE_OPTIONAL_HEADER OptionalHeader
;
2257 } IMAGE_NT_HEADERS
,*PIMAGE_NT_HEADERS
;
2258 typedef struct _IMAGE_ROM_HEADERS
{
2259 IMAGE_FILE_HEADER FileHeader
;
2260 IMAGE_ROM_OPTIONAL_HEADER OptionalHeader
;
2261 } IMAGE_ROM_HEADERS
,*PIMAGE_ROM_HEADERS
;
2262 typedef struct _IMAGE_SECTION_HEADER
{
2263 BYTE Name
[IMAGE_SIZEOF_SHORT_NAME
];
2265 DWORD PhysicalAddress
;
2268 DWORD VirtualAddress
;
2269 DWORD SizeOfRawData
;
2270 DWORD PointerToRawData
;
2271 DWORD PointerToRelocations
;
2272 DWORD PointerToLinenumbers
;
2273 WORD NumberOfRelocations
;
2274 WORD NumberOfLinenumbers
;
2275 DWORD Characteristics
;
2276 } IMAGE_SECTION_HEADER
,*PIMAGE_SECTION_HEADER
;
2278 #pragma pack(push,2)
2279 typedef struct _IMAGE_SYMBOL
{
2289 SHORT SectionNumber
;
2292 BYTE NumberOfAuxSymbols
;
2293 } IMAGE_SYMBOL
,*PIMAGE_SYMBOL
;
2294 typedef union _IMAGE_AUX_SYMBOL
{
2306 DWORD PointerToLinenumber
;
2307 DWORD PointerToNextFunction
;
2316 BYTE Name
[IMAGE_SIZEOF_SYMBOL
];
2320 WORD NumberOfRelocations
;
2321 WORD NumberOfLinenumbers
;
2326 } IMAGE_AUX_SYMBOL
,*PIMAGE_AUX_SYMBOL
;
2327 typedef struct _IMAGE_COFF_SYMBOLS_HEADER
{
2328 DWORD NumberOfSymbols
;
2329 DWORD LvaToFirstSymbol
;
2330 DWORD NumberOfLinenumbers
;
2331 DWORD LvaToFirstLinenumber
;
2332 DWORD RvaToFirstByteOfCode
;
2333 DWORD RvaToLastByteOfCode
;
2334 DWORD RvaToFirstByteOfData
;
2335 DWORD RvaToLastByteOfData
;
2336 } IMAGE_COFF_SYMBOLS_HEADER
,*PIMAGE_COFF_SYMBOLS_HEADER
;
2337 typedef struct _IMAGE_RELOCATION
{
2338 _ANONYMOUS_UNION
union {
2339 DWORD VirtualAddress
;
2342 DWORD SymbolTableIndex
;
2344 } IMAGE_RELOCATION
,*PIMAGE_RELOCATION
;
2346 #pragma pack(push,4)
2347 typedef struct _IMAGE_BASE_RELOCATION
{
2348 DWORD VirtualAddress
;
2350 } IMAGE_BASE_RELOCATION
,*PIMAGE_BASE_RELOCATION
;
2352 #pragma pack(push,2)
2353 typedef struct _IMAGE_LINENUMBER
{
2355 DWORD SymbolTableIndex
;
2356 DWORD VirtualAddress
;
2359 } IMAGE_LINENUMBER
,*PIMAGE_LINENUMBER
;
2361 #pragma pack(push,4)
2362 typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER
{
2370 } IMAGE_ARCHIVE_MEMBER_HEADER
,*PIMAGE_ARCHIVE_MEMBER_HEADER
;
2371 typedef struct _IMAGE_EXPORT_DIRECTORY
{
2372 DWORD Characteristics
;
2373 DWORD TimeDateStamp
;
2378 DWORD NumberOfFunctions
;
2379 DWORD NumberOfNames
;
2380 PDWORD
*AddressOfFunctions
;
2381 PDWORD
*AddressOfNames
;
2382 PWORD
*AddressOfNameOrdinals
;
2383 } IMAGE_EXPORT_DIRECTORY
,*PIMAGE_EXPORT_DIRECTORY
;
2384 typedef struct _IMAGE_IMPORT_BY_NAME
{
2387 } IMAGE_IMPORT_BY_NAME
,*PIMAGE_IMPORT_BY_NAME
;
2388 typedef struct _IMAGE_THUNK_DATA
{
2390 PBYTE ForwarderString
;
2393 PIMAGE_IMPORT_BY_NAME AddressOfData
;
2395 } IMAGE_THUNK_DATA
,*PIMAGE_THUNK_DATA
;
2396 typedef struct _IMAGE_IMPORT_DESCRIPTOR
{
2397 _ANONYMOUS_UNION
union {
2398 DWORD Characteristics
;
2399 PIMAGE_THUNK_DATA OriginalFirstThunk
;
2401 DWORD TimeDateStamp
;
2402 DWORD ForwarderChain
;
2404 PIMAGE_THUNK_DATA FirstThunk
;
2405 } IMAGE_IMPORT_DESCRIPTOR
,*PIMAGE_IMPORT_DESCRIPTOR
;
2406 typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR
{
2407 DWORD TimeDateStamp
;
2408 WORD OffsetModuleName
;
2409 WORD NumberOfModuleForwarderRefs
;
2410 } IMAGE_BOUND_IMPORT_DESCRIPTOR
,*PIMAGE_BOUND_IMPORT_DESCRIPTOR
;
2411 typedef struct _IMAGE_BOUND_FORWARDER_REF
{
2412 DWORD TimeDateStamp
;
2413 WORD OffsetModuleName
;
2415 } IMAGE_BOUND_FORWARDER_REF
,*PIMAGE_BOUND_FORWARDER_REF
;
2416 typedef void(NTAPI
*PIMAGE_TLS_CALLBACK
)(PVOID
,DWORD
,PVOID
);
2417 typedef struct _IMAGE_TLS_DIRECTORY
{
2418 DWORD StartAddressOfRawData
;
2419 DWORD EndAddressOfRawData
;
2420 PDWORD AddressOfIndex
;
2421 PIMAGE_TLS_CALLBACK
*AddressOfCallBacks
;
2422 DWORD SizeOfZeroFill
;
2423 DWORD Characteristics
;
2424 } IMAGE_TLS_DIRECTORY
,*PIMAGE_TLS_DIRECTORY
;
2425 typedef struct _IMAGE_RESOURCE_DIRECTORY
{
2426 DWORD Characteristics
;
2427 DWORD TimeDateStamp
;
2430 WORD NumberOfNamedEntries
;
2431 WORD NumberOfIdEntries
;
2432 } IMAGE_RESOURCE_DIRECTORY
,*PIMAGE_RESOURCE_DIRECTORY
;
2433 _ANONYMOUS_STRUCT
typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY
{
2434 _ANONYMOUS_UNION
union {
2435 _ANONYMOUS_STRUCT
struct {
2436 DWORD NameOffset
:31;
2437 DWORD NameIsString
:1;
2442 _ANONYMOUS_UNION
union {
2444 _ANONYMOUS_STRUCT
struct {
2445 DWORD OffsetToDirectory
:31;
2446 DWORD DataIsDirectory
:1;
2449 } IMAGE_RESOURCE_DIRECTORY_ENTRY
,*PIMAGE_RESOURCE_DIRECTORY_ENTRY
;
2450 typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING
{
2453 } IMAGE_RESOURCE_DIRECTORY_STRING
,*PIMAGE_RESOURCE_DIRECTORY_STRING
;
2454 typedef struct _IMAGE_RESOURCE_DIR_STRING_U
{
2456 WCHAR NameString
[1];
2457 } IMAGE_RESOURCE_DIR_STRING_U
,*PIMAGE_RESOURCE_DIR_STRING_U
;
2458 typedef struct _IMAGE_RESOURCE_DATA_ENTRY
{
2463 } IMAGE_RESOURCE_DATA_ENTRY
,*PIMAGE_RESOURCE_DATA_ENTRY
;
2464 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY
{
2465 DWORD Characteristics
;
2466 DWORD TimeDateStamp
;
2469 DWORD GlobalFlagsClear
;
2470 DWORD GlobalFlagsSet
;
2471 DWORD CriticalSectionDefaultTimeout
;
2472 DWORD DeCommitFreeBlockThreshold
;
2473 DWORD DeCommitTotalFreeThreshold
;
2474 PVOID LockPrefixTable
;
2475 DWORD MaximumAllocationSize
;
2476 DWORD VirtualMemoryThreshold
;
2477 DWORD ProcessHeapFlags
;
2479 } IMAGE_LOAD_CONFIG_DIRECTORY
,*PIMAGE_LOAD_CONFIG_DIRECTORY
;
2480 typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY
{
2483 PVOID ExceptionHandler
;
2485 DWORD PrologEndAddress
;
2486 } IMAGE_RUNTIME_FUNCTION_ENTRY
,*PIMAGE_RUNTIME_FUNCTION_ENTRY
;
2487 typedef struct _IMAGE_DEBUG_DIRECTORY
{
2488 DWORD Characteristics
;
2489 DWORD TimeDateStamp
;
2494 DWORD AddressOfRawData
;
2495 DWORD PointerToRawData
;
2496 } IMAGE_DEBUG_DIRECTORY
,*PIMAGE_DEBUG_DIRECTORY
;
2497 typedef struct _FPO_DATA
{
2508 } FPO_DATA
,*PFPO_DATA
;
2509 typedef struct _IMAGE_DEBUG_MISC
{
2515 } IMAGE_DEBUG_MISC
,*PIMAGE_DEBUG_MISC
;
2516 typedef struct _IMAGE_FUNCTION_ENTRY
{
2517 DWORD StartingAddress
;
2518 DWORD EndingAddress
;
2519 DWORD EndOfPrologue
;
2520 } IMAGE_FUNCTION_ENTRY
,*PIMAGE_FUNCTION_ENTRY
;
2521 typedef struct _IMAGE_SEPARATE_DEBUG_HEADER
{
2525 WORD Characteristics
;
2526 DWORD TimeDateStamp
;
2530 DWORD NumberOfSections
;
2531 DWORD ExportedNamesSize
;
2532 DWORD DebugDirectorySize
;
2534 } IMAGE_SEPARATE_DEBUG_HEADER
,*PIMAGE_SEPARATE_DEBUG_HEADER
;
2536 typedef enum _CM_SERVICE_NODE_TYPE
{
2537 DriverType
=SERVICE_KERNEL_DRIVER
,
2538 FileSystemType
=SERVICE_FILE_SYSTEM_DRIVER
,
2539 Win32ServiceOwnProcess
=SERVICE_WIN32_OWN_PROCESS
,
2540 Win32ServiceShareProcess
=SERVICE_WIN32_SHARE_PROCESS
,
2541 AdapterType
=SERVICE_ADAPTER
,
2542 RecognizerType
=SERVICE_RECOGNIZER_DRIVER
2543 } SERVICE_NODE_TYPE
;
2544 typedef enum _CM_SERVICE_LOAD_TYPE
{
2545 BootLoad
=SERVICE_BOOT_START
,
2546 SystemLoad
=SERVICE_SYSTEM_START
,
2547 AutoLoad
=SERVICE_AUTO_START
,
2548 DemandLoad
=SERVICE_DEMAND_START
,
2549 DisableLoad
=SERVICE_DISABLED
2550 } SERVICE_LOAD_TYPE
;
2551 typedef enum _CM_ERROR_CONTROL_TYPE
{
2552 IgnoreError
=SERVICE_ERROR_IGNORE
,
2553 NormalError
=SERVICE_ERROR_NORMAL
,
2554 SevereError
=SERVICE_ERROR_SEVERE
,
2555 CriticalError
=SERVICE_ERROR_CRITICAL
2556 } SERVICE_ERROR_TYPE
;
2557 typedef struct _NT_TIB
{
2558 struct _EXCEPTION_REGISTRATION_RECORD
*ExceptionList
;
2562 _ANONYMOUS_UNION
union {
2566 PVOID ArbitraryUserPointer
;
2567 struct _NT_TIB
*Self
;
2569 typedef struct _REPARSE_DATA_BUFFER
{
2571 WORD ReparseDataLength
;
2573 _ANONYMOUS_UNION
union {
2575 WORD SubstituteNameOffset
;
2576 WORD SubstituteNameLength
;
2577 WORD PrintNameOffset
;
2578 WORD PrintNameLength
;
2579 WCHAR PathBuffer
[1];
2580 } SymbolicLinkReparseBuffer
;
2582 WORD SubstituteNameOffset
;
2583 WORD SubstituteNameLength
;
2584 WORD PrintNameOffset
;
2585 WORD PrintNameLength
;
2586 WCHAR PathBuffer
[1];
2587 } MountPointReparseBuffer
;
2590 } GenericReparseBuffer
;
2592 } REPARSE_DATA_BUFFER
, *PREPARSE_DATA_BUFFER
;
2593 typedef struct _REPARSE_GUID_DATA_BUFFER
{
2595 WORD ReparseDataLength
;
2600 } GenericReparseBuffer
;
2601 } REPARSE_GUID_DATA_BUFFER
, *PREPARSE_GUID_DATA_BUFFER
;
2602 typedef struct _REPARSE_POINT_INFORMATION
{
2603 WORD ReparseDataLength
;
2604 WORD UnparsedNameLength
;
2605 } REPARSE_POINT_INFORMATION
, *PREPARSE_POINT_INFORMATION
;
2608 typedef OSVERSIONINFOW OSVERSIONINFO
,*POSVERSIONINFO
,*LPOSVERSIONINFO
;
2609 typedef OSVERSIONINFOEXW OSVERSIONINFOEX
,*POSVERSIONINFOEX
,*LPOSVERSIONINFOEX
;
2611 typedef OSVERSIONINFOA OSVERSIONINFO
,*POSVERSIONINFO
,*LPOSVERSIONINFO
;
2612 typedef OSVERSIONINFOEXA OSVERSIONINFOEX
,*POSVERSIONINFOEX
,*LPOSVERSIONINFOEX
;
2615 #if defined(__GNUC__)
2617 PVOID
GetCurrentFiber(void);
2618 PVOID
GetFiberData(void);
2620 PVOID
GetCurrentFiber(void);
2621 extern __inline__ PVOID
GetCurrentFiber(void)
2626 : "=r" (ret
) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
2632 PVOID
GetFiberData(void);
2633 extern __inline__ PVOID
GetFiberData(void)
2637 "movl %%fs:0x10,%0\n"
2639 : "=r" (ret
) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
2647 extern PVOID
GetCurrentFiber(void);
2648 #pragma aux GetCurrentFiber = \
2649 "mov eax, dword ptr fs:0x10" \
2653 extern PVOID
GetFiberData(void);
2654 #pragma aux GetFiberData = \
2655 "mov eax, dword ptr fs:0x10" \
2660 #endif /* __GNUC__ */