ReactOS  0.4.12-dev-721-g03c3dd5
winbase.h
Go to the documentation of this file.
1 #ifndef _WINBASE_
2 #define _WINBASE_
3 
4 #if !defined(_KERNEL32_)
5 #define WINBASEAPI DECLSPEC_IMPORT
6 #else
7 #define WINBASEAPI
8 #endif
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include <libloaderapi.h>
15 
16 #ifdef _MSC_VER
17 #pragma warning(push)
18 #pragma warning(disable:4201)
19 #pragma warning(disable:4214)
20 #pragma warning(disable:4820)
21 #endif
22 
23 #define PROCESS_NAME_NATIVE 1
24 
25 #define FILE_ENCRYPTABLE 0
26 #define FILE_IS_ENCRYPTED 1
27 #define FILE_SYSTEM_ATTR 2
28 #define FILE_ROOT_DIR 3
29 #define FILE_SYSTEM_DIR 4
30 #define FILE_UNKNOWN 5
31 #define FILE_SYSTEM_NOT_SUPPORT 6
32 #define FILE_USER_DISALLOWED 7
33 #define FILE_READ_ONLY 8
34 #define FILE_DIR_DISALLOWED 9
35 
36 #define COMMPROP_INITIALIZED 0xE73CF52E
37 #define SP_SERIALCOMM 1
38 #define PST_UNSPECIFIED 0
39 #define PST_RS232 1
40 #define PST_PARALLELPORT 2
41 #define PST_RS422 3
42 #define PST_RS423 4
43 #define PST_RS449 5
44 #define PST_MODEM 6
45 #define PST_FAX 0x21
46 #define PST_SCANNER 0x22
47 #define PST_NETWORK_BRIDGE 0x100
48 #define PST_LAT 0x101
49 #define PST_TCPIP_TELNET 0x102
50 #define PST_X25 0x103
51 #define BAUD_075 1
52 #define BAUD_110 2
53 #define BAUD_134_5 4
54 #define BAUD_150 8
55 #define BAUD_300 16
56 #define BAUD_600 32
57 #define BAUD_1200 64
58 #define BAUD_1800 128
59 #define BAUD_2400 256
60 #define BAUD_4800 512
61 #define BAUD_7200 1024
62 #define BAUD_9600 2048
63 #define BAUD_14400 4096
64 #define BAUD_19200 8192
65 #define BAUD_38400 16384
66 #define BAUD_56K 32768
67 #define BAUD_128K 65536
68 #define BAUD_115200 131072
69 #define BAUD_57600 262144
70 #define BAUD_USER 0x10000000
71 #define PCF_DTRDSR 1
72 #define PCF_RTSCTS 2
73 #define PCF_RLSD 4
74 #define PCF_PARITY_CHECK 8
75 #define PCF_XONXOFF 16
76 #define PCF_SETXCHAR 32
77 #define PCF_TOTALTIMEOUTS 64
78 #define PCF_INTTIMEOUTS 128
79 #define PCF_SPECIALCHARS 256
80 #define PCF_16BITMODE 512
81 #define SP_PARITY 1
82 #define SP_BAUD 2
83 #define SP_DATABITS 4
84 #define SP_STOPBITS 8
85 #define SP_HANDSHAKING 16
86 #define SP_PARITY_CHECK 32
87 #define SP_RLSD 64
88 #define DATABITS_5 1
89 #define DATABITS_6 2
90 #define DATABITS_7 4
91 #define DATABITS_8 8
92 #define DATABITS_16 16
93 #define DATABITS_16X 32
94 #define STOPBITS_10 1
95 #define STOPBITS_15 2
96 #define STOPBITS_20 4
97 #define PARITY_NONE 256
98 #define PARITY_ODD 512
99 #define PARITY_EVEN 1024
100 #define PARITY_MARK 2048
101 #define PARITY_SPACE 4096
102 #define EXCEPTION_DEBUG_EVENT 1
103 #define CREATE_THREAD_DEBUG_EVENT 2
104 #define CREATE_PROCESS_DEBUG_EVENT 3
105 #define EXIT_THREAD_DEBUG_EVENT 4
106 #define EXIT_PROCESS_DEBUG_EVENT 5
107 #define LOAD_DLL_DEBUG_EVENT 6
108 #define UNLOAD_DLL_DEBUG_EVENT 7
109 #define OUTPUT_DEBUG_STRING_EVENT 8
110 #define RIP_EVENT 9
111 #define HFILE_ERROR ((HFILE)-1)
112 #define FILE_BEGIN 0
113 #define FILE_CURRENT 1
114 #define FILE_END 2
115 #define INVALID_SET_FILE_POINTER ((DWORD)-1)
116 #define OF_READ 0
117 #define OF_READWRITE 2
118 #define OF_WRITE 1
119 #define OF_SHARE_COMPAT 0
120 #define OF_SHARE_DENY_NONE 64
121 #define OF_SHARE_DENY_READ 48
122 #define OF_SHARE_DENY_WRITE 32
123 #define OF_SHARE_EXCLUSIVE 16
124 #define OF_CANCEL 2048
125 #define OF_CREATE 4096
126 #define OF_DELETE 512
127 #define OF_EXIST 16384
128 #define OF_PARSE 256
129 #define OF_PROMPT 8192
130 #define OF_REOPEN 32768
131 #define OF_VERIFY 1024
132 #define NMPWAIT_NOWAIT 1
133 #define NMPWAIT_WAIT_FOREVER ((DWORD)-1)
134 #define NMPWAIT_USE_DEFAULT_WAIT 0
135 #define CE_BREAK 16
136 #define CE_DNS 2048
137 #define CE_FRAME 8
138 #define CE_IOE 1024
139 #define CE_MODE 32768
140 #define CE_OOP 4096
141 #define CE_OVERRUN 2
142 #define CE_PTO 512
143 #define CE_RXOVER 1
144 #define CE_RXPARITY 4
145 #define CE_TXFULL 256
146 #define PROGRESS_CONTINUE 0
147 #define PROGRESS_CANCEL 1
148 #define PROGRESS_STOP 2
149 #define PROGRESS_QUIET 3
150 #define CALLBACK_CHUNK_FINISHED 0
151 #define CALLBACK_STREAM_SWITCH 1
152 #define OFS_MAXPATHNAME 128
153 #define FILE_MAP_COPY SECTION_QUERY
154 #define FILE_MAP_WRITE SECTION_MAP_WRITE
155 #define FILE_MAP_READ SECTION_MAP_READ
156 #define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
157 #define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT
158 #define MUTEX_ALL_ACCESS 0x1f0001
159 #define MUTEX_MODIFY_STATE 1
160 #define SEMAPHORE_ALL_ACCESS 0x1f0003
161 #define SEMAPHORE_MODIFY_STATE 2
162 #define EVENT_ALL_ACCESS 0x1f0003
163 #define EVENT_MODIFY_STATE 2
164 #define PIPE_ACCESS_DUPLEX 3
165 #define PIPE_ACCESS_INBOUND 1
166 #define PIPE_ACCESS_OUTBOUND 2
167 #define PIPE_TYPE_BYTE 0
168 #define PIPE_TYPE_MESSAGE 4
169 #define PIPE_READMODE_BYTE 0
170 #define PIPE_READMODE_MESSAGE 2
171 #define PIPE_WAIT 0
172 #define PIPE_NOWAIT 1
173 #define PIPE_CLIENT_END 0
174 #define PIPE_SERVER_END 1
175 #define PIPE_UNLIMITED_INSTANCES 255
176 #define DEBUG_PROCESS 0x00000001
177 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
178 #define CREATE_SUSPENDED 0x00000004
179 #define DETACHED_PROCESS 0x00000008
180 #define CREATE_NEW_CONSOLE 0x00000010
181 #define NORMAL_PRIORITY_CLASS 0x00000020
182 #define IDLE_PRIORITY_CLASS 0x00000040
183 #define HIGH_PRIORITY_CLASS 0x00000080
184 #define REALTIME_PRIORITY_CLASS 0x00000100
185 #define CREATE_NEW_PROCESS_GROUP 0x00000200
186 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
187 #define CREATE_SEPARATE_WOW_VDM 0x00000800
188 #define CREATE_SHARED_WOW_VDM 0x00001000
189 #define CREATE_FORCEDOS 0x00002000
190 #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
191 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
192 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000
193 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
194 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
195 #define CREATE_NO_WINDOW 0x08000000
196 #define PROFILE_USER 0x10000000
197 #define PROFILE_KERNEL 0x20000000
198 #define PROFILE_SERVER 0x40000000
199 #define CREATE_NEW 1
200 #define CREATE_ALWAYS 2
201 #define OPEN_EXISTING 3
202 #define OPEN_ALWAYS 4
203 #define TRUNCATE_EXISTING 5
204 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
205 #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
206 #define COPY_FILE_RESTARTABLE 0x00000002
207 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
208 #define FILE_FLAG_WRITE_THROUGH 0x80000000
209 #define FILE_FLAG_OVERLAPPED 1073741824
210 #define FILE_FLAG_NO_BUFFERING 536870912
211 #define FILE_FLAG_RANDOM_ACCESS 268435456
212 #define FILE_FLAG_SEQUENTIAL_SCAN 134217728
213 #define FILE_FLAG_DELETE_ON_CLOSE 67108864
214 #define FILE_FLAG_BACKUP_SEMANTICS 33554432
215 #define FILE_FLAG_POSIX_SEMANTICS 16777216
216 #define FILE_FLAG_OPEN_REPARSE_POINT 2097152
217 #define FILE_FLAG_OPEN_NO_RECALL 1048576
218 #if (_WIN32_WINNT >= 0x0500)
219 #define FILE_FLAG_FIRST_PIPE_INSTANCE 524288
220 #endif
221 #define CLRDTR 6
222 #define CLRRTS 4
223 #define SETDTR 5
224 #define SETRTS 3
225 #define SETXOFF 1
226 #define SETXON 2
227 #define RESETDEV 7
228 #define SETBREAK 8
229 #define CLRBREAK 9
230 #define STILL_ACTIVE 0x103
231 #define FIND_FIRST_EX_CASE_SENSITIVE 1
232 #define FIND_FIRST_EX_LARGE_FETCH 2
233 #define SCS_32BIT_BINARY 0
234 #define SCS_64BIT_BINARY 6
235 #define SCS_DOS_BINARY 1
236 #define SCS_OS216_BINARY 5
237 #define SCS_PIF_BINARY 3
238 #define SCS_POSIX_BINARY 4
239 #define SCS_WOW_BINARY 2
240 #define MAX_COMPUTERNAME_LENGTH 15
241 #define HW_PROFILE_GUIDLEN 39
242 #define MAX_PROFILE_LEN 80
243 #define DOCKINFO_UNDOCKED 1
244 #define DOCKINFO_DOCKED 2
245 #define DOCKINFO_USER_SUPPLIED 4
246 #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_UNDOCKED)
247 #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_DOCKED)
248 #define DRIVE_REMOVABLE 2
249 #define DRIVE_FIXED 3
250 #define DRIVE_REMOTE 4
251 #define DRIVE_CDROM 5
252 #define DRIVE_RAMDISK 6
253 #define DRIVE_UNKNOWN 0
254 #define DRIVE_NO_ROOT_DIR 1
255 #define FILE_TYPE_UNKNOWN 0
256 #define FILE_TYPE_DISK 1
257 #define FILE_TYPE_CHAR 2
258 #define FILE_TYPE_PIPE 3
259 #define FILE_TYPE_REMOTE 0x8000
260 /* also in ddk/ntapi.h */
261 #define HANDLE_FLAG_INHERIT 0x01
262 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
263 /* end ntapi.h */
264 #define STD_INPUT_HANDLE (DWORD)(0xfffffff6)
265 #define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5)
266 #define STD_ERROR_HANDLE (DWORD)(0xfffffff4)
267 #define INVALID_HANDLE_VALUE (HANDLE)(-1)
268 #define GET_TAPE_MEDIA_INFORMATION 0
269 #define GET_TAPE_DRIVE_INFORMATION 1
270 #define SET_TAPE_MEDIA_INFORMATION 0
271 #define SET_TAPE_DRIVE_INFORMATION 1
272 #define THREAD_PRIORITY_ABOVE_NORMAL 1
273 #define THREAD_PRIORITY_BELOW_NORMAL (-1)
274 #define THREAD_PRIORITY_HIGHEST 2
275 #define THREAD_PRIORITY_IDLE (-15)
276 #define THREAD_PRIORITY_LOWEST (-2)
277 #define THREAD_PRIORITY_NORMAL 0
278 #define THREAD_PRIORITY_TIME_CRITICAL 15
279 #define THREAD_PRIORITY_ERROR_RETURN 2147483647
280 #define TIME_ZONE_ID_UNKNOWN 0
281 #define TIME_ZONE_ID_STANDARD 1
282 #define TIME_ZONE_ID_DAYLIGHT 2
283 #define TIME_ZONE_ID_INVALID 0xFFFFFFFF
284 #define FS_CASE_IS_PRESERVED 2
285 #define FS_CASE_SENSITIVE 1
286 #define FS_UNICODE_STORED_ON_DISK 4
287 #define FS_PERSISTENT_ACLS 8
288 #define FS_FILE_COMPRESSION 16
289 #define FS_VOL_IS_COMPRESSED 32768
290 #define GMEM_FIXED 0
291 #define GMEM_MOVEABLE 2
292 #define GMEM_MODIFY 128
293 #define GPTR 64
294 #define GHND 66
295 #define GMEM_DDESHARE 8192
296 #define GMEM_DISCARDABLE 256
297 #define GMEM_LOWER 4096
298 #define GMEM_NOCOMPACT 16
299 #define GMEM_NODISCARD 32
300 #define GMEM_NOT_BANKED 4096
301 #define GMEM_NOTIFY 16384
302 #define GMEM_SHARE 8192
303 #define GMEM_ZEROINIT 64
304 #define GMEM_DISCARDED 16384
305 #define GMEM_INVALID_HANDLE 32768
306 #define GMEM_LOCKCOUNT 255
307 #define GMEM_VALID_FLAGS 32626
308 #define EXCEPTION_ACCESS_VIOLATION ((DWORD)0xC0000005)
309 #define EXCEPTION_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
310 #define EXCEPTION_BREAKPOINT ((DWORD)0x80000003)
311 #define EXCEPTION_SINGLE_STEP ((DWORD)0x80000004)
312 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C)
313 #define EXCEPTION_FLT_DENORMAL_OPERAND ((DWORD)0xC000008D)
314 #define EXCEPTION_FLT_DIVIDE_BY_ZERO ((DWORD)0xC000008E)
315 #define EXCEPTION_FLT_INEXACT_RESULT ((DWORD)0xC000008F)
316 #define EXCEPTION_FLT_INVALID_OPERATION ((DWORD)0xC0000090)
317 #define EXCEPTION_FLT_OVERFLOW ((DWORD)0xC0000091)
318 #define EXCEPTION_FLT_STACK_CHECK ((DWORD)0xC0000092)
319 #define EXCEPTION_FLT_UNDERFLOW ((DWORD)0xC0000093)
320 #define EXCEPTION_INT_DIVIDE_BY_ZERO ((DWORD)0xC0000094)
321 #define EXCEPTION_INT_OVERFLOW ((DWORD)0xC0000095)
322 #define EXCEPTION_PRIV_INSTRUCTION ((DWORD)0xC0000096)
323 #define EXCEPTION_IN_PAGE_ERROR ((DWORD)0xC0000006)
324 #define EXCEPTION_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
325 #define EXCEPTION_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
326 #define EXCEPTION_STACK_OVERFLOW ((DWORD)0xC00000FD)
327 #define EXCEPTION_INVALID_DISPOSITION ((DWORD)0xC0000026)
328 #define EXCEPTION_GUARD_PAGE ((DWORD)0x80000001)
329 #define EXCEPTION_INVALID_HANDLE ((DWORD)0xC0000008L)
330 #define CONTROL_C_EXIT ((DWORD)0xC000013A)
331 #define PROCESS_HEAP_REGION 1
332 #define PROCESS_HEAP_UNCOMMITTED_RANGE 2
333 #define PROCESS_HEAP_ENTRY_BUSY 4
334 #define PROCESS_HEAP_ENTRY_MOVEABLE 16
335 #define PROCESS_HEAP_ENTRY_DDESHARE 32
336 
337 #define DONT_RESOLVE_DLL_REFERENCES 1
338 #define LOAD_LIBRARY_AS_DATAFILE 2
339 #define LOAD_WITH_ALTERED_SEARCH_PATH 8
340 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 16
341 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 32
342 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 64
343 #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 256
344 #define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 512
345 #define LOAD_LIBRARY_SEARCH_USER_DIRS 1024
346 #define LOAD_LIBRARY_SEARCH_SYSTEM32 2048
347 #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 4096
348 
349 #define LMEM_FIXED 0
350 #define LMEM_MOVEABLE 2
351 #define LMEM_NONZEROLHND 2
352 #define LMEM_NONZEROLPTR 0
353 #define LMEM_DISCARDABLE 3840
354 #define LMEM_NOCOMPACT 16
355 #define LMEM_NODISCARD 32
356 #define LMEM_ZEROINIT 64
357 #define LMEM_DISCARDED 16384
358 #define LMEM_MODIFY 128
359 #define LMEM_INVALID_HANDLE 32768
360 #define LMEM_LOCKCOUNT 255
361 #define LMEM_VALID_FLAGS 0x0F72
362 #define LPTR 64
363 #define LHND 66
364 #define NONZEROLHND 2
365 #define NONZEROLPTR 0
366 #define LOCKFILE_FAIL_IMMEDIATELY 1
367 #define LOCKFILE_EXCLUSIVE_LOCK 2
368 #define LOGON32_PROVIDER_DEFAULT 0
369 #define LOGON32_PROVIDER_WINNT35 1
370 #define LOGON32_PROVIDER_WINNT40 2
371 #define LOGON32_PROVIDER_WINNT50 3
372 #define LOGON32_LOGON_INTERACTIVE 2
373 #define LOGON32_LOGON_NETWORK 3
374 #define LOGON32_LOGON_BATCH 4
375 #define LOGON32_LOGON_SERVICE 5
376 #define LOGON32_LOGON_UNLOCK 7
377 #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
378 #define LOGON32_LOGON_NEW_CREDENTIALS 9
379 #define MOVEFILE_REPLACE_EXISTING 1
380 #define MOVEFILE_COPY_ALLOWED 2
381 #define MOVEFILE_DELAY_UNTIL_REBOOT 4
382 #define MOVEFILE_WRITE_THROUGH 8
383 #define MOVEFILE_CREATE_HARDLINK 16
384 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 32
385 #define MAXIMUM_WAIT_OBJECTS 64
386 #define MAXIMUM_SUSPEND_COUNT 0x7F
387 #define WAIT_OBJECT_0 0
388 #define WAIT_ABANDONED_0 128
389 #ifndef WAIT_TIMEOUT /* also in winerror.h */
390 #define WAIT_TIMEOUT 258
391 #endif
392 #define WAIT_IO_COMPLETION 0xC0
393 #define WAIT_ABANDONED 128
394 #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
395 #define PURGE_TXABORT 1
396 #define PURGE_RXABORT 2
397 #define PURGE_TXCLEAR 4
398 #define PURGE_RXCLEAR 8
399 
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 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x00001
589 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
590 #define BASE_SEARCH_PATH_PERMANENT 0x08000
591 #define BASE_SEARCH_PATH_INVALID_FLAGS (~0x18001)
592 
593 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
594 
595 #if (_WIN32_WINNT >= 0x0600)
596 #define PROCESS_DEP_ENABLE 0x00000001
597 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
598 #endif
599 
600 #ifndef RC_INVOKED
601 
602 #ifndef _FILETIME_
603 #define _FILETIME_
604 typedef struct _FILETIME {
608 #endif
609 
622 
623 typedef struct _DCB {
646  char XonChar;
647  char XoffChar;
648  char ErrorChar;
649  char EofChar;
650  char EvtChar;
652 } DCB,*LPDCB;
653 
654 typedef struct _COMM_CONFIG {
664 
665 typedef struct _COMMPROP {
685 
686 typedef struct _COMMTIMEOUTS {
693 
694 typedef struct _COMSTAT {
705 } COMSTAT,*LPCOMSTAT;
706 
708 
721 
727 
728 typedef struct _EXCEPTION_DEBUG_INFO {
732 
733 typedef struct _EXIT_THREAD_DEBUG_INFO {
736 
737 typedef struct _EXIT_PROCESS_DEBUG_INFO {
740 
741 typedef struct _LOAD_DLL_DEBUG_INFO {
749 
750 typedef struct _UNLOAD_DLL_DEBUG_INFO {
753 
759 
760 typedef struct _RIP_INFO {
764 
765 typedef struct _DEBUG_EVENT {
769  union {
779  } u;
781 
782 typedef struct _OVERLAPPED {
785  union {
786  struct {
789  } DUMMYSTRUCTNAME;
791  } DUMMYUNIONNAME;
794 
795 typedef struct _STARTUPINFOA {
815 
816 typedef struct _STARTUPINFOW {
836 
837 typedef struct _PROCESS_INFORMATION {
843 
844 typedef struct _CRITICAL_SECTION_DEBUG {
851 //#ifdef __WINESRC__ //not all wine code is marked so
852  DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */
853 //#else
854  //WORD SpareWORD;
855 //#endif
857 
858 typedef struct _CRITICAL_SECTION {
866 
867 #ifndef _SYSTEMTIME_
868 #define _SYSTEMTIME_
869 typedef struct _SYSTEMTIME {
879 #endif /* _SYSTEMTIME_ */
880 #if (_WIN32_WINNT >= 0x0500)
882 #endif
891 typedef struct _WIN32_FIND_DATAA {
903 typedef struct _WIN32_FIND_DATAW {
915 
916 #if (_WIN32_WINNT >= 0x0501)
917 typedef enum _STREAM_INFO_LEVELS {
918  FindStreamInfoStandard
919 } STREAM_INFO_LEVELS;
920 
921 typedef struct _WIN32_FIND_STREAM_DATA {
922  LARGE_INTEGER StreamSize;
923  WCHAR cStreamName[MAX_PATH + 36];
924 } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
925 #endif
926 
927 typedef struct _WIN32_STREAM_ID {
934 
935 #if (_WIN32_WINNT >= 0x0600)
936 
937 typedef enum _FILE_ID_TYPE {
938  FileIdType,
939  ObjectIdType,
940  ExtendedFileIdType,
941  MaximumFileIdType
942 } FILE_ID_TYPE, *PFILE_ID_TYPE;
943 
944 typedef struct _FILE_ID_DESCRIPTOR {
945  DWORD dwSize;
946  FILE_ID_TYPE Type;
947  union {
948  LARGE_INTEGER FileId;
949  GUID ObjectId;
950  } DUMMYUNIONNAME;
951 } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
952 
953 typedef enum _FILE_INFO_BY_HANDLE_CLASS {
954  FileBasicInfo,
955  FileStandardInfo,
956  FileNameInfo,
957  FileRenameInfo,
958  FileDispositionInfo,
959  FileAllocationInfo,
960  FileEndOfFileInfo,
961  FileStreamInfo,
962  FileCompressionInfo,
963  FileAttributeTagInfo,
964  FileIdBothDirectoryInfo,
965  FileIdBothDirectoryRestartInfo,
966  FileIoPriorityHintInfo,
967  FileRemoteProtocolInfo,
968  FileFullDirectoryInfo,
969  FileFullDirectoryRestartInfo,
970  FileStorageInfo,
971  FileAlignmentInfo,
972  FileIdInfo,
973  FileIdExtdDirectoryInfo,
974  FileIdExtdDirectoryRestartInfo,
975  MaximumFileInfoByHandlesClass
976 } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
977 
978 typedef struct _FILE_ID_BOTH_DIR_INFO {
979  DWORD NextEntryOffset;
980  DWORD FileIndex;
981  LARGE_INTEGER CreationTime;
982  LARGE_INTEGER LastAccessTime;
983  LARGE_INTEGER LastWriteTime;
984  LARGE_INTEGER ChangeTime;
985  LARGE_INTEGER EndOfFile;
989  DWORD EaSize;
990  CCHAR ShortNameLength;
991  WCHAR ShortName[12];
992  LARGE_INTEGER FileId;
993  WCHAR FileName[1];
994 } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
995 
996 typedef struct _FILE_BASIC_INFO {
997  LARGE_INTEGER CreationTime;
998  LARGE_INTEGER LastAccessTime;
999  LARGE_INTEGER LastWriteTime;
1000  LARGE_INTEGER ChangeTime;
1002 } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
1003 
1004 typedef struct _FILE_STANDARD_INFO {
1006  LARGE_INTEGER EndOfFile;
1007  DWORD NumberOfLinks;
1008  BOOLEAN DeletePending;
1010 } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
1011 
1012 typedef struct _FILE_NAME_INFO {
1014  WCHAR FileName[1];
1015 } FILE_NAME_INFO, *PFILE_NAME_INFO;
1016 
1017 typedef enum _PRIORITY_HINT {
1018  IoPriorityHintVeryLow,
1019  IoPriorityHintLow,
1020  IoPriorityHintNormal,
1021  MaximumIoPriorityHintType
1022 } PRIORITY_HINT;
1023 
1024 typedef struct _FILE_IO_PRIORITY_HINT_INFO {
1025  PRIORITY_HINT PriorityHint;
1026 } FILE_IO_PRIORITY_HINT_INFO;
1027 
1028 typedef struct _FILE_ALLOCATION_INFO {
1030 } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
1031 
1032 typedef struct _FILE_DISPOSITION_INFO {
1034 } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
1035 
1036 typedef struct _FILE_END_OF_FILE_INFO {
1037  LARGE_INTEGER EndOfFile;
1038 } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
1039 
1040 typedef struct _FILE_RENAME_INFO {
1041  BOOLEAN ReplaceIfExists;
1044  WCHAR FileName[1];
1045 } FILE_RENAME_INFO, *PFILE_RENAME_INFO;
1046 
1047 typedef struct _FILE_ATTRIBUTE_TAG_INFO {
1049  DWORD ReparseTag;
1050 } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
1051 
1052 typedef struct _FILE_COMPRESSION_INFO {
1053  LARGE_INTEGER CompressedFileSize;
1054  WORD CompressionFormat;
1055  UCHAR CompressionUnitShift;
1056  UCHAR ChunkShift;
1057  UCHAR ClusterShift;
1058  UCHAR Reserved[3];
1059 } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
1060 
1061 typedef struct _FILE_REMOTE_PROTOCOL_INFO {
1062  USHORT StructureVersion;
1063  USHORT StructureSize;
1064  ULONG Protocol;
1065  USHORT ProtocolMajorVersion;
1066  USHORT ProtocolMinorVersion;
1067  USHORT ProtocolRevision;
1068  USHORT Reserved;
1069  ULONG Flags;
1070  struct {
1071  ULONG Reserved[8];
1072  } GenericReserved;
1073  struct {
1074  ULONG Reserved[16];
1075  } ProtocolSpecificReserved;
1076 } FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
1077 
1078 #endif
1079 
1080 typedef enum _FINDEX_INFO_LEVELS {
1085 
1086 typedef enum _FINDEX_SEARCH_OPS {
1092 
1093 typedef struct tagHW_PROFILE_INFOA {
1098 
1099 typedef struct tagHW_PROFILE_INFOW {
1104 
1105 /* Event Logging */
1106 
1107 #define EVENTLOG_FULL_INFO 0
1108 
1112 
1117 
1118 typedef struct _SYSTEM_INFO {
1119  _ANONYMOUS_UNION union {
1121  _ANONYMOUS_STRUCT struct {
1124  } DUMMYSTRUCTNAME;
1125  } DUMMYUNIONNAME;
1136 
1137 typedef struct _SYSTEM_POWER_STATUS {
1145 
1157 
1158 typedef struct _TIME_ZONE_INFORMATION {
1167 
1168 typedef struct _MEMORYSTATUS {
1178 
1179 #if (_WIN32_WINNT >= 0x0500)
1180 typedef struct _MEMORYSTATUSEX {
1181  DWORD dwLength;
1182  DWORD dwMemoryLoad;
1183  DWORDLONG ullTotalPhys;
1184  DWORDLONG ullAvailPhys;
1185  DWORDLONG ullTotalPageFile;
1186  DWORDLONG ullAvailPageFile;
1187  DWORDLONG ullTotalVirtual;
1188  DWORDLONG ullAvailVirtual;
1189  DWORDLONG ullAvailExtendedVirtual;
1190 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
1191 #endif
1192 
1193 #ifndef _LDT_ENTRY_DEFINED
1194 #define _LDT_ENTRY_DEFINED
1195 typedef struct _LDT_ENTRY {
1196  WORD LimitLow;
1197  WORD BaseLow;
1198  union {
1199  struct {
1200  BYTE BaseMid;
1201  BYTE Flags1;
1202  BYTE Flags2;
1203  BYTE BaseHi;
1204  } Bytes;
1205  struct {
1206  DWORD BaseMid:8;
1207  DWORD Type:5;
1208  DWORD Dpl:2;
1209  DWORD Pres:1;
1210  DWORD LimitHi:4;
1211  DWORD Sys:1;
1212  DWORD Reserved_0:1;
1213  DWORD Default_Big:1;
1214  DWORD Granularity:1;
1215  DWORD BaseHi:8;
1216  } Bits;
1217  } HighWord;
1219 #endif
1220 
1221 typedef struct _PROCESS_HEAP_ENTRY {
1227  _ANONYMOUS_UNION union {
1228  struct {
1231  } Block;
1232  struct {
1237  } Region;
1238  } DUMMYUNIONNAME;
1240 
1241 typedef struct _OFSTRUCT {
1249 
1250 #if (_WIN32_WINNT >= 0x0501)
1251 typedef struct tagACTCTXA {
1252  ULONG cbSize;
1253  DWORD dwFlags;
1254  LPCSTR lpSource;
1255  USHORT wProcessorArchitecture;
1256  LANGID wLangId;
1257  LPCSTR lpAssemblyDirectory;
1258  LPCSTR lpResourceName;
1259  LPCSTR lpApplicationName;
1260  HMODULE hModule;
1261 } ACTCTXA,*PACTCTXA;
1262 typedef const ACTCTXA *PCACTCTXA;
1263 
1264 typedef struct tagACTCTXW {
1265  ULONG cbSize;
1266  DWORD dwFlags;
1267  LPCWSTR lpSource;
1268  USHORT wProcessorArchitecture;
1269  LANGID wLangId;
1270  LPCWSTR lpAssemblyDirectory;
1271  LPCWSTR lpResourceName;
1272  LPCWSTR lpApplicationName;
1273  HMODULE hModule;
1274 } ACTCTXW,*PACTCTXW;
1275 typedef const ACTCTXW *PCACTCTXW;
1276 
1277 typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
1278  ULONG cbSize;
1279  ULONG ulDataFormatVersion;
1280  PVOID lpData;
1281  ULONG ulLength;
1282  PVOID lpSectionGlobalData;
1283  ULONG ulSectionGlobalDataLength;
1284  PVOID lpSectionBase;
1285  ULONG ulSectionTotalLength;
1286  HANDLE hActCtx;
1287  ULONG ulAssemblyRosterIndex;
1288 } ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
1289 typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
1290 
1291 typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
1292  PVOID lpInformation;
1293  PVOID lpSectionBase;
1294  ULONG ulSectionLength;
1295  PVOID lpSectionGlobalDataBase;
1296  ULONG ulSectionGlobalDataLength;
1297 } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1298 typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1299 
1300 typedef struct tagACTCTX_SECTION_KEYED_DATA {
1301  ULONG cbSize;
1302  ULONG ulDataFormatVersion;
1303  PVOID lpData;
1304  ULONG ulLength;
1305  PVOID lpSectionGlobalData;
1306  ULONG ulSectionGlobalDataLength;
1307  PVOID lpSectionBase;
1308  ULONG ulSectionTotalLength;
1309  HANDLE hActCtx;
1310  ULONG ulAssemblyRosterIndex;
1311  /* Non 2600 extra fields */
1312  ULONG ulFlags;
1313  ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
1314 } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
1315 
1316 typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
1317 
1318 typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
1319  HANDLE hActCtx;
1320  DWORD dwFlags;
1321 } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
1322 typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
1323 
1324 typedef BOOL
1325 (WINAPI *PQUERYACTCTXW_FUNC)(
1326  _In_ DWORD dwFlags,
1327  _In_ HANDLE hActCtx,
1328  _In_opt_ PVOID pvSubInstance,
1329  _In_ ULONG ulInfoClass,
1330  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
1331  _In_ SIZE_T cbBuffer,
1332  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
1333 
1334 typedef enum {
1335  LowMemoryResourceNotification ,
1336  HighMemoryResourceNotification
1337 } MEMORY_RESOURCE_NOTIFICATION_TYPE;
1338 #endif /* (_WIN32_WINNT >= 0x0501) */
1339 
1340 #if (_WIN32_WINNT >= 0x0500)
1341 typedef enum _COMPUTER_NAME_FORMAT {
1342  ComputerNameNetBIOS,
1343  ComputerNameDnsHostname,
1344  ComputerNameDnsDomain,
1345  ComputerNameDnsFullyQualified,
1346  ComputerNamePhysicalNetBIOS,
1347  ComputerNamePhysicalDnsHostname,
1348  ComputerNamePhysicalDnsDomain,
1349  ComputerNamePhysicalDnsFullyQualified,
1350  ComputerNameMax
1351 } COMPUTER_NAME_FORMAT;
1352 #endif /* (_WIN32_WINNT >= 0x0500) */
1353 
1354 #if (_WIN32_WINNT >= 0x0600)
1355 typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
1356 typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
1357 #endif
1358 
1360 
1361 #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1362 #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1363 #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1364 #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1365 
1381 
1382 #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1383 #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1384 #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1385 
1386 typedef DWORD
1388  _In_reads_bytes_(ulLength) PBYTE pbData,
1389  _In_opt_ PVOID pvCallbackContext,
1390  _In_ ULONG ulLength);
1391 
1393 
1394 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
1396 
1409 #if (_WIN32_WINNT >= 0x0600)
1410 typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);
1411 #endif
1412 
1413 #ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
1414 #define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
1415 #else
1416 #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
1417 #endif
1418 
1419 typedef DWORD
1421  _Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
1422  _In_opt_ PVOID pvCallbackContext,
1423  _Inout_ PULONG ulLength);
1424 
1425 /* Functions */
1426 #ifndef UNDER_CE
1428 #else
1430 #endif
1432 
1433 long
1434 WINAPI
1435 _hread(
1436  _In_ HFILE hFile,
1437  _Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
1438  _In_ long lBytes);
1439 
1440 long
1441 WINAPI
1442 _hwrite(
1443  _In_ HFILE hFile,
1445  _In_ long lBytes);
1446 
1451 
1452 UINT
1453 WINAPI
1454 _lread(
1455  _In_ HFILE hFile,
1456  _Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
1457  _In_ UINT uBytes);
1458 
1459 UINT
1460 WINAPI
1461 _lwrite(
1462  _In_ HFILE hFile,
1464  _In_ UINT uBytes);
1465 
1467 
1468 BOOL
1469 WINAPI
1471  _In_ LPCSTR SubsystemName,
1472  _In_opt_ LPVOID HandleId,
1478  _In_ BOOL ObjectCreation,
1481  _Out_ LPBOOL pfGenerateOnClose);
1482 
1484 #if (_WIN32_WINNT >= 0x0600)
1487 #endif
1488 #if (_WIN32_WINNT >= 0x0501)
1490 #endif
1493 #if (_WIN32_WINNT >= 0x0500)
1498 #endif
1503 #if (_WIN32_WINNT >= 0x0500)
1505 #endif
1506 #if (_WIN32_WINNT >= 0x0501)
1508 #endif
1509 #if (_WIN32_WINNT >= 0x0500)
1510 _Ret_maybenull_ PVOID WINAPI AddVectoredExceptionHandler(_In_ ULONG, _In_ PVECTORED_EXCEPTION_HANDLER);
1512 #endif
1524 
1525 BOOL
1526 WINAPI
1527 BackupRead(
1528  _In_ HANDLE hFile,
1529  _Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
1530  _In_ DWORD nNumberOfBytesToRead,
1531  _Out_ LPDWORD lpNumberOfBytesRead,
1532  _In_ BOOL bAbort,
1533  _In_ BOOL bProcessSecurity,
1534  _Inout_ LPVOID *lpContext);
1535 
1537 
1538 BOOL
1539 WINAPI
1540 BackupWrite(
1541  _In_ HANDLE hFile,
1544  _Out_ LPDWORD lpNumberOfBytesWritten,
1545  _In_ BOOL bAbort,
1546  _In_ BOOL bProcessSecurity,
1547  _Inout_ LPVOID *lpContext);
1548 
1552 #if (_WIN32_WINNT >= 0x0500)
1554 #endif
1559 
1560 BOOL
1561 WINAPI
1563  _In_ LPCSTR lpNamedPipeName,
1564  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1565  _In_ DWORD nInBufferSize,
1566  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1567  _In_ DWORD nOutBufferSize,
1568  _Out_ LPDWORD lpBytesRead,
1569  _In_ DWORD nTimeOut);
1570 
1571 BOOL
1572 WINAPI
1574  _In_ LPCWSTR lpNamedPipeName,
1575  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1576  _In_ DWORD nInBufferSize,
1577  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1578  _In_ DWORD nOutBufferSize,
1579  _Out_ LPDWORD lpBytesRead,
1580  _In_ DWORD nTimeOut);
1581 
1584 #if (_WIN32_WINNT >= 0x0600)
1585 BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED);
1586 BOOL WINAPI CancelSynchronousIo(HANDLE);
1587 #endif
1589 
1590 #if (_WIN32_WINNT >= 0x0501)
1591 
1592 BOOL
1593 WINAPI
1595  _In_ LPCSTR lpName,
1596  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1597  _In_ DWORD OemNameSize,
1598  _Out_opt_ PBOOL pbNameContainsSpaces,
1599  _Out_ PBOOL pbNameLegal);
1600 
1601 BOOL
1602 WINAPI
1605  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1606  _In_ DWORD OemNameSize,
1607  _Out_opt_ PBOOL pbNameContainsSpaces,
1608  _Out_ PBOOL pbNameLegal);
1609 
1611 #endif
1612 
1624 #if (_WIN32_WINNT >= 0x0400)
1626 #endif
1632 #define MoveMemory RtlMoveMemory
1633 #define CopyMemory RtlCopyMemory
1634 #define FillMemory RtlFillMemory
1635 #define ZeroMemory RtlZeroMemory
1636 #define SecureZeroMemory RtlSecureZeroMemory
1638 #if (_WIN32_WINNT >= 0x0501)
1639 HANDLE WINAPI CreateActCtxA(_In_ PCACTCTXA);
1640 HANDLE WINAPI CreateActCtxW(_In_ PCACTCTXW);
1641 #endif
1648 #if (_WIN32_WINNT >= 0x0600)
1651 #endif
1653 #if (_WIN32_WINNT >= 0x0400)
1655 #endif
1660 #if (_WIN32_WINNT >= 0x0500)
1663 #endif
1665 #if (_WIN32_WINNT >= 0x0500)
1670 #endif
1673 #if (_WIN32_WINNT >= 0x0501)
1674 HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE);
1675 #endif
1678 #if (_WIN32_WINNT >= 0x0600)
1681 #endif
1688 
1689 BOOL
1690 WINAPI
1692  _In_opt_ HANDLE,
1693  _In_opt_ LPCSTR,
1697  _In_ BOOL,
1698  _In_ DWORD,
1699  _In_opt_ PVOID,
1700  _In_opt_ LPCSTR,
1703 
1706 
1707 BOOL
1708 WINAPI
1710  _In_ HANDLE ExistingTokenHandle,
1711  _In_ DWORD Flags,
1712  _In_ DWORD DisableSidCount,
1713  _In_reads_opt_(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
1714  _In_ DWORD DeletePrivilegeCount,
1715  _In_reads_opt_(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete,
1716  _In_ DWORD RestrictedSidCount,
1717  _In_reads_opt_(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
1719 
1722 #if (_WIN32_WINNT >= 0x0600)
1725 #endif
1727 
1728 #if (_WIN32_WINNT >= 0x0500)
1729 
1731 
1732 BOOL
1733 WINAPI
1735  _Outptr_ PHANDLE,
1736  _In_opt_ HANDLE,
1738  _In_opt_ PVOID,
1739  _In_ DWORD,
1740  _In_ DWORD,
1741  _In_ ULONG);
1742 
1744 BOOL
1745 WINAPI
1747  _In_opt_ HANDLE TimerQueue,
1749  _In_ ULONG DueTime,
1750  _In_ ULONG Period);
1751 
1752 #endif /* (_WIN32_WINNT >= 0x0500) */
1753 
1757 #if (_WIN32_WINNT >= 0x0600)
1759 HANDLE WINAPI CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1760 #endif
1761 #if (_WIN32_WINNT >= 0x0501)
1764 #endif
1766 #if (_WIN32_WINNT >= 0x0501)
1768 #endif
1769 void WINAPI DebugBreak(void);
1770 #if (_WIN32_WINNT >= 0x0501)
1773 #endif
1780 #define DefineHandleTable(w) ((w),TRUE)
1787 #if (_WIN32_WINNT >= 0x0500)
1793 #endif
1798 
1799 #if (_WIN32_WINNT >= 0x0500)
1800 
1801 _Success_(return != FALSE)
1802 BOOL
1803 WINAPI
1805  _In_ LPCSTR Hostname,
1806  _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
1808 
1809 _Success_(return != FALSE)
1810 BOOL
1811 WINAPI
1813  _In_ LPCWSTR Hostname,
1814  _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
1816 
1817 #endif
1818 
1853 #if (_WIN32_WINNT >= 0x0501)
1857 #endif
1868 #if (_WIN32_WINNT >= 0x0501)
1870 #endif
1872 
1873 #if (_WIN32_WINNT >= 0x0500)
1874 
1875 HANDLE
1876 WINAPI
1878  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1879  _In_ DWORD cchBufferLength);
1880 
1882 
1883 HANDLE
1884 WINAPI
1886  _In_ LPCSTR lpszRootPathName,
1887  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1888  _In_ DWORD cchBufferLength);
1889 
1890 HANDLE
1891 WINAPI
1893  _In_ LPCWSTR lpszRootPathName,
1894  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1895  _In_ DWORD cchBufferLength);
1896 
1897 #endif
1898 
1902 #if (_WIN32_WINNT >= 0x0501)
1904 #endif
1905 
1906 #if (_WIN32_WINNT >= 0x0500)
1907 
1908 BOOL
1909 WINAPI
1911  _Inout_ HANDLE hFindVolume,
1912  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1913  _In_ DWORD cchBufferLength);
1914 
1916 
1917 BOOL
1918 WINAPI
1920  _In_ HANDLE hFindVolumeMountPoint,
1921  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1922  _In_ DWORD cchBufferLength);
1923 
1924 BOOL
1925 WINAPI
1927  _In_ HANDLE hFindVolumeMountPoint,
1928  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1929  _In_ DWORD cchBufferLength);
1930 
1933 
1934 #endif
1935 
1940 #if (_WIN32_WINNT >= 0x0502)
1941 
1942 DWORD
1943 WINAPI
1945  _In_ LPCSTR lpName,
1946  _In_ LPCSTR lpGuid,
1948  _In_ DWORD nSize);
1949 
1950 DWORD
1951 WINAPI
1954  _In_ LPCWSTR lpGuid,
1956  _In_ DWORD nSize);
1957 
1958 #endif
1972 #define FreeModule(m) FreeLibrary(m)
1973 #define FreeProcInstance(p) (void)(p)
1974 #ifndef XFree86Server
1976 #endif /* ndef XFree86Server */
1980 #if (_WIN32_WINNT >= 0x0600)
1981 HRESULT WINAPI GetApplicationRecoveryCallback(_In_ HANDLE, _Out_ APPLICATION_RECOVERY_CALLBACK*, _Outptr_opt_result_maybenull_ PVOID*, _Out_opt_ DWORD*, _Out_opt_ DWORD*);
1982 HRESULT WINAPI GetApplicationRestart(HANDLE,PWSTR,PDWORD,PDWORD);
1983 #endif
1984 
1985 UINT
1986 WINAPI
1987 GetAtomNameA(
1988  _In_ ATOM nAtom,
1989  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
1990  _In_ int nSize);
1991 
1992 UINT
1993 WINAPI
1994 GetAtomNameW(
1995  _In_ ATOM nAtom,
1996  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
1997  _In_ int nSize);
1998 
2003 
2004 _Success_(return != FALSE)
2005 BOOL
2006 WINAPI
2008  _In_ HANDLE hCommDev,
2011 
2019 
2020 _Success_(return != 0)
2021 BOOL
2022 WINAPI
2026 
2027 _Success_(return != 0)
2028 BOOL
2029 WINAPI
2033 
2034 #if (_WIN32_WINNT >= 0x0500)
2035 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
2036 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
2037 #endif
2038 #if (_WIN32_WINNT >= 0x0501)
2040 #endif
2049 #define GetCurrentTime GetTickCount
2050 
2051 BOOL
2052 WINAPI
2054  _In_ LPCSTR lpszName,
2057 
2058 BOOL
2059 WINAPI
2061  _In_ LPCWSTR lpszName,
2064 
2069 
2070 #if (_WIN32_WINNT >= 0x0502)
2071 
2072 _Success_(return != 0 && return < nBufferLength)
2073 DWORD
2074 WINAPI
2078 
2079 _Success_(return != 0 && return < nBufferLength)
2080 DWORD
2081 WINAPI
2085 
2086 #endif
2087 
2097 #if (_WIN32_WINNT >= 0x0600)
2099 DWORD WINAPI GetFinalPathNameByHandleA(HANDLE,LPSTR,DWORD,DWORD);
2100 DWORD WINAPI GetFinalPathNameByHandleW(HANDLE,LPWSTR,DWORD,DWORD);
2101 #endif
2105 #if (_WIN32_WINNT >= 0x0600)
2106 BOOL WINAPI GetFileBandwidthReservation(_In_ HANDLE, _Out_ LPDWORD, _Out_ LPDWORD, _Out_ LPBOOL, _Out_ LPDWORD, _Out_ LPDWORD);
2107 #endif
2109 
2110 #if (_WIN32_WINNT >= 0x0600)
2111 BOOL
2112 WINAPI
2114  _In_ HANDLE hFile,
2116  _Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
2117  _In_ DWORD dwBufferSize);
2118 #endif
2119 
2120 BOOL
2121 WINAPI
2124  _In_ SECURITY_INFORMATION RequestedInformation,
2125  _Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
2126  _In_ DWORD nLength,
2127  _Out_ LPDWORD lpnLengthNeeded);
2128 
2134 #define GetFreeSpace(w) (0x100000L)
2139 DWORD WINAPI GetLastError(void);
2143 
2144 _Success_(return != 0 && return <= nBufferLength)
2145 DWORD
2146 WINAPI
2150 
2152 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
2155 #endif
2161 #if (_WIN32_WINNT >= 0x0500)
2164 #endif
2165 
2166 #if _WIN32_WINNT >= 0x0502
2169 #endif
2170 
2171 BOOL
2172 WINAPI
2174  _In_ HANDLE hNamedPipe,
2175  _Out_opt_ LPDWORD lpState,
2176  _Out_opt_ LPDWORD lpCurInstances,
2177  _Out_opt_ LPDWORD lpMaxCollectionCount,
2178  _Out_opt_ LPDWORD lpCollectDataTimeout,
2179  _Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
2180  _In_ DWORD nMaxUserNameSize);
2181 
2182 BOOL
2183 WINAPI
2185  _In_ HANDLE hNamedPipe,
2186  _Out_opt_ LPDWORD lpState,
2187  _Out_opt_ LPDWORD lpCurInstances,
2188  _Out_opt_ LPDWORD lpMaxCollectionCount,
2189  _Out_opt_ LPDWORD lpCollectDataTimeout,
2190  _Out_writes_opt_(nMaxUserNameSize) LPWSTR lpUserName,
2191  _In_ DWORD nMaxUserNameSize);
2192 
2194 #if (_WIN32_WINNT >= 0x0501)
2196 #endif
2197 
2198 BOOL
2199 WINAPI
2201  _In_ HANDLE hEventLog,
2206 
2214 
2215 DWORD
2216 WINAPI
2218  _In_ LPCSTR lpAppName,
2219  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2220  _In_ DWORD nSize,
2222 
2223 DWORD
2224 WINAPI
2226  _In_ LPCWSTR lpAppName,
2227  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2228  _In_ DWORD nSize,
2230 
2231 DWORD
2232 WINAPI
2234  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
2235  _In_ DWORD nSize,
2237 
2238 DWORD
2239 WINAPI
2241  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
2242  _In_ DWORD nSize,
2244 
2245 DWORD
2246 WINAPI
2248  _In_opt_ LPCSTR lpAppName,
2249  _In_opt_ LPCSTR lpKeyName,
2250  _In_opt_ LPCSTR lpDefault,
2251  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2252  _In_ DWORD nSize,
2254 
2255 DWORD
2256 WINAPI
2258  _In_opt_ LPCWSTR lpAppName,
2259  _In_opt_ LPCWSTR lpKeyName,
2260  _In_opt_ LPCWSTR lpDefault,
2261  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2262  _In_ DWORD nSize,
2264 
2265 BOOL
2266 WINAPI
2268  _In_ LPCSTR lpszSection,
2269  _In_ LPCSTR lpszKey,
2270  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2271  _In_ UINT uSizeStruct,
2272  _In_opt_ LPCSTR szFile);
2273 
2274 BOOL
2275 WINAPI
2277  _In_ LPCWSTR lpszSection,
2278  _In_ LPCWSTR lpszKey,
2279  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2280  _In_ UINT uSizeStruct,
2281  _In_opt_ LPCWSTR szFile);
2282 
2285 #if (_WIN32_WINNT >= 0x0502)
2287 #endif
2290 #if (_WIN32_WINNT >= 0x0502)
2293 #endif
2294 #if (_WIN32_WINNT >= 0x0500)
2296 #endif
2301 HWINSTA WINAPI GetProcessWindowStation(void);
2305 
2306 DWORD
2307 WINAPI
2309  _In_ LPCSTR lpAppName,
2310  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2311  _In_ DWORD nSize);
2312 
2313 DWORD
2314 WINAPI
2316  _In_ LPCWSTR lpAppName,
2317  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2318  _In_ DWORD nSize);
2319 
2320 DWORD
2321 WINAPI
2323  _In_opt_ LPCSTR lpAppName,
2324  _In_opt_ LPCSTR lpKeyName,
2325  _In_opt_ LPCSTR lpDefault,
2326  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2327  _In_ DWORD nSize);
2328 
2329 DWORD
2330 WINAPI
2332  _In_opt_ LPCWSTR lpAppName,
2333  _In_opt_ LPCWSTR lpKeyName,
2334  _In_opt_ LPCWSTR lpDefault,
2335  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2336  _In_ DWORD nSize);
2337 
2346 
2347 _Success_(return != 0 && return < cchBuffer)
2348 DWORD
2349 WINAPI
2351  _In_ LPCSTR lpszLongPath,
2352  _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszShortPath,
2354 
2367 #if (_WIN32_WINNT >= 0x0502)
2369 #endif
2371 #if (_WIN32_WINNT >= 0x0501)
2373 #endif
2376 #if (_WIN32_WINNT >= 0x0500)
2379 #endif
2380 
2381 #if (_WIN32_WINNT >= 0x0501)
2382 
2383 _Success_(return != 0 && return < uSize)
2384 UINT
2385 WINAPI
2387  _Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer,
2388  _In_ UINT uSize);
2389 
2390 _Success_(return != 0 && return < uSize)
2391 UINT
2392 WINAPI
2394  _Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer,
2395  _In_ UINT uSize);
2396 
2397 #endif
2398 
2399 DWORD
2400 WINAPI
2402  _In_ HANDLE hDevice,
2403  _In_ DWORD dwOperation,
2405  _Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation);
2406 
2409 
2410 UINT
2411 WINAPI
2413  _In_ LPCSTR lpPathName,
2414  _In_ LPCSTR lpPrefixString,
2415  _In_ UINT uUnique,
2416  _Out_writes_(MAX_PATH) LPSTR lpTempFileName);
2417 
2419 
2420 DWORD
2421 WINAPI
2422 GetTempPathA(
2425 
2428 #if (_WIN32_WINNT >= 0x0502)
2430 #endif
2436 #if (_WIN32_WINNT >= 0x0600)
2438 #endif
2442 
2443 BOOL
2444 WINAPI
2445 GetUserNameA(
2446  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
2447  _Inout_ LPDWORD pcbBuffer);
2448 
2449 BOOL
2450 WINAPI
2451 GetUserNameW(
2452  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
2453  _Inout_ LPDWORD pcbBuffer);
2454 
2455 DWORD WINAPI GetVersion(void);
2458 
2459 BOOL
2460 WINAPI
2462  _In_opt_ LPCSTR lpRootPathName,
2463  _Out_writes_opt_(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
2464  _In_ DWORD nVolumeNameSize,
2465  _Out_opt_ LPDWORD lpVolumeSerialNumber,
2466  _Out_opt_ LPDWORD lpMaximumComponentLength,
2467  _Out_opt_ LPDWORD lpFileSystemFlags,
2468  _Out_writes_opt_(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
2469  _In_ DWORD nFileSystemNameSize);
2470 
2472 
2473 #if (_WIN32_WINNT >= 0x0500)
2474 
2475 BOOL
2476 WINAPI
2478  _In_ LPCSTR lpszVolumeMountPoint,
2479  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
2480  _In_ DWORD cchBufferLength);
2481 
2483 
2484 BOOL
2485 WINAPI
2487  _In_ LPCSTR lpszFileName,
2488  _Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
2489  _In_ DWORD cchBufferLength);
2490 
2492 
2493 #endif
2494 
2495 #if (_WIN32_WINNT >= 0x0501)
2496 
2497 BOOL
2498 WINAPI
2500  _In_ LPCSTR lpszVolumeName,
2501  _Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_terminated_ LPCH lpszVolumePathNames,
2502  _In_ DWORD cchBufferLength,
2503  _Out_ PDWORD lpcchReturnLength);
2504 
2506 
2507 #endif
2508 
2516 SIZE_T WINAPI GlobalCompact(_In_ DWORD); /* Obsolete: Has no effect. */
2518 #define GlobalDiscard(m) GlobalReAlloc((m),0,GMEM_MOVEABLE)
2521 VOID WINAPI GlobalFix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2522 UINT WINAPI GlobalFlags(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2524 
2525 UINT
2526 WINAPI
2528  _In_ ATOM nAtom,
2529  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2530  _In_ int nSize);
2531 
2532 UINT
2533 WINAPI
2535  _In_ ATOM nAtom,
2536  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2537  _In_ int nSize);
2538 
2542 #if (_WIN32_WINNT >= 0x0500)
2543 BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
2544 #endif
2547 VOID WINAPI GlobalUnfix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2549 BOOL WINAPI GlobalUnWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2550 PVOID WINAPI GlobalWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2551 #define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
2558 #if (_WIN32_WINNT >= 0x0501)
2560 #endif
2562 #if (_WIN32_WINNT >= 0x0501)
2564 #endif
2575 #if (_WIN32_WINNT >= 0x0600)
2576 VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE);
2577 #endif
2583 
2584 #if (_WIN32_WINNT >= 0x0600)
2586 #endif
2587 
2596 #if (_WIN32_WINNT >= 0x0501)
2598 #endif
2601 
2602 BOOL
2603 WINAPI
2605  _In_reads_bytes_(iSize) CONST VOID *lpv,
2606  _In_ int iSize,
2607  _Inout_opt_ LPINT lpiResult);
2608 
2609 #if (_WIN32_WINNT >= 0x0600)
2611 #endif
2615 #if (_WIN32_WINNT >= 0x0501)
2618 #endif
2620 #define LimitEmsPages(n)
2628 SIZE_T WINAPI LocalCompact(_In_ UINT); /* Obsolete: Has no effect. */
2629 #define LocalDiscard(m) (LocalReAlloc((m),0,LMEM_MOVEABLE))
2631 UINT WINAPI LocalFlags(_In_ HLOCAL); /* Obsolete: Has no effect. */
2636 SIZE_T WINAPI LocalShrink(_In_ HLOCAL, _In_ UINT); /* Obsolete: Has no effect. */
2642 #define LockSegment(w) GlobalFix((HANDLE)(w)) /* Obsolete: Has no effect. */
2645 
2646 _Success_(return != FALSE)
2647 BOOL
2648 WINAPI
2649 LogonUserExA(
2650  _In_ LPSTR lpszUsername,
2660 
2661 _Success_(return != FALSE)
2662 BOOL
2663 WINAPI
2664 LogonUserExW(
2665  _In_ LPWSTR lpszUsername,
2675 
2676 _Success_(return != FALSE)
2677 BOOL
2678 WINAPI
2680  _In_opt_ LPCSTR lpSystemName,
2687 
2688 _Success_(return != FALSE)
2689 BOOL
2690 WINAPI
2692  _In_opt_ LPCWSTR lpSystemName,
2699 
2700 _Success_(return != FALSE)
2701 BOOL
2702 WINAPI
2704  _In_opt_ LPCSTR lpSystemName,
2705  _In_ PSID Sid,
2711 
2712 _Success_(return != FALSE)
2713 BOOL
2714 WINAPI
2716  _In_opt_ LPCWSTR lpSystemName,
2717  _In_ PSID Sid,
2723 
2724 _Success_(return != FALSE)
2725 BOOL
2726 WINAPI
2728  _In_opt_ LPCSTR lpSystemName,
2733 
2734 _Success_(return != FALSE)
2735 BOOL
2736 WINAPI
2738  _In_opt_ LPCWSTR lpSystemName,
2743 
2744 _Success_(return != FALSE)
2745 BOOL
2746 WINAPI
2748  _In_opt_ LPCSTR lpSystemName,
2752 
2753 _Success_(return != FALSE)
2754 BOOL
2755 WINAPI
2757  _In_opt_ LPCWSTR lpSystemName,
2758  _In_ PLUID lpLuid,
2761 
2764 
2765 LPSTR
2766 WINAPI
2767 lstrcatA(
2768  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPSTR lpString1,
2769  _In_ LPCSTR lpString2);
2770 
2771 LPWSTR
2772 WINAPI
2773 lstrcatW(
2774  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPWSTR lpString1,
2775  _In_ LPCWSTR lpString2);
2776 
2781 
2782 LPSTR
2783 WINAPI
2784 lstrcpyA(
2785  _Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1,
2786  _In_ LPCSTR lpString2);
2787 
2788 LPWSTR
2789 WINAPI
2790 lstrcpyW(
2791  _Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1,
2792  _In_ LPCWSTR lpString2);
2793 
2796 int WINAPI lstrlenA(LPCSTR);
2797 int WINAPI lstrlenW(LPCWSTR);
2799 #define MakeProcInstance(p,i) (p)
2810 int WINAPI MulDiv(_In_ int, _In_ int, _In_ int);
2827 #if (_WIN32_WINNT >= 0x0600)
2829 #endif
2838 #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
2840 #endif
2852 #if (_WIN32_WINNT >= 0x0500)
2854 #endif
2857 
2858 #if (_WIN32_WINNT >= 0x0501)
2859 BOOL
2860 WINAPI
2861 QueryActCtxW(
2862  _In_ DWORD dwFlags,
2863  _In_ HANDLE hActCtx,
2864  _In_opt_ PVOID pvSubInstance,
2865  _In_ ULONG ulInfoClass,
2866  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
2867  _In_ SIZE_T cbBuffer,
2868  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
2869 #endif
2870 
2871 DWORD
2872 WINAPI
2874  _In_opt_ LPCSTR lpDeviceName,
2875  _Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
2876  _In_ DWORD ucchMax);
2877 
2879 #if (_WIN32_WINNT >= 0x0501)
2881 #endif
2884 #if (_WIN32_WINNT >= 0x0600)
2886 #endif
2888 #if (_WIN32_WINNT >= 0x0500)
2890 #endif
2892 
2893 BOOL
2894 WINAPI
2896  _In_opt_ HANDLE hJob,
2897  _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
2898  _Out_writes_bytes_to_(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJobObjectInformation,
2899  _In_ DWORD cbJobObjectInformationLength,
2900  _Out_opt_ LPDWORD lpReturnLength);
2901 
2902 BOOL
2903 WINAPI
2905  _In_ HANDLE hDirectory,
2908  _In_ BOOL bWatchSubtree,
2909  _In_ DWORD dwNotifyFilter,
2912  _In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2913 
2914 BOOL
2915 WINAPI
2917  _In_ HANDLE hEventLog,
2918  _In_ DWORD dwReadFlags,
2919  _In_ DWORD dwRecordOffset,
2920  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2921  _In_ DWORD nNumberOfBytesToRead,
2922  _Out_ DWORD *pnBytesRead,
2923  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2924 
2925 BOOL
2926 WINAPI
2928  _In_ HANDLE hEventLog,
2929  _In_ DWORD dwReadFlags,
2930  _In_ DWORD dwRecordOffset,
2931  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2932  _In_ DWORD nNumberOfBytesToRead,
2933  _Out_ DWORD *pnBytesRead,
2934  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2935 
2940 #if (_WIN32_WINNT >= 0x0600)
2941 VOID WINAPI RecoveryFinished(BOOL);
2942 HRESULT WINAPI RecoveryInProgress(OUT PBOOL);
2943 HRESULT WINAPI RegisterApplicationRecoveryCallback(_In_ APPLICATION_RECOVERY_CALLBACK, _In_opt_ PVOID, _In_ DWORD, _In_ DWORD);
2944 HRESULT WINAPI RegisterApplicationRestart(_In_opt_ PCWSTR, _In_ DWORD);
2945 #endif
2948 #if (_WIN32_WINNT >= 0x0500)
2951 #endif
2952 #if (_WIN32_WINNT >= 0x0501)
2954 #endif
2957 #if (_WIN32_WINNT >= 0x0600)
2960 #endif
2963 #if (_WIN32_WINNT >= 0x0500)
2964 ULONG WINAPI RemoveVectoredExceptionHandler(_In_ PVOID);
2965 ULONG WINAPI RemoveVectoredContinueHandler(_In_ PVOID);
2966 #endif
2967 #if (_WIN32_WINNT >= 0x0500)
2970 #endif
2971 
2972 BOOL
2973 WINAPI
2974 ReportEventA(
2975  _In_ HANDLE hEventLog,
2976  _In_ WORD wType,
2977  _In_ WORD wCategory,
2978  _In_ DWORD dwEventID,
2979  _In_opt_ PSID lpUserSid,
2980  _In_ WORD wNumStrings,
2981  _In_ DWORD dwDataSize,
2982  _In_reads_opt_(wNumStrings) LPCSTR *lpStrings,
2983  _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData);
2984 
2985 BOOL
2986 WINAPI
2987 ReportEventW(
2988  _In_ HANDLE hEventLog,
2989  _In_ WORD wType,
2990  _In_ WORD wCategory,
2991  _In_ DWORD dwEventID,
2992  _In_opt_ PSID lpUserSid,
2993  _In_ WORD wNumStrings,
2994  _In_ DWORD dwDataSize,
2995  _In_reads_opt_(wNumStrings) LPCWSTR *lpStrings,
2996  _In_reads_bytes_opt_(dwDataSize) LPVOID lpRawData);
2997 
3000 #if (_WIN32_WINNT >= 0x0510)
3001 VOID WINAPI RestoreLastError(_In_ DWORD);
3002 #endif
3004 BOOL WINAPI RevertToSelf(void);
3005 
3006 _Success_(return != 0 && return < nBufferLength)
3007 DWORD
3008