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