Mobile API Reference  MicroStrategy 2019
PDCwinnt.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : PDCwinnt.h
3 // AUTHOR : Perl Script
4 // CREATION : 6/13/02
5 // Copyright (C) MicroStrategy, Inc. 2002
6 //==============================================================================================
7 #ifndef PDCwinnt_h
8 #define PDCwinnt_h
9 
10 // this must be the *first* file included
11 #include "ProtectedSource/Prolog.h"
12 
13 #if defined(WIN32) && !defined(_USE_MSI_COM)
14  #include <winnt.h>
15 #else
16 
17  //==============================================================================================
18  // FILENAME : winnt.h
19  // AUTHOR : Yuling Ma
20  // CREATION : 10/9/2001
21  // Copyright (C) MicroStrategy Incorporated 2001
22  // All rights reserved
23  //==============================================================================================
24 
25  // This header file stands in for the standard 'winnt.h' header file used in VC++
26  // We make minimal effort to declare symbols and functions in the same file as
27  // used in Windows.
28 
29  // We are using this file to hold symbols and declarations that seem to be part of
30  // the windows environment.
31 
32  #ifndef __WINNT_H__
33  #define __WINNT_H__
34 
35  //
36  // Language IDs.
37  //
38  // The following two combinations of primary language ID and
39  // sublanguage ID have special semantics:
40  //
41  // Primary Language ID Sublanguage ID Result
42  // ------------------- --------------- ------------------------
43  // LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
44  // LANG_NEUTRAL SUBLANG_DEFAULT User default language
45  // LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
46  //
47 
48  //
49  // Primary language IDs.
50  //
51 
52  #define LANG_NEUTRAL 0x00
53 
54  #define LANG_AFRIKAANS 0x36
55  #define LANG_ALBANIAN 0x1c
56  #define LANG_ARABIC 0x01
57  #define LANG_ARMENIAN 0x2b
58  #define LANG_ASSAMESE 0x4d
59  #define LANG_AZERI 0x2c
60  #define LANG_BASQUE 0x2d
61  #define LANG_BELARUSIAN 0x23
62  #define LANG_BENGALI 0x45
63  #define LANG_BULGARIAN 0x02
64  #define LANG_CATALAN 0x03
65  #define LANG_CHINESE 0x04
66  #define LANG_CROATIAN 0x1a
67  #define LANG_CZECH 0x05
68  #define LANG_DANISH 0x06
69  #define LANG_DUTCH 0x13
70  #define LANG_ENGLISH 0x09
71  #define LANG_ESTONIAN 0x25
72  #define LANG_FAEROESE 0x38
73  #define LANG_FARSI 0x29
74  #define LANG_FINNISH 0x0b
75  #define LANG_FRENCH 0x0c
76  #define LANG_GEORGIAN 0x37
77  #define LANG_GERMAN 0x07
78  #define LANG_GREEK 0x08
79  #define LANG_GUJARATI 0x47
80  #define LANG_HEBREW 0x0d
81  #define LANG_HINDI 0x39
82  #define LANG_HUNGARIAN 0x0e
83  #define LANG_ICELANDIC 0x0f
84  #define LANG_INDONESIAN 0x21
85  #define LANG_ITALIAN 0x10
86  #define LANG_JAPANESE 0x11
87  #define LANG_KANNADA 0x4b
88  #define LANG_KASHMIRI 0x60
89  #define LANG_KAZAK 0x3f
90  #define LANG_KONKANI 0x57
91  #define LANG_KOREAN 0x12
92  #define LANG_LATVIAN 0x26
93  #define LANG_LITHUANIAN 0x27
94  #define LANG_MACEDONIAN 0x2f
95  #define LANG_MALAY 0x3e
96  #define LANG_MALAYALAM 0x4c
97  #define LANG_MANIPURI 0x58
98  #define LANG_MARATHI 0x4e
99  #define LANG_NEPALI 0x61
100  #define LANG_NORWEGIAN 0x14
101  #define LANG_ORIYA 0x48
102  #define LANG_POLISH 0x15
103  #define LANG_PORTUGUESE 0x16
104  #define LANG_PUNJABI 0x46
105  #define LANG_ROMANIAN 0x18
106  #define LANG_RUSSIAN 0x19
107  #define LANG_SANSKRIT 0x4f
108  #define LANG_SERBIAN 0x1a
109  #define LANG_SINDHI 0x59
110  #define LANG_SLOVAK 0x1b
111  #define LANG_SLOVENIAN 0x24
112  #define LANG_SPANISH 0x0a
113  #define LANG_SWAHILI 0x41
114  #define LANG_SWEDISH 0x1d
115  #define LANG_TAMIL 0x49
116  #define LANG_TATAR 0x44
117  #define LANG_TELUGU 0x4a
118  #define LANG_THAI 0x1e
119  #define LANG_TURKISH 0x1f
120  #define LANG_UKRAINIAN 0x22
121  #define LANG_URDU 0x20
122  #define LANG_UZBEK 0x43
123  #define LANG_VIETNAMESE 0x2a
124 
125  //
126  // Sublanguage IDs.
127  //
128  // The name immediately following SUBLANG_ dictates which primary
129  // language ID that sublanguage ID can be combined with to form a
130  // valid language ID.
131  //
132 
133  #define SUBLANG_NEUTRAL 0x00 // language neutral
134  #define SUBLANG_DEFAULT 0x01 // user default
135  #define SUBLANG_SYS_DEFAULT 0x02 // system default
136 
137  #define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 // Arabic (Saudi Arabia)
138  #define SUBLANG_ARABIC_IRAQ 0x02 // Arabic (Iraq)
139  #define SUBLANG_ARABIC_EGYPT 0x03 // Arabic (Egypt)
140  #define SUBLANG_ARABIC_LIBYA 0x04 // Arabic (Libya)
141  #define SUBLANG_ARABIC_ALGERIA 0x05 // Arabic (Algeria)
142  #define SUBLANG_ARABIC_MOROCCO 0x06 // Arabic (Morocco)
143  #define SUBLANG_ARABIC_TUNISIA 0x07 // Arabic (Tunisia)
144  #define SUBLANG_ARABIC_OMAN 0x08 // Arabic (Oman)
145  #define SUBLANG_ARABIC_YEMEN 0x09 // Arabic (Yemen)
146  #define SUBLANG_ARABIC_SYRIA 0x0a // Arabic (Syria)
147  #define SUBLANG_ARABIC_JORDAN 0x0b // Arabic (Jordan)
148  #define SUBLANG_ARABIC_LEBANON 0x0c // Arabic (Lebanon)
149  #define SUBLANG_ARABIC_KUWAIT 0x0d // Arabic (Kuwait)
150  #define SUBLANG_ARABIC_UAE 0x0e // Arabic (U.A.E)
151  #define SUBLANG_ARABIC_BAHRAIN 0x0f // Arabic (Bahrain)
152  #define SUBLANG_ARABIC_QATAR 0x10 // Arabic (Qatar)
153  #define SUBLANG_AZERI_LATIN 0x01 // Azeri (Latin)
154  #define SUBLANG_AZERI_CYRILLIC 0x02 // Azeri (Cyrillic)
155  #define SUBLANG_CHINESE_TRADITIONAL 0x01 // Chinese (Taiwan Region)
156  #define SUBLANG_CHINESE_SIMPLIFIED 0x02 // Chinese (PR China)
157  #define SUBLANG_CHINESE_HONGKONG 0x03 // Chinese (Hong Kong)
158  #define SUBLANG_CHINESE_SINGAPORE 0x04 // Chinese (Singapore)
159  #define SUBLANG_CHINESE_MACAU 0x05 // Chinese (Macau)
160  #define SUBLANG_DUTCH 0x01 // Dutch
161  #define SUBLANG_DUTCH_BELGIAN 0x02 // Dutch (Belgian)
162  #define SUBLANG_ENGLISH_US 0x01 // English (USA)
163  #define SUBLANG_ENGLISH_UK 0x02 // English (UK)
164  #define SUBLANG_ENGLISH_AUS 0x03 // English (Australian)
165  #define SUBLANG_ENGLISH_CAN 0x04 // English (Canadian)
166  #define SUBLANG_ENGLISH_NZ 0x05 // English (New Zealand)
167  #define SUBLANG_ENGLISH_EIRE 0x06 // English (Irish)
168  #define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 // English (South Africa)
169  #define SUBLANG_ENGLISH_JAMAICA 0x08 // English (Jamaica)
170  #define SUBLANG_ENGLISH_CARIBBEAN 0x09 // English (Caribbean)
171  #define SUBLANG_ENGLISH_BELIZE 0x0a // English (Belize)
172  #define SUBLANG_ENGLISH_TRINIDAD 0x0b // English (Trinidad)
173  #define SUBLANG_ENGLISH_ZIMBABWE 0x0c // English (Zimbabwe)
174  #define SUBLANG_ENGLISH_PHILIPPINES 0x0d // English (Philippines)
175  #define SUBLANG_FRENCH 0x01 // French
176  #define SUBLANG_FRENCH_BELGIAN 0x02 // French (Belgian)
177  #define SUBLANG_FRENCH_CANADIAN 0x03 // French (Canadian)
178  #define SUBLANG_FRENCH_SWISS 0x04 // French (Swiss)
179  #define SUBLANG_FRENCH_LUXEMBOURG 0x05 // French (Luxembourg)
180  #define SUBLANG_FRENCH_MONACO 0x06 // French (Monaco)
181  #define SUBLANG_GERMAN 0x01 // German
182  #define SUBLANG_GERMAN_SWISS 0x02 // German (Swiss)
183  #define SUBLANG_GERMAN_AUSTRIAN 0x03 // German (Austrian)
184  #define SUBLANG_GERMAN_LUXEMBOURG 0x04 // German (Luxembourg)
185  #define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 // German (Liechtenstein)
186  #define SUBLANG_ITALIAN 0x01 // Italian
187  #define SUBLANG_ITALIAN_SWISS 0x02 // Italian (Swiss)
188  #define SUBLANG_KASHMIRI_INDIA 0x02 // Kashmiri (India)
189  #define SUBLANG_KOREAN 0x01 // Korean (Extended Wansung)
190  #define SUBLANG_LITHUANIAN 0x01 // Lithuanian
191  #define SUBLANG_LITHUANIAN_CLASSIC 0x02 // Lithuanian (Classic)
192  #define SUBLANG_MALAY_MALAYSIA 0x01 // Malay (Malaysia)
193  #define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 // Malay (Brunei Darussalam)
194  #define SUBLANG_NEPALI_INDIA 0x02 // Nepali (India)
195  #define SUBLANG_NORWEGIAN_BOKMAL 0x01 // Norwegian (Bokmal)
196  #define SUBLANG_NORWEGIAN_NYNORSK 0x02 // Norwegian (Nynorsk)
197  #define SUBLANG_PORTUGUESE 0x02 // Portuguese
198  #define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 // Portuguese (Brazilian)
199  #define SUBLANG_SERBIAN_LATIN 0x02 // Serbian (Latin)
200  #define SUBLANG_SERBIAN_CYRILLIC 0x03 // Serbian (Cyrillic)
201  #define SUBLANG_SPANISH 0x01 // Spanish (Castilian)
202  #define SUBLANG_SPANISH_MEXICAN 0x02 // Spanish (Mexican)
203  #define SUBLANG_SPANISH_MODERN 0x03 // Spanish (Modern)
204  #define SUBLANG_SPANISH_GUATEMALA 0x04 // Spanish (Guatemala)
205  #define SUBLANG_SPANISH_COSTA_RICA 0x05 // Spanish (Costa Rica)
206  #define SUBLANG_SPANISH_PANAMA 0x06 // Spanish (Panama)
207  #define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 // Spanish (Dominican Republic)
208  #define SUBLANG_SPANISH_VENEZUELA 0x08 // Spanish (Venezuela)
209  #define SUBLANG_SPANISH_COLOMBIA 0x09 // Spanish (Colombia)
210  #define SUBLANG_SPANISH_PERU 0x0a // Spanish (Peru)
211  #define SUBLANG_SPANISH_ARGENTINA 0x0b // Spanish (Argentina)
212  #define SUBLANG_SPANISH_ECUADOR 0x0c // Spanish (Ecuador)
213  #define SUBLANG_SPANISH_CHILE 0x0d // Spanish (Chile)
214  #define SUBLANG_SPANISH_URUGUAY 0x0e // Spanish (Uruguay)
215  #define SUBLANG_SPANISH_PARAGUAY 0x0f // Spanish (Paraguay)
216  #define SUBLANG_SPANISH_BOLIVIA 0x10 // Spanish (Bolivia)
217  #define SUBLANG_SPANISH_EL_SALVADOR 0x11 // Spanish (El Salvador)
218  #define SUBLANG_SPANISH_HONDURAS 0x12 // Spanish (Honduras)
219  #define SUBLANG_SPANISH_NICARAGUA 0x13 // Spanish (Nicaragua)
220  #define SUBLANG_SPANISH_PUERTO_RICO 0x14 // Spanish (Puerto Rico)
221  #define SUBLANG_SWEDISH 0x01 // Swedish
222  #define SUBLANG_SWEDISH_FINLAND 0x02 // Swedish (Finland)
223  #define SUBLANG_URDU_PAKISTAN 0x01 // Urdu (Pakistan)
224  #define SUBLANG_URDU_INDIA 0x02 // Urdu (India)
225  #define SUBLANG_UZBEK_LATIN 0x01 // Uzbek (Latin)
226  #define SUBLANG_UZBEK_CYRILLIC 0x02 // Uzbek (Cyrillic)
227 
228  //
229  // Sorting IDs.
230  //
231 
232  #define SORT_DEFAULT 0x0 // sorting default
233 
234  #define SORT_JAPANESE_XJIS 0x0 // Japanese XJIS order
235  #define SORT_JAPANESE_UNICODE 0x1 // Japanese Unicode order
236 
237  #define SORT_CHINESE_BIG5 0x0 // Chinese BIG5 order
238  #define SORT_CHINESE_PRCP 0x0 // PRC Chinese Phonetic order
239  #define SORT_CHINESE_UNICODE 0x1 // Chinese Unicode order
240  #define SORT_CHINESE_PRC 0x2 // PRC Chinese Stroke Count order
241  #define SORT_CHINESE_BOPOMOFO 0x3 // Traditional Chinese Bopomofo order
242 
243  #define SORT_KOREAN_KSC 0x0 // Korean KSC order
244  #define SORT_KOREAN_UNICODE 0x1 // Korean Unicode order
245 
246  #define SORT_GERMAN_PHONE_BOOK 0x1 // German Phone Book order
247 
248  #define SORT_HUNGARIAN_DEFAULT 0x0 // Hungarian Default order
249  #define SORT_HUNGARIAN_TECHNICAL 0x1 // Hungarian Technical order
250 
251  #define SORT_GEORGIAN_TRADITIONAL 0x0 // Georgian Traditional order
252  #define SORT_GEORGIAN_MODERN 0x1 // Georgian Modern order
253 
254  // end_r_winnt
255 
256  //
257  // A language ID is a 16 bit value which is the combination of a
258  // primary language ID and a secondary language ID. The bits are
259  // allocated as follows:
260  //
261  // +-----------------------+-------------------------+
262  // | Sublanguage ID | Primary Language ID |
263  // +-----------------------+-------------------------+
264  // 15 10 9 0 bit
265  //
266  //
267  // Language ID creation/extraction macros:
268  //
269  // MAKELANGID - construct language id from a primary language id and
270  // a sublanguage id.
271  // PRIMARYLANGID - extract primary language id from a language id.
272  // SUBLANGID - extract sublanguage id from a language id.
273  //
274 
275  #define MAKELANGID(p, s) ((((WORD )(s)) << 10) | (WORD )(p))
276  #define PRIMARYLANGID(lgid) ((WORD )(lgid) & 0x3ff)
277  #define SUBLANGID(lgid) ((WORD )(lgid) >> 10)
278 
279 
280  //
281  // A locale ID is a 32 bit value which is the combination of a
282  // language ID, a sort ID, and a reserved area. The bits are
283  // allocated as follows:
284  //
285  // +-------------+---------+-------------------------+
286  // | Reserved | Sort ID | Language ID |
287  // +-------------+---------+-------------------------+
288  // 31 20 19 16 15 0 bit
289  //
290  //
291  // Locale ID creation/extraction macros:
292  //
293  // MAKELCID - construct the locale id from a language id and a sort id.
294  // MAKESORTLCID - construct the locale id from a language id, sort id, and sort version.
295  // LANGIDFROMLCID - extract the language id from a locale id.
296  // SORTIDFROMLCID - extract the sort id from a locale id.
297  // SORTVERSIONFROMLCID - extract the sort version from a locale id.
298  //
299 
300  #define NLS_VALID_LOCALE_MASK 0x000fffff
301 
302  #define MAKELCID(lgid, srtid) ((DWORD)((((DWORD)((WORD )(srtid))) << 16) | \
303  ((DWORD)((WORD )(lgid)))))
304  #define MAKESORTLCID(lgid, srtid, ver) \
305  ((DWORD)((MAKELCID(lgid, srtid)) | \
306  (((DWORD)((WORD )(ver))) << 20)))
307  #define LANGIDFROMLCID(lcid) ((WORD )(lcid))
308  #define SORTIDFROMLCID(lcid) ((WORD )((((DWORD)(lcid)) >> 16) & 0xf))
309  #define SORTVERSIONFROMLCID(lcid) ((WORD )((((DWORD)(lcid)) >> 20) & 0xf))
310 
311  //
312  // Default System and User IDs for language and locale.
313  //
314 
315  #define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
316  #define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
317 
318  #define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT))
319  #define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT))
320 
321  #define LOCALE_NEUTRAL \
322  (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT))
323 
324  #ifndef WIN32_NO_STATUS
325  /*lint -save -e767 */
326  #define STATUS_WAIT_0 ((DWORD )0x00000000L)
327  #define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
328  #define STATUS_USER_APC ((DWORD )0x000000C0L)
329  #define STATUS_TIMEOUT ((DWORD )0x00000102L)
330  #define STATUS_PENDING ((DWORD )0x00000103L)
331  #define STATUS_SEGMENT_NOTIFICATION ((DWORD )0x40000005L)
332  #define STATUS_GUARD_PAGE_VIOLATION ((DWORD )0x80000001L)
333  #define STATUS_DATATYPE_MISALIGNMENT ((DWORD )0x80000002L)
334  #define STATUS_BREAKPOINT ((DWORD )0x80000003L)
335  #define STATUS_SINGLE_STEP ((DWORD )0x80000004L)
336  #define STATUS_ACCESS_VIOLATION ((DWORD )0xC0000005L)
337  #define STATUS_IN_PAGE_ERROR ((DWORD )0xC0000006L)
338  #define STATUS_INVALID_HANDLE ((DWORD )0xC0000008L)
339  #define STATUS_NO_MEMORY ((DWORD )0xC0000017L)
340  #define STATUS_ILLEGAL_INSTRUCTION ((DWORD )0xC000001DL)
341  #define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD )0xC0000025L)
342  #define STATUS_INVALID_DISPOSITION ((DWORD )0xC0000026L)
343  #define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD )0xC000008CL)
344  #define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD )0xC000008DL)
345  #define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD )0xC000008EL)
346  #define STATUS_FLOAT_INEXACT_RESULT ((DWORD )0xC000008FL)
347  #define STATUS_FLOAT_INVALID_OPERATION ((DWORD )0xC0000090L)
348  #define STATUS_FLOAT_OVERFLOW ((DWORD )0xC0000091L)
349  #define STATUS_FLOAT_STACK_CHECK ((DWORD )0xC0000092L)
350  #define STATUS_FLOAT_UNDERFLOW ((DWORD )0xC0000093L)
351  #define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD )0xC0000094L)
352  #define STATUS_INTEGER_OVERFLOW ((DWORD )0xC0000095L)
353  #define STATUS_PRIVILEGED_INSTRUCTION ((DWORD )0xC0000096L)
354  #define STATUS_STACK_OVERFLOW ((DWORD )0xC00000FDL)
355  #define STATUS_CONTROL_C_EXIT ((DWORD )0xC000013AL)
356  #define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD )0xC00002B4L)
357  #define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD )0xC00002B5L)
358  #define STATUS_ILLEGAL_VLM_REFERENCE ((DWORD )0xC00002C0L)
359  /*lint -restore */
360  #endif
361 
362  //
363  // The types of events that can be logged.
364  //
365  #define EVENTLOG_SUCCESS 0X0000
366  #define EVENTLOG_ERROR_TYPE 0x0001
367  #define EVENTLOG_WARNING_TYPE 0x0002
368  #define EVENTLOG_INFORMATION_TYPE 0x0004
369  #define EVENTLOG_AUDIT_SUCCESS 0x0008
370  #define EVENTLOG_AUDIT_FAILURE 0x0010
371 
372  #define MEM_COMMIT 0x1000
373  #define MEM_RESERVE 0x2000
374  #define MEM_DECOMMIT 0x4000
375  #define MEM_RELEASE 0x8000
376  #define MEM_FREE 0x10000
377  #define MEM_PRIVATE 0x20000
378  #define MEM_MAPPED 0x40000
379  #define MEM_RESET 0x80000
380  #define MEM_TOP_DOWN 0x100000
381  #define MEM_4MB_PAGES 0x80000000
382  #define SEC_FILE 0x800000
383  #define SEC_IMAGE 0x1000000
384  #define SEC_VLM 0x2000000
385  #define SEC_RESERVE 0x4000000
386  #define SEC_COMMIT 0x8000000
387  #define SEC_NOCACHE 0x10000000
388  #define MEM_IMAGE SEC_IMAGE
389 
390 #ifdef WIN32 //kxiao add for security subsytem on MSICOM Windows
391 
392 typedef DWORD ACCESS_MASK;
393 typedef ACCESS_MASK *PACCESS_MASK;
394 // Registry Specific Access Rights.
395 //
396 
397 #define KEY_QUERY_VALUE (0x0001)
398 #define KEY_SET_VALUE (0x0002)
399 #define KEY_CREATE_SUB_KEY (0x0004)
400 #define KEY_ENUMERATE_SUB_KEYS (0x0008)
401 #define KEY_NOTIFY (0x0010)
402 #define KEY_CREATE_LINK (0x0020)
403 #define KEY_WOW64_32KEY (0x0200)
404 #define KEY_WOW64_64KEY (0x0100)
405 #define KEY_WOW64_RES (0x0300)
406 
407 #define KEY_READ ((STANDARD_RIGHTS_READ |\
408  KEY_QUERY_VALUE |\
409  KEY_ENUMERATE_SUB_KEYS |\
410  KEY_NOTIFY) \
411  & \
412  (~SYNCHRONIZE))
413 
414 
415 #define KEY_WRITE ((STANDARD_RIGHTS_WRITE |\
416  KEY_SET_VALUE |\
417  KEY_CREATE_SUB_KEY) \
418  & \
419  (~SYNCHRONIZE))
420 
421 #define KEY_EXECUTE ((KEY_READ) \
422  & \
423  (~SYNCHRONIZE))
424 
425 #define KEY_ALL_ACCESS ((STANDARD_RIGHTS_ALL |\
426  KEY_QUERY_VALUE |\
427  KEY_SET_VALUE |\
428  KEY_CREATE_SUB_KEY |\
429  KEY_ENUMERATE_SUB_KEYS |\
430  KEY_NOTIFY |\
431  KEY_CREATE_LINK) \
432  & \
433  (~SYNCHRONIZE))
434 
435 //
436 // Open/Create Options
437 //
438 
439 #define REG_OPTION_RESERVED (0x00000000L) // Parameter is reserved
440 
441 #define REG_OPTION_NON_VOLATILE (0x00000000L) // Key is preserved
442  // when system is rebooted
443 
444 #define REG_OPTION_VOLATILE (0x00000001L) // Key is not preserved
445  // when system is rebooted
446 
447 #define REG_OPTION_CREATE_LINK (0x00000002L) // Created key is a
448  // symbolic link
449 
450 #define REG_OPTION_BACKUP_RESTORE (0x00000004L) // open for backup or restore
451  // special access rules
452  // privilege required
453 
454 #define REG_OPTION_OPEN_LINK (0x00000008L) // Open symbolic link
455 
456 #define REG_LEGAL_OPTION \
457  (REG_OPTION_RESERVED |\
458  REG_OPTION_NON_VOLATILE |\
459  REG_OPTION_VOLATILE |\
460  REG_OPTION_CREATE_LINK |\
461  REG_OPTION_BACKUP_RESTORE |\
462  REG_OPTION_OPEN_LINK)
463 
464 //
465 // Key creation/open disposition
466 //
467 
468 #define REG_CREATED_NEW_KEY (0x00000001L) // New Registry Key created
469 #define REG_OPENED_EXISTING_KEY (0x00000002L) // Existing Key opened
470 
471 //
472 // hive format to be used by Reg(Nt)SaveKeyEx
473 //
474 #define REG_STANDARD_FORMAT 1
475 #define REG_LATEST_FORMAT 2
476 #define REG_NO_COMPRESSION 4
477 
478 //
479 // Key restore flags
480 //
481 
482 #define REG_WHOLE_HIVE_VOLATILE (0x00000001L) // Restore whole hive volatile
483 #define REG_REFRESH_HIVE (0x00000002L) // Unwind changes to last flush
484 #define REG_NO_LAZY_FLUSH (0x00000004L) // Never lazy flush this hive
485 #define REG_FORCE_RESTORE (0x00000008L) // Force the restore process even when we have open handles on subkeys
486 
487 //
488 // Unload Flags
489 //
490 #define REG_FORCE_UNLOAD 1
491 
492 // end_ntddk end_wdm end_nthal
493 
494 //
495 // Notify filter values
496 //
497 #define REG_NOTIFY_CHANGE_NAME (0x00000001L) // Create or delete (child)
498 #define REG_NOTIFY_CHANGE_ATTRIBUTES (0x00000002L)
499 #define REG_NOTIFY_CHANGE_LAST_SET (0x00000004L) // time stamp
500 #define REG_NOTIFY_CHANGE_SECURITY (0x00000008L)
501 
502 #define REG_LEGAL_CHANGE_FILTER \
503  (REG_NOTIFY_CHANGE_NAME |\
504  REG_NOTIFY_CHANGE_ATTRIBUTES |\
505  REG_NOTIFY_CHANGE_LAST_SET |\
506  REG_NOTIFY_CHANGE_SECURITY)
507 
508 //
509 //
510 // Predefined Value Types.
511 //
512 
513 #define REG_NONE ( 0 ) // No value type
514 #define REG_SZ ( 1 ) // Unicode nul terminated string
515 #define REG_EXPAND_SZ ( 2 ) // Unicode nul terminated string
516  // (with environment variable references)
517 #define REG_BINARY ( 3 ) // Free form binary
518 #define REG_DWORD ( 4 ) // 32-bit number
519 #define REG_DWORD_LITTLE_ENDIAN ( 4 ) // 32-bit number (same as REG_DWORD)
520 #define REG_DWORD_BIG_ENDIAN ( 5 ) // 32-bit number
521 #define REG_LINK ( 6 ) // Symbolic Link (unicode)
522 #define REG_MULTI_SZ ( 7 ) // Multiple Unicode strings
523 #define REG_RESOURCE_LIST ( 8 ) // Resource list in the resource map
524 #define REG_FULL_RESOURCE_DESCRIPTOR ( 9 ) // Resource list in the hardware description
525 #define REG_RESOURCE_REQUIREMENTS_LIST ( 10 )
526 #define REG_QWORD ( 11 ) // 64-bit number
527 #define REG_QWORD_LITTLE_ENDIAN ( 11 ) // 64-bit number (same as REG_QWORD)
528 
529 //
530 // The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
531 // devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
532 // constants *MUST* always be in sync.
533 // The values are redefined in devioctl.h because they must be available to
534 // both DOS and NT.
535 //
536 
537 #define FILE_READ_DATA ( 0x0001 ) // file & pipe
538 #define FILE_LIST_DIRECTORY ( 0x0001 ) // directory
539 
540 #define FILE_WRITE_DATA ( 0x0002 ) // file & pipe
541 #define FILE_ADD_FILE ( 0x0002 ) // directory
542 
543 #define FILE_APPEND_DATA ( 0x0004 ) // file
544 #define FILE_ADD_SUBDIRECTORY ( 0x0004 ) // directory
545 #define FILE_CREATE_PIPE_INSTANCE ( 0x0004 ) // named pipe
546 
547 
548 #define FILE_READ_EA ( 0x0008 ) // file & directory
549 
550 #define FILE_WRITE_EA ( 0x0010 ) // file & directory
551 
552 #define FILE_EXECUTE ( 0x0020 ) // file
553 #define FILE_TRAVERSE ( 0x0020 ) // directory
554 
555 #define FILE_DELETE_CHILD ( 0x0040 ) // directory
556 
557 #define FILE_READ_ATTRIBUTES ( 0x0080 ) // all
558 
559 #define FILE_WRITE_ATTRIBUTES ( 0x0100 ) // all
560 
561 #define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
562 
563 #define FILE_GENERIC_READ (STANDARD_RIGHTS_READ |\
564  FILE_READ_DATA |\
565  FILE_READ_ATTRIBUTES |\
566  FILE_READ_EA |\
567  SYNCHRONIZE)
568 
569 
570 #define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\
571  FILE_WRITE_DATA |\
572  FILE_WRITE_ATTRIBUTES |\
573  FILE_WRITE_EA |\
574  FILE_APPEND_DATA |\
575  SYNCHRONIZE)
576 
577 
578 #define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
579  FILE_READ_ATTRIBUTES |\
580  FILE_EXECUTE |\
581  SYNCHRONIZE)
582 
583 #define FILE_SHARE_READ 0x00000001
584 #define FILE_SHARE_WRITE 0x00000002
585 #define FILE_SHARE_DELETE 0x00000004
586 #define FILE_ATTRIBUTE_READONLY 0x00000001
587 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
588 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
589 #define FILE_ATTRIBUTE_DIRECTORY 0x00000010
590 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020
591 #define FILE_ATTRIBUTE_DEVICE 0x00000040
592 #define FILE_ATTRIBUTE_NORMAL 0x00000080
593 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100
594 #define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
595 #define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
596 #define FILE_ATTRIBUTE_COMPRESSED 0x00000800
597 #define FILE_ATTRIBUTE_OFFLINE 0x00001000
598 #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
599 #define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
600 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
601 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
602 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
603 #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
604 #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
605 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
606 #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
607 #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
608 #define FILE_ACTION_ADDED 0x00000001
609 #define FILE_ACTION_REMOVED 0x00000002
610 #define FILE_ACTION_MODIFIED 0x00000003
611 #define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
612 #define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
613 #define MAILSLOT_NO_MESSAGE ((DWORD)-1)
614 #define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
615 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
616 #define FILE_CASE_PRESERVED_NAMES 0x00000002
617 #define FILE_UNICODE_ON_DISK 0x00000004
618 #define FILE_PERSISTENT_ACLS 0x00000008
619 #define FILE_FILE_COMPRESSION 0x00000010
620 #define FILE_VOLUME_QUOTAS 0x00000020
621 #define FILE_SUPPORTS_SPARSE_FILES 0x00000040
622 #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
623 #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
624 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
625 #define FILE_SUPPORTS_OBJECT_IDS 0x00010000
626 #define FILE_SUPPORTS_ENCRYPTION 0x00020000
627 #define FILE_NAMED_STREAMS 0x00040000
628 #define FILE_READ_ONLY_VOLUME 0x00080000
629 
630 #define GENERIC_READ (0x80000000L)
631 #define GENERIC_WRITE (0x40000000L)
632 #define GENERIC_EXECUTE (0x20000000L)
633 #define GENERIC_ALL (0x10000000L)
634 
635 
636 #define ANYSIZE_ARRAY 1
637 typedef struct _ACL {
638  BYTE AclRevision;
639  BYTE Sbz1;
640  WORD AclSize;
641  WORD AceCount;
642  WORD Sbz2;
643 } ACL;
644 typedef ACL *PACL;
645 
646 //
647 // Locally Unique Identifier
648 //
649 
650 typedef struct _LUID {
651  DWORD LowPart;
652  LONG HighPart;
653 } LUID, *PLUID;
654 
655 typedef PVOID PACCESS_TOKEN;
656 typedef PVOID PSECURITY_DESCRIPTOR;
657 typedef PVOID PSID;
658 typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
659 #define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
660 typedef struct _SECURITY_DESCRIPTOR {
661  BYTE Revision;
662  BYTE Sbz1;
663  SECURITY_DESCRIPTOR_CONTROL Control;
664  PSID Owner;
665  PSID Group;
666  PACL Sacl;
667  PACL Dacl;
668 
669  } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
670 
672 // //
673 // LUID_AND_ATTRIBUTES //
674 // //
676 //
677 //
678 
679 
680 #include <pshpack4.h>
681 
682 typedef struct _LUID_AND_ATTRIBUTES {
683  LUID Luid;
684  DWORD Attributes;
685  } LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES;
686 typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
687 typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
688 
689 #include <poppack.h>
690 
692 // //
693 // Security Id (SID) //
694 // //
696 //
697 //
698 // Pictorially the structure of an SID is as follows:
699 //
700 // 1 1 1 1 1 1
701 // 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
702 // +---------------------------------------------------------------+
703 // | SubAuthorityCount |Reserved1 (SBZ)| Revision |
704 // +---------------------------------------------------------------+
705 // | IdentifierAuthority[0] |
706 // +---------------------------------------------------------------+
707 // | IdentifierAuthority[1] |
708 // +---------------------------------------------------------------+
709 // | IdentifierAuthority[2] |
710 // +---------------------------------------------------------------+
711 // | |
712 // +- - - - - - - - SubAuthority[] - - - - - - - - -+
713 // | |
714 // +---------------------------------------------------------------+
715 //
716 //
717 
718 
719 // begin_ntifs
720 
721 #ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
722 #define SID_IDENTIFIER_AUTHORITY_DEFINED
723 typedef struct _SID_IDENTIFIER_AUTHORITY {
724  BYTE Value[6];
725 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
726 #endif
727 
728 #ifndef SID_DEFINED
729 #define SID_DEFINED
730 typedef struct _SID {
731  BYTE Revision;
732  BYTE SubAuthorityCount;
733  SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
734 #ifdef MIDL_PASS
735  [size_is(SubAuthorityCount)] DWORD SubAuthority[*];
736 #else // MIDL_PASS
737  DWORD SubAuthority[ANYSIZE_ARRAY];
738 #endif // MIDL_PASS
739 } SID, *PISID;
740 #endif
741 
742 #define SID_REVISION (1) // Current revision level
743 #define SID_MAX_SUB_AUTHORITIES (15)
744 #define SID_RECOMMENDED_SUB_AUTHORITIES (1) // Will change to around 6
745  // in a future release.
746 
747 typedef enum _SID_NAME_USE {
748  SidTypeUser = 1,
749  SidTypeGroup,
750  SidTypeDomain,
751  SidTypeAlias,
752  SidTypeWellKnownGroup,
753  SidTypeDeletedAccount,
754  SidTypeInvalid,
755  SidTypeUnknown,
756  SidTypeComputer
757 } SID_NAME_USE, *PSID_NAME_USE;
758 
759 typedef struct _SID_AND_ATTRIBUTES {
760  PSID Sid;
761  DWORD Attributes;
762  } SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
763 
764 typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
765 typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
766 
768 // //
769 // Token Object Definitions //
770 // //
771 // //
773 
774 
775 //
776 // Token Specific Access Rights.
777 //
778 
779 #define TOKEN_ASSIGN_PRIMARY (0x0001)
780 #define TOKEN_DUPLICATE (0x0002)
781 #define TOKEN_IMPERSONATE (0x0004)
782 #define TOKEN_QUERY (0x0008)
783 #define TOKEN_QUERY_SOURCE (0x0010)
784 #define TOKEN_ADJUST_PRIVILEGES (0x0020)
785 #define TOKEN_ADJUST_GROUPS (0x0040)
786 #define TOKEN_ADJUST_DEFAULT (0x0080)
787 #define TOKEN_ADJUST_SESSIONID (0x0100)
788 
789 #define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
790  TOKEN_ASSIGN_PRIMARY |\
791  TOKEN_DUPLICATE |\
792  TOKEN_IMPERSONATE |\
793  TOKEN_QUERY |\
794  TOKEN_QUERY_SOURCE |\
795  TOKEN_ADJUST_PRIVILEGES |\
796  TOKEN_ADJUST_GROUPS |\
797  TOKEN_ADJUST_SESSIONID |\
798  TOKEN_ADJUST_DEFAULT)
799 
800 
801 #define TOKEN_READ (STANDARD_RIGHTS_READ |\
802  TOKEN_QUERY)
803 
804 
805 #define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
806  TOKEN_ADJUST_PRIVILEGES |\
807  TOKEN_ADJUST_GROUPS |\
808  TOKEN_ADJUST_DEFAULT)
809 
810 #define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
811 
812 
813 //
814 //
815 // Token Types
816 //
817 
818 typedef enum _TOKEN_TYPE {
819  TokenPrimary = 1,
820  TokenImpersonation
821  } TOKEN_TYPE;
822 typedef TOKEN_TYPE *PTOKEN_TYPE;
823 
824 
825 //
826 // Token Information Classes.
827 //
828 
829 
830 typedef enum _TOKEN_INFORMATION_CLASS {
831  TokenUser = 1,
832  TokenGroups,
833  TokenPrivileges,
834  TokenOwner,
835  TokenPrimaryGroup,
836  TokenDefaultDacl,
837  TokenSource,
838  TokenType,
839  TokenImpersonationLevel,
840  TokenStatistics,
841  TokenRestrictedSids,
842  TokenSessionId
843 } TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
844 
845 //
846 // Token information class structures
847 //
848 
849 
850 typedef struct _TOKEN_USER {
851  SID_AND_ATTRIBUTES User;
852 } TOKEN_USER, *PTOKEN_USER;
853 
854 typedef struct _TOKEN_GROUPS {
855  DWORD GroupCount;
856  SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
857 } TOKEN_GROUPS, *PTOKEN_GROUPS;
858 
859 
860 typedef struct _TOKEN_PRIVILEGES {
861  DWORD PrivilegeCount;
862  LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
863 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
864 
865 
866 typedef struct _TOKEN_OWNER {
867  PSID Owner;
868 } TOKEN_OWNER, *PTOKEN_OWNER;
869 
870 
871 typedef struct _TOKEN_PRIMARY_GROUP {
872  PSID PrimaryGroup;
873 } TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
874 
875 
876 typedef struct _TOKEN_DEFAULT_DACL {
877  PACL DefaultDacl;
878 } TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
879 
880 // 2/13/2006 qxue: added for Windows MSICOM configuration
881 typedef struct _MEMORY_BASIC_INFORMATION {
882  PVOID BaseAddress;
883  PVOID AllocationBase;
884  DWORD AllocationProtect;
885  SIZE_T RegionSize;
886  DWORD State;
887  DWORD Protect;
888  DWORD Type;
889 } MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
890 
891 #define PAGE_NOACCESS 0x01
892 #define PAGE_READONLY 0x02
893 #define PAGE_READWRITE 0x04
894 #define PAGE_WRITECOPY 0x08
895 #define PAGE_EXECUTE 0x10
896 #define PAGE_EXECUTE_READ 0x20
897 #define PAGE_EXECUTE_READWRITE 0x40
898 #define PAGE_EXECUTE_WRITECOPY 0x80
899 #define PAGE_GUARD 0x100
900 #define PAGE_NOCACHE 0x200
901 #define PAGE_WRITECOMBINE 0x400
902 #define MEM_COMMIT 0x1000
903 #define MEM_RESERVE 0x2000
904 #define MEM_DECOMMIT 0x4000
905 #define MEM_RELEASE 0x8000
906 #define MEM_FREE 0x10000
907 #define MEM_PRIVATE 0x20000
908 #define MEM_MAPPED 0x40000
909 #define MEM_RESET 0x80000
910 #define MEM_TOP_DOWN 0x100000
911 #define MEM_WRITE_WATCH 0x200000
912 #define MEM_PHYSICAL 0x400000
913 #define MEM_LARGE_PAGES 0x20000000
914 #define MEM_4MB_PAGES 0x80000000
915 #define SEC_FILE 0x800000
916 #define SEC_IMAGE 0x1000000
917 #define SEC_RESERVE 0x4000000
918 #define SEC_COMMIT 0x8000000
919 #define SEC_NOCACHE 0x10000000
920 #define SEC_LARGE_PAGES 0x80000000
921 #define MEM_IMAGE SEC_IMAGE
922 #define WRITE_WATCH_FLAG_RESET 0x01
923 
924 // begin_ntddk begin_wdm begin_nthal begin_ntifs
925 //
926 // The following are masks for the predefined standard access types
927 //
928 
929 #define DELETE (0x00010000L)
930 #define READ_CONTROL (0x00020000L)
931 #define WRITE_DAC (0x00040000L)
932 #define WRITE_OWNER (0x00080000L)
933 #define SYNCHRONIZE (0x00100000L)
934 
935 #define STANDARD_RIGHTS_REQUIRED (0x000F0000L)
936 
937 #define STANDARD_RIGHTS_READ (READ_CONTROL)
938 #define STANDARD_RIGHTS_WRITE (READ_CONTROL)
939 #define STANDARD_RIGHTS_EXECUTE (READ_CONTROL)
940 
941 #define STANDARD_RIGHTS_ALL (0x001F0000L)
942 
943 #define SPECIFIC_RIGHTS_ALL (0x0000FFFFL)
944 
945 #define SECTION_QUERY 0x0001
946 #define SECTION_MAP_WRITE 0x0002
947 #define SECTION_MAP_READ 0x0004
948 #define SECTION_MAP_EXECUTE 0x0008
949 #define SECTION_EXTEND_SIZE 0x0010
950 #define SECTION_MAP_EXECUTE_EXPLICIT 0x0020 // not included in SECTION_ALL_ACCESS
951 
952 #define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY|\
953  SECTION_MAP_WRITE | \
954  SECTION_MAP_READ | \
955  SECTION_MAP_EXECUTE | \
956  SECTION_EXTEND_SIZE)
957 
958 
959 #define SE_DEBUG_NAME L"SeDebugPrivilege"
960 // begin_wdm begin_ntddk begin_nthal
961 //
962 // Privilege attributes
963 //
964 
965 #define SE_PRIVILEGE_ENABLED_BY_DEFAULT (0x00000001L)
966 #define SE_PRIVILEGE_ENABLED (0x00000002L)
967 #define SE_PRIVILEGE_REMOVED (0X00000004L)
968 #define SE_PRIVILEGE_USED_FOR_ACCESS (0x80000000L)
969 
970 #if defined(_M_MRX000) && !(defined(MIDL_PASS) || defined(RC_INVOKED)) && defined(ENABLE_RESTRICTED)
971 #define RESTRICTED_POINTER __restrict
972 #else
973 #define RESTRICTED_POINTER
974 #endif
975 
976 typedef struct _LIST_ENTRY {
977  struct _LIST_ENTRY *Flink;
978  struct _LIST_ENTRY *Blink;
979 } LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY;
980 
981 typedef struct _RTL_CRITICAL_SECTION_DEBUG {
982  WORD Type;
983  WORD CreatorBackTraceIndex;
984  struct _RTL_CRITICAL_SECTION *CriticalSection;
985  LIST_ENTRY ProcessLocksList;
986  DWORD EntryCount;
987  DWORD ContentionCount;
988  DWORD Spare[ 2 ];
989 } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
990 
991 typedef struct _RTL_CRITICAL_SECTION {
992  PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
993 
994  //
995  // The following three fields control entering and exiting the critical
996  // section for the resource
997  //
998 
999  LONG LockCount;
1000  LONG RecursionCount;
1001  HANDLE OwningThread; // from the thread's ClientId->UniqueThread
1002  HANDLE LockSemaphore;
1003  ULONG_PTR SpinCount; // force size on 64-bit systems when packed
1004 } RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
1005 
1006 typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
1007 
1008 #endif // WIN32
1009 
1010  #endif /* __WINNT_H__ */
1011 #endif // WIN32 && !_USE_MSI_COM
1012 
1013 // this must be the *last* file included
1014 #include "ProtectedSource/Epilog.h"
1015 
1016 #endif // PDCwinnt_h
PVOID PSID
Definition: PDCwtypes.h:200
unsigned char BYTE
Definition: PDCwtypes.h:108
unsigned long SIZE_T
Definition: Msi_objidl.h:17
void * HANDLE
Definition: PDCwtypes.h:306
long LONG
Definition: PDCwtypes.h:119
void __RPC_FAR * PVOID
Definition: PDCwtypes.h:149
unsigned short WORD
Definition: PDCwtypes.h:109
unsigned long DWORD
Definition: PDCwtypes.h:121