winnt.py 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305
  1. # Generated by h2py from \mssdk\include\winnt.h
  2. APPLICATION_ERROR_MASK = 536870912
  3. ERROR_SEVERITY_SUCCESS = 0
  4. ERROR_SEVERITY_INFORMATIONAL = 1073741824
  5. ERROR_SEVERITY_WARNING = -2147483648
  6. ERROR_SEVERITY_ERROR = -1073741824
  7. MINCHAR = 128
  8. MAXCHAR = 127
  9. MINSHORT = 32768
  10. MAXSHORT = 32767
  11. MINLONG = -2147483648
  12. MAXLONG = 2147483647
  13. MAXBYTE = 255
  14. MAXWORD = 65535
  15. MAXDWORD = -1
  16. LANG_NEUTRAL = 0
  17. LANG_AFRIKAANS = 54
  18. LANG_ALBANIAN = 28
  19. LANG_ARABIC = 1
  20. LANG_BASQUE = 45
  21. LANG_BELARUSIAN = 35
  22. LANG_BULGARIAN = 2
  23. LANG_CATALAN = 3
  24. LANG_CHINESE = 4
  25. LANG_CROATIAN = 26
  26. LANG_CZECH = 5
  27. LANG_DANISH = 6
  28. LANG_DUTCH = 19
  29. LANG_ENGLISH = 9
  30. LANG_ESTONIAN = 37
  31. LANG_FAEROESE = 56
  32. LANG_FARSI = 41
  33. LANG_FINNISH = 11
  34. LANG_FRENCH = 12
  35. LANG_GERMAN = 7
  36. LANG_GREEK = 8
  37. LANG_HEBREW = 13
  38. LANG_HINDI = 57
  39. LANG_HUNGARIAN = 14
  40. LANG_ICELANDIC = 15
  41. LANG_INDONESIAN = 33
  42. LANG_ITALIAN = 16
  43. LANG_JAPANESE = 17
  44. LANG_KOREAN = 18
  45. LANG_LATVIAN = 38
  46. LANG_LITHUANIAN = 39
  47. LANG_MACEDONIAN = 47
  48. LANG_MALAY = 62
  49. LANG_NORWEGIAN = 20
  50. LANG_POLISH = 21
  51. LANG_PORTUGUESE = 22
  52. LANG_ROMANIAN = 24
  53. LANG_RUSSIAN = 25
  54. LANG_SERBIAN = 26
  55. LANG_SLOVAK = 27
  56. LANG_SLOVENIAN = 36
  57. LANG_SPANISH = 10
  58. LANG_SWAHILI = 65
  59. LANG_SWEDISH = 29
  60. LANG_THAI = 30
  61. LANG_TURKISH = 31
  62. LANG_UKRAINIAN = 34
  63. LANG_VIETNAMESE = 42
  64. SUBLANG_NEUTRAL = 0
  65. SUBLANG_DEFAULT = 1
  66. SUBLANG_SYS_DEFAULT = 2
  67. SUBLANG_ARABIC_SAUDI_ARABIA = 1
  68. SUBLANG_ARABIC_IRAQ = 2
  69. SUBLANG_ARABIC_EGYPT = 3
  70. SUBLANG_ARABIC_LIBYA = 4
  71. SUBLANG_ARABIC_ALGERIA = 5
  72. SUBLANG_ARABIC_MOROCCO = 6
  73. SUBLANG_ARABIC_TUNISIA = 7
  74. SUBLANG_ARABIC_OMAN = 8
  75. SUBLANG_ARABIC_YEMEN = 9
  76. SUBLANG_ARABIC_SYRIA = 10
  77. SUBLANG_ARABIC_JORDAN = 11
  78. SUBLANG_ARABIC_LEBANON = 12
  79. SUBLANG_ARABIC_KUWAIT = 13
  80. SUBLANG_ARABIC_UAE = 14
  81. SUBLANG_ARABIC_BAHRAIN = 15
  82. SUBLANG_ARABIC_QATAR = 16
  83. SUBLANG_CHINESE_TRADITIONAL = 1
  84. SUBLANG_CHINESE_SIMPLIFIED = 2
  85. SUBLANG_CHINESE_HONGKONG = 3
  86. SUBLANG_CHINESE_SINGAPORE = 4
  87. SUBLANG_CHINESE_MACAU = 5
  88. SUBLANG_DUTCH = 1
  89. SUBLANG_DUTCH_BELGIAN = 2
  90. SUBLANG_ENGLISH_US = 1
  91. SUBLANG_ENGLISH_UK = 2
  92. SUBLANG_ENGLISH_AUS = 3
  93. SUBLANG_ENGLISH_CAN = 4
  94. SUBLANG_ENGLISH_NZ = 5
  95. SUBLANG_ENGLISH_EIRE = 6
  96. SUBLANG_ENGLISH_SOUTH_AFRICA = 7
  97. SUBLANG_ENGLISH_JAMAICA = 8
  98. SUBLANG_ENGLISH_CARIBBEAN = 9
  99. SUBLANG_ENGLISH_BELIZE = 10
  100. SUBLANG_ENGLISH_TRINIDAD = 11
  101. SUBLANG_ENGLISH_ZIMBABWE = 12
  102. SUBLANG_ENGLISH_PHILIPPINES = 13
  103. SUBLANG_FRENCH = 1
  104. SUBLANG_FRENCH_BELGIAN = 2
  105. SUBLANG_FRENCH_CANADIAN = 3
  106. SUBLANG_FRENCH_SWISS = 4
  107. SUBLANG_FRENCH_LUXEMBOURG = 5
  108. SUBLANG_FRENCH_MONACO = 6
  109. SUBLANG_GERMAN = 1
  110. SUBLANG_GERMAN_SWISS = 2
  111. SUBLANG_GERMAN_AUSTRIAN = 3
  112. SUBLANG_GERMAN_LUXEMBOURG = 4
  113. SUBLANG_GERMAN_LIECHTENSTEIN = 5
  114. SUBLANG_ITALIAN = 1
  115. SUBLANG_ITALIAN_SWISS = 2
  116. SUBLANG_KOREAN = 1
  117. SUBLANG_KOREAN_JOHAB = 2
  118. SUBLANG_LITHUANIAN = 1
  119. SUBLANG_LITHUANIAN_CLASSIC = 2
  120. SUBLANG_MALAY_MALAYSIA = 1
  121. SUBLANG_MALAY_BRUNEI_DARUSSALAM = 2
  122. SUBLANG_NORWEGIAN_BOKMAL = 1
  123. SUBLANG_NORWEGIAN_NYNORSK = 2
  124. SUBLANG_PORTUGUESE = 2
  125. SUBLANG_PORTUGUESE_BRAZILIAN = 1
  126. SUBLANG_SERBIAN_LATIN = 2
  127. SUBLANG_SERBIAN_CYRILLIC = 3
  128. SUBLANG_SPANISH = 1
  129. SUBLANG_SPANISH_MEXICAN = 2
  130. SUBLANG_SPANISH_MODERN = 3
  131. SUBLANG_SPANISH_GUATEMALA = 4
  132. SUBLANG_SPANISH_COSTA_RICA = 5
  133. SUBLANG_SPANISH_PANAMA = 6
  134. SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 7
  135. SUBLANG_SPANISH_VENEZUELA = 8
  136. SUBLANG_SPANISH_COLOMBIA = 9
  137. SUBLANG_SPANISH_PERU = 10
  138. SUBLANG_SPANISH_ARGENTINA = 11
  139. SUBLANG_SPANISH_ECUADOR = 12
  140. SUBLANG_SPANISH_CHILE = 13
  141. SUBLANG_SPANISH_URUGUAY = 14
  142. SUBLANG_SPANISH_PARAGUAY = 15
  143. SUBLANG_SPANISH_BOLIVIA = 16
  144. SUBLANG_SPANISH_EL_SALVADOR = 17
  145. SUBLANG_SPANISH_HONDURAS = 18
  146. SUBLANG_SPANISH_NICARAGUA = 19
  147. SUBLANG_SPANISH_PUERTO_RICO = 20
  148. SUBLANG_SWEDISH = 1
  149. SUBLANG_SWEDISH_FINLAND = 2
  150. SORT_DEFAULT = 0
  151. SORT_JAPANESE_XJIS = 0
  152. SORT_JAPANESE_UNICODE = 1
  153. SORT_CHINESE_BIG5 = 0
  154. SORT_CHINESE_PRCP = 0
  155. SORT_CHINESE_UNICODE = 1
  156. SORT_CHINESE_PRC = 2
  157. SORT_KOREAN_KSC = 0
  158. SORT_KOREAN_UNICODE = 1
  159. SORT_GERMAN_PHONE_BOOK = 1
  160. def PRIMARYLANGID(lgid): return ((WORD )(lgid) & 1023)
  161. def SUBLANGID(lgid): return ((WORD )(lgid) >> 10)
  162. NLS_VALID_LOCALE_MASK = 1048575
  163. def LANGIDFROMLCID(lcid): return ((WORD )(lcid))
  164. def SORTIDFROMLCID(lcid): return ((WORD )((((DWORD)(lcid)) & NLS_VALID_LOCALE_MASK) >> 16))
  165. def UNREFERENCED_PARAMETER(P): return (P)
  166. def DBG_UNREFERENCED_PARAMETER(P): return (P)
  167. def DBG_UNREFERENCED_LOCAL_VARIABLE(V): return (V)
  168. def UNREFERENCED_PARAMETER(P): return \
  169. def DBG_UNREFERENCED_PARAMETER(P): return \
  170. def DBG_UNREFERENCED_LOCAL_VARIABLE(V): return \
  171. MAXIMUM_WAIT_OBJECTS = 64
  172. MAXIMUM_SUSPEND_COUNT = MAXCHAR
  173. EXCEPTION_NONCONTINUABLE = 1
  174. EXCEPTION_MAXIMUM_PARAMETERS = 15
  175. PROCESS_TERMINATE = (1)
  176. PROCESS_CREATE_THREAD = (2)
  177. PROCESS_VM_OPERATION = (8)
  178. PROCESS_VM_READ = (16)
  179. PROCESS_VM_WRITE = (32)
  180. PROCESS_DUP_HANDLE = (64)
  181. PROCESS_CREATE_PROCESS = (128)
  182. PROCESS_SET_QUOTA = (256)
  183. PROCESS_SET_INFORMATION = (512)
  184. PROCESS_QUERY_INFORMATION = (1024)
  185. PROCESS_SUSPEND_RESUME = (2048)
  186. PROCESS_QUERY_LIMITED_INFORMATION = (4096)
  187. PROCESS_SET_LIMITED_INFORMATION = (8192)
  188. MAXIMUM_PROCESSORS = 32
  189. THREAD_TERMINATE = (1)
  190. THREAD_SUSPEND_RESUME = (2)
  191. THREAD_GET_CONTEXT = (8)
  192. THREAD_SET_CONTEXT = (16)
  193. THREAD_SET_INFORMATION = (32)
  194. THREAD_QUERY_INFORMATION = (64)
  195. THREAD_SET_THREAD_TOKEN = (128)
  196. THREAD_IMPERSONATE = (256)
  197. THREAD_DIRECT_IMPERSONATION = (512)
  198. THREAD_SET_LIMITED_INFORMATION = (1024)
  199. THREAD_QUERY_LIMITED_INFORMATION = (2048)
  200. THREAD_RESUME = (4096)
  201. JOB_OBJECT_ASSIGN_PROCESS = (1)
  202. JOB_OBJECT_SET_ATTRIBUTES = (2)
  203. JOB_OBJECT_QUERY = (4)
  204. JOB_OBJECT_TERMINATE = (8)
  205. TLS_MINIMUM_AVAILABLE = 64
  206. THREAD_BASE_PRIORITY_LOWRT = 15
  207. THREAD_BASE_PRIORITY_MAX = 2
  208. THREAD_BASE_PRIORITY_MIN = -2
  209. THREAD_BASE_PRIORITY_IDLE = -15
  210. JOB_OBJECT_LIMIT_WORKINGSET = 1
  211. JOB_OBJECT_LIMIT_PROCESS_TIME = 2
  212. JOB_OBJECT_LIMIT_JOB_TIME = 4
  213. JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 8
  214. JOB_OBJECT_LIMIT_AFFINITY = 16
  215. JOB_OBJECT_LIMIT_PRIORITY_CLASS = 32
  216. JOB_OBJECT_LIMIT_VALID_FLAGS = 63
  217. EVENT_MODIFY_STATE = 2
  218. MUTANT_QUERY_STATE = 1
  219. SEMAPHORE_MODIFY_STATE = 2
  220. TIME_ZONE_ID_UNKNOWN = 0
  221. TIME_ZONE_ID_STANDARD = 1
  222. TIME_ZONE_ID_DAYLIGHT = 2
  223. PROCESSOR_INTEL_386 = 386
  224. PROCESSOR_INTEL_486 = 486
  225. PROCESSOR_INTEL_PENTIUM = 586
  226. PROCESSOR_MIPS_R4000 = 4000
  227. PROCESSOR_ALPHA_21064 = 21064
  228. PROCESSOR_HITACHI_SH3 = 10003
  229. PROCESSOR_HITACHI_SH3E = 10004
  230. PROCESSOR_HITACHI_SH4 = 10005
  231. PROCESSOR_MOTOROLA_821 = 821
  232. PROCESSOR_ARM_7TDMI = 70001
  233. PROCESSOR_ARCHITECTURE_INTEL = 0
  234. PROCESSOR_ARCHITECTURE_MIPS = 1
  235. PROCESSOR_ARCHITECTURE_ALPHA = 2
  236. PROCESSOR_ARCHITECTURE_PPC = 3
  237. PROCESSOR_ARCHITECTURE_SH = 4
  238. PROCESSOR_ARCHITECTURE_ARM = 5
  239. PROCESSOR_ARCHITECTURE_IA64 = 6
  240. PROCESSOR_ARCHITECTURE_ALPHA64 = 7
  241. PROCESSOR_ARCHITECTURE_MSIL = 8
  242. PROCESSOR_ARCHITECTURE_AMD64 = 9
  243. PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10
  244. PROCESSOR_ARCHITECTURE_UNKNOWN = 65535
  245. PF_FLOATING_POINT_PRECISION_ERRATA = 0
  246. PF_FLOATING_POINT_EMULATED = 1
  247. PF_COMPARE_EXCHANGE_DOUBLE = 2
  248. PF_MMX_INSTRUCTIONS_AVAILABLE = 3
  249. PF_PPC_MOVEMEM_64BIT_OK = 4
  250. PF_ALPHA_BYTE_INSTRUCTIONS = 5
  251. SECTION_QUERY = 1
  252. SECTION_MAP_WRITE = 2
  253. SECTION_MAP_READ = 4
  254. SECTION_MAP_EXECUTE = 8
  255. SECTION_EXTEND_SIZE = 16
  256. PAGE_NOACCESS = 1
  257. PAGE_READONLY = 2
  258. PAGE_READWRITE = 4
  259. PAGE_WRITECOPY = 8
  260. PAGE_EXECUTE = 16
  261. PAGE_EXECUTE_READ = 32
  262. PAGE_EXECUTE_READWRITE = 64
  263. PAGE_EXECUTE_WRITECOPY = 128
  264. PAGE_GUARD = 256
  265. PAGE_NOCACHE = 512
  266. MEM_COMMIT = 4096
  267. MEM_RESERVE = 8192
  268. MEM_DECOMMIT = 16384
  269. MEM_RELEASE = 32768
  270. MEM_FREE = 65536
  271. MEM_PRIVATE = 131072
  272. MEM_MAPPED = 262144
  273. MEM_RESET = 524288
  274. MEM_TOP_DOWN = 1048576
  275. MEM_4MB_PAGES = -2147483648
  276. SEC_FILE = 8388608
  277. SEC_IMAGE = 16777216
  278. SEC_VLM = 33554432
  279. SEC_RESERVE = 67108864
  280. SEC_COMMIT = 134217728
  281. SEC_NOCACHE = 268435456
  282. MEM_IMAGE = SEC_IMAGE
  283. FILE_READ_DATA = ( 1 )
  284. FILE_LIST_DIRECTORY = ( 1 )
  285. FILE_WRITE_DATA = ( 2 )
  286. FILE_ADD_FILE = ( 2 )
  287. FILE_APPEND_DATA = ( 4 )
  288. FILE_ADD_SUBDIRECTORY = ( 4 )
  289. FILE_CREATE_PIPE_INSTANCE = ( 4 )
  290. FILE_READ_EA = ( 8 )
  291. FILE_WRITE_EA = ( 16 )
  292. FILE_EXECUTE = ( 32 )
  293. FILE_TRAVERSE = ( 32 )
  294. FILE_DELETE_CHILD = ( 64 )
  295. FILE_READ_ATTRIBUTES = ( 128 )
  296. FILE_WRITE_ATTRIBUTES = ( 256 )
  297. FILE_SHARE_READ = 1
  298. FILE_SHARE_WRITE = 2
  299. FILE_SHARE_DELETE = 4
  300. FILE_ATTRIBUTE_READONLY = 1
  301. FILE_ATTRIBUTE_HIDDEN = 2
  302. FILE_ATTRIBUTE_SYSTEM = 4
  303. FILE_ATTRIBUTE_DIRECTORY = 16
  304. FILE_ATTRIBUTE_ARCHIVE = 32
  305. FILE_ATTRIBUTE_DEVICE = 64
  306. FILE_ATTRIBUTE_NORMAL = 128
  307. FILE_ATTRIBUTE_TEMPORARY = 256
  308. FILE_ATTRIBUTE_SPARSE_FILE = 512
  309. FILE_ATTRIBUTE_REPARSE_POINT = 1024
  310. FILE_ATTRIBUTE_COMPRESSED = 2048
  311. FILE_ATTRIBUTE_OFFLINE = 4096
  312. FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192
  313. FILE_ATTRIBUTE_ENCRYPTED = 16384
  314. FILE_ATTRIBUTE_VIRTUAL = 65536
  315. FILE_NOTIFY_CHANGE_FILE_NAME = 1
  316. FILE_NOTIFY_CHANGE_DIR_NAME = 2
  317. FILE_NOTIFY_CHANGE_ATTRIBUTES = 4
  318. FILE_NOTIFY_CHANGE_SIZE = 8
  319. FILE_NOTIFY_CHANGE_LAST_WRITE = 16
  320. FILE_NOTIFY_CHANGE_LAST_ACCESS = 32
  321. FILE_NOTIFY_CHANGE_CREATION = 64
  322. FILE_NOTIFY_CHANGE_SECURITY = 256
  323. FILE_ACTION_ADDED = 1
  324. FILE_ACTION_REMOVED = 2
  325. FILE_ACTION_MODIFIED = 3
  326. FILE_ACTION_RENAMED_OLD_NAME = 4
  327. FILE_ACTION_RENAMED_NEW_NAME = 5
  328. FILE_CASE_SENSITIVE_SEARCH = 1
  329. FILE_CASE_PRESERVED_NAMES = 2
  330. FILE_UNICODE_ON_DISK = 4
  331. FILE_PERSISTENT_ACLS = 8
  332. FILE_FILE_COMPRESSION = 16
  333. FILE_VOLUME_QUOTAS = 32
  334. FILE_SUPPORTS_SPARSE_FILES = 64
  335. FILE_SUPPORTS_REPARSE_POINTS = 128
  336. FILE_SUPPORTS_REMOTE_STORAGE = 256
  337. FILE_VOLUME_IS_COMPRESSED = 32768
  338. FILE_SUPPORTS_OBJECT_IDS = 65536
  339. FILE_SUPPORTS_ENCRYPTION = 131072
  340. MAXIMUM_REPARSE_DATA_BUFFER_SIZE = ( 16 * 1024 )
  341. IO_REPARSE_TAG_RESERVED_ZERO = (0)
  342. IO_REPARSE_TAG_RESERVED_ONE = (1)
  343. IO_REPARSE_TAG_SYMBOLIC_LINK = (2)
  344. IO_REPARSE_TAG_NSS = (5)
  345. IO_REPARSE_TAG_FILTER_MANAGER = -2147483637
  346. IO_REPARSE_TAG_DFS = -2147483638
  347. IO_REPARSE_TAG_SIS = -2147483641
  348. IO_REPARSE_TAG_MOUNT_POINT = -1610612733
  349. IO_REPARSE_TAG_HSM = -1073741820
  350. IO_REPARSE_TAG_NSSRECOVER = (8)
  351. IO_REPARSE_TAG_RESERVED_MS_RANGE = (256)
  352. IO_REPARSE_TAG_RESERVED_RANGE = IO_REPARSE_TAG_RESERVED_ONE
  353. IO_COMPLETION_MODIFY_STATE = 2
  354. DUPLICATE_CLOSE_SOURCE = 1
  355. DUPLICATE_SAME_ACCESS = 2
  356. DELETE = (65536)
  357. READ_CONTROL = (131072)
  358. WRITE_DAC = (262144)
  359. WRITE_OWNER = (524288)
  360. SYNCHRONIZE = (1048576)
  361. STANDARD_RIGHTS_REQUIRED = (983040)
  362. STANDARD_RIGHTS_READ = (READ_CONTROL)
  363. STANDARD_RIGHTS_WRITE = (READ_CONTROL)
  364. STANDARD_RIGHTS_EXECUTE = (READ_CONTROL)
  365. STANDARD_RIGHTS_ALL = (2031616)
  366. SPECIFIC_RIGHTS_ALL = (65535)
  367. IO_COMPLETION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3
  368. ACCESS_SYSTEM_SECURITY = (16777216)
  369. MAXIMUM_ALLOWED = (33554432)
  370. GENERIC_READ = (-2147483648)
  371. GENERIC_WRITE = (1073741824)
  372. GENERIC_EXECUTE = (536870912)
  373. GENERIC_ALL = (268435456)
  374. # Included from pshpack4.h
  375. # Included from poppack.h
  376. SID_REVISION = (1)
  377. SID_MAX_SUB_AUTHORITIES = (15)
  378. SID_RECOMMENDED_SUB_AUTHORITIES = (1)
  379. SidTypeUser = 1
  380. SidTypeGroup = 2
  381. SidTypeDomain =3
  382. SidTypeAlias = 4
  383. SidTypeWellKnownGroup = 5
  384. SidTypeDeletedAccount = 6
  385. SidTypeInvalid = 7
  386. SidTypeUnknown = 8
  387. SECURITY_NULL_RID = (0)
  388. SECURITY_WORLD_RID = (0)
  389. SECURITY_LOCAL_RID = (0X00000000)
  390. SECURITY_CREATOR_OWNER_RID = (0)
  391. SECURITY_CREATOR_GROUP_RID = (1)
  392. SECURITY_CREATOR_OWNER_SERVER_RID = (2)
  393. SECURITY_CREATOR_GROUP_SERVER_RID = (3)
  394. SECURITY_DIALUP_RID = (1)
  395. SECURITY_NETWORK_RID = (2)
  396. SECURITY_BATCH_RID = (3)
  397. SECURITY_INTERACTIVE_RID = (4)
  398. SECURITY_SERVICE_RID = (6)
  399. SECURITY_ANONYMOUS_LOGON_RID = (7)
  400. SECURITY_PROXY_RID = (8)
  401. SECURITY_SERVER_LOGON_RID = (9)
  402. SECURITY_PRINCIPAL_SELF_RID = (10)
  403. SECURITY_AUTHENTICATED_USER_RID = (11)
  404. SECURITY_LOGON_IDS_RID = (5)
  405. SECURITY_LOGON_IDS_RID_COUNT = (3)
  406. SECURITY_LOCAL_SYSTEM_RID = (18)
  407. SECURITY_NT_NON_UNIQUE = (21)
  408. SECURITY_BUILTIN_DOMAIN_RID = (32)
  409. DOMAIN_USER_RID_ADMIN = (500)
  410. DOMAIN_USER_RID_GUEST = (501)
  411. DOMAIN_GROUP_RID_ADMINS = (512)
  412. DOMAIN_GROUP_RID_USERS = (513)
  413. DOMAIN_GROUP_RID_GUESTS = (514)
  414. DOMAIN_ALIAS_RID_ADMINS = (544)
  415. DOMAIN_ALIAS_RID_USERS = (545)
  416. DOMAIN_ALIAS_RID_GUESTS = (546)
  417. DOMAIN_ALIAS_RID_POWER_USERS = (547)
  418. DOMAIN_ALIAS_RID_ACCOUNT_OPS = (548)
  419. DOMAIN_ALIAS_RID_SYSTEM_OPS = (549)
  420. DOMAIN_ALIAS_RID_PRINT_OPS = (550)
  421. DOMAIN_ALIAS_RID_BACKUP_OPS = (551)
  422. DOMAIN_ALIAS_RID_REPLICATOR = (552)
  423. SE_GROUP_MANDATORY = (1)
  424. SE_GROUP_ENABLED_BY_DEFAULT = (2)
  425. SE_GROUP_ENABLED = (4)
  426. SE_GROUP_OWNER = (8)
  427. SE_GROUP_LOGON_ID = (-1073741824)
  428. ACL_REVISION = (2)
  429. ACL_REVISION_DS = (4)
  430. ACL_REVISION1 = (1)
  431. ACL_REVISION2 = (2)
  432. ACL_REVISION3 = (3)
  433. ACL_REVISION4 = (4)
  434. MAX_ACL_REVISION = ACL_REVISION4
  435. ## ACE types
  436. ACCESS_MIN_MS_ACE_TYPE = (0)
  437. ACCESS_ALLOWED_ACE_TYPE = (0)
  438. ACCESS_DENIED_ACE_TYPE = (1)
  439. SYSTEM_AUDIT_ACE_TYPE = (2)
  440. SYSTEM_ALARM_ACE_TYPE = (3)
  441. ACCESS_MAX_MS_V2_ACE_TYPE = (3)
  442. ACCESS_ALLOWED_COMPOUND_ACE_TYPE = (4)
  443. ACCESS_MAX_MS_V3_ACE_TYPE = (4)
  444. ACCESS_MIN_MS_OBJECT_ACE_TYPE = (5)
  445. ACCESS_ALLOWED_OBJECT_ACE_TYPE = (5)
  446. ACCESS_DENIED_OBJECT_ACE_TYPE = (6)
  447. SYSTEM_AUDIT_OBJECT_ACE_TYPE = (7)
  448. SYSTEM_ALARM_OBJECT_ACE_TYPE = (8)
  449. ACCESS_MAX_MS_OBJECT_ACE_TYPE = (8)
  450. ACCESS_MAX_MS_V4_ACE_TYPE = (8)
  451. ACCESS_MAX_MS_ACE_TYPE = (8)
  452. ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9
  453. ACCESS_DENIED_CALLBACK_ACE_TYPE = 10
  454. ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11
  455. ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12
  456. SYSTEM_AUDIT_CALLBACK_ACE_TYPE = 13
  457. SYSTEM_ALARM_CALLBACK_ACE_TYPE = 14
  458. SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = 15
  459. SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = 16
  460. SYSTEM_MANDATORY_LABEL_ACE_TYPE = 17
  461. ACCESS_MAX_MS_V5_ACE_TYPE = 17
  462. ## ACE inheritance flags
  463. OBJECT_INHERIT_ACE = (1)
  464. CONTAINER_INHERIT_ACE = (2)
  465. NO_PROPAGATE_INHERIT_ACE = (4)
  466. INHERIT_ONLY_ACE = (8)
  467. INHERITED_ACE = (16)
  468. VALID_INHERIT_FLAGS = (31)
  469. SUCCESSFUL_ACCESS_ACE_FLAG = (64)
  470. FAILED_ACCESS_ACE_FLAG = (128)
  471. ACE_OBJECT_TYPE_PRESENT = 1
  472. ACE_INHERITED_OBJECT_TYPE_PRESENT = 2
  473. SECURITY_DESCRIPTOR_REVISION = (1)
  474. SECURITY_DESCRIPTOR_REVISION1 = (1)
  475. SECURITY_DESCRIPTOR_MIN_LENGTH = (20)
  476. SE_OWNER_DEFAULTED = (1)
  477. SE_GROUP_DEFAULTED = (2)
  478. SE_DACL_PRESENT = (4)
  479. SE_DACL_DEFAULTED = (8)
  480. SE_SACL_PRESENT = (16)
  481. SE_SACL_DEFAULTED = (32)
  482. SE_DACL_AUTO_INHERIT_REQ = (256)
  483. SE_SACL_AUTO_INHERIT_REQ = (512)
  484. SE_DACL_AUTO_INHERITED = (1024)
  485. SE_SACL_AUTO_INHERITED = (2048)
  486. SE_DACL_PROTECTED = (4096)
  487. SE_SACL_PROTECTED = (8192)
  488. SE_SELF_RELATIVE = (32768)
  489. ACCESS_OBJECT_GUID = 0
  490. ACCESS_PROPERTY_SET_GUID = 1
  491. ACCESS_PROPERTY_GUID = 2
  492. ACCESS_MAX_LEVEL = 4
  493. AUDIT_ALLOW_NO_PRIVILEGE = 1
  494. ACCESS_DS_SOURCE_A = "Directory Service"
  495. ACCESS_DS_OBJECT_TYPE_NAME_A = "Directory Service Object"
  496. SE_PRIVILEGE_ENABLED_BY_DEFAULT = (1)
  497. SE_PRIVILEGE_ENABLED = (2)
  498. SE_PRIVILEGE_USED_FOR_ACCESS = (-2147483648)
  499. PRIVILEGE_SET_ALL_NECESSARY = (1)
  500. SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
  501. SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
  502. SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
  503. SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
  504. SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
  505. SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
  506. SE_TCB_NAME = "SeTcbPrivilege"
  507. SE_SECURITY_NAME = "SeSecurityPrivilege"
  508. SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
  509. SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
  510. SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
  511. SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
  512. SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
  513. SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
  514. SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
  515. SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
  516. SE_BACKUP_NAME = "SeBackupPrivilege"
  517. SE_RESTORE_NAME = "SeRestorePrivilege"
  518. SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
  519. SE_DEBUG_NAME = "SeDebugPrivilege"
  520. SE_AUDIT_NAME = "SeAuditPrivilege"
  521. SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
  522. SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
  523. SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
  524. TOKEN_ASSIGN_PRIMARY = (1)
  525. TOKEN_DUPLICATE = (2)
  526. TOKEN_IMPERSONATE = (4)
  527. TOKEN_QUERY = (8)
  528. TOKEN_QUERY_SOURCE = (16)
  529. TOKEN_ADJUST_PRIVILEGES = (32)
  530. TOKEN_ADJUST_GROUPS = (64)
  531. TOKEN_ADJUST_DEFAULT = (128)
  532. TOKEN_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED |\
  533. TOKEN_ASSIGN_PRIMARY |\
  534. TOKEN_DUPLICATE |\
  535. TOKEN_IMPERSONATE |\
  536. TOKEN_QUERY |\
  537. TOKEN_QUERY_SOURCE |\
  538. TOKEN_ADJUST_PRIVILEGES |\
  539. TOKEN_ADJUST_GROUPS |\
  540. TOKEN_ADJUST_DEFAULT)
  541. TOKEN_READ = (STANDARD_RIGHTS_READ |\
  542. TOKEN_QUERY)
  543. TOKEN_WRITE = (STANDARD_RIGHTS_WRITE |\
  544. TOKEN_ADJUST_PRIVILEGES |\
  545. TOKEN_ADJUST_GROUPS |\
  546. TOKEN_ADJUST_DEFAULT)
  547. TOKEN_EXECUTE = (STANDARD_RIGHTS_EXECUTE)
  548. TOKEN_SOURCE_LENGTH = 8
  549. # Token types
  550. TokenPrimary = 1
  551. TokenImpersonation = 2
  552. # TOKEN_INFORMATION_CLASS, used with Get/SetTokenInformation
  553. TokenUser = 1
  554. TokenGroups = 2
  555. TokenPrivileges = 3
  556. TokenOwner = 4
  557. TokenPrimaryGroup = 5
  558. TokenDefaultDacl = 6
  559. TokenSource = 7
  560. TokenType = 8
  561. TokenImpersonationLevel = 9
  562. TokenStatistics = 10
  563. TokenRestrictedSids = 11
  564. TokenSessionId = 12
  565. TokenGroupsAndPrivileges = 13
  566. TokenSessionReference = 14
  567. TokenSandBoxInert = 15
  568. TokenAuditPolicy = 16
  569. TokenOrigin = 17
  570. TokenElevationType = 18
  571. TokenLinkedToken = 19
  572. TokenElevation = 20
  573. TokenHasRestrictions = 21
  574. TokenAccessInformation = 22
  575. TokenVirtualizationAllowed = 23
  576. TokenVirtualizationEnabled = 24
  577. TokenIntegrityLevel = 25
  578. TokenUIAccess = 26
  579. TokenMandatoryPolicy = 27
  580. TokenLogonSid = 28
  581. OWNER_SECURITY_INFORMATION = (0X00000001)
  582. GROUP_SECURITY_INFORMATION = (0X00000002)
  583. DACL_SECURITY_INFORMATION = (0X00000004)
  584. SACL_SECURITY_INFORMATION = (0X00000008)
  585. LABEL_SECURITY_INFORMATION = 0x00000010
  586. IMAGE_DOS_SIGNATURE = 23117
  587. IMAGE_OS2_SIGNATURE = 17742
  588. IMAGE_OS2_SIGNATURE_LE = 17740
  589. IMAGE_VXD_SIGNATURE = 17740
  590. IMAGE_NT_SIGNATURE = 17744
  591. IMAGE_SIZEOF_FILE_HEADER = 20
  592. IMAGE_FILE_RELOCS_STRIPPED = 1
  593. IMAGE_FILE_EXECUTABLE_IMAGE = 2
  594. IMAGE_FILE_LINE_NUMS_STRIPPED = 4
  595. IMAGE_FILE_LOCAL_SYMS_STRIPPED = 8
  596. IMAGE_FILE_AGGRESIVE_WS_TRIM = 16
  597. IMAGE_FILE_LARGE_ADDRESS_AWARE = 32
  598. IMAGE_FILE_BYTES_REVERSED_LO = 128
  599. IMAGE_FILE_32BIT_MACHINE = 256
  600. IMAGE_FILE_DEBUG_STRIPPED = 512
  601. IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 1024
  602. IMAGE_FILE_NET_RUN_FROM_SWAP = 2048
  603. IMAGE_FILE_SYSTEM = 4096
  604. IMAGE_FILE_DLL = 8192
  605. IMAGE_FILE_UP_SYSTEM_ONLY = 16384
  606. IMAGE_FILE_BYTES_REVERSED_HI = 32768
  607. IMAGE_FILE_MACHINE_UNKNOWN = 0
  608. IMAGE_FILE_MACHINE_I386 = 332
  609. IMAGE_FILE_MACHINE_R3000 = 354
  610. IMAGE_FILE_MACHINE_R4000 = 358
  611. IMAGE_FILE_MACHINE_R10000 = 360
  612. IMAGE_FILE_MACHINE_WCEMIPSV2 = 361
  613. IMAGE_FILE_MACHINE_ALPHA = 388
  614. IMAGE_FILE_MACHINE_POWERPC = 496
  615. IMAGE_FILE_MACHINE_SH3 = 418
  616. IMAGE_FILE_MACHINE_SH3E = 420
  617. IMAGE_FILE_MACHINE_SH4 = 422
  618. IMAGE_FILE_MACHINE_ARM = 448
  619. IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16
  620. IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56
  621. IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28
  622. IMAGE_SIZEOF_NT_OPTIONAL_HEADER = 224
  623. IMAGE_NT_OPTIONAL_HDR_MAGIC = 267
  624. IMAGE_ROM_OPTIONAL_HDR_MAGIC = 263
  625. IMAGE_SUBSYSTEM_UNKNOWN = 0
  626. IMAGE_SUBSYSTEM_NATIVE = 1
  627. IMAGE_SUBSYSTEM_WINDOWS_GUI = 2
  628. IMAGE_SUBSYSTEM_WINDOWS_CUI = 3
  629. IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 4
  630. IMAGE_SUBSYSTEM_OS2_CUI = 5
  631. IMAGE_SUBSYSTEM_POSIX_CUI = 7
  632. IMAGE_SUBSYSTEM_RESERVED8 = 8
  633. IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 8192
  634. IMAGE_DIRECTORY_ENTRY_EXPORT = 0
  635. IMAGE_DIRECTORY_ENTRY_IMPORT = 1
  636. IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
  637. IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
  638. IMAGE_DIRECTORY_ENTRY_SECURITY = 4
  639. IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
  640. IMAGE_DIRECTORY_ENTRY_DEBUG = 6
  641. IMAGE_DIRECTORY_ENTRY_COPYRIGHT = 7
  642. IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8
  643. IMAGE_DIRECTORY_ENTRY_TLS = 9
  644. IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10
  645. IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
  646. IMAGE_DIRECTORY_ENTRY_IAT = 12
  647. IMAGE_SIZEOF_SHORT_NAME = 8
  648. IMAGE_SIZEOF_SECTION_HEADER = 40
  649. IMAGE_SCN_TYPE_NO_PAD = 8
  650. IMAGE_SCN_CNT_CODE = 32
  651. IMAGE_SCN_CNT_INITIALIZED_DATA = 64
  652. IMAGE_SCN_CNT_UNINITIALIZED_DATA = 128
  653. IMAGE_SCN_LNK_OTHER = 256
  654. IMAGE_SCN_LNK_INFO = 512
  655. IMAGE_SCN_LNK_REMOVE = 2048
  656. IMAGE_SCN_LNK_COMDAT = 4096
  657. IMAGE_SCN_MEM_FARDATA = 32768
  658. IMAGE_SCN_MEM_PURGEABLE = 131072
  659. IMAGE_SCN_MEM_16BIT = 131072
  660. IMAGE_SCN_MEM_LOCKED = 262144
  661. IMAGE_SCN_MEM_PRELOAD = 524288
  662. IMAGE_SCN_ALIGN_1BYTES = 1048576
  663. IMAGE_SCN_ALIGN_2BYTES = 2097152
  664. IMAGE_SCN_ALIGN_4BYTES = 3145728
  665. IMAGE_SCN_ALIGN_8BYTES = 4194304
  666. IMAGE_SCN_ALIGN_16BYTES = 5242880
  667. IMAGE_SCN_ALIGN_32BYTES = 6291456
  668. IMAGE_SCN_ALIGN_64BYTES = 7340032
  669. IMAGE_SCN_LNK_NRELOC_OVFL = 16777216
  670. IMAGE_SCN_MEM_DISCARDABLE = 33554432
  671. IMAGE_SCN_MEM_NOT_CACHED = 67108864
  672. IMAGE_SCN_MEM_NOT_PAGED = 134217728
  673. IMAGE_SCN_MEM_SHARED = 268435456
  674. IMAGE_SCN_MEM_EXECUTE = 536870912
  675. IMAGE_SCN_MEM_READ = 1073741824
  676. IMAGE_SCN_MEM_WRITE = -2147483648
  677. IMAGE_SCN_SCALE_INDEX = 1
  678. IMAGE_SIZEOF_SYMBOL = 18
  679. IMAGE_SYM_TYPE_NULL = 0
  680. IMAGE_SYM_TYPE_VOID = 1
  681. IMAGE_SYM_TYPE_CHAR = 2
  682. IMAGE_SYM_TYPE_SHORT = 3
  683. IMAGE_SYM_TYPE_INT = 4
  684. IMAGE_SYM_TYPE_LONG = 5
  685. IMAGE_SYM_TYPE_FLOAT = 6
  686. IMAGE_SYM_TYPE_DOUBLE = 7
  687. IMAGE_SYM_TYPE_STRUCT = 8
  688. IMAGE_SYM_TYPE_UNION = 9
  689. IMAGE_SYM_TYPE_ENUM = 10
  690. IMAGE_SYM_TYPE_MOE = 11
  691. IMAGE_SYM_TYPE_BYTE = 12
  692. IMAGE_SYM_TYPE_WORD = 13
  693. IMAGE_SYM_TYPE_UINT = 14
  694. IMAGE_SYM_TYPE_DWORD = 15
  695. IMAGE_SYM_TYPE_PCODE = 32768
  696. IMAGE_SYM_DTYPE_NULL = 0
  697. IMAGE_SYM_DTYPE_POINTER = 1
  698. IMAGE_SYM_DTYPE_FUNCTION = 2
  699. IMAGE_SYM_DTYPE_ARRAY = 3
  700. IMAGE_SYM_CLASS_NULL = 0
  701. IMAGE_SYM_CLASS_AUTOMATIC = 1
  702. IMAGE_SYM_CLASS_EXTERNAL = 2
  703. IMAGE_SYM_CLASS_STATIC = 3
  704. IMAGE_SYM_CLASS_REGISTER = 4
  705. IMAGE_SYM_CLASS_EXTERNAL_DEF = 5
  706. IMAGE_SYM_CLASS_LABEL = 6
  707. IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7
  708. IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8
  709. IMAGE_SYM_CLASS_ARGUMENT = 9
  710. IMAGE_SYM_CLASS_STRUCT_TAG = 10
  711. IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11
  712. IMAGE_SYM_CLASS_UNION_TAG = 12
  713. IMAGE_SYM_CLASS_TYPE_DEFINITION = 13
  714. IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14
  715. IMAGE_SYM_CLASS_ENUM_TAG = 15
  716. IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16
  717. IMAGE_SYM_CLASS_REGISTER_PARAM = 17
  718. IMAGE_SYM_CLASS_BIT_FIELD = 18
  719. IMAGE_SYM_CLASS_FAR_EXTERNAL = 68
  720. IMAGE_SYM_CLASS_BLOCK = 100
  721. IMAGE_SYM_CLASS_FUNCTION = 101
  722. IMAGE_SYM_CLASS_END_OF_STRUCT = 102
  723. IMAGE_SYM_CLASS_FILE = 103
  724. IMAGE_SYM_CLASS_SECTION = 104
  725. IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105
  726. N_BTMASK = 15
  727. N_TMASK = 48
  728. N_TMASK1 = 192
  729. N_TMASK2 = 240
  730. N_BTSHFT = 4
  731. N_TSHIFT = 2
  732. def BTYPE(x): return ((x) & N_BTMASK)
  733. def ISPTR(x): return (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_POINTER << N_BTSHFT))
  734. def ISFCN(x): return (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT))
  735. def ISARY(x): return (((x) & N_TMASK) == (IMAGE_SYM_DTYPE_ARRAY << N_BTSHFT))
  736. def INCREF(x): return ((((x)&~N_BTMASK)<<N_TSHIFT)|(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT)|((x)&N_BTMASK))
  737. def DECREF(x): return ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
  738. IMAGE_SIZEOF_AUX_SYMBOL = 18
  739. IMAGE_COMDAT_SELECT_NODUPLICATES = 1
  740. IMAGE_COMDAT_SELECT_ANY = 2
  741. IMAGE_COMDAT_SELECT_SAME_SIZE = 3
  742. IMAGE_COMDAT_SELECT_EXACT_MATCH = 4
  743. IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5
  744. IMAGE_COMDAT_SELECT_LARGEST = 6
  745. IMAGE_COMDAT_SELECT_NEWEST = 7
  746. IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1
  747. IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2
  748. IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3
  749. IMAGE_SIZEOF_RELOCATION = 10
  750. IMAGE_REL_I386_ABSOLUTE = 0
  751. IMAGE_REL_I386_DIR16 = 1
  752. IMAGE_REL_I386_REL16 = 2
  753. IMAGE_REL_I386_DIR32 = 6
  754. IMAGE_REL_I386_DIR32NB = 7
  755. IMAGE_REL_I386_SEG12 = 9
  756. IMAGE_REL_I386_SECTION = 10
  757. IMAGE_REL_I386_SECREL = 11
  758. IMAGE_REL_I386_REL32 = 20
  759. IMAGE_REL_MIPS_ABSOLUTE = 0
  760. IMAGE_REL_MIPS_REFHALF = 1
  761. IMAGE_REL_MIPS_REFWORD = 2
  762. IMAGE_REL_MIPS_JMPADDR = 3
  763. IMAGE_REL_MIPS_REFHI = 4
  764. IMAGE_REL_MIPS_REFLO = 5
  765. IMAGE_REL_MIPS_GPREL = 6
  766. IMAGE_REL_MIPS_LITERAL = 7
  767. IMAGE_REL_MIPS_SECTION = 10
  768. IMAGE_REL_MIPS_SECREL = 11
  769. IMAGE_REL_MIPS_SECRELLO = 12
  770. IMAGE_REL_MIPS_SECRELHI = 13
  771. IMAGE_REL_MIPS_REFWORDNB = 34
  772. IMAGE_REL_MIPS_PAIR = 37
  773. IMAGE_REL_ALPHA_ABSOLUTE = 0
  774. IMAGE_REL_ALPHA_REFLONG = 1
  775. IMAGE_REL_ALPHA_REFQUAD = 2
  776. IMAGE_REL_ALPHA_GPREL32 = 3
  777. IMAGE_REL_ALPHA_LITERAL = 4
  778. IMAGE_REL_ALPHA_LITUSE = 5
  779. IMAGE_REL_ALPHA_GPDISP = 6
  780. IMAGE_REL_ALPHA_BRADDR = 7
  781. IMAGE_REL_ALPHA_HINT = 8
  782. IMAGE_REL_ALPHA_INLINE_REFLONG = 9
  783. IMAGE_REL_ALPHA_REFHI = 10
  784. IMAGE_REL_ALPHA_REFLO = 11
  785. IMAGE_REL_ALPHA_PAIR = 12
  786. IMAGE_REL_ALPHA_MATCH = 13
  787. IMAGE_REL_ALPHA_SECTION = 14
  788. IMAGE_REL_ALPHA_SECREL = 15
  789. IMAGE_REL_ALPHA_REFLONGNB = 16
  790. IMAGE_REL_ALPHA_SECRELLO = 17
  791. IMAGE_REL_ALPHA_SECRELHI = 18
  792. IMAGE_REL_PPC_ABSOLUTE = 0
  793. IMAGE_REL_PPC_ADDR64 = 1
  794. IMAGE_REL_PPC_ADDR32 = 2
  795. IMAGE_REL_PPC_ADDR24 = 3
  796. IMAGE_REL_PPC_ADDR16 = 4
  797. IMAGE_REL_PPC_ADDR14 = 5
  798. IMAGE_REL_PPC_REL24 = 6
  799. IMAGE_REL_PPC_REL14 = 7
  800. IMAGE_REL_PPC_TOCREL16 = 8
  801. IMAGE_REL_PPC_TOCREL14 = 9
  802. IMAGE_REL_PPC_ADDR32NB = 10
  803. IMAGE_REL_PPC_SECREL = 11
  804. IMAGE_REL_PPC_SECTION = 12
  805. IMAGE_REL_PPC_IFGLUE = 13
  806. IMAGE_REL_PPC_IMGLUE = 14
  807. IMAGE_REL_PPC_SECREL16 = 15
  808. IMAGE_REL_PPC_REFHI = 16
  809. IMAGE_REL_PPC_REFLO = 17
  810. IMAGE_REL_PPC_PAIR = 18
  811. IMAGE_REL_PPC_SECRELLO = 19
  812. IMAGE_REL_PPC_SECRELHI = 20
  813. IMAGE_REL_PPC_TYPEMASK = 255
  814. IMAGE_REL_PPC_NEG = 256
  815. IMAGE_REL_PPC_BRTAKEN = 512
  816. IMAGE_REL_PPC_BRNTAKEN = 1024
  817. IMAGE_REL_PPC_TOCDEFN = 2048
  818. IMAGE_REL_SH3_ABSOLUTE = 0
  819. IMAGE_REL_SH3_DIRECT16 = 1
  820. IMAGE_REL_SH3_DIRECT32 = 2
  821. IMAGE_REL_SH3_DIRECT8 = 3
  822. IMAGE_REL_SH3_DIRECT8_WORD = 4
  823. IMAGE_REL_SH3_DIRECT8_LONG = 5
  824. IMAGE_REL_SH3_DIRECT4 = 6
  825. IMAGE_REL_SH3_DIRECT4_WORD = 7
  826. IMAGE_REL_SH3_DIRECT4_LONG = 8
  827. IMAGE_REL_SH3_PCREL8_WORD = 9
  828. IMAGE_REL_SH3_PCREL8_LONG = 10
  829. IMAGE_REL_SH3_PCREL12_WORD = 11
  830. IMAGE_REL_SH3_STARTOF_SECTION = 12
  831. IMAGE_REL_SH3_SIZEOF_SECTION = 13
  832. IMAGE_REL_SH3_SECTION = 14
  833. IMAGE_REL_SH3_SECREL = 15
  834. IMAGE_REL_SH3_DIRECT32_NB = 16
  835. IMAGE_SIZEOF_LINENUMBER = 6
  836. IMAGE_SIZEOF_BASE_RELOCATION = 8
  837. IMAGE_REL_BASED_ABSOLUTE = 0
  838. IMAGE_REL_BASED_HIGH = 1
  839. IMAGE_REL_BASED_LOW = 2
  840. IMAGE_REL_BASED_HIGHLOW = 3
  841. IMAGE_REL_BASED_HIGHADJ = 4
  842. IMAGE_REL_BASED_MIPS_JMPADDR = 5
  843. IMAGE_REL_BASED_SECTION = 6
  844. IMAGE_REL_BASED_REL32 = 7
  845. IMAGE_ARCHIVE_START_SIZE = 8
  846. IMAGE_ARCHIVE_START = "!<arch>\n"
  847. IMAGE_ARCHIVE_END = "`\n"
  848. IMAGE_ARCHIVE_PAD = "\n"
  849. IMAGE_ARCHIVE_LINKER_MEMBER = "/ "
  850. IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60
  851. IMAGE_ORDINAL_FLAG = -2147483648
  852. def IMAGE_SNAP_BY_ORDINAL(Ordina): return ((Ordinal & IMAGE_ORDINAL_FLAG) != 0)
  853. def IMAGE_ORDINAL(Ordina): return (Ordinal & 65535)
  854. IMAGE_RESOURCE_NAME_IS_STRING = -2147483648
  855. IMAGE_RESOURCE_DATA_IS_DIRECTORY = -2147483648
  856. IMAGE_DEBUG_TYPE_UNKNOWN = 0
  857. IMAGE_DEBUG_TYPE_COFF = 1
  858. IMAGE_DEBUG_TYPE_CODEVIEW = 2
  859. IMAGE_DEBUG_TYPE_FPO = 3
  860. IMAGE_DEBUG_TYPE_MISC = 4
  861. IMAGE_DEBUG_TYPE_EXCEPTION = 5
  862. IMAGE_DEBUG_TYPE_FIXUP = 6
  863. IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7
  864. IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8
  865. IMAGE_DEBUG_TYPE_BORLAND = 9
  866. FRAME_FPO = 0
  867. FRAME_TRAP = 1
  868. FRAME_TSS = 2
  869. FRAME_NONFPO = 3
  870. SIZEOF_RFPO_DATA = 16
  871. IMAGE_DEBUG_MISC_EXENAME = 1
  872. IMAGE_SEPARATE_DEBUG_SIGNATURE = 18756
  873. IMAGE_SEPARATE_DEBUG_FLAGS_MASK = 32768
  874. IMAGE_SEPARATE_DEBUG_MISMATCH = 32768
  875. # Included from string.h
  876. _NLSCMPERROR = 2147483647
  877. NULL = 0
  878. HEAP_NO_SERIALIZE = 1
  879. HEAP_GROWABLE = 2
  880. HEAP_GENERATE_EXCEPTIONS = 4
  881. HEAP_ZERO_MEMORY = 8
  882. HEAP_REALLOC_IN_PLACE_ONLY = 16
  883. HEAP_TAIL_CHECKING_ENABLED = 32
  884. HEAP_FREE_CHECKING_ENABLED = 64
  885. HEAP_DISABLE_COALESCE_ON_FREE = 128
  886. HEAP_CREATE_ALIGN_16 = 65536
  887. HEAP_CREATE_ENABLE_TRACING = 131072
  888. HEAP_MAXIMUM_TAG = 4095
  889. HEAP_PSEUDO_TAG_FLAG = 32768
  890. HEAP_TAG_SHIFT = 16
  891. IS_TEXT_UNICODE_ASCII16 = 1
  892. IS_TEXT_UNICODE_REVERSE_ASCII16 = 16
  893. IS_TEXT_UNICODE_STATISTICS = 2
  894. IS_TEXT_UNICODE_REVERSE_STATISTICS = 32
  895. IS_TEXT_UNICODE_CONTROLS = 4
  896. IS_TEXT_UNICODE_REVERSE_CONTROLS = 64
  897. IS_TEXT_UNICODE_SIGNATURE = 8
  898. IS_TEXT_UNICODE_REVERSE_SIGNATURE = 128
  899. IS_TEXT_UNICODE_ILLEGAL_CHARS = 256
  900. IS_TEXT_UNICODE_ODD_LENGTH = 512
  901. IS_TEXT_UNICODE_DBCS_LEADBYTE = 1024
  902. IS_TEXT_UNICODE_NULL_BYTES = 4096
  903. IS_TEXT_UNICODE_UNICODE_MASK = 15
  904. IS_TEXT_UNICODE_REVERSE_MASK = 240
  905. IS_TEXT_UNICODE_NOT_UNICODE_MASK = 3840
  906. IS_TEXT_UNICODE_NOT_ASCII_MASK = 61440
  907. COMPRESSION_FORMAT_NONE = (0)
  908. COMPRESSION_FORMAT_DEFAULT = (1)
  909. COMPRESSION_FORMAT_LZNT1 = (2)
  910. COMPRESSION_ENGINE_STANDARD = (0)
  911. COMPRESSION_ENGINE_MAXIMUM = (256)
  912. MESSAGE_RESOURCE_UNICODE = 1
  913. RTL_CRITSECT_TYPE = 0
  914. RTL_RESOURCE_TYPE = 1
  915. SEF_DACL_AUTO_INHERIT = 1
  916. SEF_SACL_AUTO_INHERIT = 2
  917. SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = 4
  918. SEF_AVOID_PRIVILEGE_CHECK = 8
  919. DLL_PROCESS_ATTACH = 1
  920. DLL_THREAD_ATTACH = 2
  921. DLL_THREAD_DETACH = 3
  922. DLL_PROCESS_DETACH = 0
  923. EVENTLOG_SEQUENTIAL_READ = 0X0001
  924. EVENTLOG_SEEK_READ = 0X0002
  925. EVENTLOG_FORWARDS_READ = 0X0004
  926. EVENTLOG_BACKWARDS_READ = 0X0008
  927. EVENTLOG_SUCCESS = 0X0000
  928. EVENTLOG_ERROR_TYPE = 1
  929. EVENTLOG_WARNING_TYPE = 2
  930. EVENTLOG_INFORMATION_TYPE = 4
  931. EVENTLOG_AUDIT_SUCCESS = 8
  932. EVENTLOG_AUDIT_FAILURE = 16
  933. EVENTLOG_START_PAIRED_EVENT = 1
  934. EVENTLOG_END_PAIRED_EVENT = 2
  935. EVENTLOG_END_ALL_PAIRED_EVENTS = 4
  936. EVENTLOG_PAIRED_EVENT_ACTIVE = 8
  937. EVENTLOG_PAIRED_EVENT_INACTIVE = 16
  938. KEY_QUERY_VALUE = (1)
  939. KEY_SET_VALUE = (2)
  940. KEY_CREATE_SUB_KEY = (4)
  941. KEY_ENUMERATE_SUB_KEYS = (8)
  942. KEY_NOTIFY = (16)
  943. KEY_CREATE_LINK = (32)
  944. KEY_READ = ((STANDARD_RIGHTS_READ |\
  945. KEY_QUERY_VALUE |\
  946. KEY_ENUMERATE_SUB_KEYS |\
  947. KEY_NOTIFY) \
  948. & \
  949. (~SYNCHRONIZE))
  950. KEY_WRITE = ((STANDARD_RIGHTS_WRITE |\
  951. KEY_SET_VALUE |\
  952. KEY_CREATE_SUB_KEY) \
  953. & \
  954. (~SYNCHRONIZE))
  955. KEY_EXECUTE = ((KEY_READ) \
  956. & \
  957. (~SYNCHRONIZE))
  958. KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL |\
  959. KEY_QUERY_VALUE |\
  960. KEY_SET_VALUE |\
  961. KEY_CREATE_SUB_KEY |\
  962. KEY_ENUMERATE_SUB_KEYS |\
  963. KEY_NOTIFY |\
  964. KEY_CREATE_LINK) \
  965. & \
  966. (~SYNCHRONIZE))
  967. REG_OPTION_RESERVED = (0)
  968. REG_OPTION_NON_VOLATILE = (0)
  969. REG_OPTION_VOLATILE = (1)
  970. REG_OPTION_CREATE_LINK = (2)
  971. REG_OPTION_BACKUP_RESTORE = (4)
  972. REG_OPTION_OPEN_LINK = (8)
  973. REG_LEGAL_OPTION = \
  974. (REG_OPTION_RESERVED |\
  975. REG_OPTION_NON_VOLATILE |\
  976. REG_OPTION_VOLATILE |\
  977. REG_OPTION_CREATE_LINK |\
  978. REG_OPTION_BACKUP_RESTORE |\
  979. REG_OPTION_OPEN_LINK)
  980. ## dispositions returned from RegCreateKeyEx
  981. REG_CREATED_NEW_KEY = 1
  982. REG_OPENED_EXISTING_KEY = 2
  983. ## flags used with RegSaveKeyEx
  984. REG_STANDARD_FORMAT = 1
  985. REG_LATEST_FORMAT = 2
  986. REG_NO_COMPRESSION = 4
  987. ## flags used with RegRestoreKey
  988. REG_WHOLE_HIVE_VOLATILE = 1
  989. REG_REFRESH_HIVE = 2
  990. REG_NO_LAZY_FLUSH = 4
  991. REG_FORCE_RESTORE = 8
  992. REG_NOTIFY_CHANGE_NAME = (1)
  993. REG_NOTIFY_CHANGE_ATTRIBUTES = (2)
  994. REG_NOTIFY_CHANGE_LAST_SET = (4)
  995. REG_NOTIFY_CHANGE_SECURITY = (8)
  996. REG_LEGAL_CHANGE_FILTER = \
  997. (REG_NOTIFY_CHANGE_NAME |\
  998. REG_NOTIFY_CHANGE_ATTRIBUTES |\
  999. REG_NOTIFY_CHANGE_LAST_SET |\
  1000. REG_NOTIFY_CHANGE_SECURITY)
  1001. REG_NONE = ( 0 )
  1002. REG_SZ = ( 1 )
  1003. REG_EXPAND_SZ = ( 2 )
  1004. REG_BINARY = ( 3 )
  1005. REG_DWORD = ( 4 )
  1006. REG_DWORD_LITTLE_ENDIAN = ( 4 )
  1007. REG_DWORD_BIG_ENDIAN = ( 5 )
  1008. REG_LINK = ( 6 )
  1009. REG_MULTI_SZ = ( 7 )
  1010. REG_RESOURCE_LIST = ( 8 )
  1011. REG_FULL_RESOURCE_DESCRIPTOR = ( 9 )
  1012. REG_RESOURCE_REQUIREMENTS_LIST = ( 10 )
  1013. SERVICE_KERNEL_DRIVER = 1
  1014. SERVICE_FILE_SYSTEM_DRIVER = 2
  1015. SERVICE_ADAPTER = 4
  1016. SERVICE_RECOGNIZER_DRIVER = 8
  1017. SERVICE_DRIVER = (SERVICE_KERNEL_DRIVER | \
  1018. SERVICE_FILE_SYSTEM_DRIVER | \
  1019. SERVICE_RECOGNIZER_DRIVER)
  1020. SERVICE_WIN32_OWN_PROCESS = 16
  1021. SERVICE_WIN32_SHARE_PROCESS = 32
  1022. SERVICE_WIN32 = (SERVICE_WIN32_OWN_PROCESS | \
  1023. SERVICE_WIN32_SHARE_PROCESS)
  1024. SERVICE_INTERACTIVE_PROCESS = 256
  1025. SERVICE_TYPE_ALL = (SERVICE_WIN32 | \
  1026. SERVICE_ADAPTER | \
  1027. SERVICE_DRIVER | \
  1028. SERVICE_INTERACTIVE_PROCESS)
  1029. SERVICE_BOOT_START = 0
  1030. SERVICE_SYSTEM_START = 1
  1031. SERVICE_AUTO_START = 2
  1032. SERVICE_DEMAND_START = 3
  1033. SERVICE_DISABLED = 4
  1034. SERVICE_ERROR_IGNORE = 0
  1035. SERVICE_ERROR_NORMAL = 1
  1036. SERVICE_ERROR_SEVERE = 2
  1037. SERVICE_ERROR_CRITICAL = 3
  1038. TAPE_ERASE_SHORT = 0
  1039. TAPE_ERASE_LONG = 1
  1040. TAPE_LOAD = 0
  1041. TAPE_UNLOAD = 1
  1042. TAPE_TENSION = 2
  1043. TAPE_LOCK = 3
  1044. TAPE_UNLOCK = 4
  1045. TAPE_FORMAT = 5
  1046. TAPE_SETMARKS = 0
  1047. TAPE_FILEMARKS = 1
  1048. TAPE_SHORT_FILEMARKS = 2
  1049. TAPE_LONG_FILEMARKS = 3
  1050. TAPE_ABSOLUTE_POSITION = 0
  1051. TAPE_LOGICAL_POSITION = 1
  1052. TAPE_PSEUDO_LOGICAL_POSITION = 2
  1053. TAPE_REWIND = 0
  1054. TAPE_ABSOLUTE_BLOCK = 1
  1055. TAPE_LOGICAL_BLOCK = 2
  1056. TAPE_PSEUDO_LOGICAL_BLOCK = 3
  1057. TAPE_SPACE_END_OF_DATA = 4
  1058. TAPE_SPACE_RELATIVE_BLOCKS = 5
  1059. TAPE_SPACE_FILEMARKS = 6
  1060. TAPE_SPACE_SEQUENTIAL_FMKS = 7
  1061. TAPE_SPACE_SETMARKS = 8
  1062. TAPE_SPACE_SEQUENTIAL_SMKS = 9
  1063. TAPE_DRIVE_FIXED = 1
  1064. TAPE_DRIVE_SELECT = 2
  1065. TAPE_DRIVE_INITIATOR = 4
  1066. TAPE_DRIVE_ERASE_SHORT = 16
  1067. TAPE_DRIVE_ERASE_LONG = 32
  1068. TAPE_DRIVE_ERASE_BOP_ONLY = 64
  1069. TAPE_DRIVE_ERASE_IMMEDIATE = 128
  1070. TAPE_DRIVE_TAPE_CAPACITY = 256
  1071. TAPE_DRIVE_TAPE_REMAINING = 512
  1072. TAPE_DRIVE_FIXED_BLOCK = 1024
  1073. TAPE_DRIVE_VARIABLE_BLOCK = 2048
  1074. TAPE_DRIVE_WRITE_PROTECT = 4096
  1075. TAPE_DRIVE_EOT_WZ_SIZE = 8192
  1076. TAPE_DRIVE_ECC = 65536
  1077. TAPE_DRIVE_COMPRESSION = 131072
  1078. TAPE_DRIVE_PADDING = 262144
  1079. TAPE_DRIVE_REPORT_SMKS = 524288
  1080. TAPE_DRIVE_GET_ABSOLUTE_BLK = 1048576
  1081. TAPE_DRIVE_GET_LOGICAL_BLK = 2097152
  1082. TAPE_DRIVE_SET_EOT_WZ_SIZE = 4194304
  1083. TAPE_DRIVE_EJECT_MEDIA = 16777216
  1084. TAPE_DRIVE_RESERVED_BIT = -2147483648
  1085. TAPE_DRIVE_LOAD_UNLOAD = -2147483647
  1086. TAPE_DRIVE_TENSION = -2147483646
  1087. TAPE_DRIVE_LOCK_UNLOCK = -2147483644
  1088. TAPE_DRIVE_REWIND_IMMEDIATE = -2147483640
  1089. TAPE_DRIVE_SET_BLOCK_SIZE = -2147483632
  1090. TAPE_DRIVE_LOAD_UNLD_IMMED = -2147483616
  1091. TAPE_DRIVE_TENSION_IMMED = -2147483584
  1092. TAPE_DRIVE_LOCK_UNLK_IMMED = -2147483520
  1093. TAPE_DRIVE_SET_ECC = -2147483392
  1094. TAPE_DRIVE_SET_COMPRESSION = -2147483136
  1095. TAPE_DRIVE_SET_PADDING = -2147482624
  1096. TAPE_DRIVE_SET_REPORT_SMKS = -2147481600
  1097. TAPE_DRIVE_ABSOLUTE_BLK = -2147479552
  1098. TAPE_DRIVE_ABS_BLK_IMMED = -2147475456
  1099. TAPE_DRIVE_LOGICAL_BLK = -2147467264
  1100. TAPE_DRIVE_LOG_BLK_IMMED = -2147450880
  1101. TAPE_DRIVE_END_OF_DATA = -2147418112
  1102. TAPE_DRIVE_RELATIVE_BLKS = -2147352576
  1103. TAPE_DRIVE_FILEMARKS = -2147221504
  1104. TAPE_DRIVE_SEQUENTIAL_FMKS = -2146959360
  1105. TAPE_DRIVE_SETMARKS = -2146435072
  1106. TAPE_DRIVE_SEQUENTIAL_SMKS = -2145386496
  1107. TAPE_DRIVE_REVERSE_POSITION = -2143289344
  1108. TAPE_DRIVE_SPACE_IMMEDIATE = -2139095040
  1109. TAPE_DRIVE_WRITE_SETMARKS = -2130706432
  1110. TAPE_DRIVE_WRITE_FILEMARKS = -2113929216
  1111. TAPE_DRIVE_WRITE_SHORT_FMKS = -2080374784
  1112. TAPE_DRIVE_WRITE_LONG_FMKS = -2013265920
  1113. TAPE_DRIVE_WRITE_MARK_IMMED = -1879048192
  1114. TAPE_DRIVE_FORMAT = -1610612736
  1115. TAPE_DRIVE_FORMAT_IMMEDIATE = -1073741824
  1116. TAPE_DRIVE_HIGH_FEATURES = -2147483648
  1117. TAPE_FIXED_PARTITIONS = 0
  1118. TAPE_SELECT_PARTITIONS = 1
  1119. TAPE_INITIATOR_PARTITIONS = 2
  1120. TRANSACTIONMANAGER_QUERY_INFORMATION = 0x0001
  1121. TRANSACTIONMANAGER_SET_INFORMATION = 0x0002
  1122. TRANSACTIONMANAGER_RECOVER = 0x0004
  1123. TRANSACTIONMANAGER_RENAME = 0x0008
  1124. TRANSACTIONMANAGER_CREATE_RM = 0x0010
  1125. TRANSACTIONMANAGER_BIND_TRANSACTION = 0x0020
  1126. TRANSACTIONMANAGER_GENERIC_READ = STANDARD_RIGHTS_READ|TRANSACTIONMANAGER_QUERY_INFORMATION
  1127. TRANSACTIONMANAGER_GENERIC_WRITE = STANDARD_RIGHTS_WRITE |\
  1128. TRANSACTIONMANAGER_SET_INFORMATION |\
  1129. TRANSACTIONMANAGER_RECOVER |\
  1130. TRANSACTIONMANAGER_RENAME |\
  1131. TRANSACTIONMANAGER_CREATE_RM
  1132. TRANSACTIONMANAGER_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE
  1133. TRANSACTIONMANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |\
  1134. TRANSACTIONMANAGER_GENERIC_READ |\
  1135. TRANSACTIONMANAGER_GENERIC_WRITE |\
  1136. TRANSACTIONMANAGER_GENERIC_EXECUTE |\
  1137. TRANSACTIONMANAGER_BIND_TRANSACTION
  1138. TRANSACTION_QUERY_INFORMATION = 0x0001
  1139. TRANSACTION_SET_INFORMATION = 0x0002
  1140. TRANSACTION_ENLIST = 0x0004
  1141. TRANSACTION_COMMIT = 0x0008
  1142. TRANSACTION_ROLLBACK = 0x0010
  1143. TRANSACTION_PROPAGATE = 0x0020
  1144. TRANSACTION_SAVEPOINT = 0x0040
  1145. TRANSACTION_MARSHALL = TRANSACTION_QUERY_INFORMATION
  1146. TRANSACTION_GENERIC_READ = STANDARD_RIGHTS_READ |\
  1147. TRANSACTION_QUERY_INFORMATION |\
  1148. SYNCHRONIZE
  1149. TRANSACTION_GENERIC_WRITE = STANDARD_RIGHTS_WRITE |\
  1150. TRANSACTION_SET_INFORMATION |\
  1151. TRANSACTION_COMMIT |\
  1152. TRANSACTION_ENLIST |\
  1153. TRANSACTION_ROLLBACK |\
  1154. TRANSACTION_PROPAGATE |\
  1155. TRANSACTION_SAVEPOINT |\
  1156. SYNCHRONIZE
  1157. TRANSACTION_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE |\
  1158. TRANSACTION_COMMIT |\
  1159. TRANSACTION_ROLLBACK |\
  1160. SYNCHRONIZE
  1161. TRANSACTION_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |\
  1162. TRANSACTION_GENERIC_READ |\
  1163. TRANSACTION_GENERIC_WRITE |\
  1164. TRANSACTION_GENERIC_EXECUTE
  1165. TRANSACTION_RESOURCE_MANAGER_RIGHTS = TRANSACTION_GENERIC_READ |\
  1166. STANDARD_RIGHTS_WRITE |\
  1167. TRANSACTION_SET_INFORMATION |\
  1168. TRANSACTION_ENLIST |\
  1169. TRANSACTION_ROLLBACK |\
  1170. TRANSACTION_PROPAGATE |\
  1171. SYNCHRONIZE
  1172. RESOURCEMANAGER_QUERY_INFORMATION = 0x0001
  1173. RESOURCEMANAGER_SET_INFORMATION = 0x0002
  1174. RESOURCEMANAGER_RECOVER = 0x0004
  1175. RESOURCEMANAGER_ENLIST = 0x0008
  1176. RESOURCEMANAGER_GET_NOTIFICATION = 0x0010
  1177. RESOURCEMANAGER_REGISTER_PROTOCOL = 0x0020
  1178. RESOURCEMANAGER_COMPLETE_PROPAGATION = 0x0040
  1179. RESOURCEMANAGER_GENERIC_READ = STANDARD_RIGHTS_READ |\
  1180. RESOURCEMANAGER_QUERY_INFORMATION |\
  1181. SYNCHRONIZE
  1182. RESOURCEMANAGER_GENERIC_WRITE = STANDARD_RIGHTS_WRITE |\
  1183. RESOURCEMANAGER_SET_INFORMATION |\
  1184. RESOURCEMANAGER_RECOVER |\
  1185. RESOURCEMANAGER_ENLIST |\
  1186. RESOURCEMANAGER_GET_NOTIFICATION |\
  1187. RESOURCEMANAGER_REGISTER_PROTOCOL |\
  1188. RESOURCEMANAGER_COMPLETE_PROPAGATION |\
  1189. SYNCHRONIZE
  1190. RESOURCEMANAGER_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE |\
  1191. RESOURCEMANAGER_RECOVER |\
  1192. RESOURCEMANAGER_ENLIST |\
  1193. RESOURCEMANAGER_GET_NOTIFICATION |\
  1194. RESOURCEMANAGER_COMPLETE_PROPAGATION |\
  1195. SYNCHRONIZE
  1196. RESOURCEMANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |\
  1197. RESOURCEMANAGER_GENERIC_READ |\
  1198. RESOURCEMANAGER_GENERIC_WRITE |\
  1199. RESOURCEMANAGER_GENERIC_EXECUTE
  1200. ENLISTMENT_QUERY_INFORMATION = 0x0001
  1201. ENLISTMENT_SET_INFORMATION = 0x0002
  1202. ENLISTMENT_RECOVER = 0x0004
  1203. ENLISTMENT_SUBORDINATE_RIGHTS = 0x0008
  1204. ENLISTMENT_SUPERIOR_RIGHTS = 0x0010
  1205. ENLISTMENT_GENERIC_READ = STANDARD_RIGHTS_READ | ENLISTMENT_QUERY_INFORMATION
  1206. ENLISTMENT_GENERIC_WRITE = STANDARD_RIGHTS_WRITE |\
  1207. ENLISTMENT_SET_INFORMATION |\
  1208. ENLISTMENT_RECOVER |\
  1209. ENLISTMENT_SUBORDINATE_RIGHTS |\
  1210. ENLISTMENT_SUPERIOR_RIGHTS
  1211. ENLISTMENT_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE |\
  1212. ENLISTMENT_RECOVER |\
  1213. ENLISTMENT_SUBORDINATE_RIGHTS |\
  1214. ENLISTMENT_SUPERIOR_RIGHTS
  1215. ENLISTMENT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |\
  1216. ENLISTMENT_GENERIC_READ |\
  1217. ENLISTMENT_GENERIC_WRITE |\
  1218. ENLISTMENT_GENERIC_EXECUTE
  1219. ## TRANSACTION_OUTCOME enum
  1220. TransactionOutcomeUndetermined = 1
  1221. TransactionOutcomeCommitted = 2
  1222. TransactionOutcomeAborted = 3
  1223. ## TRANSACTION_STATE enum
  1224. TransactionStateNormal = 1
  1225. TransactionStateIndoubt = 2
  1226. TransactionStateCommittedNotify = 3
  1227. ## TRANSACTION_INFORMATION_CLASS enum
  1228. TransactionBasicInformation = 0
  1229. TransactionPropertiesInformation = 1
  1230. TransactionEnlistmentInformation = 2
  1231. TransactionFullInformation = 3
  1232. ## TRANSACTIONMANAGER_INFORMATION_CLASS enum
  1233. TransactionManagerBasicInformation = 0
  1234. TransactionManagerLogInformation = 1
  1235. TransactionManagerLogPathInformation = 2
  1236. TransactionManagerOnlineProbeInformation = 3
  1237. ## RESOURCEMANAGER_INFORMATION_CLASS ENUM
  1238. ResourceManagerBasicInformation = 0
  1239. ResourceManagerCompletionInformation = 1
  1240. ResourceManagerFullInformation = 2
  1241. ResourceManagerNameInformation = 3
  1242. ## ENLISTMENT_INFORMATION_CLASS enum
  1243. EnlistmentBasicInformation = 0
  1244. EnlistmentRecoveryInformation = 1
  1245. EnlistmentFullInformation = 2
  1246. EnlistmentNameInformation = 3
  1247. ## KTMOBJECT_TYPE enum
  1248. KTMOBJECT_TRANSACTION = 0
  1249. KTMOBJECT_TRANSACTION_MANAGER = 1
  1250. KTMOBJECT_RESOURCE_MANAGER = 2
  1251. KTMOBJECT_ENLISTMENT = 3
  1252. KTMOBJECT_INVALID = 4