xref: /reactos/sdk/include/psdk/winbase.h (revision 32d615fc)
1 #ifndef _WINBASE_
2 #define _WINBASE_
3 
4 #if !defined(_KERNEL32_)
5 #define WINBASEAPI DECLSPEC_IMPORT
6 #else
7 #define WINBASEAPI
8 #endif
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include <libloaderapi.h>
15 
16 #ifdef _MSC_VER
17 #pragma warning(push)
18 #pragma warning(disable:4201)
19 #pragma warning(disable:4214)
20 #pragma warning(disable:4820)
21 #endif
22 
23 #define PROCESS_NAME_NATIVE      1
24 
25 #define FILE_ENCRYPTABLE         0
26 #define FILE_IS_ENCRYPTED        1
27 #define FILE_SYSTEM_ATTR         2
28 #define FILE_ROOT_DIR            3
29 #define FILE_SYSTEM_DIR          4
30 #define FILE_UNKNOWN             5
31 #define FILE_SYSTEM_NOT_SUPPORT  6
32 #define FILE_USER_DISALLOWED     7
33 #define FILE_READ_ONLY           8
34 #define FILE_DIR_DISALLOWED      9
35 
36 #define COMMPROP_INITIALIZED 0xE73CF52E
37 #define SP_SERIALCOMM 1
38 #define PST_UNSPECIFIED	0
39 #define PST_RS232	1
40 #define PST_PARALLELPORT	2
41 #define PST_RS422	3
42 #define PST_RS423	4
43 #define PST_RS449	5
44 #define PST_MODEM	6
45 #define PST_FAX	0x21
46 #define PST_SCANNER	0x22
47 #define PST_NETWORK_BRIDGE	0x100
48 #define PST_LAT	0x101
49 #define PST_TCPIP_TELNET	0x102
50 #define PST_X25	0x103
51 #define BAUD_075	1
52 #define BAUD_110	2
53 #define BAUD_134_5	4
54 #define BAUD_150	8
55 #define BAUD_300	16
56 #define BAUD_600	32
57 #define BAUD_1200	64
58 #define BAUD_1800	128
59 #define BAUD_2400	256
60 #define BAUD_4800	512
61 #define BAUD_7200	1024
62 #define BAUD_9600	2048
63 #define BAUD_14400	4096
64 #define BAUD_19200	8192
65 #define BAUD_38400	16384
66 #define BAUD_56K	32768
67 #define BAUD_128K	65536
68 #define BAUD_115200	131072
69 #define BAUD_57600	262144
70 #define BAUD_USER	0x10000000
71 #define PCF_DTRDSR	1
72 #define PCF_RTSCTS	2
73 #define PCF_RLSD	4
74 #define PCF_PARITY_CHECK	8
75 #define PCF_XONXOFF	16
76 #define PCF_SETXCHAR	32
77 #define PCF_TOTALTIMEOUTS	64
78 #define PCF_INTTIMEOUTS	128
79 #define PCF_SPECIALCHARS	256
80 #define PCF_16BITMODE	512
81 #define SP_PARITY	1
82 #define SP_BAUD	2
83 #define SP_DATABITS	4
84 #define SP_STOPBITS	8
85 #define SP_HANDSHAKING	16
86 #define SP_PARITY_CHECK	32
87 #define SP_RLSD	64
88 #define DATABITS_5	1
89 #define DATABITS_6	2
90 #define DATABITS_7	4
91 #define DATABITS_8	8
92 #define DATABITS_16	16
93 #define DATABITS_16X	32
94 #define STOPBITS_10	1
95 #define STOPBITS_15	2
96 #define STOPBITS_20	4
97 #define PARITY_NONE	256
98 #define PARITY_ODD	512
99 #define PARITY_EVEN	1024
100 #define PARITY_MARK	2048
101 #define PARITY_SPACE	4096
102 #define EXCEPTION_DEBUG_EVENT	1
103 #define CREATE_THREAD_DEBUG_EVENT	2
104 #define CREATE_PROCESS_DEBUG_EVENT	3
105 #define EXIT_THREAD_DEBUG_EVENT	4
106 #define EXIT_PROCESS_DEBUG_EVENT	5
107 #define LOAD_DLL_DEBUG_EVENT	6
108 #define UNLOAD_DLL_DEBUG_EVENT	7
109 #define OUTPUT_DEBUG_STRING_EVENT	8
110 #define RIP_EVENT	9
111 #define HFILE_ERROR ((HFILE)-1)
112 #define FILE_BEGIN	0
113 #define FILE_CURRENT	1
114 #define FILE_END	2
115 #define INVALID_SET_FILE_POINTER	((DWORD)-1)
116 #define OF_READ 0
117 #define OF_READWRITE	2
118 #define OF_WRITE	1
119 #define OF_SHARE_COMPAT	0
120 #define OF_SHARE_DENY_NONE	64
121 #define OF_SHARE_DENY_READ	48
122 #define OF_SHARE_DENY_WRITE	32
123 #define OF_SHARE_EXCLUSIVE	16
124 #define OF_CANCEL	2048
125 #define OF_CREATE	4096
126 #define OF_DELETE	512
127 #define OF_EXIST	16384
128 #define OF_PARSE	256
129 #define OF_PROMPT	8192
130 #define OF_REOPEN	32768
131 #define OF_VERIFY	1024
132 #define NMPWAIT_NOWAIT	1
133 #define NMPWAIT_WAIT_FOREVER	((DWORD)-1)
134 #define NMPWAIT_USE_DEFAULT_WAIT	0
135 #define CE_BREAK	16
136 #define CE_DNS	2048
137 #define CE_FRAME	8
138 #define CE_IOE	1024
139 #define CE_MODE	32768
140 #define CE_OOP	4096
141 #define CE_OVERRUN	2
142 #define CE_PTO	512
143 #define CE_RXOVER	1
144 #define CE_RXPARITY	4
145 #define CE_TXFULL	256
146 #define PROGRESS_CONTINUE	0
147 #define PROGRESS_CANCEL	1
148 #define PROGRESS_STOP	2
149 #define PROGRESS_QUIET	3
150 #define CALLBACK_CHUNK_FINISHED	0
151 #define CALLBACK_STREAM_SWITCH	1
152 #define OFS_MAXPATHNAME 128
153 #define FILE_MAP_COPY SECTION_QUERY
154 #define FILE_MAP_WRITE SECTION_MAP_WRITE
155 #define FILE_MAP_READ SECTION_MAP_READ
156 #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
157 #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT
158 #define MUTEX_ALL_ACCESS	0x1f0001
159 #define MUTEX_MODIFY_STATE	1
160 #define SEMAPHORE_ALL_ACCESS	0x1f0003
161 #define SEMAPHORE_MODIFY_STATE	2
162 #define EVENT_ALL_ACCESS	0x1f0003
163 #define EVENT_MODIFY_STATE	2
164 #define PIPE_ACCESS_DUPLEX      3
165 #define PIPE_ACCESS_INBOUND     1
166 #define PIPE_ACCESS_OUTBOUND    2
167 #define PIPE_TYPE_BYTE	0
168 #define PIPE_TYPE_MESSAGE	4
169 #define PIPE_READMODE_BYTE	0
170 #define PIPE_READMODE_MESSAGE	2
171 #define PIPE_WAIT	0
172 #define PIPE_NOWAIT	1
173 #define PIPE_CLIENT_END 0
174 #define PIPE_SERVER_END 1
175 #define PIPE_UNLIMITED_INSTANCES 255
176 #define DEBUG_PROCESS			0x00000001
177 #define DEBUG_ONLY_THIS_PROCESS		0x00000002
178 #define CREATE_SUSPENDED		0x00000004
179 #define DETACHED_PROCESS		0x00000008
180 #define CREATE_NEW_CONSOLE		0x00000010
181 #define NORMAL_PRIORITY_CLASS		0x00000020
182 #define IDLE_PRIORITY_CLASS		0x00000040
183 #define HIGH_PRIORITY_CLASS		0x00000080
184 #define REALTIME_PRIORITY_CLASS		0x00000100
185 #define CREATE_NEW_PROCESS_GROUP	0x00000200
186 #define CREATE_UNICODE_ENVIRONMENT	0x00000400
187 #define CREATE_SEPARATE_WOW_VDM		0x00000800
188 #define CREATE_SHARED_WOW_VDM		0x00001000
189 #define CREATE_FORCEDOS			0x00002000
190 #define BELOW_NORMAL_PRIORITY_CLASS	0x00004000
191 #define ABOVE_NORMAL_PRIORITY_CLASS	0x00008000
192 #define CREATE_BREAKAWAY_FROM_JOB	0x01000000
193 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
194 #define CREATE_DEFAULT_ERROR_MODE	0x04000000
195 #define CREATE_NO_WINDOW		0x08000000
196 #define PROFILE_USER			0x10000000
197 #define PROFILE_KERNEL			0x20000000
198 #define PROFILE_SERVER			0x40000000
199 #define CREATE_NEW	1
200 #define CREATE_ALWAYS	2
201 #define OPEN_EXISTING	3
202 #define OPEN_ALWAYS	4
203 #define TRUNCATE_EXISTING	5
204 
205 #define COPY_FILE_FAIL_IF_EXISTS                0x00000001
206 #define COPY_FILE_RESTARTABLE                   0x00000002
207 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE         0x00000004
208 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION   0x00000008
209 
210 #define FILE_FLAG_WRITE_THROUGH                 0x80000000
211 #define FILE_FLAG_OVERLAPPED                    0x40000000
212 #define FILE_FLAG_NO_BUFFERING                  0x20000000
213 #define FILE_FLAG_RANDOM_ACCESS                 0x10000000
214 #define FILE_FLAG_SEQUENTIAL_SCAN               0x08000000
215 #define FILE_FLAG_DELETE_ON_CLOSE               0x04000000
216 #define FILE_FLAG_BACKUP_SEMANTICS              0x02000000
217 #define FILE_FLAG_POSIX_SEMANTICS               0x01000000
218 #define FILE_FLAG_OPEN_REPARSE_POINT            0x00200000
219 #define FILE_FLAG_OPEN_NO_RECALL                0x00100000
220 #if (_WIN32_WINNT >= 0x0500)
221 #define FILE_FLAG_FIRST_PIPE_INSTANCE           0x00080000
222 #endif
223 
224 #define CLRDTR 6
225 #define CLRRTS 4
226 #define SETDTR 5
227 #define SETRTS 3
228 #define SETXOFF 1
229 #define SETXON 2
230 #define RESETDEV 7
231 #define SETBREAK 8
232 #define CLRBREAK 9
233 #define STILL_ACTIVE 0x103
234 #define FIND_FIRST_EX_CASE_SENSITIVE 1
235 #define FIND_FIRST_EX_LARGE_FETCH 2
236 #define SCS_32BIT_BINARY 0
237 #define SCS_64BIT_BINARY 6
238 #define SCS_DOS_BINARY 1
239 #define SCS_OS216_BINARY 5
240 #define SCS_PIF_BINARY 3
241 #define SCS_POSIX_BINARY 4
242 #define SCS_WOW_BINARY 2
243 #define MAX_COMPUTERNAME_LENGTH 15
244 #define HW_PROFILE_GUIDLEN	39
245 #define MAX_PROFILE_LEN	80
246 #define DOCKINFO_UNDOCKED	1
247 #define DOCKINFO_DOCKED	2
248 #define DOCKINFO_USER_SUPPLIED	4
249 #define DOCKINFO_USER_UNDOCKED	(DOCKINFO_USER_SUPPLIED|DOCKINFO_UNDOCKED)
250 #define DOCKINFO_USER_DOCKED	(DOCKINFO_USER_SUPPLIED|DOCKINFO_DOCKED)
251 #define DRIVE_REMOVABLE 2
252 #define DRIVE_FIXED 3
253 #define DRIVE_REMOTE 4
254 #define DRIVE_CDROM 5
255 #define DRIVE_RAMDISK 6
256 #define DRIVE_UNKNOWN 0
257 #define DRIVE_NO_ROOT_DIR 1
258 #define FILE_TYPE_UNKNOWN 0
259 #define FILE_TYPE_DISK 1
260 #define FILE_TYPE_CHAR 2
261 #define FILE_TYPE_PIPE 3
262 #define FILE_TYPE_REMOTE 0x8000
263 /* also in ddk/ntapi.h */
264 #define HANDLE_FLAG_INHERIT		0x01
265 #define HANDLE_FLAG_PROTECT_FROM_CLOSE	0x02
266 /* end ntapi.h */
267 #define STD_INPUT_HANDLE (DWORD)(0xfffffff6)
268 #define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5)
269 #define STD_ERROR_HANDLE (DWORD)(0xfffffff4)
270 #define INVALID_HANDLE_VALUE (HANDLE)(-1)
271 #define GET_TAPE_MEDIA_INFORMATION 0
272 #define GET_TAPE_DRIVE_INFORMATION 1
273 #define SET_TAPE_MEDIA_INFORMATION 0
274 #define SET_TAPE_DRIVE_INFORMATION 1
275 #define THREAD_PRIORITY_ABOVE_NORMAL 1
276 #define THREAD_PRIORITY_BELOW_NORMAL (-1)
277 #define THREAD_PRIORITY_HIGHEST 2
278 #define THREAD_PRIORITY_IDLE (-15)
279 #define THREAD_PRIORITY_LOWEST (-2)
280 #define THREAD_PRIORITY_NORMAL 0
281 #define THREAD_PRIORITY_TIME_CRITICAL 15
282 #define THREAD_PRIORITY_ERROR_RETURN 2147483647
283 #define TIME_ZONE_ID_UNKNOWN 0
284 #define TIME_ZONE_ID_STANDARD 1
285 #define TIME_ZONE_ID_DAYLIGHT 2
286 #define TIME_ZONE_ID_INVALID 0xFFFFFFFF
287 #define FS_CASE_IS_PRESERVED 2
288 #define FS_CASE_SENSITIVE 1
289 #define FS_UNICODE_STORED_ON_DISK 4
290 #define FS_PERSISTENT_ACLS 8
291 #define FS_FILE_COMPRESSION 16
292 #define FS_VOL_IS_COMPRESSED 32768
293 #define GMEM_FIXED 0
294 #define GMEM_MOVEABLE 2
295 #define GMEM_MODIFY 128
296 #define GPTR 64
297 #define GHND 66
298 #define GMEM_DDESHARE 8192
299 #define GMEM_DISCARDABLE 256
300 #define GMEM_LOWER 4096
301 #define GMEM_NOCOMPACT 16
302 #define GMEM_NODISCARD 32
303 #define GMEM_NOT_BANKED 4096
304 #define GMEM_NOTIFY 16384
305 #define GMEM_SHARE 8192
306 #define GMEM_ZEROINIT 64
307 #define GMEM_DISCARDED 16384
308 #define GMEM_INVALID_HANDLE 32768
309 #define GMEM_LOCKCOUNT 255
310 #define GMEM_VALID_FLAGS 32626
311 #define EXCEPTION_ACCESS_VIOLATION ((DWORD)0xC0000005)
312 #define EXCEPTION_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
313 #define EXCEPTION_BREAKPOINT ((DWORD)0x80000003)
314 #define EXCEPTION_SINGLE_STEP ((DWORD)0x80000004)
315 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C)
316 #define EXCEPTION_FLT_DENORMAL_OPERAND ((DWORD)0xC000008D)
317 #define EXCEPTION_FLT_DIVIDE_BY_ZERO ((DWORD)0xC000008E)
318 #define EXCEPTION_FLT_INEXACT_RESULT ((DWORD)0xC000008F)
319 #define EXCEPTION_FLT_INVALID_OPERATION ((DWORD)0xC0000090)
320 #define EXCEPTION_FLT_OVERFLOW ((DWORD)0xC0000091)
321 #define EXCEPTION_FLT_STACK_CHECK ((DWORD)0xC0000092)
322 #define EXCEPTION_FLT_UNDERFLOW ((DWORD)0xC0000093)
323 #define EXCEPTION_INT_DIVIDE_BY_ZERO ((DWORD)0xC0000094)
324 #define EXCEPTION_INT_OVERFLOW ((DWORD)0xC0000095)
325 #define EXCEPTION_PRIV_INSTRUCTION ((DWORD)0xC0000096)
326 #define EXCEPTION_IN_PAGE_ERROR ((DWORD)0xC0000006)
327 #define EXCEPTION_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
328 #define EXCEPTION_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
329 #define EXCEPTION_STACK_OVERFLOW ((DWORD)0xC00000FD)
330 #define EXCEPTION_INVALID_DISPOSITION ((DWORD)0xC0000026)
331 #define EXCEPTION_GUARD_PAGE ((DWORD)0x80000001)
332 #define EXCEPTION_INVALID_HANDLE ((DWORD)0xC0000008L)
333 #define CONTROL_C_EXIT ((DWORD)0xC000013A)
334 #define PROCESS_HEAP_REGION 1
335 #define PROCESS_HEAP_UNCOMMITTED_RANGE 2
336 #define PROCESS_HEAP_ENTRY_BUSY 4
337 #define PROCESS_HEAP_ENTRY_MOVEABLE 16
338 #define PROCESS_HEAP_ENTRY_DDESHARE 32
339 
340 // LoadLibraryEx() dwFlags.
341 #define DONT_RESOLVE_DLL_REFERENCES                 0x00000001
342 #define LOAD_LIBRARY_AS_DATAFILE                    0x00000002
343 // #define LOAD_PACKAGED_LIBRARY                       0x00000004 // Internal use only.
344 #define LOAD_WITH_ALTERED_SEARCH_PATH               0x00000008
345 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL                0x00000010
346 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
347 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE              0x00000020
348 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE          0x00000040
349 #define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET          0x00000080
350 #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR            0x00000100
351 #define LOAD_LIBRARY_SEARCH_APPLICATION_DIR         0x00000200
352 #define LOAD_LIBRARY_SEARCH_USER_DIRS               0x00000400
353 #define LOAD_LIBRARY_SEARCH_SYSTEM32                0x00000800
354 #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS            0x00001000
355 #endif // _WIN32_WINNT_VISTA
356 #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
357 #define LOAD_LIBRARY_SAFE_CURRENT_DIRS              0x00002000
358 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER   0x00004000
359 #else // NTDDI_WIN10_RS1
360 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
361 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER   LOAD_LIBRARY_SEARCH_SYSTEM32
362 #endif // _WIN32_WINNT_VISTA
363 #endif // NTDDI_WIN10_RS1
364 #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
365 #define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY        0x00008000
366 #endif // NTDDI_WIN10_RS2
367 
368 #define LMEM_FIXED 0
369 #define LMEM_MOVEABLE 2
370 #define LMEM_NONZEROLHND 2
371 #define LMEM_NONZEROLPTR 0
372 #define LMEM_DISCARDABLE 3840
373 #define LMEM_NOCOMPACT 16
374 #define LMEM_NODISCARD 32
375 #define LMEM_ZEROINIT 64
376 #define LMEM_DISCARDED 16384
377 #define LMEM_MODIFY 128
378 #define LMEM_INVALID_HANDLE 32768
379 #define LMEM_LOCKCOUNT 255
380 #define LMEM_VALID_FLAGS 0x0F72
381 #define LPTR 64
382 #define LHND 66
383 #define NONZEROLHND 2
384 #define NONZEROLPTR 0
385 #define LOCKFILE_FAIL_IMMEDIATELY 1
386 #define LOCKFILE_EXCLUSIVE_LOCK 2
387 #define LOGON32_PROVIDER_DEFAULT	0
388 #define LOGON32_PROVIDER_WINNT35	1
389 #define LOGON32_PROVIDER_WINNT40	2
390 #define LOGON32_PROVIDER_WINNT50	3
391 #define LOGON32_LOGON_INTERACTIVE	2
392 #define LOGON32_LOGON_NETWORK	3
393 #define LOGON32_LOGON_BATCH	4
394 #define LOGON32_LOGON_SERVICE	5
395 #define LOGON32_LOGON_UNLOCK	7
396 #define LOGON32_LOGON_NETWORK_CLEARTEXT	8
397 #define LOGON32_LOGON_NEW_CREDENTIALS	9
398 #define MOVEFILE_REPLACE_EXISTING 1
399 #define MOVEFILE_COPY_ALLOWED 2
400 #define MOVEFILE_DELAY_UNTIL_REBOOT 4
401 #define MOVEFILE_WRITE_THROUGH 8
402 #define MOVEFILE_CREATE_HARDLINK 16
403 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 32
404 #define MAXIMUM_WAIT_OBJECTS 64
405 #define MAXIMUM_SUSPEND_COUNT 0x7F
406 #define WAIT_OBJECT_0 0
407 #define WAIT_ABANDONED_0 128
408 #ifndef WAIT_TIMEOUT /* also in winerror.h */
409 #define WAIT_TIMEOUT 258
410 #endif
411 #define WAIT_IO_COMPLETION 0xC0
412 #define WAIT_ABANDONED 128
413 #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
414 #define PURGE_TXABORT 1
415 #define PURGE_RXABORT 2
416 #define PURGE_TXCLEAR 4
417 #define PURGE_RXCLEAR 8
418 
419 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 256
420 #define FORMAT_MESSAGE_IGNORE_INSERTS 512
421 #define FORMAT_MESSAGE_FROM_STRING 1024
422 #define FORMAT_MESSAGE_FROM_HMODULE 2048
423 #define FORMAT_MESSAGE_FROM_SYSTEM 4096
424 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 8192
425 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 255
426 #define EV_BREAK 64
427 #define EV_CTS 8
428 #define EV_DSR 16
429 #define EV_ERR 128
430 #define EV_EVENT1 2048
431 #define EV_EVENT2 4096
432 #define EV_PERR 512
433 #define EV_RING 256
434 #define EV_RLSD 32
435 #define EV_RX80FULL 1024
436 #define EV_RXCHAR 1
437 #define EV_RXFLAG 2
438 #define EV_TXEMPTY 4
439 /* also in ddk/ntapi.h */
440 #define SEM_FAILCRITICALERRORS		0x0001
441 #define SEM_NOGPFAULTERRORBOX		0x0002
442 #define SEM_NOALIGNMENTFAULTEXCEPT	0x0004
443 #define SEM_NOOPENFILEERRORBOX		0x8000
444 /* end ntapi.h */
445 #define SLE_ERROR 1
446 #define SLE_MINORERROR 2
447 #define SLE_WARNING 3
448 #define SHUTDOWN_NORETRY 1
449 #define MAXINTATOM 0xC000
450 #define INVALID_ATOM ((ATOM)0)
451 #define IGNORE	0
452 #define INFINITE	0xFFFFFFFF
453 #define NOPARITY	0
454 #define ODDPARITY	1
455 #define EVENPARITY	2
456 #define MARKPARITY	3
457 #define SPACEPARITY	4
458 #define ONESTOPBIT	0
459 #define ONE5STOPBITS	1
460 #define TWOSTOPBITS	2
461 #define CBR_110	110
462 #define CBR_300	300
463 #define CBR_600	600
464 #define CBR_1200	1200
465 #define CBR_2400	2400
466 #define CBR_4800	4800
467 #define CBR_9600	9600
468 #define CBR_14400	14400
469 #define CBR_19200	19200
470 #define CBR_38400	38400
471 #define CBR_56000	56000
472 #define CBR_57600	57600
473 #define CBR_115200	115200
474 #define CBR_128000	128000
475 #define CBR_256000	256000
476 #define BACKUP_INVALID	0
477 #define BACKUP_DATA 1
478 #define BACKUP_EA_DATA 2
479 #define BACKUP_SECURITY_DATA 3
480 #define BACKUP_ALTERNATE_DATA 4
481 #define BACKUP_LINK 5
482 #define BACKUP_PROPERTY_DATA 6
483 #define BACKUP_OBJECT_ID 7
484 #define BACKUP_REPARSE_DATA 8
485 #define BACKUP_SPARSE_BLOCK 9
486 #define STREAM_NORMAL_ATTRIBUTE 0
487 #define STREAM_MODIFIED_WHEN_READ 1
488 #define STREAM_CONTAINS_SECURITY 2
489 #define STREAM_CONTAINS_PROPERTIES 4
490 
491 #define STARTF_USESHOWWINDOW    0x00000001
492 #define STARTF_USESIZE          0x00000002
493 #define STARTF_USEPOSITION      0x00000004
494 #define STARTF_USECOUNTCHARS    0x00000008
495 #define STARTF_USEFILLATTRIBUTE 0x00000010
496 #define STARTF_RUNFULLSCREEN    0x00000020
497 #define STARTF_FORCEONFEEDBACK  0x00000040
498 #define STARTF_FORCEOFFFEEDBACK 0x00000080
499 #define STARTF_USESTDHANDLES    0x00000100
500 #if (WINVER >= 0x400)
501 #define STARTF_USEHOTKEY        0x00000200
502 #define STARTF_TITLEISLINKNAME  0x00000800
503 #define STARTF_TITLEISAPPID     0x00001000
504 #define STARTF_PREVENTPINNING   0x00002000
505 #endif /* (WINVER >= 0x400) */
506 
507 #define TC_NORMAL 0
508 #define TC_HARDERR 1
509 #define TC_GP_TRAP 2
510 #define TC_SIGNAL 3
511 #define AC_LINE_OFFLINE 0
512 #define AC_LINE_ONLINE 1
513 #define AC_LINE_BACKUP_POWER 2
514 #define AC_LINE_UNKNOWN 255
515 #define BATTERY_FLAG_HIGH 1
516 #define BATTERY_FLAG_LOW 2
517 #define BATTERY_FLAG_CRITICAL 4
518 #define BATTERY_FLAG_CHARGING 8
519 #define BATTERY_FLAG_NO_BATTERY 128
520 #define BATTERY_FLAG_UNKNOWN 255
521 #define BATTERY_PERCENTAGE_UNKNOWN 255
522 #define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
523 #define DDD_RAW_TARGET_PATH 1
524 #define DDD_REMOVE_DEFINITION 2
525 #define DDD_EXACT_MATCH_ON_REMOVE 4
526 #define DDD_NO_BROADCAST_SYSTEM 8
527 #define DDD_LUID_BROADCAST_DRIVE 16
528 #define HINSTANCE_ERROR 32
529 #define MS_CTS_ON 16
530 #define MS_DSR_ON 32
531 #define MS_RING_ON 64
532 #define MS_RLSD_ON 128
533 #define DTR_CONTROL_DISABLE 0
534 #define DTR_CONTROL_ENABLE 1
535 #define DTR_CONTROL_HANDSHAKE 2
536 #define RTS_CONTROL_DISABLE 0
537 #define RTS_CONTROL_ENABLE 1
538 #define RTS_CONTROL_HANDSHAKE 2
539 #define RTS_CONTROL_TOGGLE 3
540 #define SECURITY_ANONYMOUS (SecurityAnonymous<<16)
541 #define SECURITY_IDENTIFICATION (SecurityIdentification<<16)
542 #define SECURITY_IMPERSONATION (SecurityImpersonation<<16)
543 #define SECURITY_DELEGATION (SecurityDelegation<<16)
544 #define SECURITY_CONTEXT_TRACKING 0x40000
545 #define SECURITY_EFFECTIVE_ONLY 0x80000
546 #define SECURITY_SQOS_PRESENT 0x100000
547 #define SECURITY_VALID_SQOS_FLAGS 0x1F0000
548 #define INVALID_FILE_SIZE 0xFFFFFFFF
549 #define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
550 #if (_WIN32_WINNT >= 0x0501)
551 #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x00000001
552 #define ACTCTX_FLAG_LANGID_VALID 0x00000002
553 #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x00000004
554 #define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
555 #define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
556 #define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
557 #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x00000040
558 #define ACTCTX_FLAG_HMODULE_VALID 0x00000080
559 #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
560 #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
561 #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x00000004
562 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x00000008
563 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x00000010
564 #define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000
565 #if (_WIN32_WINNT >= 0x0600)
566 #define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
567 #endif
568 #endif /* (_WIN32_WINNT >= 0x0501) */
569 #if (_WIN32_WINNT >= 0x0500)
570 #define REPLACEFILE_WRITE_THROUGH 0x00000001
571 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
572 #endif /* (_WIN32_WINNT >= 0x0500) */
573 #if (_WIN32_WINNT >= 0x0400)
574 #define FIBER_FLAG_FLOAT_SWITCH 0x1
575 #endif
576 #define FLS_OUT_OF_INDEXES 0xFFFFFFFF
577 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
578 #if (_WIN32_WINNT >= 0x0600)
579 #define MAX_RESTART_CMD_LINE 0x800
580 #define RESTART_CYCLICAL 0x1
581 #define RESTART_NOTIFY_SOLUTION 0x2
582 #define RESTART_NOTIFY_FAULT 0x4
583 #define VOLUME_NAME_DOS 0x0
584 #define VOLUME_NAME_GUID 0x1
585 #define VOLUME_NAME_NT 0x2
586 #define VOLUME_NAME_NONE 0x4
587 #define FILE_NAME_NORMALIZED 0x0
588 #define FILE_NAME_OPENED 0x8
589 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
590 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
591 #endif
592 #if (_WIN32_WINNT >= 0x0500)
593 #define GET_MODULE_HANDLE_EX_FLAG_PIN 0x1
594 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 0x2
595 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x4
596 #endif
597 #if (_WIN32_WINNT >= 0x0600)
598 #define CREATE_EVENT_MANUAL_RESET   0x1
599 #define CREATE_EVENT_INITIAL_SET    0x2
600 #define CREATE_MUTEX_INITIAL_OWNER  0x1
601 #define CREATE_WAITABLE_TIMER_MANUAL_RESET  0x1
602 #define SRWLOCK_INIT    RTL_SRWLOCK_INIT
603 #define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
604 #define CONDITION_VARIABLE_LOCKMODE_SHARED  RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
605 #endif
606 
607 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE  0x00001
608 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
609 #define BASE_SEARCH_PATH_PERMANENT               0x08000
610 #define BASE_SEARCH_PATH_INVALID_FLAGS           (~0x18001)
611 
612 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
613 
614 #if (_WIN32_WINNT >= 0x0600)
615 #define PROCESS_DEP_ENABLE 0x00000001
616 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
617 #endif
618 
619 #define LOGON_WITH_PROFILE        0x00000001
620 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
621 
622 #ifndef RC_INVOKED
623 
624 #ifndef _FILETIME_
625 #define _FILETIME_
626 typedef struct _FILETIME {
627 	DWORD dwLowDateTime;
628 	DWORD dwHighDateTime;
629 } FILETIME,*PFILETIME,*LPFILETIME;
630 #endif
631 
632 typedef struct _BY_HANDLE_FILE_INFORMATION {
633 	DWORD	dwFileAttributes;
634 	FILETIME	ftCreationTime;
635 	FILETIME	ftLastAccessTime;
636 	FILETIME	ftLastWriteTime;
637 	DWORD	dwVolumeSerialNumber;
638 	DWORD	nFileSizeHigh;
639 	DWORD	nFileSizeLow;
640 	DWORD	nNumberOfLinks;
641 	DWORD	nFileIndexHigh;
642 	DWORD	nFileIndexLow;
643 } BY_HANDLE_FILE_INFORMATION,*PBY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION;
644 
645 typedef struct _DCB {
646 	DWORD DCBlength;
647 	DWORD BaudRate;
648 	DWORD fBinary:1;
649 	DWORD fParity:1;
650 	DWORD fOutxCtsFlow:1;
651 	DWORD fOutxDsrFlow:1;
652 	DWORD fDtrControl:2;
653 	DWORD fDsrSensitivity:1;
654 	DWORD fTXContinueOnXoff:1;
655 	DWORD fOutX:1;
656 	DWORD fInX:1;
657 	DWORD fErrorChar:1;
658 	DWORD fNull:1;
659 	DWORD fRtsControl:2;
660 	DWORD fAbortOnError:1;
661 	DWORD fDummy2:17;
662 	WORD wReserved;
663 	WORD XonLim;
664 	WORD XoffLim;
665 	BYTE ByteSize;
666 	BYTE Parity;
667 	BYTE StopBits;
668 	char XonChar;
669 	char XoffChar;
670 	char ErrorChar;
671 	char EofChar;
672 	char EvtChar;
673 	WORD wReserved1;
674 } DCB,*LPDCB;
675 
676 typedef struct _COMM_CONFIG {
677 	DWORD dwSize;
678 	WORD  wVersion;
679 	WORD  wReserved;
680 	DCB   dcb;
681 	DWORD dwProviderSubType;
682 	DWORD dwProviderOffset;
683 	DWORD dwProviderSize;
684 	WCHAR wcProviderData[1];
685 } COMMCONFIG,*LPCOMMCONFIG;
686 
687 typedef struct _COMMPROP {
688 	WORD	wPacketLength;
689 	WORD	wPacketVersion;
690 	DWORD	dwServiceMask;
691 	DWORD	dwReserved1;
692 	DWORD	dwMaxTxQueue;
693 	DWORD	dwMaxRxQueue;
694 	DWORD	dwMaxBaud;
695 	DWORD	dwProvSubType;
696 	DWORD	dwProvCapabilities;
697 	DWORD	dwSettableParams;
698 	DWORD	dwSettableBaud;
699 	WORD	wSettableData;
700 	WORD	wSettableStopParity;
701 	DWORD	dwCurrentTxQueue;
702 	DWORD	dwCurrentRxQueue;
703 	DWORD	dwProvSpec1;
704 	DWORD	dwProvSpec2;
705 	WCHAR	wcProvChar[1];
706 } COMMPROP,*LPCOMMPROP;
707 
708 typedef struct _COMMTIMEOUTS {
709 	DWORD ReadIntervalTimeout;
710 	DWORD ReadTotalTimeoutMultiplier;
711 	DWORD ReadTotalTimeoutConstant;
712 	DWORD WriteTotalTimeoutMultiplier;
713 	DWORD WriteTotalTimeoutConstant;
714 } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
715 
716 typedef struct _COMSTAT {
717 	DWORD fCtsHold:1;
718 	DWORD fDsrHold:1;
719 	DWORD fRlsdHold:1;
720 	DWORD fXoffHold:1;
721 	DWORD fXoffSent:1;
722 	DWORD fEof:1;
723 	DWORD fTxim:1;
724 	DWORD fReserved:25;
725 	DWORD cbInQue;
726 	DWORD cbOutQue;
727 } COMSTAT,*LPCOMSTAT;
728 
729 typedef DWORD (WINAPI *LPTHREAD_START_ROUTINE)(LPVOID);
730 
731 typedef struct _CREATE_PROCESS_DEBUG_INFO {
732 	HANDLE hFile;
733 	HANDLE hProcess;
734 	HANDLE hThread;
735 	LPVOID lpBaseOfImage;
736 	DWORD dwDebugInfoFileOffset;
737 	DWORD nDebugInfoSize;
738 	LPVOID lpThreadLocalBase;
739 	LPTHREAD_START_ROUTINE lpStartAddress;
740 	LPVOID lpImageName;
741 	WORD fUnicode;
742 } CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO;
743 
744 typedef struct _CREATE_THREAD_DEBUG_INFO {
745 	HANDLE hThread;
746 	LPVOID lpThreadLocalBase;
747 	LPTHREAD_START_ROUTINE lpStartAddress;
748 } CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO;
749 
750 typedef struct _EXCEPTION_DEBUG_INFO {
751 	EXCEPTION_RECORD ExceptionRecord;
752 	DWORD dwFirstChance;
753 } EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO;
754 
755 typedef struct _EXIT_THREAD_DEBUG_INFO {
756 	DWORD dwExitCode;
757 } EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO;
758 
759 typedef struct _EXIT_PROCESS_DEBUG_INFO {
760 	DWORD dwExitCode;
761 } EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO;
762 
763 typedef struct _LOAD_DLL_DEBUG_INFO {
764 	HANDLE hFile;
765 	LPVOID lpBaseOfDll;
766 	DWORD dwDebugInfoFileOffset;
767 	DWORD nDebugInfoSize;
768 	LPVOID lpImageName;
769 	WORD fUnicode;
770 } LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO;
771 
772 typedef struct _UNLOAD_DLL_DEBUG_INFO {
773 	LPVOID lpBaseOfDll;
774 } UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO;
775 
776 typedef struct _OUTPUT_DEBUG_STRING_INFO {
777 	LPSTR lpDebugStringData;
778 	WORD fUnicode;
779 	WORD nDebugStringLength;
780 } OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO;
781 
782 typedef struct _RIP_INFO {
783 	DWORD dwError;
784 	DWORD dwType;
785 } RIP_INFO,*LPRIP_INFO;
786 
787 typedef struct _DEBUG_EVENT {
788 	DWORD dwDebugEventCode;
789 	DWORD dwProcessId;
790 	DWORD dwThreadId;
791 	union {
792 		EXCEPTION_DEBUG_INFO Exception;
793 		CREATE_THREAD_DEBUG_INFO CreateThread;
794 		CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
795 		EXIT_THREAD_DEBUG_INFO ExitThread;
796 		EXIT_PROCESS_DEBUG_INFO ExitProcess;
797 		LOAD_DLL_DEBUG_INFO LoadDll;
798 		UNLOAD_DLL_DEBUG_INFO UnloadDll;
799 		OUTPUT_DEBUG_STRING_INFO DebugString;
800 		RIP_INFO RipInfo;
801 	} u;
802 } DEBUG_EVENT,*LPDEBUG_EVENT;
803 
804 #ifndef MIDL_PASS
805 typedef PCONTEXT LPCONTEXT;
806 typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
807 typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
808 #endif
809 
810 typedef struct _OVERLAPPED {
811 	ULONG_PTR Internal;
812 	ULONG_PTR InternalHigh;
813 	union {
814 		struct {
815 			DWORD Offset;
816 			DWORD OffsetHigh;
817 		} DUMMYSTRUCTNAME;
818 		PVOID Pointer;
819 	} DUMMYUNIONNAME;
820 	HANDLE hEvent;
821 } OVERLAPPED, *POVERLAPPED, *LPOVERLAPPED;
822 
823 typedef struct _OVERLAPPED_ENTRY {
824     ULONG_PTR lpCompletionKey;
825     LPOVERLAPPED lpOverlapped;
826     ULONG_PTR Internal;
827     DWORD dwNumberOfBytesTransferred;
828 } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY;
829 
830 typedef struct _STARTUPINFOA {
831 	DWORD	cb;
832 	LPSTR	lpReserved;
833 	LPSTR	lpDesktop;
834 	LPSTR	lpTitle;
835 	DWORD	dwX;
836 	DWORD	dwY;
837 	DWORD	dwXSize;
838 	DWORD	dwYSize;
839 	DWORD	dwXCountChars;
840 	DWORD	dwYCountChars;
841 	DWORD	dwFillAttribute;
842 	DWORD	dwFlags;
843 	WORD	wShowWindow;
844 	WORD	cbReserved2;
845 	PBYTE	lpReserved2;
846 	HANDLE	hStdInput;
847 	HANDLE	hStdOutput;
848 	HANDLE	hStdError;
849 } STARTUPINFOA,*LPSTARTUPINFOA;
850 
851 typedef struct _STARTUPINFOW {
852 	DWORD	cb;
853 	LPWSTR	lpReserved;
854 	LPWSTR	lpDesktop;
855 	LPWSTR	lpTitle;
856 	DWORD	dwX;
857 	DWORD	dwY;
858 	DWORD	dwXSize;
859 	DWORD	dwYSize;
860 	DWORD	dwXCountChars;
861 	DWORD	dwYCountChars;
862 	DWORD	dwFillAttribute;
863 	DWORD	dwFlags;
864 	WORD	wShowWindow;
865 	WORD	cbReserved2;
866 	PBYTE	lpReserved2;
867 	HANDLE	hStdInput;
868 	HANDLE	hStdOutput;
869 	HANDLE	hStdError;
870 } STARTUPINFOW,*LPSTARTUPINFOW;
871 
872 typedef struct _PROCESS_INFORMATION {
873 	HANDLE hProcess;
874 	HANDLE hThread;
875 	DWORD dwProcessId;
876 	DWORD dwThreadId;
877 } PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION;
878 
879 typedef struct _CRITICAL_SECTION_DEBUG {
880 	WORD Type;
881 	WORD CreatorBackTraceIndex;
882 	struct _CRITICAL_SECTION *CriticalSection;
883 	LIST_ENTRY ProcessLocksList;
884 	DWORD EntryCount;
885 	DWORD ContentionCount;
886 //#ifdef __WINESRC__ //not all wine code is marked so
887 	DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */
888 //#else
889 	//WORD SpareWORD;
890 //#endif
891 } CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG,*LPCRITICAL_SECTION_DEBUG;
892 
893 typedef struct _CRITICAL_SECTION {
894 	PCRITICAL_SECTION_DEBUG DebugInfo;
895 	LONG LockCount;
896 	LONG RecursionCount;
897 	HANDLE OwningThread;
898 	HANDLE LockSemaphore;
899 	ULONG_PTR SpinCount;
900 } CRITICAL_SECTION,*PCRITICAL_SECTION,*LPCRITICAL_SECTION;
901 
902 #ifndef _SYSTEMTIME_
903 #define _SYSTEMTIME_
904 typedef struct _SYSTEMTIME {
905 	WORD wYear;
906 	WORD wMonth;
907 	WORD wDayOfWeek;
908 	WORD wDay;
909 	WORD wHour;
910 	WORD wMinute;
911 	WORD wSecond;
912 	WORD wMilliseconds;
913 } SYSTEMTIME,*LPSYSTEMTIME,*PSYSTEMTIME;
914 #endif /* _SYSTEMTIME_ */
915 #if (_WIN32_WINNT >= 0x0500)
916 typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK ;
917 #endif
918 typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
919 	DWORD	dwFileAttributes;
920 	FILETIME	ftCreationTime;
921 	FILETIME	ftLastAccessTime;
922 	FILETIME	ftLastWriteTime;
923 	DWORD	nFileSizeHigh;
924 	DWORD	nFileSizeLow;
925 } WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA;
926 typedef struct _WIN32_FIND_DATAA {
927 	DWORD dwFileAttributes;
928 	FILETIME ftCreationTime;
929 	FILETIME ftLastAccessTime;
930 	FILETIME ftLastWriteTime;
931 	DWORD nFileSizeHigh;
932 	DWORD nFileSizeLow;
933 	DWORD dwReserved0;
934 	DWORD dwReserved1;
935 	CHAR cFileName[MAX_PATH];
936 	CHAR cAlternateFileName[14];
937 } WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
938 typedef struct _WIN32_FIND_DATAW {
939 	DWORD dwFileAttributes;
940 	FILETIME ftCreationTime;
941 	FILETIME ftLastAccessTime;
942 	FILETIME ftLastWriteTime;
943 	DWORD nFileSizeHigh;
944 	DWORD nFileSizeLow;
945 	DWORD dwReserved0;
946 	DWORD dwReserved1;
947 	WCHAR cFileName[MAX_PATH];
948 	WCHAR cAlternateFileName[14];
949 } WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
950 
951 #if (_WIN32_WINNT >= 0x0501)
952 typedef enum _STREAM_INFO_LEVELS {
953 	FindStreamInfoStandard
954 } STREAM_INFO_LEVELS;
955 
956 typedef struct _WIN32_FIND_STREAM_DATA {
957 	LARGE_INTEGER StreamSize;
958 	WCHAR cStreamName[MAX_PATH + 36];
959 } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
960 #endif
961 
962 typedef struct _WIN32_STREAM_ID {
963 	DWORD dwStreamId;
964 	DWORD dwStreamAttributes;
965 	LARGE_INTEGER Size;
966 	DWORD dwStreamNameSize;
967 	WCHAR cStreamName[ANYSIZE_ARRAY];
968 } WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
969 
970 #if (_WIN32_WINNT >= 0x0600)
971 
972 typedef enum _FILE_ID_TYPE {
973     FileIdType,
974     ObjectIdType,
975     ExtendedFileIdType,
976     MaximumFileIdType
977 } FILE_ID_TYPE, *PFILE_ID_TYPE;
978 
979 typedef struct _FILE_ID_DESCRIPTOR {
980     DWORD        dwSize;
981     FILE_ID_TYPE Type;
982     union {
983         LARGE_INTEGER FileId;
984         GUID          ObjectId;
985     } DUMMYUNIONNAME;
986 } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
987 
988 #if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(__REACTOS__)
989 typedef enum _FILE_INFO_BY_HANDLE_CLASS {
990     FileBasicInfo,
991     FileStandardInfo,
992     FileNameInfo,
993     FileRenameInfo,
994     FileDispositionInfo,
995     FileAllocationInfo,
996     FileEndOfFileInfo,
997     FileStreamInfo,
998     FileCompressionInfo,
999     FileAttributeTagInfo,
1000     FileIdBothDirectoryInfo,
1001     FileIdBothDirectoryRestartInfo,
1002     FileIoPriorityHintInfo,
1003     FileRemoteProtocolInfo,
1004     FileFullDirectoryInfo,
1005     FileFullDirectoryRestartInfo,
1006 #if (NTDDI_VERSION >= NTDDI_WIN8) || defined(__REACTOS__)
1007     FileStorageInfo,
1008     FileAlignmentInfo,
1009     FileIdInfo,
1010     FileIdExtdDirectoryInfo,
1011     FileIdExtdDirectoryRestartInfo,
1012 #endif
1013 #if (NTDDI_VERSION >= NTDDI_WIN10_RS1) || defined(__REACTOS__)
1014     FileDispositionInfoEx,
1015     FileRenameInfoEx,
1016 #endif
1017 #if (NTDDI_VERSION >= NTDDI_WIN10_19H1) || defined(__REACTOS__)
1018     FileCaseSensitiveInfo,
1019     FileNormalizedNameInfo,
1020 #endif
1021     MaximumFileInfoByHandleClass
1022 } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
1023 #endif
1024 
1025 typedef struct _FILE_ID_BOTH_DIR_INFO {
1026     DWORD         NextEntryOffset;
1027     DWORD         FileIndex;
1028     LARGE_INTEGER CreationTime;
1029     LARGE_INTEGER LastAccessTime;
1030     LARGE_INTEGER LastWriteTime;
1031     LARGE_INTEGER ChangeTime;
1032     LARGE_INTEGER EndOfFile;
1033     LARGE_INTEGER AllocationSize;
1034     DWORD         FileAttributes;
1035     DWORD         FileNameLength;
1036     DWORD         EaSize;
1037     CCHAR         ShortNameLength;
1038     WCHAR         ShortName[12];
1039     LARGE_INTEGER FileId;
1040     WCHAR         FileName[1];
1041 } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
1042 
1043 typedef struct _FILE_BASIC_INFO {
1044     LARGE_INTEGER CreationTime;
1045     LARGE_INTEGER LastAccessTime;
1046     LARGE_INTEGER LastWriteTime;
1047     LARGE_INTEGER ChangeTime;
1048     DWORD FileAttributes;
1049 } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
1050 
1051 typedef struct _FILE_STANDARD_INFO {
1052     LARGE_INTEGER AllocationSize;
1053     LARGE_INTEGER EndOfFile;
1054     DWORD NumberOfLinks;
1055     BOOLEAN DeletePending;
1056     BOOLEAN Directory;
1057 } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
1058 
1059 typedef struct _FILE_NAME_INFO {
1060     DWORD FileNameLength;
1061     WCHAR FileName[1];
1062 } FILE_NAME_INFO, *PFILE_NAME_INFO;
1063 
1064 typedef enum _PRIORITY_HINT {
1065     IoPriorityHintVeryLow,
1066     IoPriorityHintLow,
1067     IoPriorityHintNormal,
1068     MaximumIoPriorityHintType
1069 } PRIORITY_HINT;
1070 
1071 typedef struct _FILE_IO_PRIORITY_HINT_INFO {
1072     PRIORITY_HINT PriorityHint;
1073 } FILE_IO_PRIORITY_HINT_INFO;
1074 
1075 typedef struct _FILE_ALLOCATION_INFO {
1076     LARGE_INTEGER AllocationSize;
1077 } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
1078 
1079 typedef struct _FILE_DISPOSITION_INFO {
1080     BOOLEAN DeleteFile;
1081 } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
1082 
1083 typedef struct _FILE_END_OF_FILE_INFO {
1084     LARGE_INTEGER EndOfFile;
1085 } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
1086 
1087 typedef struct _FILE_RENAME_INFO {
1088     BOOLEAN ReplaceIfExists;
1089     HANDLE RootDirectory;
1090     DWORD FileNameLength;
1091     WCHAR FileName[1];
1092 } FILE_RENAME_INFO, *PFILE_RENAME_INFO;
1093 
1094 typedef struct _FILE_ATTRIBUTE_TAG_INFO {
1095     DWORD FileAttributes;
1096     DWORD ReparseTag;
1097 } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
1098 
1099 typedef struct _FILE_COMPRESSION_INFO {
1100     LARGE_INTEGER CompressedFileSize;
1101     WORD CompressionFormat;
1102     UCHAR CompressionUnitShift;
1103     UCHAR ChunkShift;
1104     UCHAR ClusterShift;
1105     UCHAR Reserved[3];
1106 } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
1107 
1108 typedef struct _FILE_REMOTE_PROTOCOL_INFO {
1109     USHORT StructureVersion;
1110     USHORT StructureSize;
1111     ULONG Protocol;
1112     USHORT ProtocolMajorVersion;
1113     USHORT ProtocolMinorVersion;
1114     USHORT ProtocolRevision;
1115     USHORT Reserved;
1116     ULONG Flags;
1117     struct {
1118         ULONG Reserved[8];
1119     } GenericReserved;
1120     struct {
1121         ULONG Reserved[16];
1122     } ProtocolSpecificReserved;
1123 } FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
1124 
1125 #endif
1126 
1127 typedef enum _FINDEX_INFO_LEVELS {
1128 	FindExInfoStandard,
1129 	FindExInfoBasic,
1130 	FindExInfoMaxInfoLevel
1131 } FINDEX_INFO_LEVELS;
1132 
1133 typedef enum _FINDEX_SEARCH_OPS {
1134 	FindExSearchNameMatch,
1135 	FindExSearchLimitToDirectories,
1136 	FindExSearchLimitToDevices,
1137 	FindExSearchMaxSearchOp
1138 } FINDEX_SEARCH_OPS;
1139 
1140 typedef struct tagHW_PROFILE_INFOA {
1141 	DWORD dwDockInfo;
1142 	CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1143 	CHAR szHwProfileName[MAX_PROFILE_LEN];
1144 } HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA;
1145 
1146 typedef struct tagHW_PROFILE_INFOW {
1147 	DWORD dwDockInfo;
1148 	WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1149 	WCHAR szHwProfileName[MAX_PROFILE_LEN];
1150 } HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW;
1151 
1152 /* Event Logging */
1153 
1154 #define EVENTLOG_FULL_INFO          0
1155 
1156 typedef struct _EVENTLOG_FULL_INFORMATION {
1157     DWORD dwFull;
1158 } EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION;
1159 
1160 typedef enum _GET_FILEEX_INFO_LEVELS {
1161 	GetFileExInfoStandard,
1162 	GetFileExMaxInfoLevel
1163 } GET_FILEEX_INFO_LEVELS;
1164 
1165 typedef struct _SYSTEM_INFO {
1166 	_ANONYMOUS_UNION union {
1167 		DWORD dwOemId;
1168 		_ANONYMOUS_STRUCT struct {
1169 			WORD wProcessorArchitecture;
1170 			WORD wReserved;
1171 		} DUMMYSTRUCTNAME;
1172 	} DUMMYUNIONNAME;
1173 	DWORD dwPageSize;
1174 	PVOID lpMinimumApplicationAddress;
1175 	PVOID lpMaximumApplicationAddress;
1176 	DWORD_PTR dwActiveProcessorMask;
1177 	DWORD dwNumberOfProcessors;
1178 	DWORD dwProcessorType;
1179 	DWORD dwAllocationGranularity;
1180 	WORD wProcessorLevel;
1181 	WORD wProcessorRevision;
1182 } SYSTEM_INFO,*LPSYSTEM_INFO;
1183 
1184 typedef struct _SYSTEM_POWER_STATUS {
1185 	BYTE ACLineStatus;
1186 	BYTE BatteryFlag;
1187 	BYTE BatteryLifePercent;
1188 	BYTE SystemStatusFlag;
1189 	DWORD BatteryLifeTime;
1190 	DWORD BatteryFullLifeTime;
1191 } SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS;
1192 
1193 typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
1194   LONG Bias;
1195   WCHAR StandardName[32];
1196   SYSTEMTIME StandardDate;
1197   LONG StandardBias;
1198   WCHAR DaylightName[32];
1199   SYSTEMTIME DaylightDate;
1200   LONG DaylightBias;
1201   WCHAR TimeZoneKeyName[128];
1202   BOOLEAN DynamicDaylightTimeDisabled;
1203 } DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION;
1204 
1205 typedef struct _TIME_ZONE_INFORMATION {
1206 	LONG Bias;
1207 	WCHAR StandardName[32];
1208 	SYSTEMTIME StandardDate;
1209 	LONG StandardBias;
1210 	WCHAR DaylightName[32];
1211 	SYSTEMTIME DaylightDate;
1212 	LONG DaylightBias;
1213 } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION;
1214 
1215 typedef struct _MEMORYSTATUS {
1216 	DWORD dwLength;
1217 	DWORD dwMemoryLoad;
1218 	SIZE_T dwTotalPhys;
1219 	SIZE_T dwAvailPhys;
1220 	SIZE_T dwTotalPageFile;
1221 	SIZE_T dwAvailPageFile;
1222 	SIZE_T dwTotalVirtual;
1223 	SIZE_T dwAvailVirtual;
1224 } MEMORYSTATUS,*LPMEMORYSTATUS;
1225 
1226 #if (_WIN32_WINNT >= 0x0500)
1227 typedef struct _MEMORYSTATUSEX {
1228 	DWORD dwLength;
1229 	DWORD dwMemoryLoad;
1230 	DWORDLONG ullTotalPhys;
1231 	DWORDLONG ullAvailPhys;
1232 	DWORDLONG ullTotalPageFile;
1233 	DWORDLONG ullAvailPageFile;
1234 	DWORDLONG ullTotalVirtual;
1235 	DWORDLONG ullAvailVirtual;
1236 	DWORDLONG ullAvailExtendedVirtual;
1237 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
1238 #endif
1239 
1240 #ifndef _LDT_ENTRY_DEFINED
1241 #define _LDT_ENTRY_DEFINED
1242 typedef struct _LDT_ENTRY {
1243 	WORD LimitLow;
1244 	WORD BaseLow;
1245 	union {
1246 		struct {
1247 			BYTE BaseMid;
1248 			BYTE Flags1;
1249 			BYTE Flags2;
1250 			BYTE BaseHi;
1251 		} Bytes;
1252 		struct {
1253 			DWORD BaseMid:8;
1254 			DWORD Type:5;
1255 			DWORD Dpl:2;
1256 			DWORD Pres:1;
1257 			DWORD LimitHi:4;
1258 			DWORD Sys:1;
1259 			DWORD Reserved_0:1;
1260 			DWORD Default_Big:1;
1261 			DWORD Granularity:1;
1262 			DWORD BaseHi:8;
1263 		} Bits;
1264 	} HighWord;
1265 } LDT_ENTRY,*PLDT_ENTRY,*LPLDT_ENTRY;
1266 #endif
1267 
1268 typedef struct _PROCESS_HEAP_ENTRY {
1269 	PVOID lpData;
1270 	DWORD cbData;
1271 	BYTE cbOverhead;
1272 	BYTE iRegionIndex;
1273 	WORD wFlags;
1274 	_ANONYMOUS_UNION union {
1275 		struct {
1276 			HANDLE hMem;
1277 			DWORD dwReserved[3];
1278 		} Block;
1279 		struct {
1280 			DWORD dwCommittedSize;
1281 			DWORD dwUnCommittedSize;
1282 			LPVOID lpFirstBlock;
1283 			LPVOID lpLastBlock;
1284 		} Region;
1285 	} DUMMYUNIONNAME;
1286 } PROCESS_HEAP_ENTRY,*PPROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY;
1287 
1288 typedef struct _OFSTRUCT {
1289 	BYTE cBytes;
1290 	BYTE fFixedDisk;
1291 	WORD nErrCode;
1292 	WORD Reserved1;
1293 	WORD Reserved2;
1294 	CHAR szPathName[OFS_MAXPATHNAME];
1295 } OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT;
1296 
1297 #if (_WIN32_WINNT >= 0x0501)
1298 typedef struct tagACTCTXA {
1299 	ULONG cbSize;
1300 	DWORD dwFlags;
1301 	LPCSTR lpSource;
1302 	USHORT wProcessorArchitecture;
1303 	LANGID wLangId;
1304 	LPCSTR lpAssemblyDirectory;
1305 	LPCSTR lpResourceName;
1306 	LPCSTR lpApplicationName;
1307 	HMODULE hModule;
1308 } ACTCTXA,*PACTCTXA;
1309 typedef const ACTCTXA *PCACTCTXA;
1310 
1311 typedef struct tagACTCTXW {
1312 	ULONG cbSize;
1313 	DWORD dwFlags;
1314 	LPCWSTR lpSource;
1315 	USHORT wProcessorArchitecture;
1316 	LANGID wLangId;
1317 	LPCWSTR lpAssemblyDirectory;
1318 	LPCWSTR lpResourceName;
1319 	LPCWSTR lpApplicationName;
1320 	HMODULE hModule;
1321 } ACTCTXW,*PACTCTXW;
1322 typedef const ACTCTXW *PCACTCTXW;
1323 
1324 typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
1325 	ULONG  cbSize;
1326 	ULONG  ulDataFormatVersion;
1327 	PVOID  lpData;
1328 	ULONG  ulLength;
1329 	PVOID  lpSectionGlobalData;
1330 	ULONG  ulSectionGlobalDataLength;
1331 	PVOID  lpSectionBase;
1332 	ULONG  ulSectionTotalLength;
1333 	HANDLE hActCtx;
1334 	ULONG  ulAssemblyRosterIndex;
1335 } ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
1336 typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
1337 
1338 typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
1339 	PVOID lpInformation;
1340 	PVOID lpSectionBase;
1341 	ULONG ulSectionLength;
1342 	PVOID lpSectionGlobalDataBase;
1343 	ULONG ulSectionGlobalDataLength;
1344 } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1345 typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1346 
1347 typedef struct tagACTCTX_SECTION_KEYED_DATA {
1348 	ULONG cbSize;
1349 	ULONG ulDataFormatVersion;
1350 	PVOID lpData;
1351 	ULONG ulLength;
1352 	PVOID lpSectionGlobalData;
1353 	ULONG ulSectionGlobalDataLength;
1354 	PVOID lpSectionBase;
1355 	ULONG ulSectionTotalLength;
1356 	HANDLE hActCtx;
1357 	ULONG ulAssemblyRosterIndex;
1358 	/* Non 2600 extra fields */
1359 	ULONG ulFlags;
1360 	ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
1361 } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
1362 
1363 typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
1364 
1365 typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
1366 	HANDLE hActCtx;
1367 	DWORD  dwFlags;
1368 } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
1369 typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
1370 
1371 typedef BOOL
1372 (WINAPI *PQUERYACTCTXW_FUNC)(
1373   _In_ DWORD dwFlags,
1374   _In_ HANDLE hActCtx,
1375   _In_opt_ PVOID pvSubInstance,
1376   _In_ ULONG ulInfoClass,
1377   _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
1378   _In_ SIZE_T cbBuffer,
1379   _Out_opt_ SIZE_T *pcbWrittenOrRequired);
1380 
1381 typedef enum {
1382 	LowMemoryResourceNotification ,
1383 	HighMemoryResourceNotification
1384 } MEMORY_RESOURCE_NOTIFICATION_TYPE;
1385 #endif /* (_WIN32_WINNT >= 0x0501) */
1386 
1387 #if (_WIN32_WINNT >= 0x0500)
1388 typedef enum _COMPUTER_NAME_FORMAT {
1389 	ComputerNameNetBIOS,
1390 	ComputerNameDnsHostname,
1391 	ComputerNameDnsDomain,
1392 	ComputerNameDnsFullyQualified,
1393 	ComputerNamePhysicalNetBIOS,
1394 	ComputerNamePhysicalDnsHostname,
1395 	ComputerNamePhysicalDnsDomain,
1396 	ComputerNamePhysicalDnsFullyQualified,
1397 	ComputerNameMax
1398 } COMPUTER_NAME_FORMAT;
1399 #endif /* (_WIN32_WINNT >= 0x0500) */
1400 
1401 #if (_WIN32_WINNT >= 0x0600)
1402 typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
1403 typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
1404 #endif
1405 
1406 typedef struct _PROC_THREAD_ATTRIBUTE_LIST *PPROC_THREAD_ATTRIBUTE_LIST, *LPPROC_THREAD_ATTRIBUTE_LIST;
1407 
1408 #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1409 #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1410 #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1411 #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1412 
1413 typedef enum _PROC_THREAD_ATTRIBUTE_NUM {
1414   ProcThreadAttributeParentProcess = 0,
1415   ProcThreadAttributeHandleList = 2,
1416   ProcThreadAttributeGroupAffinity = 3,
1417   ProcThreadAttributeIdealProcessor = 5,
1418   ProcThreadAttributeUmsThread = 6,
1419   ProcThreadAttributeMitigationPolicy = 7,
1420   ProcThreadAttributeSecurityCapabilities = 9,
1421   ProcThreadAttributeProtectionLevel = 11,
1422   ProcThreadAttributeJobList = 13,
1423   ProcThreadAttributeChildProcessPolicy = 14,
1424   ProcThreadAttributeAllApplicationPackagesPolicy = 15,
1425   ProcThreadAttributeWin32kFilter = 16,
1426   ProcThreadAttributeSafeOpenPromptOriginClaim = 17,
1427 } PROC_THREAD_ATTRIBUTE_NUM;
1428 
1429 #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1430 #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1431 #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1432 
1433 typedef DWORD
1434 (WINAPI *PFE_EXPORT_FUNC)(
1435   _In_reads_bytes_(ulLength) PBYTE pbData,
1436   _In_opt_ PVOID pvCallbackContext,
1437   _In_ ULONG ulLength);
1438 
1439 typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(_In_ LARGE_INTEGER, _In_ LARGE_INTEGER, _In_ LARGE_INTEGER, _In_ LARGE_INTEGER, _In_ DWORD, _In_ DWORD, _In_ HANDLE, _In_ HANDLE, _In_opt_ LPVOID);
1440 
1441 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
1442 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
1443 
1444 typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID);
1445 typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR);
1446 typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR);
1447 typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR);
1448 typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR);
1449 typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR);
1450 typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR);
1451 typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
1452 typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS);
1453 typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
1454 typedef void(APIENTRY *PAPCFUNC)(ULONG_PTR);
1455 typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD);
1456 #if (_WIN32_WINNT >= 0x0600)
1457 typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);
1458 #endif
1459 
1460 #ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
1461 #define MAKEINTATOM(atom)   ((ULONG_PTR)((WORD)(atom)))
1462 #else
1463 #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
1464 #endif
1465 
1466 typedef DWORD
1467 (WINAPI *PFE_IMPORT_FUNC)(
1468   _Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
1469   _In_opt_ PVOID pvCallbackContext,
1470   _Inout_ PULONG ulLength);
1471 
1472 /* Functions */
1473 #ifndef UNDER_CE
1474 int APIENTRY WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int);
1475 #else
1476 int APIENTRY WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int);
1477 #endif
1478 int APIENTRY wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int);
1479 
1480 long
1481 WINAPI
1482 _hread(
1483   _In_ HFILE hFile,
1484   _Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
1485   _In_ long lBytes);
1486 
1487 long
1488 WINAPI
1489 _hwrite(
1490   _In_ HFILE hFile,
1491   _In_reads_bytes_(lBytes) LPCCH lpBuffer,
1492   _In_ long lBytes);
1493 
1494 HFILE WINAPI _lclose(_In_ HFILE);
1495 HFILE WINAPI _lcreat(_In_ LPCSTR, _In_ int);
1496 LONG WINAPI _llseek(_In_ HFILE, _In_ LONG, _In_ int);
1497 HFILE WINAPI _lopen(_In_ LPCSTR, _In_ int);
1498 
1499 UINT
1500 WINAPI
1501 _lread(
1502   _In_ HFILE hFile,
1503   _Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
1504   _In_ UINT uBytes);
1505 
1506 UINT
1507 WINAPI
1508 _lwrite(
1509   _In_ HFILE hFile,
1510   _In_reads_bytes_(uBytes) LPCCH lpBuffer,
1511   _In_ UINT uBytes);
1512 
1513 BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,PDWORD,PDWORD,PBOOL);
1514 
1515 BOOL
1516 WINAPI
1517 AccessCheckAndAuditAlarmA(
1518   _In_ LPCSTR SubsystemName,
1519   _In_opt_ LPVOID HandleId,
1520   _In_ LPSTR ObjectTypeName,
1521   _In_opt_ LPSTR ObjectName,
1522   _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1523   _In_ DWORD DesiredAccess,
1524   _In_ PGENERIC_MAPPING GenericMapping,
1525   _In_ BOOL ObjectCreation,
1526   _Out_ LPDWORD GrantedAccess,
1527   _Out_ LPBOOL AccessStatus,
1528   _Out_ LPBOOL pfGenerateOnClose);
1529 
1530 BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
1531 #if (_WIN32_WINNT >= 0x0600)
1532 VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK);
1533 VOID WINAPI AcquireSRWLockShared(PSRWLOCK);
1534 #endif
1535 #if (_WIN32_WINNT >= 0x0501)
1536 BOOL WINAPI ActivateActCtx(_Inout_opt_ HANDLE, _Out_ ULONG_PTR*);
1537 #endif
1538 BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
1539 BOOL WINAPI AddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
1540 #if (_WIN32_WINNT >= 0x0500)
1541 BOOL WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1542 BOOL WINAPI AddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
1543 BOOL WINAPI AddAccessAllowedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
1544 BOOL WINAPI AddAccessDeniedObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID);
1545 #endif
1546 BOOL WINAPI AddAce(PACL,DWORD,DWORD,PVOID,DWORD);
1547 ATOM WINAPI AddAtomA(_In_opt_ LPCSTR);
1548 ATOM WINAPI AddAtomW(_In_opt_ LPCWSTR);
1549 BOOL WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
1550 #if (_WIN32_WINNT >= 0x0500)
1551 BOOL WINAPI AddAuditAccessObjectAce(PACL,DWORD,DWORD,DWORD,GUID*,GUID*,PSID,BOOL,BOOL);
1552 #endif
1553 #if (_WIN32_WINNT >= 0x0501)
1554 void WINAPI AddRefActCtx(_Inout_ HANDLE);
1555 #endif
1556 #if (_WIN32_WINNT >= 0x0500)
1557 _Ret_maybenull_ PVOID WINAPI AddVectoredExceptionHandler(_In_ ULONG, _In_ PVECTORED_EXCEPTION_HANDLER);
1558 _Ret_maybenull_ PVOID WINAPI AddVectoredContinueHandler(_In_ ULONG, _In_ PVECTORED_EXCEPTION_HANDLER);
1559 #endif
1560 
1561 BOOL
1562 WINAPI
1563 AccessCheckByType(
1564   _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
1565   _In_opt_ PSID PrincipalSelfSid,
1566   _In_ HANDLE ClientToken,
1567   _In_ DWORD DesiredAccess,
1568   _In_reads_opt_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
1569   _In_ DWORD ObjectTypeListLength,
1570   _In_ PGENERIC_MAPPING GenericMapping,
1571   _Out_writes_bytes_(*PrivilegeSetLength)PPRIVILEGE_SET PrivilegeSet,
1572   _Inout_ LPDWORD PrivilegeSetLength,
1573   _Out_ LPDWORD GrantedAccess,
1574   _Out_ LPBOOL AccessStatus);
1575 
1576 BOOL
1577 WINAPI
1578 AccessCheckByTypeResultList(
1579   _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor,
1580   _In_opt_ PSID PrincipalSelfSid,
1581   _In_ HANDLE ClientToken,
1582   _In_ DWORD DesiredAccess,
1583   _In_reads_(ObjectTypeListLength) POBJECT_TYPE_LIST ObjectTypeList,
1584   _In_ DWORD ObjectTypeListLength,
1585   _In_ PGENERIC_MAPPING GenericMapping,
1586   _Out_writes_bytes_(*PrivilegeSetLength) PPRIVILEGE_SET PrivilegeSet,
1587   _Inout_ LPDWORD PrivilegeSetLength,
1588   _Out_writes_(ObjectTypeListLength) LPDWORD GrantedAccess,
1589   _Out_writes_(ObjectTypeListLength) LPBOOL AccessStatus);
1590 
1591 BOOL WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD);
1592 BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
1593 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID*);
1594 BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
1595 BOOL WINAPI AllocateLocallyUniqueId(PLUID);
1596 BOOL WINAPI AreAllAccessesGranted(DWORD,DWORD);
1597 BOOL WINAPI AreAnyAccessesGranted(DWORD,DWORD);
1598 BOOL WINAPI AreFileApisANSI(void);
1599 BOOL WINAPI BackupEventLogA(_In_ HANDLE, _In_ LPCSTR);
1600 BOOL WINAPI BackupEventLogW(_In_ HANDLE, _In_ LPCWSTR);
1601 
1602 BOOL
1603 WINAPI
1604 BackupRead(
1605   _In_ HANDLE hFile,
1606   _Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
1607   _In_ DWORD nNumberOfBytesToRead,
1608   _Out_ LPDWORD lpNumberOfBytesRead,
1609   _In_ BOOL bAbort,
1610   _In_ BOOL bProcessSecurity,
1611   _Inout_ LPVOID *lpContext);
1612 
1613 BOOL WINAPI BackupSeek(_In_ HANDLE, _In_ DWORD, _In_ DWORD, _Out_ LPDWORD, _Out_ LPDWORD, _Inout_ LPVOID*);
1614 
1615 BOOL
1616 WINAPI
1617 BackupWrite(
1618   _In_ HANDLE hFile,
1619   _In_reads_bytes_(nNumberOfBytesToWrite) LPBYTE lpBuffer,
1620   _In_ DWORD nNumberOfBytesToWrite,
1621   _Out_ LPDWORD lpNumberOfBytesWritten,
1622   _In_ BOOL bAbort,
1623   _In_ BOOL bProcessSecurity,
1624   _Inout_ LPVOID *lpContext);
1625 
1626 BOOL WINAPI Beep(DWORD,DWORD);
1627 HANDLE WINAPI BeginUpdateResourceA(_In_ LPCSTR, _In_ BOOL);
1628 HANDLE WINAPI BeginUpdateResourceW(_In_ LPCWSTR, _In_ BOOL);
1629 #if (_WIN32_WINNT >= 0x0500)
1630 BOOL WINAPI BindIoCompletionCallback(_In_ HANDLE, _In_ LPOVERLAPPED_COMPLETION_ROUTINE, _In_ ULONG);
1631 #endif
1632 BOOL WINAPI BuildCommDCBA(_In_ LPCSTR, _Out_ LPDCB);
1633 BOOL WINAPI BuildCommDCBW(_In_ LPCWSTR, _Out_ LPDCB);
1634 BOOL WINAPI BuildCommDCBAndTimeoutsA(_In_ LPCSTR, _Out_ LPDCB, _Out_ LPCOMMTIMEOUTS);
1635 BOOL WINAPI BuildCommDCBAndTimeoutsW(_In_ LPCWSTR, _Out_ LPDCB, _Out_ LPCOMMTIMEOUTS);
1636 
1637 BOOL
1638 WINAPI
1639 CallNamedPipeA(
1640   _In_ LPCSTR lpNamedPipeName,
1641   _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1642   _In_ DWORD nInBufferSize,
1643   _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1644   _In_ DWORD nOutBufferSize,
1645   _Out_ LPDWORD lpBytesRead,
1646   _In_ DWORD nTimeOut);
1647 
1648 BOOL
1649 WINAPI
1650 CallNamedPipeW(
1651   _In_ LPCWSTR lpNamedPipeName,
1652   _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1653   _In_ DWORD nInBufferSize,
1654   _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1655   _In_ DWORD nOutBufferSize,
1656   _Out_ LPDWORD lpBytesRead,
1657   _In_ DWORD nTimeOut);
1658 
1659 BOOL WINAPI CancelDeviceWakeupRequest(_In_ HANDLE);
1660 BOOL WINAPI CancelIo(HANDLE);
1661 #if (_WIN32_WINNT >= 0x0600)
1662 BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED);
1663 BOOL WINAPI CancelSynchronousIo(HANDLE);
1664 #endif
1665 BOOL WINAPI CancelWaitableTimer(HANDLE);
1666 
1667 #if (_WIN32_WINNT >= 0x0501)
1668 
1669 BOOL
1670 WINAPI
1671 CheckNameLegalDOS8Dot3A(
1672   _In_ LPCSTR lpName,
1673   _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1674   _In_ DWORD OemNameSize,
1675   _Out_opt_ PBOOL pbNameContainsSpaces,
1676   _Out_ PBOOL pbNameLegal);
1677 
1678 BOOL
1679 WINAPI
1680 CheckNameLegalDOS8Dot3W(
1681   _In_ LPCWSTR lpName,
1682   _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1683   _In_ DWORD OemNameSize,
1684   _Out_opt_ PBOOL pbNameContainsSpaces,
1685   _Out_ PBOOL pbNameLegal);
1686 
1687 BOOL WINAPI CheckRemoteDebuggerPresent(_In_ HANDLE, _Out_ PBOOL);
1688 #endif
1689 
1690 BOOL WINAPI ClearCommBreak(_In_ HANDLE);
1691 BOOL WINAPI ClearCommError(_In_ HANDLE, _Out_opt_ PDWORD, _Out_opt_ LPCOMSTAT);
1692 BOOL WINAPI ClearEventLogA(_In_ HANDLE, _In_opt_ LPCSTR);
1693 BOOL WINAPI ClearEventLogW(_In_ HANDLE, _In_opt_ LPCWSTR);
1694 BOOL WINAPI CloseEventLog(_In_ HANDLE);
1695 BOOL WINAPI CloseHandle(HANDLE);
1696 BOOL WINAPI CommConfigDialogA(_In_ LPCSTR, _In_opt_ HWND, _Inout_ LPCOMMCONFIG);
1697 BOOL WINAPI CommConfigDialogW(_In_ LPCWSTR, _In_opt_ HWND, _Inout_ LPCOMMCONFIG);
1698 LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*);
1699 BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
1700 BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
1701 #if (_WIN32_WINNT >= 0x0400)
1702 BOOL WINAPI ConvertFiberToThread(void);
1703 #endif
1704 _Ret_maybenull_ PVOID WINAPI ConvertThreadToFiber(_In_opt_ PVOID);
1705 BOOL WINAPI CopyFileA(_In_ LPCSTR, _In_ LPCSTR, _In_ BOOL);
1706 BOOL WINAPI CopyFileW(_In_ LPCWSTR lpExistingFileName, _In_ LPCWSTR lpNewFileName, _In_ BOOL bFailIfExists);
1707 BOOL WINAPI CopyFileExA(_In_ LPCSTR, _In_ LPCSTR, _In_opt_ LPPROGRESS_ROUTINE, _In_opt_ LPVOID, _In_opt_ LPBOOL, _In_ DWORD);
1708 BOOL WINAPI CopyFileExW(_In_ LPCWSTR, _In_ LPCWSTR, _In_opt_ LPPROGRESS_ROUTINE, _In_opt_ LPVOID, _In_opt_ LPBOOL, _In_ DWORD);
1709 #define MoveMemory RtlMoveMemory
1710 #define CopyMemory RtlCopyMemory
1711 #define FillMemory RtlFillMemory
1712 #define ZeroMemory RtlZeroMemory
1713 #define SecureZeroMemory RtlSecureZeroMemory
1714 BOOL WINAPI CopySid(DWORD,PSID,PSID);
1715 #if (_WIN32_WINNT >= 0x0501)
1716 HANDLE WINAPI CreateActCtxA(_In_ PCACTCTXA);
1717 HANDLE WINAPI CreateActCtxW(_In_ PCACTCTXW);
1718 #endif
1719 BOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1720 BOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1721 BOOL WINAPI CreateDirectoryExA(_In_ LPCSTR, _In_ LPCSTR, _In_opt_ LPSECURITY_ATTRIBUTES);
1722 BOOL WINAPI CreateDirectoryExW(_In_ LPCWSTR, _In_ LPCWSTR, _In_opt_ LPSECURITY_ATTRIBUTES);
1723 HANDLE WINAPI CreateEventA(_In_opt_ LPSECURITY_ATTRIBUTES lpEventAttributes, _In_ BOOL bManualReset, _In_ BOOL bInitialState, _In_opt_ LPCSTR lpName);
1724 HANDLE WINAPI CreateEventW(_In_opt_ LPSECURITY_ATTRIBUTES,_In_ BOOL bManualReset, _In_ BOOL bInitialState,_In_opt_ LPCWSTR lpName);
1725 #if (_WIN32_WINNT >= 0x0600)
1726 HANDLE WINAPI CreateEventExA(LPSECURITY_ATTRIBUTES,LPCSTR,DWORD,DWORD);
1727 HANDLE WINAPI CreateEventExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1728 #endif
1729 _Ret_maybenull_ LPVOID WINAPI CreateFiber(_In_ SIZE_T, _In_ LPFIBER_START_ROUTINE, _In_opt_ LPVOID);
1730 #if (_WIN32_WINNT >= 0x0400)
1731 _Ret_maybenull_ LPVOID WINAPI CreateFiberEx(_In_ SIZE_T, _In_ SIZE_T, _In_ DWORD, _In_ LPFIBER_START_ROUTINE, _In_opt_ LPVOID);
1732 #endif
1733 HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
1734 HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
1735 _Ret_maybenull_ HANDLE WINAPI CreateFileMappingA(_In_ HANDLE, _In_opt_ LPSECURITY_ATTRIBUTES, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR);
1736 HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR);
1737 #if (_WIN32_WINNT >= 0x0500)
1738 BOOL WINAPI CreateHardLinkA(_In_ LPCSTR, _In_ LPCSTR, _Reserved_ LPSECURITY_ATTRIBUTES);
1739 BOOL WINAPI CreateHardLinkW(_In_ LPCWSTR, _In_ LPCWSTR, _Reserved_ LPSECURITY_ATTRIBUTES);
1740 #endif
1741 HANDLE WINAPI CreateIoCompletionPort(HANDLE,HANDLE,ULONG_PTR,DWORD);
1742 #if (_WIN32_WINNT >= 0x0500)
1743 _Ret_maybenull_ HANDLE WINAPI CreateJobObjectA(_In_opt_ LPSECURITY_ATTRIBUTES, _In_opt_ LPCSTR);
1744 _Ret_maybenull_ HANDLE WINAPI CreateJobObjectW(_In_opt_ LPSECURITY_ATTRIBUTES, _In_opt_ LPCWSTR);
1745 BOOL WINAPI TerminateJobObject(_In_ HANDLE, _In_ UINT);
1746 BOOL WINAPI AssignProcessToJobObject(_In_ HANDLE, _In_ HANDLE);
1747 #endif
1748 HANDLE WINAPI CreateMailslotA(_In_ LPCSTR, _In_ DWORD, _In_ DWORD, _In_opt_ LPSECURITY_ATTRIBUTES);
1749 HANDLE WINAPI CreateMailslotW(_In_ LPCWSTR, _In_ DWORD, _In_ DWORD, _In_opt_ LPSECURITY_ATTRIBUTES);
1750 #if (_WIN32_WINNT >= 0x0501)
1751 HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE);
1752 #endif
1753 HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
1754 HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
1755 #if (_WIN32_WINNT >= 0x0600)
1756 HANDLE WINAPI CreateMutexExA(LPSECURITY_ATTRIBUTES,LPCSTR,DWORD,DWORD);
1757 HANDLE WINAPI CreateMutexExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1758 #endif
1759 HANDLE WINAPI CreateNamedPipeA(_In_ LPCSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPSECURITY_ATTRIBUTES);
1760 HANDLE WINAPI CreateNamedPipeW(_In_ LPCWSTR, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPSECURITY_ATTRIBUTES);
1761 BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
1762 BOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOL,HANDLE,PGENERIC_MAPPING);
1763 BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
1764 BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1765 
1766 BOOL
1767 WINAPI
1768 CreateProcessAsUserA(
1769   _In_opt_ HANDLE,
1770   _In_opt_ LPCSTR,
1771   _Inout_opt_ LPSTR,
1772   _In_opt_ LPSECURITY_ATTRIBUTES,
1773   _In_opt_ LPSECURITY_ATTRIBUTES,
1774   _In_ BOOL,
1775   _In_ DWORD,
1776   _In_opt_ PVOID,
1777   _In_opt_ LPCSTR,
1778   _In_ LPSTARTUPINFOA,
1779   _Out_ LPPROCESS_INFORMATION);
1780 
1781 BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1782 BOOL WINAPI CreateProcessWithLogonW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1783 BOOL WINAPI CreateProcessWithTokenW(HANDLE,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
1784 HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
1785 
1786 BOOL
1787 WINAPI
1788 CreateRestrictedToken(
1789   _In_ HANDLE ExistingTokenHandle,
1790   _In_ DWORD Flags,
1791   _In_ DWORD DisableSidCount,
1792   _In_reads_opt_(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
1793   _In_ DWORD DeletePrivilegeCount,
1794   _In_reads_opt_(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete,
1795   _In_ DWORD RestrictedSidCount,
1796   _In_reads_opt_(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
1797   _Outptr_ PHANDLE NewTokenHandle);
1798 
1799 _Ret_maybenull_ HANDLE WINAPI CreateSemaphoreA(_In_opt_ LPSECURITY_ATTRIBUTES, _In_ LONG, _In_ LONG, _In_opt_ LPCSTR);
1800 _Ret_maybenull_ HANDLE WINAPI CreateSemaphoreW(_In_opt_ LPSECURITY_ATTRIBUTES, _In_ LONG, _In_ LONG, _In_opt_ LPCWSTR);
1801 #if (_WIN32_WINNT >= 0x0600)
1802 _Ret_maybenull_ HANDLE WINAPI CreateSemaphoreExA(_In_opt_ LPSECURITY_ATTRIBUTES, _In_ LONG, _In_ LONG, _In_opt_ LPCSTR, _Reserved_ DWORD, _In_ DWORD);
1803 HANDLE WINAPI CreateSemaphoreExW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR,DWORD,DWORD);
1804 #endif
1805 DWORD WINAPI CreateTapePartition(_In_ HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD);
1806 
1807 #if (_WIN32_WINNT >= 0x0500)
1808 
1809 HANDLE WINAPI CreateTimerQueue(void);
1810 
1811 BOOL
1812 WINAPI
1813 CreateTimerQueueTimer(
1814   _Outptr_ PHANDLE,
1815   _In_opt_ HANDLE,
1816   _In_ WAITORTIMERCALLBACK,
1817   _In_opt_ PVOID,
1818   _In_ DWORD,
1819   _In_ DWORD,
1820   _In_ ULONG);
1821 
1822 _Must_inspect_result_
1823 BOOL
1824 WINAPI
1825 ChangeTimerQueueTimer(
1826   _In_opt_ HANDLE TimerQueue,
1827   _Inout_ HANDLE Timer,
1828   _In_ ULONG DueTime,
1829   _In_ ULONG Period);
1830 
1831 #endif /* (_WIN32_WINNT >= 0x0500) */
1832 
1833 HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,PVOID,DWORD,PDWORD);
1834 _Ret_maybenull_ HANDLE WINAPI CreateWaitableTimerA(_In_opt_ LPSECURITY_ATTRIBUTES, _In_ BOOL, _In_opt_ LPCSTR);
1835 _Ret_maybenull_ HANDLE WINAPI CreateWaitableTimerW(_In_opt_ LPSECURITY_ATTRIBUTES, _In_ BOOL, _In_opt_ LPCWSTR);
1836 #if (_WIN32_WINNT >= 0x0600)
1837 _Ret_maybenull_ HANDLE WINAPI CreateWaitableTimerExA(_In_opt_ LPSECURITY_ATTRIBUTES, _In_opt_ LPCSTR, _In_ DWORD, _In_ DWORD);
1838 HANDLE WINAPI CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1839 #endif
1840 #if (_WIN32_WINNT >= 0x0501)
1841 BOOL WINAPI CreateWellKnownSid(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
1842 BOOL WINAPI DeactivateActCtx(_In_ DWORD, _In_ ULONG_PTR);
1843 #endif
1844 BOOL WINAPI DebugActiveProcess(DWORD);
1845 #if (_WIN32_WINNT >= 0x0501)
1846 BOOL WINAPI DebugActiveProcessStop(DWORD);
1847 #endif
1848 void WINAPI DebugBreak(void);
1849 #if (_WIN32_WINNT >= 0x0501)
1850 BOOL WINAPI DebugBreakProcess(_In_ HANDLE);
1851 BOOL WINAPI DebugSetProcessKillOnExit(_In_ BOOL);
1852 #endif
1853 PVOID WINAPI DecodePointer(PVOID);
1854 PVOID WINAPI DecodeSystemPointer(PVOID);
1855 BOOL WINAPI DecryptFileA(_In_ LPCSTR, _Reserved_ DWORD);
1856 BOOL WINAPI DecryptFileW(_In_ LPCWSTR, _Reserved_ DWORD);
1857 BOOL WINAPI DefineDosDeviceA(_In_ DWORD, _In_ LPCSTR, _In_opt_ LPCSTR);
1858 BOOL WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR);
1859 #define DefineHandleTable(w) ((w),TRUE)
1860 BOOL WINAPI DeleteAce(PACL,DWORD);
1861 ATOM WINAPI DeleteAtom(_In_ ATOM);
1862 void WINAPI DeleteCriticalSection(PCRITICAL_SECTION);
1863 void WINAPI DeleteFiber(_In_ PVOID);
1864 BOOL WINAPI DeleteFileA(LPCSTR);
1865 BOOL WINAPI DeleteFileW(LPCWSTR);
1866 #if (_WIN32_WINNT >= 0x0500)
1867 _Must_inspect_result_ BOOL WINAPI DeleteTimerQueue(_In_ HANDLE);
1868 BOOL WINAPI DeleteTimerQueueEx(HANDLE,HANDLE);
1869 BOOL WINAPI DeleteTimerQueueTimer(HANDLE,HANDLE,HANDLE);
1870 BOOL WINAPI DeleteVolumeMountPointA(_In_ LPCSTR);
1871 BOOL WINAPI DeleteVolumeMountPointW(LPCWSTR);
1872 #endif
1873 BOOL WINAPI DeregisterEventSource(_In_ HANDLE);
1874 BOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR*);
1875 BOOL WINAPI DeviceIoControl(HANDLE,DWORD,PVOID,DWORD,PVOID,DWORD,PDWORD,POVERLAPPED);
1876 BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
1877 
1878 #if (_WIN32_WINNT >= 0x0500)
1879 
1880 _Success_(return != FALSE)
1881 BOOL
1882 WINAPI
1883 DnsHostnameToComputerNameA(
1884   _In_ LPCSTR Hostname,
1885   _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
1886   _Inout_ LPDWORD nSize);
1887 
1888 _Success_(return != FALSE)
1889 BOOL
1890 WINAPI
1891 DnsHostnameToComputerNameW(
1892   _In_ LPCWSTR Hostname,
1893   _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
1894   _Inout_ LPDWORD nSize);
1895 
1896 #endif
1897 
1898 BOOL WINAPI DisconnectNamedPipe(HANDLE);
1899 BOOL WINAPI DosDateTimeToFileTime(_In_ WORD, _In_ WORD, _Out_ LPFILETIME);
1900 BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,PHANDLE,DWORD,BOOL,DWORD);
1901 BOOL WINAPI DuplicateToken(HANDLE,SECURITY_IMPERSONATION_LEVEL,PHANDLE);
1902 BOOL WINAPI DuplicateTokenEx(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
1903 PVOID WINAPI EncodePointer(PVOID);
1904 PVOID WINAPI EncodeSystemPointer(PVOID);
1905 BOOL WINAPI EncryptFileA(_In_ LPCSTR);
1906 BOOL WINAPI EncryptFileW(_In_ LPCWSTR);
1907 BOOL WINAPI EndUpdateResourceA(_In_ HANDLE, _In_ BOOL);
1908 BOOL WINAPI EndUpdateResourceW(_In_ HANDLE, _In_ BOOL);
1909 void WINAPI EnterCriticalSection(LPCRITICAL_SECTION);
1910 BOOL WINAPI EnumResourceLanguagesA(_In_opt_ HMODULE, _In_ LPCSTR, _In_ LPCSTR, _In_ ENUMRESLANGPROCA, _In_ LONG_PTR);
1911 BOOL WINAPI EnumResourceLanguagesW(_In_opt_ HMODULE, _In_ LPCWSTR, _In_ LPCWSTR, _In_ ENUMRESLANGPROCW, _In_ LONG_PTR);
1912 BOOL WINAPI EnumResourceNamesA(_In_opt_ HMODULE, _In_ LPCSTR, _In_ ENUMRESNAMEPROCA, _In_ LONG_PTR);
1913 BOOL WINAPI EnumResourceNamesW(_In_opt_ HMODULE, _In_ LPCWSTR, _In_ ENUMRESNAMEPROCW, _In_ LONG_PTR);
1914 BOOL WINAPI EnumResourceTypesA(_In_opt_ HMODULE, _In_ ENUMRESTYPEPROCA, _In_ LONG_PTR);
1915 BOOL WINAPI EnumResourceTypesW(_In_opt_ HMODULE, _In_ ENUMRESTYPEPROCW, _In_ LONG_PTR);
1916 BOOL WINAPI EqualPrefixSid(PSID,PSID);
1917 BOOL WINAPI EqualSid(PSID,PSID);
1918 DWORD WINAPI EraseTape(_In_ HANDLE, _In_ DWORD, _In_ BOOL);
1919 BOOL WINAPI EscapeCommFunction(_In_ HANDLE, _In_ DWORD);
1920 DECLSPEC_NORETURN void WINAPI ExitProcess(UINT);
1921 DECLSPEC_NORETURN void WINAPI ExitThread(_In_ DWORD dwExitCode);
1922 DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
1923 DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
1924 void WINAPI FatalAppExitA(UINT,LPCSTR);
1925 void WINAPI FatalAppExitW(UINT,LPCWSTR);
1926 __analysis_noreturn void WINAPI FatalExit(_In_ int);
1927 BOOL WINAPI FileEncryptionStatusA(_In_ LPCSTR, _Out_ LPDWORD);
1928 BOOL WINAPI FileEncryptionStatusW(_In_ LPCWSTR, _Out_ LPDWORD);
1929 BOOL WINAPI FileTimeToDosDateTime(_In_ CONST FILETIME *, _Out_ LPWORD, _Out_ LPWORD);
1930 BOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *,LPFILETIME);
1931 BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME);
1932 #if (_WIN32_WINNT >= 0x0501)
1933 BOOL WINAPI FindActCtxSectionGuid(_In_ DWORD, _Reserved_ const GUID*, _In_ ULONG, _In_opt_ const GUID*, _Out_ PACTCTX_SECTION_KEYED_DATA);
1934 BOOL WINAPI FindActCtxSectionStringA(_In_ DWORD, _Reserved_ const GUID*, _In_ ULONG, _In_ LPCSTR, _Out_ PACTCTX_SECTION_KEYED_DATA);
1935 BOOL WINAPI FindActCtxSectionStringW(_In_ DWORD, _Reserved_ const GUID*, _In_ ULONG, _In_ LPCWSTR, _Out_ PACTCTX_SECTION_KEYED_DATA);
1936 #endif
1937 ATOM WINAPI FindAtomA(_In_opt_ LPCSTR);
1938 ATOM WINAPI FindAtomW(_In_opt_ LPCWSTR);
1939 BOOL WINAPI FindClose(HANDLE);
1940 BOOL WINAPI FindCloseChangeNotification(HANDLE);
1941 HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
1942 HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
1943 HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
1944 HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
1945 HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
1946 HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
1947 #if (_WIN32_WINNT >= 0x0501)
1948 HANDLE WINAPI FindFirstStreamW(_In_ LPCWSTR, _In_ STREAM_INFO_LEVELS, _Out_ LPVOID, _Reserved_ DWORD);
1949 #endif
1950 BOOL WINAPI FindFirstFreeAce(PACL,PVOID*);
1951 
1952 #if (_WIN32_WINNT >= 0x0500)
1953 
1954 HANDLE
1955 WINAPI
1956 FindFirstVolumeA(
1957   _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1958   _In_ DWORD cchBufferLength);
1959 
1960 HANDLE WINAPI FindFirstVolumeW(LPWSTR,DWORD);
1961 
1962 HANDLE
1963 WINAPI
1964 FindFirstVolumeMountPointA(
1965   _In_ LPCSTR lpszRootPathName,
1966   _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1967   _In_ DWORD cchBufferLength);
1968 
1969 HANDLE
1970 WINAPI
1971 FindFirstVolumeMountPointW(
1972   _In_ LPCWSTR lpszRootPathName,
1973   _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1974   _In_ DWORD cchBufferLength);
1975 
1976 #endif
1977 
1978 BOOL WINAPI FindNextChangeNotification(HANDLE);
1979 BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
1980 BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
1981 #if (_WIN32_WINNT >= 0x0501)
1982 BOOL WINAPI FindNextStreamW(_In_ HANDLE, _Out_ LPVOID);
1983 #endif
1984 
1985 #if (_WIN32_WINNT >= 0x0500)
1986 
1987 BOOL
1988 WINAPI
1989 FindNextVolumeA(
1990   _Inout_ HANDLE hFindVolume,
1991   _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1992   _In_ DWORD cchBufferLength);
1993 
1994 BOOL WINAPI FindNextVolumeW(HANDLE,LPWSTR,DWORD);
1995 
1996 BOOL
1997 WINAPI
1998 FindNextVolumeMountPointA(
1999   _In_ HANDLE hFindVolumeMountPoint,
2000   _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
2001   _In_ DWORD cchBufferLength);
2002 
2003 BOOL
2004 WINAPI
2005 FindNextVolumeMountPointW(
2006   _In_ HANDLE hFindVolumeMountPoint,
2007   _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
2008   _In_ DWORD cchBufferLength);
2009 
2010 BOOL WINAPI FindVolumeClose(HANDLE);
2011 BOOL WINAPI FindVolumeMountPointClose(_In_ HANDLE);
2012 
2013 #endif
2014 
2015 _Ret_maybenull_ HRSRC WINAPI FindResourceA(_In_opt_ HMODULE,_In_ LPCSTR, _In_ LPCSTR);
2016 _Ret_maybenull_ HRSRC WINAPI FindResourceW(_In_opt_ HMODULE,_In_ LPCWSTR, _In_ LPCWSTR);
2017 _Ret_maybenull_ HRSRC WINAPI FindResourceExA(_In_opt_ HMODULE, _In_ LPCSTR, _In_ LPCSTR, _In_ WORD);
2018 HRSRC WINAPI FindResourceExW(HINSTANCE,LPCWSTR,LPCWSTR,WORD);
2019 
2020 BOOL WINAPI FlushFileBuffers(HANDLE);
2021 BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
2022 BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
2023 DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION);
2024 PVOID WINAPI FlsGetValue(DWORD);
2025 BOOL WINAPI FlsSetValue(DWORD,PVOID);
2026 BOOL WINAPI FlsFree(DWORD);
2027 DWORD WINAPI FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list* Arguments);
2028 DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list* Arguments);
2029 BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
2030 BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
2031 BOOL WINAPI FreeLibrary(HMODULE);
2032 DECLSPEC_NORETURN void WINAPI FreeLibraryAndExitThread(HMODULE,DWORD);
2033 #define FreeModule(m) FreeLibrary(m)
2034 #define FreeProcInstance(p) (void)(p)
2035 BOOL WINAPI FreeResource(HGLOBAL);
2036 PVOID WINAPI FreeSid(PSID);
2037 BOOL WINAPI GetAce(PACL,DWORD,LPVOID*);
2038 BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
2039 #if (_WIN32_WINNT >= 0x0600)
2040 HRESULT WINAPI GetApplicationRecoveryCallback(_In_ HANDLE, _Out_ APPLICATION_RECOVERY_CALLBACK*, _Outptr_opt_result_maybenull_ PVOID*, _Out_opt_ DWORD*, _Out_opt_ DWORD*);
2041 HRESULT WINAPI GetApplicationRestart(HANDLE,PWSTR,PDWORD,PDWORD);
2042 #endif
2043 
2044 UINT
2045 WINAPI
2046 GetAtomNameA(
2047   _In_ ATOM nAtom,
2048   _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2049   _In_ int nSize);
2050 
2051 UINT
2052 WINAPI
2053 GetAtomNameW(
2054   _In_ ATOM nAtom,
2055   _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2056   _In_ int nSize);
2057 
2058 BOOL WINAPI GetBinaryTypeA(_In_ LPCSTR, _Out_ PDWORD);
2059 BOOL WINAPI GetBinaryTypeW(_In_ LPCWSTR, _Out_ PDWORD);
2060 LPSTR WINAPI GetCommandLineA(VOID);
2061 LPWSTR WINAPI GetCommandLineW(VOID);
2062 
2063 _Success_(return != FALSE)
2064 BOOL
2065 WINAPI
2066 GetCommConfig(
2067   _In_ HANDLE hCommDev,
2068   _Out_writes_bytes_opt_(*lpdwSize) LPCOMMCONFIG lpCC,
2069   _Inout_ LPDWORD lpdwSize);
2070 
2071 BOOL WINAPI GetCommMask(_In_ HANDLE, _Out_ PDWORD);
2072 BOOL WINAPI GetCommModemStatus(_In_ HANDLE, _Out_ PDWORD);
2073 BOOL WINAPI GetCommProperties(_In_ HANDLE, _Inout_ LPCOMMPROP);
2074 BOOL WINAPI GetCommState(_In_ HANDLE, _Out_ LPDCB);
2075 BOOL WINAPI GetCommTimeouts(_In_ HANDLE, _Out_ LPCOMMTIMEOUTS);
2076 DWORD WINAPI GetCompressedFileSizeA(_In_ LPCSTR, _Out_opt_ PDWORD);
2077 DWORD WINAPI GetCompressedFileSizeW(_In_ LPCWSTR, _Out_opt_ PDWORD);
2078 
2079 _Success_(return != 0)
2080 BOOL
2081 WINAPI
2082 GetComputerNameA(
2083   _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR lpBuffer,
2084   _Inout_ LPDWORD nSize);
2085 
2086 _Success_(return != 0)
2087 BOOL
2088 WINAPI
2089 GetComputerNameW(
2090   _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR lpBuffer,
2091   _Inout_ LPDWORD nSize);
2092 
2093 #if (_WIN32_WINNT >= 0x0500)
2094 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
2095 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
2096 #endif
2097 #if (_WIN32_WINNT >= 0x0501)
2098 BOOL WINAPI GetCurrentActCtx( _Outptr_ HANDLE*);
2099 #endif
2100 DWORD WINAPI GetCurrentDirectoryA(DWORD,LPSTR);
2101 DWORD WINAPI GetCurrentDirectoryW(DWORD,LPWSTR);
2102 BOOL WINAPI GetCurrentHwProfileA(_Out_ LPHW_PROFILE_INFOA);
2103 BOOL WINAPI GetCurrentHwProfileW(_Out_ LPHW_PROFILE_INFOW);
2104 HANDLE WINAPI GetCurrentProcess(void);
2105 DWORD WINAPI GetCurrentProcessId(void);
2106 HANDLE WINAPI GetCurrentThread(void);
2107 DWORD WINAPI GetCurrentThreadId(void);
2108 #define GetCurrentTime GetTickCount
2109 
2110 BOOL
2111 WINAPI
2112 GetDefaultCommConfigA(
2113   _In_ LPCSTR lpszName,
2114   _Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
2115   _Inout_ LPDWORD lpdwSize);
2116 
2117 BOOL
2118 WINAPI
2119 GetDefaultCommConfigW(
2120   _In_ LPCWSTR lpszName,
2121   _Out_writes_bytes_to_(*lpdwSize, *lpdwSize) LPCOMMCONFIG lpCC,
2122   _Inout_ LPDWORD lpdwSize);
2123 
2124 BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,PDWORD,PDWORD,PDWORD,PDWORD);
2125 BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,PDWORD,PDWORD,PDWORD,PDWORD);
2126 BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
2127 BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
2128 
2129 #if (_WIN32_WINNT >= 0x0502)
2130 
2131 _Success_(return != 0 && return < nBufferLength)
2132 DWORD
2133 WINAPI
2134 GetDllDirectoryA(
2135   _In_ DWORD nBufferLength,
2136   _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer);
2137 
2138 _Success_(return != 0 && return < nBufferLength)
2139 DWORD
2140 WINAPI
2141 GetDllDirectoryW(
2142   _In_ DWORD nBufferLength,
2143   _Out_writes_to_opt_(nBufferLength, return + 1) LPWSTR lpBuffer);
2144 
2145 #endif
2146 
2147 UINT WINAPI GetDriveTypeA(LPCSTR);
2148 UINT WINAPI GetDriveTypeW(LPCWSTR);
2149 LPSTR WINAPI GetEnvironmentStrings(void);
2150 LPWSTR WINAPI GetEnvironmentStringsW(void);
2151 DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
2152 DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
2153 BOOL WINAPI GetExitCodeProcess(HANDLE,PDWORD);
2154 BOOL WINAPI GetExitCodeThread(HANDLE,PDWORD);
2155 DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName);
2156 #if (_WIN32_WINNT >= 0x0600)
2157 BOOL WINAPI GetFileAttributesByHandle(HANDLE,LPDWORD,DWORD);
2158 DWORD WINAPI GetFinalPathNameByHandleA(HANDLE,LPSTR,DWORD,DWORD);
2159 DWORD WINAPI GetFinalPathNameByHandleW(HANDLE,LPWSTR,DWORD,DWORD);
2160 #endif
2161 DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName);
2162 BOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, PVOID lpFileInformation);
2163 BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, PVOID lpFileInformation);
2164 #if (_WIN32_WINNT >= 0x0600)
2165 BOOL WINAPI GetFileBandwidthReservation(_In_ HANDLE, _Out_ LPDWORD, _Out_ LPDWORD, _Out_ LPBOOL, _Out_ LPDWORD, _Out_ LPDWORD);
2166 #endif
2167 BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION);
2168 
2169 #if (_WIN32_WINNT >= 0x0600)
2170 BOOL
2171 WINAPI
2172 GetFileInformationByHandleEx(
2173   _In_ HANDLE hFile,
2174   _In_ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
2175   _Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
2176   _In_ DWORD dwBufferSize);
2177 #endif
2178 
2179 BOOL
2180 WINAPI
2181 GetFileSecurityA(
2182   _In_ LPCSTR lpFileName,
2183   _In_ SECURITY_INFORMATION RequestedInformation,
2184   _Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
2185   _In_ DWORD nLength,
2186   _Out_ LPDWORD lpnLengthNeeded);
2187 
2188 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
2189 DWORD WINAPI GetFileSize(HANDLE,PDWORD);
2190 BOOL WINAPI GetFileSizeEx(HANDLE,PLARGE_INTEGER);
2191 BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
2192 DWORD WINAPI GetFileType(HANDLE);
2193 #define GetFreeSpace(w) (0x100000L)
2194 DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
2195 DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
2196 BOOL WINAPI GetHandleInformation(HANDLE,PDWORD);
2197 BOOL WINAPI GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
2198 DWORD WINAPI GetLastError(void);
2199 DWORD WINAPI GetLengthSid(PSID);
2200 void WINAPI GetLocalTime(LPSYSTEMTIME);
2201 DWORD WINAPI GetLogicalDrives(void);
2202 
2203 _Success_(return != 0 && return <= nBufferLength)
2204 DWORD
2205 WINAPI
2206 GetLogicalDriveStringsA(
2207   _In_ DWORD nBufferLength,
2208   _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer);
2209 
2210 DWORD WINAPI GetLogicalDriveStringsW(DWORD,LPWSTR);
2211 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
2212 DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
2213 DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
2214 #endif
2215 BOOL WINAPI GetMailslotInfo(_In_ HANDLE, _Out_opt_ PDWORD, _Out_opt_ PDWORD, _Out_opt_ PDWORD, _Out_opt_ PDWORD);
2216 DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule,LPSTR lpFilename,DWORD nSize);
2217 DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule,LPWSTR lpFilename,DWORD nSize);
2218 HMODULE WINAPI GetModuleHandleA(LPCSTR);
2219 HMODULE WINAPI GetModuleHandleW(LPCWSTR);
2220 #if (_WIN32_WINNT >= 0x0500)
2221 BOOL WINAPI GetModuleHandleExA(DWORD,LPCSTR,HMODULE*);
2222 BOOL WINAPI GetModuleHandleExW(DWORD,LPCWSTR,HMODULE*);
2223 #endif
2224 
2225 #if _WIN32_WINNT >= 0x0502
2226 WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA(LPCSTR ExeName);
2227 WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR ExeName);
2228 #endif
2229 
2230 BOOL
2231 WINAPI
2232 GetNamedPipeHandleStateA(
2233   _In_ HANDLE hNamedPipe,
2234   _Out_opt_ LPDWORD lpState,
2235   _Out_opt_ LPDWORD lpCurInstances,
2236   _Out_opt_ LPDWORD lpMaxCollectionCount,
2237   _Out_opt_ LPDWORD lpCollectDataTimeout,
2238   _Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
2239   _In_ DWORD nMaxUserNameSize);
2240 
2241 BOOL
2242 WINAPI
2243 GetNamedPipeHandleStateW(
2244   _In_ HANDLE hNamedPipe,
2245   _Out_opt_ LPDWORD lpState,
2246   _Out_opt_ LPDWORD lpCurInstances,
2247   _Out_opt_ LPDWORD lpMaxCollectionCount,
2248   _Out_opt_ LPDWORD lpCollectDataTimeout,
2249   _Out_writes_opt_(nMaxUserNameSize) LPWSTR lpUserName,
2250   _In_ DWORD nMaxUserNameSize);
2251 
2252 BOOL WINAPI GetNamedPipeInfo(_In_ HANDLE, _Out_opt_ PDWORD, _Out_opt_ PDWORD, _Out_opt_ PDWORD, _Out_opt_ PDWORD);
2253 #if (_WIN32_WINNT >= 0x0501)
2254 VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO);
2255 #endif
2256 
2257 BOOL
2258 WINAPI
2259 GetEventLogInformation(
2260   _In_ HANDLE hEventLog,
2261   _In_ DWORD dwInfoLevel,
2262   _Out_writes_bytes_to_(cbBufSize, *pcbBytesNeeded) LPVOID lpBuffer,
2263   _In_ DWORD cbBufSize,
2264   _Out_ LPDWORD pcbBytesNeeded);
2265 
2266 BOOL WINAPI GetNumberOfEventLogRecords(_In_ HANDLE, _Out_ PDWORD);
2267 BOOL WINAPI GetOldestEventLogRecord(_In_ HANDLE, _Out_ PDWORD);
2268 BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,PDWORD,BOOL);
2269 DWORD WINAPI GetPriorityClass(HANDLE);
2270 BOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
2271 UINT WINAPI GetPrivateProfileIntA(_In_ LPCSTR, _In_ LPCSTR, _In_ INT, _In_opt_ LPCSTR);
2272 UINT WINAPI GetPrivateProfileIntW(_In_ LPCWSTR, _In_ LPCWSTR, _In_ INT, _In_opt_ LPCWSTR);
2273 
2274 DWORD
2275 WINAPI
2276 GetPrivateProfileSectionA(
2277   _In_ LPCSTR lpAppName,
2278   _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2279   _In_ DWORD nSize,
2280   _In_opt_ LPCSTR lpFileName);
2281 
2282 DWORD
2283 WINAPI
2284 GetPrivateProfileSectionW(
2285   _In_ LPCWSTR lpAppName,
2286   _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2287   _In_ DWORD nSize,
2288   _In_opt_ LPCWSTR lpFileName);
2289 
2290 DWORD
2291 WINAPI
2292 GetPrivateProfileSectionNamesA(
2293   _Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
2294   _In_ DWORD nSize,
2295   _In_opt_ LPCSTR lpFileName);
2296 
2297 DWORD
2298 WINAPI
2299 GetPrivateProfileSectionNamesW(
2300   _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
2301   _In_ DWORD nSize,
2302   _In_opt_ LPCWSTR lpFileName);
2303 
2304 DWORD
2305 WINAPI
2306 GetPrivateProfileStringA(
2307   _In_opt_ LPCSTR lpAppName,
2308   _In_opt_ LPCSTR lpKeyName,
2309   _In_opt_ LPCSTR lpDefault,
2310   _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2311   _In_ DWORD nSize,
2312   _In_opt_ LPCSTR lpFileName);
2313 
2314 DWORD
2315 WINAPI
2316 GetPrivateProfileStringW(
2317   _In_opt_ LPCWSTR lpAppName,
2318   _In_opt_ LPCWSTR lpKeyName,
2319   _In_opt_ LPCWSTR lpDefault,
2320   _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2321   _In_ DWORD nSize,
2322   _In_opt_ LPCWSTR lpFileName);
2323 
2324 BOOL
2325 WINAPI
2326 GetPrivateProfileStructA(
2327   _In_ LPCSTR lpszSection,
2328   _In_ LPCSTR lpszKey,
2329   _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2330   _In_ UINT uSizeStruct,
2331   _In_opt_ LPCSTR szFile);
2332 
2333 BOOL
2334 WINAPI
2335 GetPrivateProfileStructW(
2336   _In_ LPCWSTR lpszSection,
2337   _In_ LPCWSTR lpszKey,
2338   _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2339   _In_ UINT uSizeStruct,
2340   _In_opt_ LPCWSTR szFile);
2341 
2342 FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
2343 BOOL WINAPI GetProcessAffinityMask(_In_ HANDLE, _Out_ PDWORD_PTR, _Out_ PDWORD_PTR);
2344 #if (_WIN32_WINNT >= 0x0502)
2345 BOOL WINAPI GetProcessHandleCount(_In_ HANDLE, _Out_ PDWORD);
2346 #endif
2347 HANDLE WINAPI GetProcessHeap(VOID);
2348 DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE);
2349 #if (_WIN32_WINNT >= 0x0502)
2350 DWORD WINAPI GetProcessId(HANDLE);
2351 DWORD WINAPI GetProcessIdOfThread(HANDLE);
2352 #endif
2353 #if (_WIN32_WINNT >= 0x0500)
2354 BOOL WINAPI GetProcessIoCounters(_In_ HANDLE, _Out_ PIO_COUNTERS);
2355 #endif
2356 BOOL WINAPI GetProcessPriorityBoost(_In_ HANDLE, _Out_ PBOOL);
2357 BOOL WINAPI GetProcessShutdownParameters(_Out_ PDWORD, _Out_ PDWORD);
2358 BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
2359 DWORD WINAPI GetProcessVersion(DWORD);
2360 HWINSTA WINAPI GetProcessWindowStation(void);
2361 BOOL WINAPI GetProcessWorkingSetSize(_In_ HANDLE, _Out_ PSIZE_T, _Out_ PSIZE_T);
2362 UINT WINAPI GetProfileIntA(_In_ LPCSTR, _In_ LPCSTR, _In_ INT);
2363 UINT WINAPI GetProfileIntW(_In_ LPCWSTR, _In_ LPCWSTR, _In_ INT);
2364 
2365 DWORD
2366 WINAPI
2367 GetProfileSectionA(
2368   _In_ LPCSTR lpAppName,
2369   _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2370   _In_ DWORD nSize);
2371 
2372 DWORD
2373 WINAPI
2374 GetProfileSectionW(
2375   _In_ LPCWSTR lpAppName,
2376   _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2377   _In_ DWORD nSize);
2378 
2379 DWORD
2380 WINAPI
2381 GetProfileStringA(
2382   _In_opt_ LPCSTR lpAppName,
2383   _In_opt_ LPCSTR lpKeyName,
2384   _In_opt_ LPCSTR lpDefault,
2385   _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2386   _In_ DWORD nSize);
2387 
2388 DWORD
2389 WINAPI
2390 GetProfileStringW(
2391   _In_opt_ LPCWSTR lpAppName,
2392   _In_opt_ LPCWSTR lpKeyName,
2393   _In_opt_ LPCWSTR lpDefault,
2394   _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2395   _In_ DWORD nSize);
2396 
2397 BOOL WINAPI GetQueuedCompletionStatus(HANDLE,PDWORD,PULONG_PTR,LPOVERLAPPED*,DWORD);
2398 BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,PDWORD);
2399 BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
2400 BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
2401 DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
2402 BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
2403 DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR,PUCHAR);
2404 BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
2405 
2406 _Success_(return != 0 && return < cchBuffer)
2407 DWORD
2408 WINAPI
2409 GetShortPathNameA(
2410   _In_ LPCSTR lpszLongPath,
2411   _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR  lpszShortPath,
2412   _In_ DWORD cchBuffer);
2413 
2414 DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
2415 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
2416 DWORD WINAPI GetSidLengthRequired(UCHAR);
2417 PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
2418 PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
2419 VOID WINAPI GetStartupInfoA(_Out_ LPSTARTUPINFOA);
2420 VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
2421 HANDLE WINAPI GetStdHandle(_In_ DWORD);
2422 UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
2423 UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
2424 
2425 VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
2426 BOOL WINAPI GetSystemPowerStatus(_Out_ LPSYSTEM_POWER_STATUS);
2427 #if (_WIN32_WINNT >= 0x0502)
2428 BOOL WINAPI GetSystemRegistryQuota(_Out_opt_ PDWORD, _Out_opt_ PDWORD);
2429 #endif
2430 VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
2431 #if (_WIN32_WINNT >= 0x0501)
2432 BOOL WINAPI GetSystemTimes(_Out_opt_ LPFILETIME, _Out_opt_ LPFILETIME, _Out_opt_ LPFILETIME);
2433 #endif
2434 BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
2435 void WINAPI GetSystemTimeAsFileTime(LPFILETIME);
2436 #if (_WIN32_WINNT >= 0x0500)
2437 UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT);
2438 UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT);
2439 #endif
2440 
2441 #if (_WIN32_WINNT >= 0x0501)
2442 
2443 _Success_(return != 0 && return < uSize)
2444 UINT
2445 WINAPI
2446 GetSystemWow64DirectoryA(
2447   _Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer,
2448   _In_ UINT uSize);
2449 
2450 _Success_(return != 0 && return < uSize)
2451 UINT
2452 WINAPI
2453 GetSystemWow64DirectoryW(
2454   _Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer,
2455   _In_ UINT uSize);
2456 
2457 #endif
2458 
2459 DWORD
2460 WINAPI
2461 GetTapeParameters(
2462   _In_ HANDLE hDevice,
2463   _In_ DWORD dwOperation,
2464   _Inout_ LPDWORD lpdwSize,
2465   _Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation);
2466 
2467 DWORD WINAPI GetTapePosition(_In_ HANDLE, _In_ DWORD, _Out_ PDWORD, _Out_ PDWORD, _Out_ PDWORD);
2468 DWORD WINAPI GetTapeStatus(_In_ HANDLE);
2469 
2470 UINT
2471 WINAPI
2472 GetTempFileNameA(
2473   _In_ LPCSTR lpPathName,
2474   _In_ LPCSTR lpPrefixString,
2475   _In_ UINT uUnique,
2476   _Out_writes_(MAX_PATH) LPSTR lpTempFileName);
2477 
2478 UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
2479 
2480 DWORD
2481 WINAPI
2482 GetTempPathA(
2483   _In_ DWORD nBufferLength,
2484   _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer);
2485 
2486 DWORD WINAPI GetTempPathW(DWORD,LPWSTR);
2487 BOOL WINAPI GetThreadContext(HANDLE,LPCONTEXT);
2488 #if (_WIN32_WINNT >= 0x0502)
2489 BOOL WINAPI GetThreadIOPendingFlag(_In_ HANDLE, _Out_ PBOOL);
2490 #endif
2491 int WINAPI GetThreadPriority(HANDLE);
2492 BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
2493 BOOL WINAPI GetThreadSelectorEntry(_In_ HANDLE, _In_ DWORD, _Out_ LPLDT_ENTRY);
2494 BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
2495 DWORD WINAPI GetTickCount(VOID);
2496 #if (_WIN32_WINNT >= 0x0600)
2497 ULONGLONG WINAPI GetTickCount64(VOID);
2498 #endif
2499 DWORD WINAPI GetThreadId(HANDLE);
2500 DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
2501 BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD);
2502 
2503 BOOL
2504 WINAPI
2505 GetUserNameA(
2506   _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
2507   _Inout_ LPDWORD pcbBuffer);
2508 
2509 BOOL
2510 WINAPI
2511 GetUserNameW(
2512   _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
2513   _Inout_ LPDWORD pcbBuffer);
2514 
2515 DWORD WINAPI GetVersion(void);
2516 BOOL WINAPI GetVersionExA(LPOSVERSIONINFOA);
2517 BOOL WINAPI GetVersionExW(LPOSVERSIONINFOW);
2518 
2519 BOOL
2520 WINAPI
2521 GetVolumeInformationA(
2522   _In_opt_ LPCSTR lpRootPathName,
2523   _Out_writes_opt_(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
2524   _In_ DWORD nVolumeNameSize,
2525   _Out_opt_ LPDWORD lpVolumeSerialNumber,
2526   _Out_opt_ LPDWORD lpMaximumComponentLength,
2527   _Out_opt_ LPDWORD lpFileSystemFlags,
2528   _Out_writes_opt_(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
2529   _In_ DWORD nFileSystemNameSize);
2530 
2531 BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD);
2532 
2533 #if (_WIN32_WINNT >= 0x0500)
2534 
2535 BOOL
2536 WINAPI
2537 GetVolumeNameForVolumeMountPointA(
2538   _In_ LPCSTR lpszVolumeMountPoint,
2539   _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
2540   _In_ DWORD cchBufferLength);
2541 
2542 BOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
2543 
2544 BOOL
2545 WINAPI
2546 GetVolumePathNameA(
2547   _In_ LPCSTR lpszFileName,
2548   _Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
2549   _In_ DWORD cchBufferLength);
2550 
2551 BOOL WINAPI GetVolumePathNameW(LPCWSTR,LPWSTR,DWORD);
2552 
2553 #endif
2554 
2555 #if (_WIN32_WINNT >= 0x0501)
2556 
2557 BOOL
2558 WINAPI
2559 GetVolumePathNamesForVolumeNameA(
2560   _In_ LPCSTR lpszVolumeName,
2561   _Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_terminated_ LPCH lpszVolumePathNames,
2562   _In_ DWORD cchBufferLength,
2563   _Out_ PDWORD lpcchReturnLength);
2564 
2565 BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DWORD,PDWORD);
2566 
2567 #endif
2568 
2569 UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
2570 UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
2571 DWORD WINAPI GetWindowThreadProcessId(HWND hWnd,PDWORD lpdwProcessId);
2572 UINT WINAPI GetWriteWatch(DWORD,PVOID,SIZE_T,PVOID*,PULONG_PTR,PULONG);
2573 ATOM WINAPI GlobalAddAtomA(_In_opt_ LPCSTR);
2574 ATOM WINAPI GlobalAddAtomW(_In_opt_ LPCWSTR);
2575 HGLOBAL WINAPI GlobalAlloc(UINT,SIZE_T);
2576 SIZE_T WINAPI GlobalCompact(_In_ DWORD); /* Obsolete: Has no effect. */
2577 ATOM WINAPI GlobalDeleteAtom(_In_ ATOM);
2578 #define GlobalDiscard(m) GlobalReAlloc((m),0,GMEM_MOVEABLE)
2579 ATOM WINAPI GlobalFindAtomA(_In_opt_ LPCSTR);
2580 ATOM WINAPI GlobalFindAtomW(_In_opt_ LPCWSTR);
2581 VOID WINAPI GlobalFix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2582 UINT WINAPI GlobalFlags(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2583 HGLOBAL WINAPI GlobalFree(HGLOBAL);
2584 
2585 UINT
2586 WINAPI
2587 GlobalGetAtomNameA(
2588   _In_ ATOM nAtom,
2589   _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2590   _In_ int nSize);
2591 
2592 UINT
2593 WINAPI
2594 GlobalGetAtomNameW(
2595   _In_ ATOM nAtom,
2596   _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2597   _In_ int nSize);
2598 
2599 _Ret_maybenull_ HGLOBAL WINAPI GlobalHandle(_In_ LPCVOID);
2600 _Ret_maybenull_ LPVOID WINAPI GlobalLock(_In_ HGLOBAL);
2601 VOID WINAPI GlobalMemoryStatus(_Out_ LPMEMORYSTATUS);
2602 #if (_WIN32_WINNT >= 0x0500)
2603 BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
2604 #endif
2605 HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,SIZE_T,UINT);
2606 SIZE_T WINAPI GlobalSize(_In_ HGLOBAL);
2607 VOID WINAPI GlobalUnfix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2608 BOOL WINAPI GlobalUnlock(_In_ HGLOBAL);
2609 BOOL WINAPI GlobalUnWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2610 PVOID WINAPI GlobalWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2611 #define HasOverlappedIoCompleted(lpOverlapped)  ((lpOverlapped)->Internal != STATUS_PENDING)
2612 PVOID WINAPI HeapAlloc(HANDLE,DWORD,SIZE_T);
2613 SIZE_T WINAPI HeapCompact(HANDLE,DWORD);
2614 HANDLE WINAPI HeapCreate(DWORD,SIZE_T,SIZE_T);
2615 BOOL WINAPI HeapDestroy(HANDLE);
2616 BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID);
2617 BOOL WINAPI HeapLock(HANDLE);
2618 #if (_WIN32_WINNT >= 0x0501)
2619 BOOL WINAPI HeapQueryInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
2620 #endif
2621 PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,SIZE_T);
2622 #if (_WIN32_WINNT >= 0x0501)
2623 BOOL WINAPI HeapSetInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
2624 #endif
2625 SIZE_T WINAPI HeapSize(HANDLE,DWORD,LPCVOID);
2626 BOOL WINAPI HeapUnlock(HANDLE);
2627 BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID);
2628 BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
2629 BOOL WINAPI ImpersonateAnonymousToken(HANDLE);
2630 BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
2631 BOOL WINAPI ImpersonateNamedPipeClient(HANDLE);
2632 BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
2633 BOOL WINAPI InitAtomTable(_In_ DWORD);
2634 BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD);
2635 #if (_WIN32_WINNT >= 0x0600)
2636 VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE);
2637 #endif
2638 VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION);
2639 BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD);
2640 DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
2641 BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
2642 BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
2643 
2644 #if (_WIN32_WINNT >= 0x0600)
2645 VOID WINAPI InitializeSRWLock(PSRWLOCK);
2646 #endif
2647 
2648 BOOL WINAPI IsBadCodePtr(_In_opt_ FARPROC);
2649 BOOL WINAPI IsBadHugeReadPtr(_In_opt_ CONST VOID*, _In_ UINT_PTR);
2650 BOOL WINAPI IsBadHugeWritePtr(_In_opt_ PVOID, _In_ UINT_PTR);
2651 BOOL WINAPI IsBadReadPtr(_In_opt_ CONST VOID*, _In_ UINT_PTR);
2652 BOOL WINAPI IsBadStringPtrA(_In_opt_ LPCSTR, _In_ UINT_PTR);
2653 BOOL WINAPI IsBadStringPtrW(_In_opt_ LPCWSTR, _In_ UINT_PTR);
2654 BOOL WINAPI IsBadWritePtr(_In_opt_ PVOID, _In_ UINT_PTR);
2655 BOOL WINAPI IsDebuggerPresent(void);
2656 #if (_WIN32_WINNT >= 0x0501)
2657 BOOL WINAPI IsProcessInJob(HANDLE,HANDLE,PBOOL);
2658 #endif
2659 BOOL WINAPI IsProcessorFeaturePresent(DWORD);
2660 BOOL WINAPI IsSystemResumeAutomatic(void);
2661 
2662 BOOL
2663 WINAPI
2664 IsTextUnicode(
2665   _In_reads_bytes_(iSize) CONST VOID *lpv,
2666   _In_ int iSize,
2667   _Inout_opt_ LPINT lpiResult);
2668 
2669 #if (_WIN32_WINNT >= 0x0600)
2670 BOOL WINAPI IsThreadAFiber(VOID);
2671 #endif
2672 BOOL WINAPI IsValidAcl(PACL);
2673 BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
2674 BOOL WINAPI IsValidSid(PSID);
2675 #if (_WIN32_WINNT >= 0x0501)
2676 BOOL WINAPI IsWellKnownSid(PSID,WELL_KNOWN_SID_TYPE);
2677 BOOL WINAPI IsWow64Process(HANDLE,PBOOL);
2678 #endif
2679 void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
2680 #define LimitEmsPages(n)
2681 _Ret_maybenull_ HINSTANCE WINAPI LoadLibraryA(_In_ LPCSTR);
2682 _Ret_maybenull_ HINSTANCE WINAPI LoadLibraryW(_In_ LPCWSTR);
2683 HINSTANCE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
2684 HINSTANCE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
2685 DWORD WINAPI LoadModule(_In_ LPCSTR, _In_ PVOID);
2686 HGLOBAL WINAPI LoadResource(HINSTANCE,HRSRC);
2687 HLOCAL WINAPI LocalAlloc(UINT,SIZE_T);
2688 SIZE_T WINAPI LocalCompact(_In_ UINT); /* Obsolete: Has no effect. */
2689 #define LocalDiscard(m) (LocalReAlloc((m),0,LMEM_MOVEABLE))
2690 BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,LPFILETIME);
2691 UINT WINAPI LocalFlags(_In_ HLOCAL); /* Obsolete: Has no effect. */
2692 HLOCAL WINAPI LocalFree(HLOCAL);
2693 _Ret_maybenull_ HLOCAL WINAPI LocalHandle(_In_ LPCVOID);
2694 PVOID WINAPI LocalLock(HLOCAL);
2695 HLOCAL WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT);
2696 SIZE_T WINAPI LocalShrink(_In_ HLOCAL, _In_ UINT);  /* Obsolete: Has no effect. */
2697 SIZE_T WINAPI LocalSize(_In_ HLOCAL);
2698 BOOL WINAPI LocalUnlock(HLOCAL);
2699 BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
2700 BOOL WINAPI LockFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPOVERLAPPED);
2701 PVOID WINAPI LockResource(HGLOBAL);
2702 #define LockSegment(w) GlobalFix((HANDLE)(w)) /* Obsolete: Has no effect. */
2703 BOOL WINAPI LogonUserA(_In_ LPSTR, _In_opt_ LPSTR, _In_opt_ LPSTR, _In_ DWORD, _In_ DWORD, _Outptr_ PHANDLE);
2704 BOOL WINAPI LogonUserW(_In_ LPWSTR, _In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_ DWORD, _In_ DWORD, _Outptr_ PHANDLE);
2705 
2706 _Success_(return != FALSE)
2707 BOOL
2708 WINAPI
2709 LogonUserExA(
2710   _In_ LPSTR lpszUsername,
2711   _In_opt_ LPSTR lpszDomain,
2712   _In_opt_ LPSTR lpszPassword,
2713   _In_ DWORD dwLogonType,
2714   _In_ DWORD dwLogonProvider,
2715   _Out_opt_ PHANDLE phToken,
2716   _Out_opt_ PSID *ppLogonSid,
2717   _Out_opt_ PVOID *ppProfileBuffer,
2718   _Out_opt_ LPDWORD pdwProfileLength,
2719   _Out_opt_ PQUOTA_LIMITS pQuotaLimits);
2720 
2721 _Success_(return != FALSE)
2722 BOOL
2723 WINAPI
2724 LogonUserExW(
2725   _In_ LPWSTR lpszUsername,
2726   _In_opt_ LPWSTR lpszDomain,
2727   _In_opt_ LPWSTR lpszPassword,
2728   _In_ DWORD dwLogonType,
2729   _In_ DWORD dwLogonProvider,
2730   _Out_opt_ PHANDLE phToken,
2731   _Out_opt_ PSID *ppLogonSid,
2732   _Out_opt_ PVOID *ppProfileBuffer,
2733   _Out_opt_ LPDWORD pdwProfileLength,
2734   _Out_opt_ PQUOTA_LIMITS pQuotaLimits);
2735 
2736 _Success_(return != FALSE)
2737 BOOL
2738 WINAPI
2739 LookupAccountNameA(
2740   _In_opt_ LPCSTR lpSystemName,
2741   _In_ LPCSTR lpAccountName,
2742   _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
2743   _Inout_ LPDWORD cbSid,
2744   _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
2745   _Inout_ LPDWORD cchReferencedDomainName,
2746   _Out_ PSID_NAME_USE peUse);
2747 
2748 _Success_(return != FALSE)
2749 BOOL
2750 WINAPI
2751 LookupAccountNameW(
2752   _In_opt_ LPCWSTR lpSystemName,
2753   _In_ LPCWSTR lpAccountName,
2754   _Out_writes_bytes_to_opt_(*cbSid, *cbSid) PSID Sid,
2755   _Inout_ LPDWORD cbSid,
2756   _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
2757   _Inout_ LPDWORD cchReferencedDomainName,
2758   _Out_ PSID_NAME_USE peUse);
2759 
2760 _Success_(return != FALSE)
2761 BOOL
2762 WINAPI
2763 LookupAccountSidA(
2764   _In_opt_ LPCSTR lpSystemName,
2765   _In_ PSID Sid,
2766   _Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR Name,
2767   _Inout_ LPDWORD cchName,
2768   _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPSTR ReferencedDomainName,
2769   _Inout_ LPDWORD cchReferencedDomainName,
2770   _Out_ PSID_NAME_USE peUse);
2771 
2772 _Success_(return != FALSE)
2773 BOOL
2774 WINAPI
2775 LookupAccountSidW(
2776   _In_opt_ LPCWSTR lpSystemName,
2777   _In_ PSID Sid,
2778   _Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR Name,
2779   _Inout_  LPDWORD cchName,
2780   _Out_writes_to_opt_(*cchReferencedDomainName, *cchReferencedDomainName + 1) LPWSTR ReferencedDomainName,
2781   _Inout_ LPDWORD cchReferencedDomainName,
2782   _Out_ PSID_NAME_USE peUse);
2783 
2784 _Success_(return != FALSE)
2785 BOOL
2786 WINAPI
2787 LookupPrivilegeDisplayNameA(
2788   _In_opt_ LPCSTR lpSystemName,
2789   _In_ LPCSTR lpName,
2790   _Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPSTR lpDisplayName,
2791   _Inout_ LPDWORD cchDisplayName,
2792   _Out_ LPDWORD lpLanguageId);
2793 
2794 _Success_(return != FALSE)
2795 BOOL
2796 WINAPI
2797 LookupPrivilegeDisplayNameW(
2798   _In_opt_ LPCWSTR lpSystemName,
2799   _In_ LPCWSTR lpName,
2800   _Out_writes_to_opt_(*cchDisplayName, *cchDisplayName + 1) LPWSTR lpDisplayName,
2801   _Inout_ LPDWORD cchDisplayName,
2802   _Out_ LPDWORD lpLanguageId);
2803 
2804 _Success_(return != FALSE)
2805 BOOL
2806 WINAPI
2807 LookupPrivilegeNameA(
2808   _In_opt_ LPCSTR lpSystemName,
2809   _In_ PLUID lpLuid,
2810   _Out_writes_to_opt_(*cchName, *cchName + 1) LPSTR lpName,
2811   _Inout_ LPDWORD cchName);
2812 
2813 _Success_(return != FALSE)
2814 BOOL
2815 WINAPI
2816 LookupPrivilegeNameW(
2817   _In_opt_ LPCWSTR lpSystemName,
2818   _In_ PLUID lpLuid,
2819   _Out_writes_to_opt_(*cchName, *cchName + 1) LPWSTR lpName,
2820   _Inout_ LPDWORD cchName);
2821 
2822 BOOL WINAPI LookupPrivilegeValueA(_In_opt_ LPCSTR, _In_ LPCSTR, _Out_ PLUID);
2823 BOOL WINAPI LookupPrivilegeValueW(_In_opt_ LPCWSTR, _In_ LPCWSTR, _Out_ PLUID);
2824 
2825 LPSTR
2826 WINAPI
2827 lstrcatA(
2828   _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPSTR lpString1,
2829   _In_ LPCSTR lpString2);
2830 
2831 LPWSTR
2832 WINAPI
2833 lstrcatW(
2834   _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPWSTR lpString1,
2835   _In_ LPCWSTR lpString2);
2836 
2837 int WINAPI lstrcmpA(LPCSTR,LPCSTR);
2838 int WINAPI lstrcmpiA(LPCSTR,LPCSTR);
2839 int WINAPI lstrcmpiW( LPCWSTR,LPCWSTR);
2840 int WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
2841 
2842 LPSTR
2843 WINAPI
2844 lstrcpyA(
2845   _Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1,
2846   _In_ LPCSTR lpString2);
2847 
2848 LPWSTR
2849 WINAPI
2850 lstrcpyW(
2851   _Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1,
2852   _In_ LPCWSTR lpString2);
2853 
2854 LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,int);
2855 LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,int);
2856 int WINAPI lstrlenA(LPCSTR);
2857 int WINAPI lstrlenW(LPCWSTR);
2858 BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
2859 #define MakeProcInstance(p,i) (p)
2860 BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD);
2861 VOID WINAPI MapGenericMask(PDWORD,PGENERIC_MAPPING);
2862 PVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,SIZE_T);
2863 PVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,SIZE_T,PVOID);
2864 BOOL WINAPI MoveFileA(_In_ LPCSTR, _In_ LPCSTR);
2865 BOOL WINAPI MoveFileW(_In_ LPCWSTR, _In_ LPCWSTR);
2866 BOOL WINAPI MoveFileExA(_In_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD);
2867 BOOL WINAPI MoveFileExW(_In_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD);
2868 BOOL WINAPI MoveFileWithProgressA(_In_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPPROGRESS_ROUTINE, _In_opt_ LPVOID, _In_ DWORD);
2869 BOOL WINAPI MoveFileWithProgressW(_In_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPPROGRESS_ROUTINE, _In_opt_ LPVOID, _In_ DWORD);
2870 int WINAPI MulDiv(_In_ int, _In_ int, _In_ int);
2871 BOOL WINAPI NotifyChangeEventLog(_In_ HANDLE, _In_ HANDLE);
2872 BOOL WINAPI ObjectCloseAuditAlarmA(_In_ LPCSTR, _In_ PVOID, _In_ BOOL);
2873 BOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR,PVOID,BOOL);
2874 BOOL WINAPI ObjectDeleteAuditAlarmA(_In_ LPCSTR, _In_ PVOID, _In_ BOOL);
2875 BOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR,PVOID,BOOL);
2876 BOOL WINAPI ObjectOpenAuditAlarmA(_In_ LPCSTR, _In_ PVOID, _In_ LPSTR, _In_opt_ LPSTR, _In_ PSECURITY_DESCRIPTOR, _In_ HANDLE, _In_ DWORD, _In_ DWORD, _In_opt_ PPRIVILEGE_SET, _In_ BOOL, _In_ BOOL, _Out_ PBOOL);
2877 BOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR,PVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL);
2878 BOOL WINAPI ObjectPrivilegeAuditAlarmA(_In_ LPCSTR, _In_ PVOID, _In_ HANDLE, _In_ DWORD, _In_ PPRIVILEGE_SET, _In_ BOOL);
2879 BOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
2880 HANDLE WINAPI OpenBackupEventLogA(_In_opt_ LPCSTR, _In_ LPCSTR);
2881 HANDLE WINAPI OpenBackupEventLogW(_In_opt_ LPCWSTR, _In_ LPCWSTR);
2882 HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
2883 HANDLE WINAPI OpenEventLogA(_In_opt_ LPCSTR, _In_ LPCSTR);
2884 HANDLE WINAPI OpenEventLogW(_In_opt_ LPCWSTR, _In_ LPCWSTR);
2885 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
2886 HFILE WINAPI OpenFile(_In_ LPCSTR, _Inout_ LPOFSTRUCT, _In_ UINT);
2887 #if (_WIN32_WINNT >= 0x0600)
2888 HANDLE WINAPI OpenFileById(_In_ HANDLE, _In_ LPFILE_ID_DESCRIPTOR, _In_ DWORD, _In_ DWORD, _In_opt_ LPSECURITY_ATTRIBUTES, _In_ DWORD);
2889 #endif
2890 HANDLE WINAPI OpenFileMappingA(_In_ DWORD, _In_ BOOL, _In_ LPCSTR);
2891 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
2892 _Ret_maybenull_ HANDLE WINAPI OpenMutexA(_In_ DWORD, _In_ BOOL, _In_ LPCSTR);
2893 HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
2894 HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
2895 BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
2896 _Ret_maybenull_ HANDLE WINAPI OpenSemaphoreA(_In_ DWORD, _In_ BOOL, _In_ LPCSTR);
2897 HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
2898 #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
2899 HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
2900 #endif
2901 BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
2902 _Ret_maybenull_ HANDLE WINAPI OpenWaitableTimerA(_In_ DWORD, _In_ BOOL, _In_ LPCSTR);
2903 HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
2904 WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR);
2905 WINBASEAPI void WINAPI OutputDebugStringW(LPCWSTR);
2906 BOOL WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD);
2907 BOOL WINAPI PostQueuedCompletionStatus(HANDLE,DWORD,ULONG_PTR,LPOVERLAPPED);
2908 DWORD WINAPI PrepareTape(_In_ HANDLE, _In_ DWORD, _In_ BOOL);
2909 BOOL WINAPI PrivilegeCheck (HANDLE,PPRIVILEGE_SET,PBOOL);
2910 BOOL WINAPI PrivilegedServiceAuditAlarmA(_In_ LPCSTR, _In_ LPCSTR, _In_ HANDLE, _In_ PPRIVILEGE_SET, _In_ BOOL);
2911 BOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR,LPCWSTR,HANDLE,PPRIVILEGE_SET,BOOL);
2912 #if (_WIN32_WINNT >= 0x0500)
2913 BOOL WINAPI ProcessIdToSessionId(DWORD,DWORD*);
2914 #endif
2915 BOOL WINAPI PulseEvent(HANDLE);
2916 BOOL WINAPI PurgeComm(_In_ HANDLE, _In_ DWORD);
2917 
2918 #if (_WIN32_WINNT >= 0x0501)
2919 BOOL
2920 WINAPI
2921 QueryActCtxW(
2922   _In_ DWORD dwFlags,
2923   _In_ HANDLE hActCtx,
2924   _In_opt_ PVOID pvSubInstance,
2925   _In_ ULONG ulInfoClass,
2926   _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
2927   _In_ SIZE_T cbBuffer,
2928   _Out_opt_ SIZE_T *pcbWrittenOrRequired);
2929 #endif
2930 
2931 DWORD
2932 WINAPI
2933 QueryDosDeviceA(
2934   _In_opt_ LPCSTR lpDeviceName,
2935   _Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
2936   _In_ DWORD ucchMax);
2937 
2938 DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
2939 #if (_WIN32_WINNT >= 0x0501)
2940 BOOL WINAPI QueryMemoryResourceNotification(HANDLE,PBOOL);
2941 #endif
2942 BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
2943 BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER);
2944 #if (_WIN32_WINNT >= 0x0600)
2945 VOID WINAPI QuerySecurityAccessMask(SECURITY_INFORMATION,LPDWORD);
2946 #endif
2947 DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
2948 #if (_WIN32_WINNT >= 0x0500)
2949 BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG);
2950 #endif
2951 void WINAPI RaiseException(DWORD,DWORD,DWORD,const ULONG_PTR*);
2952 
2953 BOOL
2954 WINAPI
2955 QueryInformationJobObject(
2956   _In_opt_ HANDLE hJob,
2957   _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
2958   _Out_writes_bytes_to_(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJobObjectInformation,
2959   _In_ DWORD cbJobObjectInformationLength,
2960   _Out_opt_ LPDWORD lpReturnLength);
2961 
2962 BOOL
2963 WINAPI
2964 ReadDirectoryChangesW(
2965   _In_ HANDLE hDirectory,
2966   _Out_writes_bytes_to_(nBufferLength, *lpBytesReturned) LPVOID lpBuffer,
2967   _In_ DWORD nBufferLength,
2968   _In_ BOOL bWatchSubtree,
2969   _In_ DWORD dwNotifyFilter,
2970   _Out_opt_ LPDWORD lpBytesReturned,
2971   _Inout_opt_ LPOVERLAPPED lpOverlapped,
2972   _In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2973 
2974 BOOL
2975 WINAPI
2976 ReadEventLogA(
2977   _In_ HANDLE hEventLog,
2978   _In_ DWORD dwReadFlags,
2979   _In_ DWORD dwRecordOffset,
2980   _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2981   _In_ DWORD nNumberOfBytesToRead,
2982   _Out_ DWORD *pnBytesRead,
2983   _Out_ DWORD *pnMinNumberOfBytesNeeded);
2984 
2985 BOOL
2986 WINAPI
2987 ReadEventLogW(
2988   _In_ HANDLE hEventLog,
2989   _In_ DWORD dwReadFlags,
2990   _In_ DWORD dwRecordOffset,
2991   _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2992   _In_ DWORD nNumberOfBytesToRead,
2993   _Out_ DWORD *pnBytesRead,
2994   _Out_ DWORD *pnMinNumberOfBytesNeeded);
2995 
2996 BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED);
2997 BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
2998 BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
2999 BOOL WINAPI ReadProcessMemory(HANDLE,LPCVOID,LPVOID,SIZE_T,PSIZE_T);
3000 #if (_WIN32_WINNT >= 0x0600)
3001 VOID WINAPI RecoveryFinished(BOOL);
3002 HRESULT WINAPI RecoveryInProgress(OUT PBOOL);
3003 HRESULT WINAPI RegisterApplicationRecoveryCallback(_In_ APPLICATION_RECOVERY_CALLBACK, _In_opt_ PVOID, _In_ DWORD, _In_ DWORD);
3004 HRESULT WINAPI RegisterApplicationRestart(_In_opt_ PCWSTR, _In_ DWORD);
3005 #endif
3006 HANDLE WINAPI RegisterEventSourceA(_In_opt_ LPCSTR, _In_ LPCSTR);
3007 HANDLE WINAPI RegisterEventSourceW(_In_opt_ LPCWSTR, _In_ LPCWSTR);
3008 #if (_WIN32_WINNT >= 0x0500)
3009 BOOL WINAPI RegisterWaitForSingleObject(_Outptr_ PHANDLE, _In_ HANDLE, _In_ WAITORTIMERCALLBACK, _In_opt_ PVOID, _In_ ULONG, _In_ ULONG);
3010 HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
3011 #endif
3012 #if (_WIN32_WINNT >= 0x0501)
3013 void WINAPI ReleaseActCtx(_Inout_ HANDLE);
3014 #endif
3015 BOOL WINAPI ReleaseMutex(HANDLE);
3016 BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
3017 #if (_WIN32_WINNT >= 0x0600)
3018 VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK);
3019 VOID WINAPI ReleaseSRWLockShared(PSRWLOCK);
3020 #endif
3021 BOOL WINAPI RemoveDirectoryA(LPCSTR);
3022 BOOL WINAPI RemoveDirectoryW(LPCWSTR);
3023 #if (_WIN32_WINNT >= 0x0500)
3024 ULONG WINAPI RemoveVectoredExceptionHandler(_In_ PVOID);
3025 ULONG WINAPI RemoveVectoredContinueHandler(_In_ PVOID);
3026 #endif
3027 #if (_WIN32_WINNT >= 0x0500)
3028 BOOL WINAPI ReplaceFileA(_In_ LPCSTR, _In_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD, _Reserved_ LPVOID, _Reserved_ LPVOID);
3029 BOOL WINAPI ReplaceFileW(_In_ LPCWSTR, _In_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD, _Reserved_ LPVOID, _Reserved_ LPVOID);
3030 #endif
3031 
3032 BOOL
3033 WINAPI
3034 ReportEventA(
3035   _In_ HANDLE hEventLog,
3036   _In_ WORD wType,
3037   _In_ WORD wCategory,
3038   _In_ DWORD dwEventID,
3039   _In_opt_ PSID lpUserSid,
3040   _In_ WORD wNumStrings,
3041   _In_ DWORD dwDataSize,
3042   _In_reads_opt_(wNumStrings) LPCSTR *lpStrings,
3043   _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData);
3044 
3045 BOOL
3046 WINAPI
3047 ReportEventW(
3048   _In_ HANDLE hEventLog,
3049   _In_ WORD wType,
3050   _In_ WORD wCategory,
3051   _In_ DWORD dwEventID,
3052   _In_opt_ PSID lpUserSid,
3053   _In_ WORD wNumStrings,
3054   _In_ DWORD dwDataSize,
3055   _In_reads_opt_(wNumStrings) LPCWSTR *lpStrings,
3056   _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData);
3057 
3058 BOOL WINAPI ResetEvent(HANDLE);
3059 UINT WINAPI ResetWriteWatch(LPVOID,SIZE_T);
3060 #if (_WIN32_WINNT >= 0x0510)
3061 VOID WINAPI RestoreLastError(_In_ DWORD);
3062 #endif
3063 DWORD WINAPI ResumeThread(HANDLE);
3064 BOOL WINAPI RevertToSelf(void);
3065 
3066 _Success_(return != 0 && return < nBufferLength)
3067 DWORD
3068 WINAPI
3069 SearchPathA(
3070   _In_opt_ LPCSTR lpPath,
3071   _In_ LPCSTR lpFileName,
3072   _In_opt_ LPCSTR lpExtension,
3073   _In_ DWORD nBufferLength,
3074   _Out_writes_to_opt_(nBufferLength, return + 1) LPSTR lpBuffer,
3075   _Out_opt_ LPSTR *lpFilePart);
3076 
3077 DWORD WINAPI
3078 SearchPathW(
3079     _In_opt_ LPCWSTR lpPath,
3080     _In_ LPCWSTR lpFileName,
3081     _In_opt_ LPCWSTR lpExtension,
3082     _In_ DWORD nBufferLength,
3083     _Out_writes_to_opt_(nBufferLength, return +1) LPWSTR lpBuffer,
3084     _Out_opt_ LPWSTR *lpFilePart);
3085 BOOL WINAPI SetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
3086 BOOL WINAPI SetCommBreak(_In_ HANDLE);
3087 
3088 BOOL
3089 WINAPI
3090 SetCommConfig(
3091   _In_ HANDLE hCommDev,
3092   _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
3093   _In_ DWORD dwSize);
3094 
3095 BOOL WINAPI SetCommMask(_In_ HANDLE, _In_ DWORD);
3096 BOOL WINAPI SetCommState(_In_ HANDLE, _In_ LPDCB);
3097 BOOL WINAPI SetCommTimeouts(_In_ HANDLE, _In_ LPCOMMTIMEOUTS);
3098 BOOL WINAPI SetComputerNameA(_In_ LPCSTR);
3099 BOOL WINAPI SetComputerNameW(_In_ LPCWSTR);
3100 #if (_WIN32_WINNT >= 0x0500)
3101 BOOL WINAPI SetComputerNameExA(_In_ COMPUTER_NAME_FORMAT, _In_ LPCSTR);
3102 BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT,LPCWSTR);
3103 #endif
3104 BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
3105 BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
3106 
3107 BOOL
3108 WINAPI
3109 SetDefaultCommConfigA(
3110   _In_ LPCSTR lpszName,
3111   _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
3112   _In_ DWORD dwSize);
3113 
3114 BOOL
3115 WINAPI
3116 SetDefaultCommConfigW(
3117   _In_ LPCWSTR lpszName,
3118   _In_reads_bytes_(dwSize) LPCOMMCONFIG lpCC,
3119   _In_ DWORD dwSize);
3120 
3121 #if (_WIN32_WINNT >= 0x0502)
3122 BOOL WINAPI SetDllDirectoryA(_In_opt_ LPCSTR);
3123 BOOL WINAPI SetDllDirectoryW(_In_opt_ LPCWSTR);
3124 #endif
3125 BOOL WINAPI SetEndOfFile(HANDLE);
3126 BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
3127 BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
3128 UINT WINAPI SetErrorMode(UINT);
3129 BOOL WINAPI SetEvent(HANDLE);
3130 VOID WINAPI SetFileApisToANSI(void);
3131 VOID WINAPI SetFileApisToOEM(void);
3132 BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes);
3133 #if (_WIN32_WINNT >= 0x0600)
3134 BOOL WINAPI SetFileAttributesByHandle(HANDLE,DWORD,DWORD);
3135 #endif
3136 BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes);
3137 #if (_WIN32_WINNT >= 0x0600)
3138 BOOL WINAPI SetFileBandwidthReservation(_In_ HANDLE, _In_ DWORD, _In_ DWORD, _In_ BOOL, _Out_ LPDWORD, _Out_ LPDWORD);
3139 BOOL WINAPI SetFileCompletionNotificationModes(_In_ HANDLE, _In_ UCHAR);
3140 #endif
3141 DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD);
3142 BOOL WINAPI SetFilePointerEx(HANDLE,LARGE_INTEGER,PLARGE_INTEGER,DWORD);
3143 BOOL WINAPI SetFileSecurityA(_In_ LPCSTR, _In_ SECURITY_INFORMATION, _In_ PSECURITY_DESCRIPTOR);
3144 BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
3145 #if (_WIN32_WINNT >= 0x0501)
3146 BOOL WINAPI SetFileShortNameA(_In_ HANDLE, _In_ LPCSTR);
3147 BOOL WINAPI SetFileShortNameW(_In_ HANDLE, _In_ LPCWSTR);
3148 #endif
3149 BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
3150 #if (_WIN32_WINNT >= 0x0501)
3151 BOOL WINAPI SetFileValidData(HANDLE,LONGLONG);
3152 #endif
3153 
3154 #if (_WIN32_WINNT >= 0x0502)
3155 
3156 WINBASEAPI
3157 UINT
3158 WINAPI
3159 EnumSystemFirmwareTables(
3160     _In_ DWORD FirmwareTableProviderSignature,
3161     _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableEnumBuffer,
3162     _In_ DWORD BufferSize);
3163 
3164 WINBASEAPI
3165 UINT
3166 WINAPI
3167 GetSystemFirmwareTable(
3168     _In_ DWORD FirmwareTableProviderSignature,
3169     _In_ DWORD FirmwareTableID,
3170     _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableBuffer,
3171     _In_ DWORD BufferSize);
3172 
3173 _Success_(return > 0)
3174 WINBASEAPI
3175 DWORD
3176 WINAPI
3177 GetFirmwareEnvironmentVariableA(
3178     _In_ LPCSTR lpName,
3179     _In_ LPCSTR lpGuid,
3180     _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
3181     _In_ DWORD nSize);
3182 
3183 _Success_(return > 0)
3184 WINBASEAPI
3185 DWORD
3186 WINAPI
3187 GetFirmwareEnvironmentVariableW(
3188     _In_ LPCWSTR lpName,
3189     _In_ LPCWSTR lpGuid,
3190     _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
3191     _In_ DWORD nSize);
3192 
3193 #ifdef UNICODE
3194 #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
3195 #else
3196 #define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
3197 #endif
3198 
3199 WINBASEAPI
3200 BOOL
3201 WINAPI
3202 SetFirmwareEnvironmentVariableA(
3203   _In_ LPCSTR lpName,
3204   _In_ LPCSTR lpGuid,
3205   _In_reads_bytes_opt_(nSize) PVOID pValue,
3206   _In_ DWORD nSize);
3207 
3208 WINBASEAPI
3209 BOOL
3210 WINAPI
3211 SetFirmwareEnvironmentVariableW(
3212   _In_ LPCWSTR lpName,
3213   _In_ LPCWSTR lpGuid,
3214   _In_reads_bytes_opt_(nSize) PVOID pValue,
3215   _In_ DWORD nSize);
3216 
3217 #ifdef UNICODE
3218 #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
3219 #else
3220 #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
3221 #endif
3222 
3223 #endif /* _WIN32_WINNT >= 0x0502 */
3224 
3225 #if (_WIN32_WINNT >= 0x0602)
3226 
3227 _Success_(return > 0)
3228 WINBASEAPI
3229 DWORD
3230 WINAPI
3231 GetFirmwareEnvironmentVariableExW(
3232     _In_ LPCWSTR lpName,
3233     _In_ LPCWSTR lpGuid,
3234     _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
3235     _In_ DWORD nSize,
3236     _Out_opt_ PDWORD pdwAttribubutes);
3237 
3238 _Success_(return > 0)
3239 WINBASEAPI
3240 DWORD
3241 WINAPI
3242 GetFirmwareEnvironmentVariableExA(
3243     _In_ LPCSTR lpName,
3244     _In_ LPCSTR lpGuid,
3245     _Out_writes_bytes_to_opt_(nSize, return) PVOID pBuffer,
3246     _In_ DWORD nSize,
3247     _Out_opt_ PDWORD pdwAttribubutes);
3248 
3249 #ifdef UNICODE
3250 #define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExW
3251 #else
3252 #define GetFirmwareEnvironmentVariableEx GetFirmwareEnvironmentVariableExA
3253 #endif
3254 
3255 WINBASEAPI
3256 BOOL
3257 WINAPI
3258 SetFirmwareEnvironmentVariableExW(
3259     _In_ LPCWSTR lpName,
3260     _In_ LPCWSTR lpGuid,
3261     _In_reads_bytes_opt_(nSize) PVOID pValue,
3262     _In_ DWORD nSize,
3263     _In_ DWORD dwAttributes);
3264 
3265 WINBASEAPI
3266 BOOL
3267 WINAPI
3268 SetFirmwareEnvironmentVariableExA(
3269     _In_ LPCSTR lpName,
3270     _In_ LPCSTR lpGuid,
3271     _In_reads_bytes_opt_(nSize) PVOID pValue,
3272     _In_ DWORD nSize,
3273     _In_ DWORD dwAttributes);
3274 
3275 #ifdef UNICODE
3276 #define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExW
3277 #else
3278 #define SetFirmwareEnvironmentVariableEx SetFirmwareEnvironmentVariableExA
3279 #endif
3280 
3281 _Success_(return)
3282 WINBASEAPI
3283 BOOL
3284 WINAPI
3285 GetFirmwareType(
3286     _Out_ PFIRMWARE_TYPE FirmwareType);
3287 
3288 #endif /* _WIN32_WINNT >= 0x0602 */
3289 
3290 UINT WINAPI SetHandleCount(UINT);
3291 BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
3292 
3293 BOOL
3294 WINAPI
3295 SetInformationJobObject(
3296   _In_ HANDLE hJob,
3297   _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
3298   _In_reads_bytes_(cbJobObjectInformationLength) LPVOID lpJobObjectInformation,
3299   _In_ DWORD cbJobObjectInformationLength);
3300 
3301 BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
3302 void WINAPI SetLastError(DWORD);
3303 void WINAPI SetLastErrorEx(DWORD,DWORD);
3304 BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
3305 BOOL WINAPI SetMailslotInfo(_In_ HANDLE, _In_ DWORD);
3306 BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD);
3307 BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
3308 BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE);
3309 BOOL WINAPI SetProcessAffinityMask(_In_ HANDLE, _In_ DWORD_PTR);
3310 BOOL WINAPI SetProcessPriorityBoost(_In_ HANDLE, _In_ BOOL);
3311 BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
3312 BOOL WINAPI SetProcessWorkingSetSize(_In_ HANDLE, _In_ SIZE_T, _In_ SIZE_T);
3313 #if (_WIN32_WINNT >= 0x0600)
3314 VOID WINAPI SetSecurityAccessMask(SECURITY_INFORMATION,LPDWORD);
3315 #endif
3316 BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
3317 BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
3318 BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
3319 BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
3320 DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR,PUCHAR);
3321 BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
3322 BOOL WINAPI SetStdHandle(_In_ DWORD, _In_ HANDLE);
3323 #define SetSwapAreaSize(w) (w)
3324 BOOL WINAPI SetSystemPowerState(_In_ BOOL, _In_ BOOL);
3325 BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
3326 BOOL WINAPI SetSystemTimeAdjustment(_In_ DWORD, _In_ BOOL);
3327 DWORD WINAPI SetTapeParameters(_In_ HANDLE, _In_ DWORD, _In_ PVOID);
3328 DWORD WINAPI SetTapePosition(_In_ HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ BOOL);
3329 DWORD_PTR WINAPI SetThreadAffinityMask(_In_ HANDLE, _In_ DWORD_PTR);
3330 BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT*);
3331 DWORD WINAPI SetThreadIdealProcessor(_In_ HANDLE, _In_ DWORD);
3332 BOOL WINAPI SetThreadPriority(HANDLE,int);
3333 BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
3334 BOOL WINAPI SetThreadToken (PHANDLE,HANDLE);
3335 BOOL WINAPI SetTimeZoneInformation(const TIME_ZONE_INFORMATION *);
3336 BOOL WINAPI SetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD);
3337 LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER);
3338 BOOL WINAPI SetupComm(_In_ HANDLE, _In_ DWORD, _In_ DWORD);
3339 BOOL WINAPI SetVolumeLabelA(_In_opt_ LPCSTR, _In_opt_ LPCSTR);
3340 BOOL WINAPI SetVolumeLabelW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
3341 #if (_WIN32_WINNT >= 0x0500)
3342 BOOL WINAPI SetVolumeMountPointA(_In_ LPCSTR, _In_ LPCSTR);
3343 BOOL WINAPI SetVolumeMountPointW(_In_ LPCWSTR, _In_ LPCWSTR);
3344 #endif
3345 BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,PVOID,BOOL);
3346 DWORD WINAPI SignalObjectAndWait(_In_ HANDLE, _In_ HANDLE, _In_ DWORD, _In_ BOOL);
3347 DWORD WINAPI SizeofResource(HINSTANCE,HRSRC);
3348 WINBASEAPI void WINAPI Sleep(DWORD);
3349 #if (_WIN32_WINNT >= 0x0600)
3350 BOOL WINAPI SleepConditionVariableCS(PCONDITION_VARIABLE,PCRITICAL_SECTION,DWORD);
3351 BOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE,PSRWLOCK,DWORD,ULONG);
3352 #endif
3353 DWORD WINAPI SleepEx(DWORD,BOOL);
3354 DWORD WINAPI SuspendThread(HANDLE);
3355 void WINAPI SwitchToFiber(_In_ PVOID);
3356 BOOL WINAPI SwitchToThread(void);
3357 BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
3358 BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION*,CONST SYSTEMTIME*,LPSYSTEMTIME);
3359 BOOL WINAPI TerminateProcess(HANDLE hProcess, UINT uExitCode);
3360 BOOL WINAPI TerminateThread(HANDLE hThread,DWORD dwExitCode);
3361 DWORD WINAPI TlsAlloc(VOID);
3362 BOOL WINAPI TlsFree(DWORD);
3363 PVOID WINAPI TlsGetValue(DWORD);
3364 BOOL WINAPI TlsSetValue(DWORD,PVOID);
3365 BOOL WINAPI TransactNamedPipe(HANDLE,PVOID,DWORD,PVOID,DWORD,PDWORD,LPOVERLAPPED);
3366 BOOL WINAPI TransmitCommChar(_In_ HANDLE, _In_ char);
3367 BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION);
3368 BOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
3369 LONG WINAPI UnhandledExceptionFilter(LPEXCEPTION_POINTERS);
3370 BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
3371 BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
3372 #define UnlockResource(handle) ((handle), 0)
3373 #define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) /* Obsolete: Has no effect. */
3374 BOOL WINAPI UnmapViewOfFile(LPCVOID);
3375 #if (_WIN32_WINNT >= 0x0500)
3376 _Must_inspect_result_ BOOL WINAPI UnregisterWait(_In_ HANDLE);
3377 BOOL WINAPI UnregisterWaitEx(HANDLE,HANDLE);
3378 #endif
3379 
3380 BOOL
3381 WINAPI
3382 UpdateResourceA(
3383   _In_ HANDLE hUpdate,
3384   _In_ LPCSTR lpType,
3385   _In_ LPCSTR lpName,
3386   _In_ WORD wLanguage,
3387   _In_reads_bytes_opt_(cb) LPVOID lpData,
3388   _In_ DWORD cb);
3389 
3390 BOOL
3391 WINAPI
3392 UpdateResourceW(
3393   _In_ HANDLE hUpdate,
3394   _In_ LPCWSTR lpType,
3395   _In_ LPCWSTR lpName,
3396   _In_ WORD wLanguage,
3397   _In_reads_bytes_opt_(cb) LPVOID lpData,
3398   _In_ DWORD cb);
3399 
3400 BOOL WINAPI VerifyVersionInfoA(_Inout_ LPOSVERSIONINFOEXA, _In_ DWORD, _In_ DWORDLONG);
3401 BOOL WINAPI VerifyVersionInfoW(_Inout_ LPOSVERSIONINFOEXW, _In_ DWORD, _In_ DWORDLONG);
3402 PVOID WINAPI VirtualAlloc(PVOID,SIZE_T,DWORD,DWORD);
3403 PVOID WINAPI VirtualAllocEx(HANDLE,PVOID,SIZE_T,DWORD,DWORD);
3404 BOOL WINAPI VirtualFree(PVOID,SIZE_T,DWORD);
3405 BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,SIZE_T,DWORD);
3406 BOOL WINAPI VirtualLock(PVOID,SIZE_T);
3407 BOOL WINAPI VirtualProtect(PVOID,SIZE_T,DWORD,PDWORD);
3408 BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,SIZE_T,DWORD,PDWORD);
3409 SIZE_T WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
3410 SIZE_T WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
3411 BOOL WINAPI VirtualUnlock(PVOID,SIZE_T);
3412 BOOL WINAPI WaitCommEvent(_In_ HANDLE, _Inout_ PDWORD, _Inout_opt_ LPOVERLAPPED);
3413 BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
3414 
3415 DWORD
3416 WINAPI
3417 WaitForMultipleObjects(
3418   _In_ DWORD nCount,
3419   _In_reads_(nCount) CONST HANDLE *lpHandles,
3420   _In_ BOOL bWaitAll,
3421   _In_ DWORD dwMilliseconds);
3422 
3423 DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
3424 DWORD WINAPI WaitForSingleObject(_In_ HANDLE hHandle, _In_ DWORD dwMilliseconds);
3425 DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
3426 BOOL WINAPI WaitNamedPipeA(_In_ LPCSTR, _In_ DWORD);
3427 BOOL WINAPI WaitNamedPipeW(_In_ LPCWSTR, _In_ DWORD);
3428 #if (_WIN32_WINNT >= 0x0600)
3429 VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE);
3430 VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE);
3431 #endif
3432 BOOL WINAPI WinLoadTrustProvider(GUID*);
3433 BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
3434 BOOLEAN WINAPI Wow64EnableWow64FsRedirection(_In_ BOOLEAN);
3435 BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
3436 DWORD WINAPI WriteEncryptedFileRaw(_In_ PFE_IMPORT_FUNC, _In_opt_ PVOID, _In_ PVOID);
3437 BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
3438 BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
3439 BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
3440 BOOL WINAPI WritePrivateProfileSectionA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR);
3441 BOOL WINAPI WritePrivateProfileSectionW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
3442 BOOL WINAPI WritePrivateProfileStringA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR);
3443 BOOL WINAPI WritePrivateProfileStringW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
3444 
3445 BOOL
3446 WINAPI
3447 WritePrivateProfileStructA(
3448   _In_ LPCSTR lpszSection,
3449   _In_ LPCSTR lpszKey,
3450   _In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
3451   _In_ UINT uSizeStruct,
3452   _In_opt_ LPCSTR szFile);
3453 
3454 BOOL
3455 WINAPI
3456 WritePrivateProfileStructW(
3457   _In_ LPCWSTR lpszSection,
3458   _In_ LPCWSTR lpszKey,
3459   _In_reads_bytes_opt_(uSizeStruct) LPVOID lpStruct,
3460   _In_ UINT uSizeStruct,
3461   _In_opt_ LPCWSTR szFile);
3462 
3463 BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,SIZE_T,SIZE_T*);
3464 BOOL WINAPI WriteProfileSectionA(_In_ LPCSTR, _In_ LPCSTR);
3465 BOOL WINAPI WriteProfileSectionW(_In_ LPCWSTR, _In_ LPCWSTR);
3466 BOOL WINAPI WriteProfileStringA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR);
3467 BOOL WINAPI WriteProfileStringW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
3468 DWORD WINAPI WriteTapemark(_In_ HANDLE, _In_ DWORD, _In_ DWORD, _In_ BOOL);
3469 
3470 #define Yield()
3471 
3472 #if (_WIN32_WINNT >= 0x0501)
3473 DWORD WINAPI WTSGetActiveConsoleSessionId(VOID);
3474 BOOL WINAPI ZombifyActCtx(_Inout_ HANDLE);
3475 #endif
3476 
3477 #if (_WIN32_WINNT >= 0x0500)
3478 
3479 BOOL
3480 WINAPI
3481 AllocateUserPhysicalPages(
3482   _In_ HANDLE hProcess,
3483   _Inout_ PULONG_PTR NumberOfPages,
3484   _Out_writes_to_(*NumberOfPages, *NumberOfPages) PULONG_PTR PageArray);
3485 
3486 BOOL
3487 WINAPI
3488 FreeUserPhysicalPages(
3489   _In_ HANDLE hProcess,
3490   _Inout_ PULONG_PTR NumberOfPages,
3491   _In_reads_(*NumberOfPages) PULONG_PTR PageArray);
3492 
3493 BOOL
3494 WINAPI
3495 MapUserPhysicalPages(
3496   _In_ PVOID VirtualAddress,
3497   _In_ ULONG_PTR NumberOfPages,
3498   _In_reads_opt_(NumberOfPages) PULONG_PTR PageArray);
3499 
3500 BOOL
3501 WINAPI
3502 MapUserPhysicalPagesScatter(
3503   _In_reads_(NumberOfPages) PVOID *VirtualAddresses,
3504   _In_ ULONG_PTR NumberOfPages,
3505   _In_reads_opt_(NumberOfPages) PULONG_PTR PageArray);
3506 
3507 #endif
3508 
3509 #ifdef UNICODE
3510 typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO;
3511 typedef WIN32_FIND_DATAW WIN32_FIND_DATA, *PWIN32_FIND_DATA, *LPWIN32_FIND_DATA;
3512 typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
3513 typedef ENUMRESLANGPROCW ENUMRESLANGPROC;
3514 typedef ENUMRESNAMEPROCW ENUMRESNAMEPROC;
3515 typedef ENUMRESTYPEPROCW ENUMRESTYPEPROC;
3516 #if (_WIN32_WINNT >= 0x0501)
3517 typedef ACTCTXW ACTCTX,*PACTCTX;
3518 typedef PCACTCTXW PCACTCTX;
3519 #endif
3520 #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
3521 #define AddAtom AddAtomW
3522 #define BackupEventLog BackupEventLogW
3523 #define BeginUpdateResource BeginUpdateResourceW
3524 #define BuildCommDCB BuildCommDCBW
3525 #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
3526 #define CallNamedPipe CallNamedPipeW
3527 #if (_WIN32_WINNT >= 0x0501)
3528 #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
3529 #endif
3530 #define ClearEventLog ClearEventLogW
3531 #define CommConfigDialog CommConfigDialogW
3532 #define CopyFile CopyFileW
3533 #define CopyFileEx CopyFileExW
3534 #if (_WIN32_WINNT >= 0x0501)
3535 #define CreateActCtx CreateActCtxW
3536 #endif
3537 #define CreateDirectory CreateDirectoryW
3538 #define CreateDirectoryEx CreateDirectoryExW
3539 #define CreateEvent CreateEventW
3540 #define CreateFile CreateFileW
3541 #define CreateFileMapping CreateFileMappingW
3542 #if (_WIN32_WINNT >= 0x0500)
3543 #define CreateHardLink CreateHardLinkW
3544 #define CreateJobObject CreateJobObjectW
3545 #endif
3546 #define CreateMailslot CreateMailslotW
3547 #define CreateMutex CreateMutexW
3548 #define CreateNamedPipe CreateNamedPipeW
3549 #define CreateProcess CreateProcessW
3550 #define CreateProcessAsUser CreateProcessAsUserW
3551 #define CreateSemaphore CreateSemaphoreW
3552 #define CreateWaitableTimer CreateWaitableTimerW
3553 #define DecryptFile DecryptFileW
3554 #define DefineDosDevice DefineDosDeviceW
3555 #define DeleteFile DeleteFileW
3556 #if (_WIN32_WINNT >= 0x0500)
3557 #define DeleteVolumeMountPoint DeleteVolumeMountPointW
3558 #define DnsHostnameToComputerName DnsHostnameToComputerNameW
3559 #endif
3560 #define EncryptFile EncryptFileW
3561 #define EndUpdateResource EndUpdateResourceW
3562 #define EnumResourceLanguages EnumResourceLanguagesW
3563 #define EnumResourceNames EnumResourceNamesW
3564 #define EnumResourceTypes EnumResourceTypesW
3565 #define ExpandEnvironmentStrings ExpandEnvironmentStringsW
3566 #define FatalAppExit FatalAppExitW
3567 #define FileEncryptionStatus FileEncryptionStatusW
3568 #if (_WIN32_WINNT >= 0x0501)
3569 #define FindActCtxSectionString FindActCtxSectionStringW
3570 #endif
3571 #define FindAtom FindAtomW
3572 #define FindFirstChangeNotification FindFirstChangeNotificationW
3573 #define FindFirstFile FindFirstFileW
3574 #define FindFirstFileEx FindFirstFileExW
3575 #if (_WIN32_WINNT >= 0x0500)
3576 #define FindFirstVolume FindFirstVolumeW
3577 #define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
3578 #endif
3579 #define FindNextFile FindNextFileW
3580 #if (_WIN32_WINNT >= 0x0500)
3581 #define FindNextVolume FindNextVolumeW
3582 #define FindNextVolumeMountPoint  FindNextVolumeMountPointW
3583 #endif
3584 #define FindResource FindResourceW
3585 #define FindResourceEx FindResourceExW
3586 #define FormatMessage FormatMessageW
3587 #define FreeEnvironmentStrings FreeEnvironmentStringsW
3588 #define GetAtomName GetAtomNameW
3589 #define GetBinaryType GetBinaryTypeW
3590 #define GetCommandLine GetCommandLineW
3591 #define GetCompressedFileSize GetCompressedFileSizeW
3592 #define GetComputerName GetComputerNameW
3593 #if (_WIN32_WINNT >= 0x0500)
3594 #define GetComputerNameEx GetComputerNameExW
3595 #endif
3596 #define GetCurrentDirectory GetCurrentDirectoryW
3597 #define GetDefaultCommConfig GetDefaultCommConfigW
3598 #define GetDiskFreeSpace GetDiskFreeSpaceW
3599 #define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
3600 #if (_WIN32_WINNT >= 0x0502)
3601 #define GetDllDirectory GetDllDirectoryW
3602 #endif
3603 #define GetDriveType GetDriveTypeW
3604 #define GetEnvironmentStrings GetEnvironmentStringsW
3605 #define GetEnvironmentVariable GetEnvironmentVariableW
3606 #define GetFileAttributes GetFileAttributesW
3607 #define GetFileAttributesEx GetFileAttributesExW
3608 #define GetFileSecurity GetFileSecurityW
3609 #if (_WIN32_WINNT >= 0x0600)
3610 #define GetFinalPathNameByHandle GetFinalPathNameByHandleW
3611 #endif
3612 #define GetFullPathName GetFullPathNameW
3613 #define GetLogicalDriveStrings GetLogicalDriveStringsW
3614 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
3615 #define GetLongPathName GetLongPathNameW
3616 #endif
3617 #define GetModuleFileName GetModuleFileNameW
3618 #define GetModuleHandle GetModuleHandleW
3619 #if (_WIN32_WINNT >= 0x0500)
3620 #define GetModuleHandleEx GetModuleHandleExW
3621 #endif
3622 #define GetNamedPipeHandleState GetNamedPipeHandleStateW
3623 #define GetPrivateProfileInt GetPrivateProfileIntW
3624 #define GetPrivateProfileSection GetPrivateProfileSectionW
3625 #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
3626 #define GetPrivateProfileString GetPrivateProfileStringW
3627 #define GetPrivateProfileStruct GetPrivateProfileStructW
3628 #define GetProfileInt GetProfileIntW
3629 #define GetProfileSection GetProfileSectionW
3630 #define GetProfileString GetProfileStringW
3631 #define GetShortPathName GetShortPathNameW
3632 #define GetStartupInfo GetStartupInfoW
3633 #define GetSystemDirectory GetSystemDirectoryW
3634 #if (_WIN32_WINNT >= 0x0500)
3635 #define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
3636 #endif
3637 #if (_WIN32_WINNT >= 0x0501)
3638 #define GetSystemWow64Directory GetSystemWow64DirectoryW
3639 #endif
3640 #define GetTempFileName GetTempFileNameW
3641 #define GetTempPath GetTempPathW
3642 #define GetUserName GetUserNameW
3643 #define GetVersionEx GetVersionExW
3644 #define GetVolumeInformation GetVolumeInformationW
3645 #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
3646 #define GetVolumePathName GetVolumePathNameW
3647 #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
3648 #define GetWindowsDirectory GetWindowsDirectoryW
3649 #define GlobalAddAtom GlobalAddAtomW
3650 #define GlobalFindAtom GlobalFindAtomW
3651 #define GlobalGetAtomName GlobalGetAtomNameW
3652 #define IsBadStringPtr IsBadStringPtrW
3653 #define LoadLibrary LoadLibraryW
3654 #define LoadLibraryEx LoadLibraryExW
3655 #define LogonUser LogonUserW
3656 #define LogonUserEx LogonUserExW
3657 #define LookupAccountName LookupAccountNameW
3658 #define LookupAccountSid LookupAccountSidW
3659 #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
3660 #define LookupPrivilegeName LookupPrivilegeNameW
3661 #define LookupPrivilegeValue LookupPrivilegeValueW
3662 #define lstrcat lstrcatW
3663 #define lstrcmp lstrcmpW
3664 #define lstrcmpi lstrcmpiW
3665 #define lstrcpy lstrcpyW
3666 #define lstrcpyn lstrcpynW
3667 #define lstrlen lstrlenW
3668 #define MoveFile MoveFileW
3669 #define MoveFileEx MoveFileExW
3670 #define MoveFileWithProgress MoveFileWithProgressW
3671 #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
3672 #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
3673 #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
3674 #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
3675 #define OpenBackupEventLog OpenBackupEventLogW
3676 #define OpenEvent OpenEventW
3677 #define OpenEventLog OpenEventLogW
3678 #define OpenFileMapping OpenFileMappingW
3679 #define OpenMutex OpenMutexW
3680 #define OpenSemaphore OpenSemaphoreW
3681 #define OutputDebugString OutputDebugStringW
3682 #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
3683 #define QueryDosDevice QueryDosDeviceW
3684 #define ReadEventLog ReadEventLogW
3685 #define RegisterEventSource RegisterEventSourceW
3686 #define RemoveDirectory RemoveDirectoryW
3687 #if (_WIN32_WINNT >= 0x0500)
3688 #define ReplaceFile ReplaceFileW
3689 #endif
3690 #define ReportEvent ReportEventW
3691 #define SearchPath SearchPathW
3692 #define SetComputerName SetComputerNameW
3693 #define SetComputerNameEx SetComputerNameExW
3694 #define SetCurrentDirectory SetCurrentDirectoryW
3695 #define SetDefaultCommConfig SetDefaultCommConfigW
3696 #if (_WIN32_WINNT >= 0x0502)
3697 #define SetDllDirectory SetDllDirectoryW
3698 #endif
3699 #define SetEnvironmentVariable SetEnvironmentVariableW
3700 #define SetFileAttributes SetFileAttributesW
3701 #define SetFileSecurity SetFileSecurityW
3702 #if (_WIN32_WINNT >= 0x0501)
3703 #define SetFileShortName SetFileShortNameW
3704 #endif
3705 #if (_WIN32_WINNT >= 0x0502)
3706 #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
3707 #endif
3708 #define SetVolumeLabel SetVolumeLabelW
3709 #define SetVolumeMountPoint SetVolumeMountPointW
3710 #define UpdateResource UpdateResourceW
3711 #define VerifyVersionInfo VerifyVersionInfoW
3712 #define WaitNamedPipe WaitNamedPipeW
3713 #define WritePrivateProfileSection WritePrivateProfileSectionW
3714 #define WritePrivateProfileString WritePrivateProfileStringW
3715 #define WritePrivateProfileStruct WritePrivateProfileStructW
3716 #define WriteProfileSection WriteProfileSectionW
3717 #define WriteProfileString WriteProfileStringW
3718 #else
3719 typedef STARTUPINFOA STARTUPINFO,*LPSTARTUPINFO;
3720 typedef WIN32_FIND_DATAA WIN32_FIND_DATA, *PWIN32_FIND_DATA, *LPWIN32_FIND_DATA;
3721 typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
3722 #if (_WIN32_WINNT >= 0x0501)
3723 typedef ACTCTXA ACTCTX,*PACTCTX;
3724 typedef PCACTCTXA PCACTCTX;
3725 #endif
3726 typedef ENUMRESLANGPROCA ENUMRESLANGPROC;
3727 typedef ENUMRESNAMEPROCA ENUMRESNAMEPROC;
3728 typedef ENUMRESTYPEPROCA ENUMRESTYPEPROC;
3729 #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
3730 #define AddAtom AddAtomA
3731 #define BackupEventLog BackupEventLogA
3732 #define BeginUpdateResource BeginUpdateResourceA
3733 #define BuildCommDCB BuildCommDCBA
3734 #define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
3735 #define CallNamedPipe CallNamedPipeA
3736 #if (_WIN32_WINNT >= 0x0501)
3737 #define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
3738 #endif
3739 #define ClearEventLog ClearEventLogA
3740 #define CommConfigDialog CommConfigDialogA
3741 #define CopyFile CopyFileA
3742 #define CopyFileEx CopyFileExA
3743 #if (_WIN32_WINNT >= 0x0501)
3744 #define CreateActCtx CreateActCtxA
3745 #endif
3746 #define CreateDirectory CreateDirectoryA
3747 #define CreateDirectoryEx CreateDirectoryExA
3748 #define CreateEvent CreateEventA
3749 #define CreateFile CreateFileA
3750 #define CreateFileMapping CreateFileMappingA
3751 #if (_WIN32_WINNT >= 0x0500)
3752 #define CreateHardLink CreateHardLinkA
3753 #define CreateJobObject CreateJobObjectA
3754 #endif
3755 #define CreateMailslot CreateMailslotA
3756 #define CreateMutex CreateMutexA
3757 #define CreateNamedPipe CreateNamedPipeA
3758 #define CreateProcess CreateProcessA
3759 #define CreateProcessAsUser CreateProcessAsUserA
3760 #define CreateSemaphore CreateSemaphoreA
3761 #define CreateWaitableTimer CreateWaitableTimerA
3762 #define DecryptFile DecryptFileA
3763 #define DefineDosDevice DefineDosDeviceA
3764 #define DeleteFile DeleteFileA
3765 #if (_WIN32_WINNT >= 0x0500)
3766 #define DeleteVolumeMountPoint DeleteVolumeMountPointA
3767 #define DnsHostnameToComputerName DnsHostnameToComputerNameA
3768 #endif
3769 #define EncryptFile EncryptFileA
3770 #define EndUpdateResource EndUpdateResourceA
3771 #define EnumResourceLanguages EnumResourceLanguagesA
3772 #define EnumResourceNames EnumResourceNamesA
3773 #define EnumResourceTypes EnumResourceTypesA
3774 #define ExpandEnvironmentStrings ExpandEnvironmentStringsA
3775 #define FatalAppExit FatalAppExitA
3776 #define FileEncryptionStatus FileEncryptionStatusA
3777 #if (_WIN32_WINNT >= 0x0501)
3778 #define FindActCtxSectionString FindActCtxSectionStringA
3779 #endif
3780 #define FindAtom FindAtomA
3781 #define FindFirstChangeNotification FindFirstChangeNotificationA
3782 #define FindFirstFile FindFirstFileA
3783 #define FindFirstFileEx FindFirstFileExA
3784 #if (_WIN32_WINNT >= 0x0500)
3785 #define FindFirstVolume FindFirstVolumeA
3786 #define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
3787 #endif
3788 #define FindNextFile FindNextFileA
3789 #if (_WIN32_WINNT >= 0x0500)
3790 #define FindNextVolume FindNextVolumeA
3791 #define FindNextVolumeMountPoint FindNextVolumeMountPointA
3792 #endif
3793 #define FindResource FindResourceA
3794 #define FindResourceEx FindResourceExA
3795 #define FormatMessage FormatMessageA
3796 #define FreeEnvironmentStrings FreeEnvironmentStringsA
3797 #define GetAtomName GetAtomNameA
3798 #define GetBinaryType GetBinaryTypeA
3799 #define GetCommandLine GetCommandLineA
3800 #define GetComputerName GetComputerNameA
3801 #if (_WIN32_WINNT >= 0x0500)
3802 #define GetComputerNameEx GetComputerNameExA
3803 #endif
3804 #define GetCompressedFileSize GetCompressedFileSizeA
3805 #define GetCurrentDirectory GetCurrentDirectoryA
3806 #define GetDefaultCommConfig GetDefaultCommConfigA
3807 #define GetDiskFreeSpace GetDiskFreeSpaceA
3808 #define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
3809 #if (_WIN32_WINNT >= 0x0502)
3810 #define GetDllDirectory GetDllDirectoryA
3811 #endif
3812 #define GetDriveType GetDriveTypeA
3813 #define GetEnvironmentStringsA GetEnvironmentStrings
3814 #define GetEnvironmentVariable GetEnvironmentVariableA
3815 #define GetFileAttributes GetFileAttributesA
3816 #define GetFileAttributesEx GetFileAttributesExA
3817 #define GetFileSecurity GetFileSecurityA
3818 #if (_WIN32_WINNT >= 0x0600)
3819 #define GetFinalPathNameByHandle GetFinalPathNameByHandleA
3820 #endif
3821 #define GetFullPathName GetFullPathNameA
3822 #define GetLogicalDriveStrings GetLogicalDriveStringsA
3823 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
3824 #define GetLongPathName GetLongPathNameA
3825 #endif
3826 #define GetNamedPipeHandleState GetNamedPipeHandleStateA
3827 #define GetModuleHandle GetModuleHandleA
3828 #if (_WIN32_WINNT >= 0x0500)
3829 #define GetModuleHandleEx GetModuleHandleExA
3830 #endif
3831 #define GetModuleFileName GetModuleFileNameA
3832 #define GetPrivateProfileInt GetPrivateProfileIntA
3833 #define GetPrivateProfileSection GetPrivateProfileSectionA
3834 #define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
3835 #define GetPrivateProfileString GetPrivateProfileStringA
3836 #define GetPrivateProfileStruct GetPrivateProfileStructA
3837 #define GetProfileInt GetProfileIntA
3838 #define GetProfileSection GetProfileSectionA
3839 #define GetProfileString GetProfileStringA
3840 #define GetShortPathName GetShortPathNameA
3841 #define GetStartupInfo GetStartupInfoA
3842 #define GetSystemDirectory GetSystemDirectoryA
3843 #if (_WIN32_WINNT >= 0x0500)
3844 #define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
3845 #endif
3846 #if (_WIN32_WINNT >= 0x0501)
3847 #define GetSystemWow64Directory GetSystemWow64DirectoryA
3848 #endif
3849 #define GetTempFileName GetTempFileNameA
3850 #define GetTempPath GetTempPathA
3851 #define GetUserName GetUserNameA
3852 #define GetVersionEx GetVersionExA
3853 #define GetVolumeInformation GetVolumeInformationA
3854 #define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
3855 #define GetVolumePathName GetVolumePathNameA
3856 #define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
3857 #define GetWindowsDirectory GetWindowsDirectoryA
3858 #define GlobalAddAtom GlobalAddAtomA
3859 #define GlobalFindAtom GlobalFindAtomA
3860 #define GlobalGetAtomName GlobalGetAtomNameA
3861 #define IsBadStringPtr IsBadStringPtrA
3862 #define LoadLibrary LoadLibraryA
3863 #define LoadLibraryEx LoadLibraryExA
3864 #define LogonUser LogonUserA
3865 #define LogonUserEx LogonUserExA
3866 #define LookupAccountName LookupAccountNameA
3867 #define LookupAccountSid LookupAccountSidA
3868 #define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
3869 #define LookupPrivilegeName LookupPrivilegeNameA
3870 #define LookupPrivilegeValue LookupPrivilegeValueA
3871 #define lstrcat lstrcatA
3872 #define lstrcmp lstrcmpA
3873 #define lstrcmpi lstrcmpiA
3874 #define lstrcpy lstrcpyA
3875 #define lstrcpyn lstrcpynA
3876 #define lstrlen lstrlenA
3877 #define MoveFile MoveFileA
3878 #define MoveFileEx MoveFileExA
3879 #define MoveFileWithProgress MoveFileWithProgressA
3880 #define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
3881 #define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
3882 #define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
3883 #define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
3884 #define OpenBackupEventLog OpenBackupEventLogA
3885 #define OpenEvent OpenEventA
3886 #define OpenEventLog OpenEventLogA
3887 #define OpenFileMapping OpenFileMappingA
3888 #define OpenMutex OpenMutexA
3889 #define OpenSemaphore OpenSemaphoreA
3890 #define OutputDebugString OutputDebugStringA
3891 #define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
3892 #define QueryDosDevice QueryDosDeviceA
3893 #define ReadEventLog ReadEventLogA
3894 #define RegisterEventSource RegisterEventSourceA
3895 #define RemoveDirectory RemoveDirectoryA
3896 #if (_WIN32_WINNT >= 0x0500)
3897 #define ReplaceFile ReplaceFileA
3898 #endif
3899 #define ReportEvent ReportEventA
3900 #define SearchPath SearchPathA
3901 #define SetComputerName SetComputerNameA
3902 #define SetComputerNameEx SetComputerNameExA
3903 #define SetCurrentDirectory SetCurrentDirectoryA
3904 #define SetDefaultCommConfig SetDefaultCommConfigA
3905 #if (_WIN32_WINNT >= 0x0502)
3906 #define SetDllDirectory SetDllDirectoryA
3907 #endif
3908 #define SetEnvironmentVariable SetEnvironmentVariableA
3909 #define SetFileAttributes SetFileAttributesA
3910 #define SetFileSecurity SetFileSecurityA
3911 #if (_WIN32_WINNT >= 0x0501)
3912 #define SetFileShortName SetFileShortNameA
3913 #endif
3914 #if (_WIN32_WINNT >= 0x0502)
3915 #define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
3916 #endif
3917 #define SetVolumeLabel SetVolumeLabelA
3918 #define SetVolumeMountPoint SetVolumeMountPointA
3919 #define UpdateResource UpdateResourceA
3920 #define VerifyVersionInfo VerifyVersionInfoA
3921 #define WaitNamedPipe WaitNamedPipeA
3922 #define WritePrivateProfileSection WritePrivateProfileSectionA
3923 #define WritePrivateProfileString WritePrivateProfileStringA
3924 #define WritePrivateProfileStruct WritePrivateProfileStructA
3925 #define WriteProfileSection WriteProfileSectionA
3926 #define WriteProfileString WriteProfileStringA
3927 #endif
3928 #endif
3929 
3930 /* one-time initialisation API */
3931 typedef RTL_RUN_ONCE INIT_ONCE;
3932 typedef PRTL_RUN_ONCE PINIT_ONCE;
3933 typedef PRTL_RUN_ONCE LPINIT_ONCE;
3934 
3935 #define INIT_ONCE_CHECK_ONLY RTL_RUN_ONCE_CHECK_ONLY
3936 #define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC
3937 #define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED
3938 
3939 #define INIT_ONCE_CTX_RESERVED_BITS RTL_RUN_ONCE_CTX_RESERVED_BITS
3940 
3941 typedef BOOL
3942 (WINAPI *PINIT_ONCE_FN)(
3943   _Inout_ PINIT_ONCE InitOnce,
3944   _Inout_opt_ PVOID Parameter,
3945   _Outptr_opt_result_maybenull_ PVOID *Context);
3946 
3947 #if _WIN32_WINNT >= 0x0601
3948 
3949 #define COPYFILE2_MESSAGE_COPY_OFFLOAD 0x00000001L
3950 
3951 typedef enum _COPYFILE2_MESSAGE_TYPE {
3952   COPYFILE2_CALLBACK_NONE = 0,
3953   COPYFILE2_CALLBACK_CHUNK_STARTED,
3954   COPYFILE2_CALLBACK_CHUNK_FINISHED,
3955   COPYFILE2_CALLBACK_STREAM_STARTED,
3956   COPYFILE2_CALLBACK_STREAM_FINISHED,
3957   COPYFILE2_CALLBACK_POLL_CONTINUE,
3958   COPYFILE2_CALLBACK_ERROR,
3959   COPYFILE2_CALLBACK_MAX,
3960 } COPYFILE2_MESSAGE_TYPE;
3961 
3962 typedef enum _COPYFILE2_MESSAGE_ACTION {
3963   COPYFILE2_PROGRESS_CONTINUE = 0,
3964   COPYFILE2_PROGRESS_CANCEL,
3965   COPYFILE2_PROGRESS_STOP,
3966   COPYFILE2_PROGRESS_QUIET,
3967   COPYFILE2_PROGRESS_PAUSE,
3968 } COPYFILE2_MESSAGE_ACTION;
3969 
3970 typedef enum _COPYFILE2_COPY_PHASE {
3971   COPYFILE2_PHASE_NONE = 0,
3972   COPYFILE2_PHASE_PREPARE_SOURCE,
3973   COPYFILE2_PHASE_PREPARE_DEST,
3974   COPYFILE2_PHASE_READ_SOURCE,
3975   COPYFILE2_PHASE_WRITE_DESTINATION,
3976   COPYFILE2_PHASE_SERVER_COPY,
3977   COPYFILE2_PHASE_NAMEGRAFT_COPY,
3978   COPYFILE2_PHASE_MAX,
3979 } COPYFILE2_COPY_PHASE;
3980 
3981 typedef struct COPYFILE2_MESSAGE {
3982   COPYFILE2_MESSAGE_TYPE Type;
3983   DWORD dwPadding;
3984   union {
3985     struct {
3986       DWORD dwStreamNumber;
3987       DWORD dwReserved;
3988       HANDLE hSourceFile;
3989       HANDLE hDestinationFile;
3990       ULARGE_INTEGER uliChunkNumber;
3991       ULARGE_INTEGER uliChunkSize;
3992       ULARGE_INTEGER uliStreamSize;
3993       ULARGE_INTEGER uliTotalFileSize;
3994     } ChunkStarted;
3995     struct {
3996       DWORD dwStreamNumber;
3997       DWORD dwFlags;
3998       HANDLE hSourceFile;
3999       HANDLE hDestinationFile;
4000       ULARGE_INTEGER uliChunkNumber;
4001       ULARGE_INTEGER uliChunkSize;
4002       ULARGE_INTEGER uliStreamSize;
4003       ULARGE_INTEGER uliStreamBytesTransferred;
4004       ULARGE_INTEGER uliTotalFileSize;
4005       ULARGE_INTEGER uliTotalBytesTransferred;
4006     } ChunkFinished;
4007     struct {
4008       DWORD dwStreamNumber;
4009       DWORD dwReserved;
4010       HANDLE hSourceFile;
4011       HANDLE hDestinationFile;
4012       ULARGE_INTEGER uliStreamSize;
4013       ULARGE_INTEGER uliTotalFileSize;
4014     } StreamStarted;
4015     struct {
4016       DWORD dwStreamNumber;
4017       DWORD dwReserved;
4018       HANDLE hSourceFile;
4019       HANDLE hDestinationFile;
4020       ULARGE_INTEGER uliStreamSize;
4021       ULARGE_INTEGER uliStreamBytesTransferred;
4022       ULARGE_INTEGER uliTotalFileSize;
4023       ULARGE_INTEGER uliTotalBytesTransferred;
4024     } StreamFinished;
4025     struct {
4026       DWORD dwReserved;
4027     } PollContinue;
4028     struct {
4029       COPYFILE2_COPY_PHASE CopyPhase;
4030       DWORD dwStreamNumber;
4031       HRESULT hrFailure;
4032       DWORD dwReserved;
4033       ULARGE_INTEGER uliChunkNumber;
4034       ULARGE_INTEGER uliStreamSize;
4035       ULARGE_INTEGER uliStreamBytesTransferred;
4036       ULARGE_INTEGER uliTotalFileSize;
4037       ULARGE_INTEGER uliTotalBytesTransferred;
4038     } Error;
4039   } Info;
4040 } COPYFILE2_MESSAGE;
4041 
4042 typedef COPYFILE2_MESSAGE_ACTION
4043 (CALLBACK *PCOPYFILE2_PROGRESS_ROUTINE)(
4044   _In_ const COPYFILE2_MESSAGE *pMessage,
4045   _In_opt_ PVOID pvCallbackContext);
4046 
4047 typedef struct COPYFILE2_EXTENDED_PARAMETERS {
4048   DWORD dwSize;
4049   DWORD dwCopyFlags;
4050   BOOL *pfCancel;
4051   PCOPYFILE2_PROGRESS_ROUTINE pProgressRoutine;
4052   PVOID pvCallbackContext;
4053 } COPYFILE2_EXTENDED_PARAMETERS;
4054 
4055 WINBASEAPI
4056 HRESULT
4057 WINAPI
4058 CopyFile2(
4059   _In_ PCWSTR pwszExistingFileName,
4060   _In_ PCWSTR pwszNewFileName,
4061   _In_opt_ COPYFILE2_EXTENDED_PARAMETERS *pExtendedParameters);
4062 
4063 #endif /* _WIN32_WINNT >= 0x0601 */
4064 
4065 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA)
4066 
4067 WINBASEAPI
4068 VOID
4069 WINAPI
4070 InitOnceInitialize(
4071     _Out_ PINIT_ONCE InitOnce);
4072 
4073 WINBASEAPI
4074 BOOL
4075 WINAPI
4076 InitOnceBeginInitialize(
4077     _Inout_ LPINIT_ONCE lpInitOnce,
4078     _In_ DWORD dwFlags,
4079     _Out_ PBOOL fPending,
4080     _Outptr_opt_result_maybenull_ LPVOID *lpContext);
4081 
4082 WINBASEAPI
4083 BOOL
4084 WINAPI
4085 InitOnceComplete(
4086     _Inout_ LPINIT_ONCE lpInitOnce,
4087     _In_ DWORD dwFlags,
4088     _In_opt_ LPVOID lpContext);
4089 
4090 #endif /* (_WIN32_WINNT >= _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) */
4091 
4092 WINBASEAPI
4093 BOOL
4094 WINAPI
4095 InitOnceExecuteOnce(
4096     _Inout_ PINIT_ONCE InitOnce,
4097     _In_ __callback PINIT_ONCE_FN InitFn,
4098     _Inout_opt_ PVOID Parameter,
4099     _Outptr_opt_result_maybenull_ LPVOID *Context);
4100 
4101 
4102 #if defined(_SLIST_HEADER_) && !defined(_NTOS_) && !defined(_NTOSP_)
4103 
4104 WINBASEAPI
4105 VOID
4106 WINAPI
4107 InitializeSListHead(
4108   _Out_ PSLIST_HEADER ListHead);
4109 
4110 WINBASEAPI
4111 PSLIST_ENTRY
4112 WINAPI
4113 InterlockedPopEntrySList(
4114   _Inout_ PSLIST_HEADER ListHead);
4115 
4116 WINBASEAPI
4117 PSLIST_ENTRY
4118 WINAPI
4119 InterlockedPushEntrySList(
4120   _Inout_ PSLIST_HEADER ListHead,
4121   _Inout_ PSLIST_ENTRY ListEntry);
4122 
4123 WINBASEAPI
4124 PSLIST_ENTRY
4125 WINAPI
4126 InterlockedFlushSList(
4127   _Inout_ PSLIST_HEADER ListHead);
4128 
4129 WINBASEAPI
4130 USHORT
4131 WINAPI
4132 QueryDepthSList(
4133   _In_ PSLIST_HEADER ListHead);
4134 
4135 #endif /* _SLIST_HEADER_ */
4136 
4137 #ifdef __WINESRC__
4138 /* Wine specific. Basically MultiByteToWideChar for us. */
4139 WCHAR * CDECL wine_get_dos_file_name(LPCSTR str);
4140 #endif
4141 
4142 #ifdef _MSC_VER
4143 #pragma warning(pop)
4144 #endif
4145 
4146 #ifdef __cplusplus
4147 }
4148 #endif
4149 #endif /* _WINBASE_H */
4150