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