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