ReactOS  0.4.15-dev-5109-g2469ce2
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 // LoadLibraryEx() dwFlags.
338 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
339 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
340 // #define LOAD_PACKAGED_LIBRARY 0x00000004 // Internal use only.
341 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
342 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
343 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
344 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
345 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
346 #define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080
347 #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
348 #define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
349 #define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
350 #define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
351 #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
352 #endif // _WIN32_WINNT_VISTA
353 #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
354 #define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x00002000
355 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER 0x00004000
356 #else // NTDDI_WIN10_RS1
357 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
358 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER LOAD_LIBRARY_SEARCH_SYSTEM32
359 #endif // _WIN32_WINNT_VISTA
360 #endif // NTDDI_WIN10_RS1
361 #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
362 #define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000
363 #endif // NTDDI_WIN10_RS2
364 
365 #define LMEM_FIXED 0
366 #define LMEM_MOVEABLE 2
367 #define LMEM_NONZEROLHND 2
368 #define LMEM_NONZEROLPTR 0
369 #define LMEM_DISCARDABLE 3840
370 #define LMEM_NOCOMPACT 16
371 #define LMEM_NODISCARD 32
372 #define LMEM_ZEROINIT 64
373 #define LMEM_DISCARDED 16384
374 #define LMEM_MODIFY 128
375 #define LMEM_INVALID_HANDLE 32768
376 #define LMEM_LOCKCOUNT 255
377 #define LMEM_VALID_FLAGS 0x0F72
378 #define LPTR 64
379 #define LHND 66
380 #define NONZEROLHND 2
381 #define NONZEROLPTR 0
382 #define LOCKFILE_FAIL_IMMEDIATELY 1
383 #define LOCKFILE_EXCLUSIVE_LOCK 2
384 #define LOGON32_PROVIDER_DEFAULT 0
385 #define LOGON32_PROVIDER_WINNT35 1
386 #define LOGON32_PROVIDER_WINNT40 2
387 #define LOGON32_PROVIDER_WINNT50 3
388 #define LOGON32_LOGON_INTERACTIVE 2
389 #define LOGON32_LOGON_NETWORK 3
390 #define LOGON32_LOGON_BATCH 4
391 #define LOGON32_LOGON_SERVICE 5
392 #define LOGON32_LOGON_UNLOCK 7
393 #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
394 #define LOGON32_LOGON_NEW_CREDENTIALS 9
395 #define MOVEFILE_REPLACE_EXISTING 1
396 #define MOVEFILE_COPY_ALLOWED 2
397 #define MOVEFILE_DELAY_UNTIL_REBOOT 4
398 #define MOVEFILE_WRITE_THROUGH 8
399 #define MOVEFILE_CREATE_HARDLINK 16
400 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 32
401 #define MAXIMUM_WAIT_OBJECTS 64
402 #define MAXIMUM_SUSPEND_COUNT 0x7F
403 #define WAIT_OBJECT_0 0
404 #define WAIT_ABANDONED_0 128
405 #ifndef WAIT_TIMEOUT /* also in winerror.h */
406 #define WAIT_TIMEOUT 258
407 #endif
408 #define WAIT_IO_COMPLETION 0xC0
409 #define WAIT_ABANDONED 128
410 #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
411 #define PURGE_TXABORT 1
412 #define PURGE_RXABORT 2
413 #define PURGE_TXCLEAR 4
414 #define PURGE_RXCLEAR 8
415 
416 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 256
417 #define FORMAT_MESSAGE_IGNORE_INSERTS 512
418 #define FORMAT_MESSAGE_FROM_STRING 1024
419 #define FORMAT_MESSAGE_FROM_HMODULE 2048
420 #define FORMAT_MESSAGE_FROM_SYSTEM 4096
421 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 8192
422 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 255
423 #define EV_BREAK 64
424 #define EV_CTS 8
425 #define EV_DSR 16
426 #define EV_ERR 128
427 #define EV_EVENT1 2048
428 #define EV_EVENT2 4096
429 #define EV_PERR 512
430 #define EV_RING 256
431 #define EV_RLSD 32
432 #define EV_RX80FULL 1024
433 #define EV_RXCHAR 1
434 #define EV_RXFLAG 2
435 #define EV_TXEMPTY 4
436 /* also in ddk/ntapi.h */
437 #define SEM_FAILCRITICALERRORS 0x0001
438 #define SEM_NOGPFAULTERRORBOX 0x0002
439 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
440 #define SEM_NOOPENFILEERRORBOX 0x8000
441 /* end ntapi.h */
442 #define SLE_ERROR 1
443 #define SLE_MINORERROR 2
444 #define SLE_WARNING 3
445 #define SHUTDOWN_NORETRY 1
446 #define MAXINTATOM 0xC000
447 #define INVALID_ATOM ((ATOM)0)
448 #define IGNORE 0
449 #define INFINITE 0xFFFFFFFF
450 #define NOPARITY 0
451 #define ODDPARITY 1
452 #define EVENPARITY 2
453 #define MARKPARITY 3
454 #define SPACEPARITY 4
455 #define ONESTOPBIT 0
456 #define ONE5STOPBITS 1
457 #define TWOSTOPBITS 2
458 #define CBR_110 110
459 #define CBR_300 300
460 #define CBR_600 600
461 #define CBR_1200 1200
462 #define CBR_2400 2400
463 #define CBR_4800 4800
464 #define CBR_9600 9600
465 #define CBR_14400 14400
466 #define CBR_19200 19200
467 #define CBR_38400 38400
468 #define CBR_56000 56000
469 #define CBR_57600 57600
470 #define CBR_115200 115200
471 #define CBR_128000 128000
472 #define CBR_256000 256000
473 #define BACKUP_INVALID 0
474 #define BACKUP_DATA 1
475 #define BACKUP_EA_DATA 2
476 #define BACKUP_SECURITY_DATA 3
477 #define BACKUP_ALTERNATE_DATA 4
478 #define BACKUP_LINK 5
479 #define BACKUP_PROPERTY_DATA 6
480 #define BACKUP_OBJECT_ID 7
481 #define BACKUP_REPARSE_DATA 8
482 #define BACKUP_SPARSE_BLOCK 9
483 #define STREAM_NORMAL_ATTRIBUTE 0
484 #define STREAM_MODIFIED_WHEN_READ 1
485 #define STREAM_CONTAINS_SECURITY 2
486 #define STREAM_CONTAINS_PROPERTIES 4
487 
488 #define STARTF_USESHOWWINDOW 0x00000001
489 #define STARTF_USESIZE 0x00000002
490 #define STARTF_USEPOSITION 0x00000004
491 #define STARTF_USECOUNTCHARS 0x00000008
492 #define STARTF_USEFILLATTRIBUTE 0x00000010
493 #define STARTF_RUNFULLSCREEN 0x00000020
494 #define STARTF_FORCEONFEEDBACK 0x00000040
495 #define STARTF_FORCEOFFFEEDBACK 0x00000080
496 #define STARTF_USESTDHANDLES 0x00000100
497 #if (WINVER >= 0x400)
498 #define STARTF_USEHOTKEY 0x00000200
499 #define STARTF_TITLEISLINKNAME 0x00000800
500 #define STARTF_TITLEISAPPID 0x00001000
501 #define STARTF_PREVENTPINNING 0x00002000
502 #endif /* (WINVER >= 0x400) */
503 
504 #define TC_NORMAL 0
505 #define TC_HARDERR 1
506 #define TC_GP_TRAP 2
507 #define TC_SIGNAL 3
508 #define AC_LINE_OFFLINE 0
509 #define AC_LINE_ONLINE 1
510 #define AC_LINE_BACKUP_POWER 2
511 #define AC_LINE_UNKNOWN 255
512 #define BATTERY_FLAG_HIGH 1
513 #define BATTERY_FLAG_LOW 2
514 #define BATTERY_FLAG_CRITICAL 4
515 #define BATTERY_FLAG_CHARGING 8
516 #define BATTERY_FLAG_NO_BATTERY 128
517 #define BATTERY_FLAG_UNKNOWN 255
518 #define BATTERY_PERCENTAGE_UNKNOWN 255
519 #define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
520 #define DDD_RAW_TARGET_PATH 1
521 #define DDD_REMOVE_DEFINITION 2
522 #define DDD_EXACT_MATCH_ON_REMOVE 4
523 #define DDD_NO_BROADCAST_SYSTEM 8
524 #define DDD_LUID_BROADCAST_DRIVE 16
525 #define HINSTANCE_ERROR 32
526 #define MS_CTS_ON 16
527 #define MS_DSR_ON 32
528 #define MS_RING_ON 64
529 #define MS_RLSD_ON 128
530 #define DTR_CONTROL_DISABLE 0
531 #define DTR_CONTROL_ENABLE 1
532 #define DTR_CONTROL_HANDSHAKE 2
533 #define RTS_CONTROL_DISABLE 0
534 #define RTS_CONTROL_ENABLE 1
535 #define RTS_CONTROL_HANDSHAKE 2
536 #define RTS_CONTROL_TOGGLE 3
537 #define SECURITY_ANONYMOUS (SecurityAnonymous<<16)
538 #define SECURITY_IDENTIFICATION (SecurityIdentification<<16)
539 #define SECURITY_IMPERSONATION (SecurityImpersonation<<16)
540 #define SECURITY_DELEGATION (SecurityDelegation<<16)
541 #define SECURITY_CONTEXT_TRACKING 0x40000
542 #define SECURITY_EFFECTIVE_ONLY 0x80000
543 #define SECURITY_SQOS_PRESENT 0x100000
544 #define SECURITY_VALID_SQOS_FLAGS 0x1F0000
545 #define INVALID_FILE_SIZE 0xFFFFFFFF
546 #define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
547 #if (_WIN32_WINNT >= 0x0501)
548 #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x00000001
549 #define ACTCTX_FLAG_LANGID_VALID 0x00000002
550 #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x00000004
551 #define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
552 #define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
553 #define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
554 #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x00000040
555 #define ACTCTX_FLAG_HMODULE_VALID 0x00000080
556 #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
557 #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
558 #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x00000004
559 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x00000008
560 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x00000010
561 #define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000
562 #if (_WIN32_WINNT >= 0x0600)
563 #define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
564 #endif
565 #endif /* (_WIN32_WINNT >= 0x0501) */
566 #if (_WIN32_WINNT >= 0x0500)
567 #define REPLACEFILE_WRITE_THROUGH 0x00000001
568 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
569 #endif /* (_WIN32_WINNT >= 0x0500) */
570 #if (_WIN32_WINNT >= 0x0400)
571 #define FIBER_FLAG_FLOAT_SWITCH 0x1
572 #endif
573 #define FLS_OUT_OF_INDEXES 0xFFFFFFFF
574 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
575 #if (_WIN32_WINNT >= 0x0600)
576 #define MAX_RESTART_CMD_LINE 0x800
577 #define RESTART_CYCLICAL 0x1
578 #define RESTART_NOTIFY_SOLUTION 0x2
579 #define RESTART_NOTIFY_FAULT 0x4
580 #define VOLUME_NAME_DOS 0x0
581 #define VOLUME_NAME_GUID 0x1
582 #define VOLUME_NAME_NT 0x2
583 #define VOLUME_NAME_NONE 0x4
584 #define FILE_NAME_NORMALIZED 0x0
585 #define FILE_NAME_OPENED 0x8
586 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
587 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
588 #endif
589 #if (_WIN32_WINNT >= 0x0500)
590 #define GET_MODULE_HANDLE_EX_FLAG_PIN 0x1
591 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 0x2
592 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x4
593 #endif
594 #if (_WIN32_WINNT >= 0x0600)
595 #define CREATE_EVENT_MANUAL_RESET 0x1
596 #define CREATE_EVENT_INITIAL_SET 0x2
597 #define CREATE_MUTEX_INITIAL_OWNER 0x1
598 #define CREATE_WAITABLE_TIMER_MANUAL_RESET 0x1
599 #define SRWLOCK_INIT RTL_SRWLOCK_INIT
600 #define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
601 #define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
602 #endif
603 
604 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x00001
605 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
606 #define BASE_SEARCH_PATH_PERMANENT 0x08000
607 #define BASE_SEARCH_PATH_INVALID_FLAGS (~0x18001)
608 
609 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
610 
611 #if (_WIN32_WINNT >= 0x0600)
612 #define PROCESS_DEP_ENABLE 0x00000001
613 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
614 #endif
615 
616 #define LOGON_WITH_PROFILE 0x00000001
617 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
618 
619 #ifndef RC_INVOKED
620 
621 #ifndef _FILETIME_
622 #define _FILETIME_
623 typedef struct _FILETIME {
627 #endif
628 
641 
642 typedef struct _DCB {
665  char XonChar;
666  char XoffChar;
667  char ErrorChar;
668  char EofChar;
669  char EvtChar;
671 } DCB,*LPDCB;
672 
673 typedef struct _COMM_CONFIG {
683 
684 typedef struct _COMMPROP {
704 
705 typedef struct _COMMTIMEOUTS {
712 
713 typedef struct _COMSTAT {
724 } COMSTAT,*LPCOMSTAT;
725 
727 
740 
746 
747 typedef struct _EXCEPTION_DEBUG_INFO {
751 
752 typedef struct _EXIT_THREAD_DEBUG_INFO {
755 
756 typedef struct _EXIT_PROCESS_DEBUG_INFO {
759 
760 typedef struct _LOAD_DLL_DEBUG_INFO {
768 
769 typedef struct _UNLOAD_DLL_DEBUG_INFO {
772 
778 
779 typedef struct _RIP_INFO {
783 
784 typedef struct _DEBUG_EVENT {
788  union {
798  } u;
800 
801 #ifndef MIDL_PASS
805 #endif
806 
807 typedef struct _OVERLAPPED {
810  union {
811  struct {
814  } DUMMYSTRUCTNAME;
816  } DUMMYUNIONNAME;
819 
820 typedef struct _OVERLAPPED_ENTRY {
826 
827 typedef struct _STARTUPINFOA {
847 
848 typedef struct _STARTUPINFOW {
868 
869 typedef struct _PROCESS_INFORMATION {
875 
876 typedef struct _CRITICAL_SECTION_DEBUG {
883 //#ifdef __WINESRC__ //not all wine code is marked so
884  DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */
885 //#else
886  //WORD SpareWORD;
887 //#endif
889 
890 typedef struct _CRITICAL_SECTION {
898 
899 #ifndef _SYSTEMTIME_
900 #define _SYSTEMTIME_
901 typedef struct _SYSTEMTIME {
911 #endif /* _SYSTEMTIME_ */
912 #if (_WIN32_WINNT >= 0x0500)
914 #endif
923 typedef struct _WIN32_FIND_DATAA {
935 typedef struct _WIN32_FIND_DATAW {
947 
948 #if (_WIN32_WINNT >= 0x0501)
949 typedef enum _STREAM_INFO_LEVELS {
950  FindStreamInfoStandard
951 } STREAM_INFO_LEVELS;
952 
953 typedef struct _WIN32_FIND_STREAM_DATA {
954  LARGE_INTEGER StreamSize;
955  WCHAR cStreamName[MAX_PATH + 36];
956 } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
957 #endif
958 
959 typedef struct _WIN32_STREAM_ID {
966 
967 #if (_WIN32_WINNT >= 0x0600)
968 
969 typedef enum _FILE_ID_TYPE {
970  FileIdType,
971  ObjectIdType,
972  ExtendedFileIdType,
973  MaximumFileIdType
974 } FILE_ID_TYPE, *PFILE_ID_TYPE;
975 
976 typedef struct _FILE_ID_DESCRIPTOR {
977  DWORD dwSize;
978  FILE_ID_TYPE Type;
979  union {
980  LARGE_INTEGER FileId;
981  GUID ObjectId;
982  } DUMMYUNIONNAME;
983 } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
984 
985 typedef enum _FILE_INFO_BY_HANDLE_CLASS {
986  FileBasicInfo,
987  FileStandardInfo,
988  FileNameInfo,
989  FileRenameInfo,
990  FileDispositionInfo,
991  FileAllocationInfo,
992  FileEndOfFileInfo,
993  FileStreamInfo,
994  FileCompressionInfo,
995  FileAttributeTagInfo,
996  FileIdBothDirectoryInfo,
997  FileIdBothDirectoryRestartInfo,
998  FileIoPriorityHintInfo,
999  FileRemoteProtocolInfo,
1000  FileFullDirectoryInfo,
1001  FileFullDirectoryRestartInfo,
1002  FileStorageInfo,
1003  FileAlignmentInfo,
1004  FileIdInfo,
1005  FileIdExtdDirectoryInfo,
1006  FileIdExtdDirectoryRestartInfo,
1007  MaximumFileInfoByHandlesClass
1008 } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
1009 
1010 typedef struct _FILE_ID_BOTH_DIR_INFO {
1011  DWORD NextEntryOffset;
1012  DWORD FileIndex;
1013  LARGE_INTEGER CreationTime;
1014  LARGE_INTEGER LastAccessTime;
1015  LARGE_INTEGER LastWriteTime;
1016  LARGE_INTEGER ChangeTime;
1017  LARGE_INTEGER EndOfFile;
1021  DWORD EaSize;
1022  CCHAR ShortNameLength;
1023  WCHAR ShortName[12];
1024  LARGE_INTEGER FileId;
1025  WCHAR FileName[1];
1026 } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
1027 
1028 typedef struct _FILE_BASIC_INFO {
1029  LARGE_INTEGER CreationTime;
1030  LARGE_INTEGER LastAccessTime;
1031  LARGE_INTEGER LastWriteTime;
1032  LARGE_INTEGER ChangeTime;
1034 } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
1035 
1036 typedef struct _FILE_STANDARD_INFO {
1038  LARGE_INTEGER EndOfFile;
1039  DWORD NumberOfLinks;
1040  BOOLEAN DeletePending;
1042 } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
1043 
1044 typedef struct _FILE_NAME_INFO {
1046  WCHAR FileName[1];
1047 } FILE_NAME_INFO, *PFILE_NAME_INFO;
1048 
1049 typedef enum _PRIORITY_HINT {
1050  IoPriorityHintVeryLow,
1051  IoPriorityHintLow,
1052  IoPriorityHintNormal,
1053  MaximumIoPriorityHintType
1054 } PRIORITY_HINT;
1055 
1056 typedef struct _FILE_IO_PRIORITY_HINT_INFO {
1057  PRIORITY_HINT PriorityHint;
1058 } FILE_IO_PRIORITY_HINT_INFO;
1059 
1060 typedef struct _FILE_ALLOCATION_INFO {
1062 } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
1063 
1064 typedef struct _FILE_DISPOSITION_INFO {
1066 } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
1067 
1068 typedef struct _FILE_END_OF_FILE_INFO {
1069  LARGE_INTEGER EndOfFile;
1070 } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
1071 
1072 typedef struct _FILE_RENAME_INFO {
1073  BOOLEAN ReplaceIfExists;
1076  WCHAR FileName[1];
1077 } FILE_RENAME_INFO, *PFILE_RENAME_INFO;
1078 
1079 typedef struct _FILE_ATTRIBUTE_TAG_INFO {
1081  DWORD ReparseTag;
1082 } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
1083 
1084 typedef struct _FILE_COMPRESSION_INFO {
1085  LARGE_INTEGER CompressedFileSize;
1086  WORD CompressionFormat;
1087  UCHAR CompressionUnitShift;
1088  UCHAR ChunkShift;
1089  UCHAR ClusterShift;
1090  UCHAR Reserved[3];
1091 } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
1092 
1093 typedef struct _FILE_REMOTE_PROTOCOL_INFO {
1094  USHORT StructureVersion;
1095  USHORT StructureSize;
1096  ULONG Protocol;
1097  USHORT ProtocolMajorVersion;
1098  USHORT ProtocolMinorVersion;
1099  USHORT ProtocolRevision;
1100  USHORT Reserved;
1101  ULONG Flags;
1102  struct {
1103  ULONG Reserved[8];
1104  } GenericReserved;
1105  struct {
1106  ULONG Reserved[16];
1107  } ProtocolSpecificReserved;
1108 } FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
1109 
1110 #endif
1111 
1112 typedef enum _FINDEX_INFO_LEVELS {
1117 
1118 typedef enum _FINDEX_SEARCH_OPS {
1124 
1125 typedef struct tagHW_PROFILE_INFOA {
1130 
1131 typedef struct tagHW_PROFILE_INFOW {
1136 
1137 /* Event Logging */
1138 
1139 #define EVENTLOG_FULL_INFO 0
1140 
1144 
1149 
1150 typedef struct _SYSTEM_INFO {
1151  _ANONYMOUS_UNION union {
1153  _ANONYMOUS_STRUCT struct {
1156  } DUMMYSTRUCTNAME;
1157  } DUMMYUNIONNAME;
1168 
1169 typedef struct _SYSTEM_POWER_STATUS {
1177 
1189 
1190 typedef struct _TIME_ZONE_INFORMATION {
1199 
1200 typedef struct _MEMORYSTATUS {
1210 
1211 #if (_WIN32_WINNT >= 0x0500)
1212 typedef struct _MEMORYSTATUSEX {
1213  DWORD dwLength;
1214  DWORD dwMemoryLoad;
1215  DWORDLONG ullTotalPhys;
1216  DWORDLONG ullAvailPhys;
1217  DWORDLONG ullTotalPageFile;
1218  DWORDLONG ullAvailPageFile;
1219  DWORDLONG ullTotalVirtual;
1220  DWORDLONG ullAvailVirtual;
1221  DWORDLONG ullAvailExtendedVirtual;
1222 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
1223 #endif
1224 
1225 #ifndef _LDT_ENTRY_DEFINED
1226 #define _LDT_ENTRY_DEFINED
1227 typedef struct _LDT_ENTRY {
1228  WORD LimitLow;
1229  WORD BaseLow;
1230  union {
1231  struct {
1232  BYTE BaseMid;
1233  BYTE Flags1;
1234  BYTE Flags2;
1235  BYTE BaseHi;
1236  } Bytes;
1237  struct {
1238  DWORD BaseMid:8;
1239  DWORD Type:5;
1240  DWORD Dpl:2;
1241  DWORD Pres:1;
1242  DWORD LimitHi:4;
1243  DWORD Sys:1;
1244  DWORD Reserved_0:1;
1245  DWORD Default_Big:1;
1246  DWORD Granularity:1;
1247  DWORD BaseHi:8;
1248  } Bits;
1249  } HighWord;
1251 #endif
1252 
1253 typedef struct _PROCESS_HEAP_ENTRY {
1259  _ANONYMOUS_UNION union {
1260  struct {
1263  } Block;
1264  struct {
1269  } Region;
1270  } DUMMYUNIONNAME;
1272 
1273 typedef struct _OFSTRUCT {
1281 
1282 #if (_WIN32_WINNT >= 0x0501)
1283 typedef struct tagACTCTXA {
1284  ULONG cbSize;
1285  DWORD dwFlags;
1286  LPCSTR lpSource;
1287  USHORT wProcessorArchitecture;
1288  LANGID wLangId;
1289  LPCSTR lpAssemblyDirectory;
1290  LPCSTR lpResourceName;
1291  LPCSTR lpApplicationName;
1292  HMODULE hModule;
1293 } ACTCTXA,*PACTCTXA;
1294 typedef const ACTCTXA *PCACTCTXA;
1295 
1296 typedef struct tagACTCTXW {
1297  ULONG cbSize;
1298  DWORD dwFlags;
1299  LPCWSTR lpSource;
1300  USHORT wProcessorArchitecture;
1301  LANGID wLangId;
1302  LPCWSTR lpAssemblyDirectory;
1303  LPCWSTR lpResourceName;
1304  LPCWSTR lpApplicationName;
1305  HMODULE hModule;
1306 } ACTCTXW,*PACTCTXW;
1307 typedef const ACTCTXW *PCACTCTXW;
1308 
1309 typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
1310  ULONG cbSize;
1311  ULONG ulDataFormatVersion;
1312  PVOID lpData;
1313  ULONG ulLength;
1314  PVOID lpSectionGlobalData;
1315  ULONG ulSectionGlobalDataLength;
1316  PVOID lpSectionBase;
1317  ULONG ulSectionTotalLength;
1318  HANDLE hActCtx;
1319  ULONG ulAssemblyRosterIndex;
1320 } ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
1321 typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
1322 
1323 typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
1324  PVOID lpInformation;
1325  PVOID lpSectionBase;
1326  ULONG ulSectionLength;
1327  PVOID lpSectionGlobalDataBase;
1328  ULONG ulSectionGlobalDataLength;
1329 } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1330 typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1331 
1332 typedef struct tagACTCTX_SECTION_KEYED_DATA {
1333  ULONG cbSize;
1334  ULONG ulDataFormatVersion;
1335  PVOID lpData;
1336  ULONG ulLength;
1337  PVOID lpSectionGlobalData;
1338  ULONG ulSectionGlobalDataLength;
1339  PVOID lpSectionBase;
1340  ULONG ulSectionTotalLength;
1341  HANDLE hActCtx;
1342  ULONG ulAssemblyRosterIndex;
1343  /* Non 2600 extra fields */
1344  ULONG ulFlags;
1345  ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
1346 } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
1347 
1348 typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
1349 
1350 typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
1351  HANDLE hActCtx;
1352  DWORD dwFlags;
1353 } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
1354 typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
1355 
1356 typedef BOOL
1357 (WINAPI *PQUERYACTCTXW_FUNC)(
1358  _In_ DWORD dwFlags,
1359  _In_ HANDLE hActCtx,
1360  _In_opt_ PVOID pvSubInstance,
1361  _In_ ULONG ulInfoClass,
1362  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
1363  _In_ SIZE_T cbBuffer,
1364  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
1365 
1366 typedef enum {
1367  LowMemoryResourceNotification ,
1368  HighMemoryResourceNotification
1369 } MEMORY_RESOURCE_NOTIFICATION_TYPE;
1370 #endif /* (_WIN32_WINNT >= 0x0501) */
1371 
1372 #if (_WIN32_WINNT >= 0x0500)
1373 typedef enum _COMPUTER_NAME_FORMAT {
1374  ComputerNameNetBIOS,
1375  ComputerNameDnsHostname,
1376  ComputerNameDnsDomain,
1377  ComputerNameDnsFullyQualified,
1378  ComputerNamePhysicalNetBIOS,
1379  ComputerNamePhysicalDnsHostname,
1380  ComputerNamePhysicalDnsDomain,
1381  ComputerNamePhysicalDnsFullyQualified,
1382  ComputerNameMax
1383 } COMPUTER_NAME_FORMAT;
1384 #endif /* (_WIN32_WINNT >= 0x0500) */
1385 
1386 #if (_WIN32_WINNT >= 0x0600)
1387 typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
1388 typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
1389 #endif
1390 
1392 
1393 #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1394 #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1395 #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1396 #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1397 
1413 
1414 #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1415 #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1416 #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1417 
1418 typedef DWORD
1420  _In_reads_bytes_(ulLength) PBYTE pbData,
1421  _In_opt_ PVOID pvCallbackContext,
1422  _In_ ULONG ulLength);
1423 
1425 
1426 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
1428 
1441 #if (_WIN32_WINNT >= 0x0600)
1442 typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);
1443 #endif
1444 
1445 #ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
1446 #define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
1447 #else
1448 #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
1449 #endif
1450 
1451 typedef DWORD
1453  _Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
1454  _In_opt_ PVOID pvCallbackContext,
1455  _Inout_ PULONG ulLength);
1456 
1457 /* Functions */
1458 #ifndef UNDER_CE
1460 #else
1462 #endif
1464 
1465 long
1466 WINAPI
1467 _hread(
1468  _In_ HFILE hFile,
1469  _Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
1470  _In_ long lBytes);
1471 
1472 long
1473 WINAPI
1474 _hwrite(
1475  _In_ HFILE hFile,
1477  _In_ long lBytes);
1478 
1483 
1484 UINT
1485 WINAPI
1486 _lread(
1487  _In_ HFILE hFile,
1488  _Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
1489  _In_ UINT uBytes);
1490 
1491 UINT
1492 WINAPI
1493 _lwrite(
1494  _In_ HFILE hFile,
1496  _In_ UINT uBytes);
1497 
1499 
1500 BOOL
1501 WINAPI
1503  _In_ LPCSTR SubsystemName,
1504  _In_opt_ LPVOID HandleId,
1510  _In_ BOOL ObjectCreation,
1513  _Out_ LPBOOL pfGenerateOnClose);
1514 
1516 #if (_WIN32_WINNT >= 0x0600)
1519 #endif
1520 #if (_WIN32_WINNT >= 0x0501)
1522 #endif
1525 #if (_WIN32_WINNT >= 0x0500)
1530 #endif
1535 #if (_WIN32_WINNT >= 0x0500)
1537 #endif
1538 #if (_WIN32_WINNT >= 0x0501)
1540 #endif
1541 #if (_WIN32_WINNT >= 0x0500)
1542 _Ret_maybenull_ PVOID WINAPI AddVectoredExceptionHandler(_In_ ULONG, _In_ PVECTORED_EXCEPTION_HANDLER);
1544 #endif
1556 
1557 BOOL
1558 WINAPI
1559 BackupRead(
1560  _In_ HANDLE hFile,
1561  _Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
1562  _In_ DWORD nNumberOfBytesToRead,
1563  _Out_ LPDWORD lpNumberOfBytesRead,
1564  _In_ BOOL bAbort,
1565  _In_ BOOL bProcessSecurity,
1566  _Inout_ LPVOID *lpContext);
1567 
1569 
1570 BOOL
1571 WINAPI
1572 BackupWrite(
1573  _In_ HANDLE hFile,
1576  _Out_ LPDWORD lpNumberOfBytesWritten,
1577  _In_ BOOL bAbort,
1578  _In_ BOOL bProcessSecurity,
1579  _Inout_ LPVOID *lpContext);
1580 
1584 #if (_WIN32_WINNT >= 0x0500)
1586 #endif
1591 
1592 BOOL
1593 WINAPI
1595  _In_ LPCSTR lpNamedPipeName,
1596  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1597  _In_ DWORD nInBufferSize,
1598  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1599  _In_ DWORD nOutBufferSize,
1600  _Out_ LPDWORD lpBytesRead,
1601  _In_ DWORD nTimeOut);
1602 
1603 BOOL
1604 WINAPI
1606  _In_ LPCWSTR lpNamedPipeName,
1607  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1608  _In_ DWORD nInBufferSize,
1609  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1610  _In_ DWORD nOutBufferSize,
1611  _Out_ LPDWORD lpBytesRead,
1612  _In_ DWORD nTimeOut);
1613 
1616 #if (_WIN32_WINNT >= 0x0600)
1617 BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED);
1618 BOOL WINAPI CancelSynchronousIo(HANDLE);
1619 #endif
1621 
1622 #if (_WIN32_WINNT >= 0x0501)
1623 
1624 BOOL
1625 WINAPI
1627  _In_ LPCSTR lpName,
1628  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1629  _In_ DWORD OemNameSize,
1630  _Out_opt_ PBOOL pbNameContainsSpaces,
1631  _Out_ PBOOL pbNameLegal);
1632 
1633 BOOL
1634 WINAPI
1637  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1638  _In_ DWORD OemNameSize,
1639  _Out_opt_ PBOOL pbNameContainsSpaces,
1640  _Out_ PBOOL pbNameLegal);
1641 
1643 #endif
1644 
1656 #if (_WIN32_WINNT >= 0x0400)
1658 #endif
1661 BOOL WINAPI CopyFileW(_In_ LPCWSTR lpExistingFileName, _In_ LPCWSTR lpNewFileName, _In_ BOOL bFailIfExists);
1664 #define MoveMemory RtlMoveMemory
1665 #define CopyMemory RtlCopyMemory
1666 #define FillMemory RtlFillMemory
1667 #define ZeroMemory RtlZeroMemory
1668 #define SecureZeroMemory RtlSecureZeroMemory
1670 #if (_WIN32_WINNT >= 0x0501)
1671 HANDLE WINAPI CreateActCtxA(_In_ PCACTCTXA);
1672 HANDLE WINAPI CreateActCtxW(_In_ PCACTCTXW);
1673 #endif
1674 BOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1675 BOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1678 HANDLE WINAPI CreateEventA(_In_opt_ LPSECURITY_ATTRIBUTES lpEventAttributes, _In_ BOOL bManualReset, _In_ BOOL bInitialState, _In_opt_ LPCSTR lpName);
1680 #if (_WIN32_WINNT >= 0x0600)
1683 #endif
1685 #if (_WIN32_WINNT >= 0x0400)
1687 #endif
1692 #if (_WIN32_WINNT >= 0x0500)
1695 #endif
1697 #if (_WIN32_WINNT >= 0x0500)
1702 #endif
1705 #if (_WIN32_WINNT >= 0x0501)
1706 HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE);
1707 #endif
1710 #if (_WIN32_WINNT >= 0x0600)
1713 #endif
1720 
1721 BOOL
1722 WINAPI
1724  _In_opt_ HANDLE,
1725  _In_opt_ LPCSTR,
1729  _In_ BOOL,
1730  _In_ DWORD,
1731  _In_opt_ PVOID,
1732  _In_opt_ LPCSTR,
1735 
1740 
1741 BOOL
1742 WINAPI
1744  _In_ HANDLE ExistingTokenHandle,
1745  _In_ DWORD Flags,
1746  _In_ DWORD DisableSidCount,
1747  _In_reads_opt_(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
1748  _In_ DWORD DeletePrivilegeCount,
1749  _In_reads_opt_(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete,
1750  _In_ DWORD RestrictedSidCount,
1751  _In_reads_opt_(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
1753 
1756 #if (_WIN32_WINNT >= 0x0600)
1759 #endif
1761 
1762 #if (_WIN32_WINNT >= 0x0500)
1763 
1765 
1766 BOOL
1767 WINAPI
1769  _Outptr_ PHANDLE,
1770  _In_opt_ HANDLE,
1772  _In_opt_ PVOID,
1773  _In_ DWORD,
1774  _In_ DWORD,
1775  _In_ ULONG);
1776 
1778 BOOL
1779 WINAPI
1781  _In_opt_ HANDLE TimerQueue,
1783  _In_ ULONG DueTime,
1784  _In_ ULONG Period);
1785 
1786 #endif /* (_WIN32_WINNT >= 0x0500) */
1787 
1791 #if (_WIN32_WINNT >= 0x0600)
1793 HANDLE WINAPI CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1794 #endif
1795 #if (_WIN32_WINNT >= 0x0501)
1798 #endif
1800 #if (_WIN32_WINNT >= 0x0501)
1802 #endif
1803 void WINAPI DebugBreak(void);
1804 #if (_WIN32_WINNT >= 0x0501)
1807 #endif
1814 #define DefineHandleTable(w) ((w),TRUE)
1821 #if (_WIN32_WINNT >= 0x0500)
1827 #endif
1832 
1833 #if (_WIN32_WINNT >= 0x0500)
1834 
1835 _Success_(return != FALSE)
1836 BOOL
1837 WINAPI
1839  _In_ LPCSTR Hostname,
1840  _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
1842 
1843 _Success_(return != FALSE)
1844 BOOL
1845 WINAPI
1847  _In_ LPCWSTR Hostname,
1848  _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
1850 
1851 #endif
1852 
1876 DECLSPEC_NORETURN void WINAPI ExitThread(_In_ DWORD dwExitCode);
1887 #if (_WIN32_WINNT >= 0x0501)
1891 #endif
1902 #if (_WIN32_WINNT >= 0x0501)
1904 #endif
1906 
1907 #if (_WIN32_WINNT >= 0x0500)
1908 
1909 HANDLE
1910 WINAPI
1912  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1913  _In_ DWORD cchBufferLength);
1914 
1916 
1917 HANDLE
1918 WINAPI
1920  _In_ LPCSTR lpszRootPathName,
1921  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1922  _In_ DWORD cchBufferLength);
1923 
1924 HANDLE
1925 WINAPI
1927  _In_ LPCWSTR lpszRootPathName,
1928  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1929  _In_ DWORD cchBufferLength);
1930 
1931 #endif
1932 
1936 #if (_WIN32_WINNT >= 0x0501)
1938 #endif
1939 
1940 #if (_WIN32_WINNT >= 0x0500)
1941 
1942 BOOL
1943 WINAPI
1945  _Inout_ HANDLE hFindVolume,
1946  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1947  _In_ DWORD cchBufferLength);
1948 
1950 
1951 BOOL
1952 WINAPI
1954  _In_ HANDLE hFindVolumeMountPoint,
1955  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1956  _In_ DWORD cchBufferLength);
1957 
1958 BOOL
1959 WINAPI
1961  _In_ HANDLE hFindVolumeMountPoint,
1962  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1963  _In_ DWORD cchBufferLength);
1964 
1967 
1968 #endif
1969 
1974 #if (_WIN32_WINNT >= 0x0502)
1975 
1976 DWORD
1977 WINAPI
1979  _In_ LPCSTR lpName,
1980  _In_ LPCSTR lpGuid,
1982  _In_ DWORD nSize);
1983 
1984 DWORD
1985 WINAPI
1988  _In_ LPCWSTR lpGuid,
1990  _In_ DWORD nSize);
1991 
1992 #endif
2000 DWORD WINAPI FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list* Arguments);
2001 DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list* Arguments);
2006 #define FreeModule(m) FreeLibrary(m)
2007 #define FreeProcInstance(p) (void)(p)
2008 #ifndef XFree86Server
2010 #endif /* ndef XFree86Server */
2014 #if (_WIN32_WINNT >= 0x0600)
2017 #endif
2018 
2019 UINT
2020 WINAPI
2021 GetAtomNameA(
2022  _In_ ATOM nAtom,
2023  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2024  _In_ int nSize);
2025 
2026 UINT
2027 WINAPI
2028 GetAtomNameW(
2029  _In_ ATOM nAtom,
2030  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2031  _In_ int nSize);
2032 
2037 
2038 _Success_(return != FALSE)
2039 BOOL
2040 WINAPI
2042  _In_ HANDLE hCommDev,
2045 
2053 
2054 _Success_(return != 0)
2055 BOOL
2056 WINAPI
2060 
2061 _Success_(return != 0)
2062 BOOL
2063 WINAPI
2067 
2068 #if (_WIN32_WINNT >= 0x0500)
2069 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
2070 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
2071 #endif
2072 #if (_WIN32_WINNT >= 0x0501)
2074 #endif
2083 #define GetCurrentTime GetTickCount
2084 
2085 BOOL
2086 WINAPI
2088  _In_ LPCSTR lpszName,
2091 
2092 BOOL
2093 WINAPI
2095  _In_ LPCWSTR lpszName,
2098 
2103 
2104 #if (_WIN32_WINNT >= 0x0502)
2105 
2106 _Success_(return != 0 && return < nBufferLength)
2107 DWORD
2108 WINAPI
2112 
2113 _Success_(return != 0 && return < nBufferLength)
2114 DWORD
2115 WINAPI
2119 
2120 #endif
2121 
2131 #if (_WIN32_WINNT >= 0x0600)
2135 #endif
2139 #if (_WIN32_WINNT >= 0x0600)
2141 #endif
2143 
2144 #if (_WIN32_WINNT >= 0x0600)
2145 BOOL
2146 WINAPI
2148  _In_ HANDLE hFile,
2150  _Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
2151  _In_ DWORD dwBufferSize);
2152 #endif
2153 
2154 BOOL
2155 WINAPI
2158  _In_ SECURITY_INFORMATION RequestedInformation,
2159  _Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
2160  _In_ DWORD nLength,
2161  _Out_ LPDWORD lpnLengthNeeded);
2162 
2168 #define GetFreeSpace(w) (0x100000L)
2173 DWORD WINAPI GetLastError(void);
2177 
2178 _Success_(return != 0 && return <= nBufferLength)
2179 DWORD
2180 WINAPI
2184 
2186 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
2189 #endif
2195 #if (_WIN32_WINNT >= 0x0500)
2198 #endif
2199 
2200 #if _WIN32_WINNT >= 0x0502
2203 #endif
2204 
2205 BOOL
2206 WINAPI
2208  _In_ HANDLE hNamedPipe,
2209  _Out_opt_ LPDWORD lpState,
2210  _Out_opt_ LPDWORD lpCurInstances,
2211  _Out_opt_ LPDWORD lpMaxCollectionCount,
2212  _Out_opt_ LPDWORD lpCollectDataTimeout,
2213  _Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
2214  _In_ DWORD nMaxUserNameSize);
2215 
2216 BOOL
2217 WINAPI
2219  _In_ HANDLE hNamedPipe,
2220  _Out_opt_ LPDWORD lpState,
2221  _Out_opt_ LPDWORD lpCurInstances,
2222  _Out_opt_ LPDWORD lpMaxCollectionCount,
2223  _Out_opt_ LPDWORD lpCollectDataTimeout,
2224  _Out_writes_opt_(nMaxUserNameSize) LPWSTR lpUserName,
2225  _In_ DWORD nMaxUserNameSize);
2226 
2228 #if (_WIN32_WINNT >= 0x0501)
2230 #endif
2231 
2232 BOOL
2233 WINAPI
2235  _In_ HANDLE hEventLog,
2240 
2248 
2249 DWORD
2250 WINAPI
2252  _In_ LPCSTR lpAppName,
2253  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2254  _In_ DWORD nSize,
2256 
2257 DWORD
2258 WINAPI
2260  _In_ LPCWSTR lpAppName,
2261  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2262  _In_ DWORD nSize,
2264 
2265 DWORD
2266 WINAPI
2268  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
2269  _In_ DWORD nSize,
2271 
2272 DWORD
2273 WINAPI
2275  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
2276  _In_ DWORD nSize,
2278 
2279 DWORD
2280 WINAPI
2282  _In_opt_ LPCSTR lpAppName,
2283  _In_opt_ LPCSTR lpKeyName,
2284  _In_opt_ LPCSTR lpDefault,
2285  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2286  _In_ DWORD nSize,
2288 
2289 DWORD
2290 WINAPI
2292  _In_opt_ LPCWSTR lpAppName,
2293  _In_opt_ LPCWSTR lpKeyName,
2294  _In_opt_ LPCWSTR lpDefault,
2295  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2296  _In_ DWORD nSize,
2298 
2299 BOOL
2300 WINAPI
2302  _In_ LPCSTR lpszSection,
2303  _In_ LPCSTR lpszKey,
2304  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2305  _In_ UINT uSizeStruct,
2306  _In_opt_ LPCSTR szFile);
2307 
2308 BOOL
2309 WINAPI
2311  _In_ LPCWSTR lpszSection,
2312  _In_ LPCWSTR lpszKey,
2313  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2314  _In_ UINT uSizeStruct,
2315  _In_opt_ LPCWSTR szFile);
2316 
2319 #if (_WIN32_WINNT >= 0x0502)
2321 #endif
2324 #if (_WIN32_WINNT >= 0x0502)
2327 #endif
2328 #if (_WIN32_WINNT >= 0x0500)
2330 #endif
2335 HWINSTA WINAPI GetProcessWindowStation(void);
2339 
2340 DWORD
2341 WINAPI
2343  _In_ LPCSTR lpAppName,
2344  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2345  _In_ DWORD nSize);
2346 
2347 DWORD
2348 WINAPI
2350  _In_ LPCWSTR lpAppName,
2351  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2352  _In_ DWORD nSize);
2353 
2354 DWORD
2355 WINAPI
2357  _In_opt_ LPCSTR lpAppName,
2358  _In_opt_ LPCSTR lpKeyName,
2359  _In_opt_ LPCSTR lpDefault,
2360  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2361  _In_ DWORD nSize);
2362 
2363 DWORD
2364 WINAPI
2366  _In_opt_ LPCWSTR lpAppName,
2367  _In_opt_ LPCWSTR lpKeyName,
2368  _In_opt_ LPCWSTR lpDefault,
2369  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2370  _In_ DWORD nSize);
2371 
2380 
2381 _Success_(return != 0 && return < cchBuffer)
2382 DWORD
2383 WINAPI
2385  _In_ LPCSTR lpszLongPath,
2386  _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszShortPath,
2388 
2399 
2400 WINBASEAPI
2401 UINT
2402 WINAPI
2404  _In_ DWORD FirmwareTableProviderSignature,
2406  _Out_writes_bytes_to_opt_(BufferSize,return) PVOID pFirmwareTableBuffer,
2408 
2411 #if (_WIN32_WINNT >= 0x0502)
2413 #endif
2414 VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
2415 #if (_WIN32_WINNT >= 0x0501)
2417 #endif
2420 #if (_WIN32_WINNT >= 0x0500)
2423 #endif
2424 
2425 #if (_WIN32_WINNT >= 0x0501)
2426 
2427 _Success_(return != 0 && return < uSize)
2428 UINT
2429 WINAPI
2431  _Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer,
2432  _In_ UINT uSize);
2433 
2434 _Success_(return != 0 && return < uSize)
2435 UINT
2436 WINAPI
2438  _Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer,
2439  _In_ UINT uSize);
2440 
2441 #endif
2442 
2443 DWORD
2444 WINAPI
2446  _In_ HANDLE hDevice,
2447  _In_ DWORD dwOperation,
2449  _Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation);
2450 
2453 
2454 UINT
2455 WINAPI
2457  _In_ LPCSTR lpPathName,
2458  _In_ LPCSTR lpPrefixString,
2459  _In_ UINT uUnique,
2460  _Out_writes_(MAX_PATH) LPSTR lpTempFileName);
2461 
2463 
2464 DWORD
2465 WINAPI
2466 GetTempPathA(
2469 
2472 #if (_WIN32_WINNT >= 0x0502)
2474 #endif
2480 #if (_WIN32_WINNT >= 0x0600)
2482 #endif
2486 
2487 BOOL
2488 WINAPI
2489 GetUserNameA(
2490  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
2491  _Inout_ LPDWORD pcbBuffer);
2492 
2493 BOOL
2494 WINAPI
2495 GetUserNameW(
2496  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
2497  _Inout_ LPDWORD pcbBuffer);
2498 
2499 DWORD WINAPI GetVersion(void);
2502 
2503 BOOL
2504 WINAPI
2506  _In_opt_ LPCSTR lpRootPathName,
2507  _Out_writes_opt_(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
2508  _In_ DWORD nVolumeNameSize,
2509  _Out_opt_ LPDWORD lpVolumeSerialNumber,
2510  _Out_opt_ LPDWORD lpMaximumComponentLength,
2511  _Out_opt_ LPDWORD lpFileSystemFlags,
2512  _Out_writes_opt_(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
2513  _In_ DWORD nFileSystemNameSize);
2514 
2516 
2517 #if (_WIN32_WINNT >= 0x0500)
2518 
2519 BOOL
2520 WINAPI
2522  _In_ LPCSTR lpszVolumeMountPoint,
2523  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
2524  _In_ DWORD cchBufferLength);
2525 
2527 
2528 BOOL
2529 WINAPI
2531  _In_ LPCSTR lpszFileName,
2532  _Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
2533  _In_ DWORD cchBufferLength);
2534 
2536 
2537 #endif
2538 
2539 #if (_WIN32_WINNT >= 0x0501)
2540 
2541 BOOL
2542 WINAPI
2544  _In_ LPCSTR lpszVolumeName,
2545  _Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_terminated_ LPCH lpszVolumePathNames,
2546  _In_ DWORD cchBufferLength,
2547  _Out_ PDWORD lpcchReturnLength);
2548 
2550 
2551 #endif
2552 
2560 SIZE_T WINAPI GlobalCompact(_In_ DWORD); /* Obsolete: Has no effect. */
2562 #define GlobalDiscard(m) GlobalReAlloc((m),0,GMEM_MOVEABLE)
2565 VOID WINAPI GlobalFix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2566 UINT WINAPI GlobalFlags(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2568 
2569 UINT
2570 WINAPI
2572  _In_ ATOM nAtom,
2573  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2574  _In_ int nSize);
2575 
2576 UINT
2577 WINAPI
2579  _In_ ATOM nAtom,
2580  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2581  _In_ int nSize);
2582 
2586 #if (_WIN32_WINNT >= 0x0500)
2587 BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
2588 #endif
2591 VOID WINAPI GlobalUnfix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2593 BOOL WINAPI GlobalUnWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2594 PVOID WINAPI GlobalWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2595 #define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
2602 #if (_WIN32_WINNT >= 0x0501)
2604 #endif
2606 #if (_WIN32_WINNT >= 0x0501)
2608 #endif
2619 #if (_WIN32_WINNT >= 0x0600)
2620 VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE);
2621 #endif
2627 
2628 #if (_WIN32_WINNT >= 0x0600)
2630 #endif
2631 
2640 #if (_WIN32_WINNT >= 0x0501)
2642 #endif
2645 
2646 BOOL
2647 WINAPI
2649  _In_reads_bytes_(iSize) CONST VOID *lpv,
2650  _In_ int iSize,
2651  _Inout_opt_ LPINT lpiResult);
2652 
2653 #if (_WIN32_WINNT >= 0x0600)
2655 #endif
2659 #if (_WIN32_WINNT >= 0x0501)
2662 #endif
2664 #define LimitEmsPages(n)
2672 SIZE_T WINAPI LocalCompact(_In_ UINT); /* Obsolete: Has no effect. */
2673 #define LocalDiscard(m) (LocalReAlloc((m),0,LMEM_MOVEABLE))
2675 UINT WINAPI LocalFlags(_In_ HLOCAL); /* Obsolete: Has no effect. */
2680 SIZE_T WINAPI LocalShrink(_In_ HLOCAL, _In_ UINT); /* Obsolete: Has no effect. */
2686 #define LockSegment(w) GlobalFix((HANDLE)(w)) /* Obsolete: Has no effect. */
2689 
2690 _Success_(return != FALSE)
2691 BOOL
2692 WINAPI
2693 LogonUserExA(
2694  _In_ LPSTR lpszUsername,
2704 
2705 _Success_(return != FALSE)
2706 BOOL
2707 WINAPI
2708 LogonUserExW(
2709  _In_ LPWSTR lpszUsername,
2719 
2720 _Success_(return != FALSE)
2721 BOOL
2722 WINAPI
2724  _In_opt_ LPCSTR lpSystemName,
2731 
2732 _Success_(return != FALSE)
2733 BOOL
2734 WINAPI
2736  _In_opt_ LPCWSTR lpSystemName,
2743 
2744 _Success_(return != FALSE)
2745 BOOL
2746 WINAPI
2748  _In_opt_ LPCSTR lpSystemName,
2749  _In_ PSID Sid,
2755 
2756 _Success_(return != FALSE)
2757 BOOL
2758 WINAPI
2760  _In_opt_ LPCWSTR lpSystemName,
2761  _In_ PSID Sid,
2767 
2768 _Success_(return != FALSE)
2769 BOOL
2770 WINAPI
2772  _In_opt_ LPCSTR lpSystemName,
2777 
2778 _Success_(return != FALSE)
2779 BOOL
2780 WINAPI
2782  _In_opt_ LPCWSTR lpSystemName,
2787 
2788 _Success_(return != FALSE)
2789 BOOL
2790 WINAPI
2792  _In_opt_ LPCSTR lpSystemName,
2796 
2797 _Success_(return != FALSE)
2798 BOOL
2799 WINAPI
2801  _In_opt_ LPCWSTR lpSystemName,
2802  _In_ PLUID lpLuid,
2805 
2808 
2809 LPSTR
2810 WINAPI
2811 lstrcatA(
2812  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPSTR lpString1,
2813  _In_ LPCSTR lpString2);
2814 
2815 LPWSTR
2816 WINAPI
2817 lstrcatW(
2818  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPWSTR lpString1,
2819  _In_ LPCWSTR lpString2);
2820 
2825 
2826 LPSTR
2827 WINAPI
2828 lstrcpyA(
2829  _Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1,
2830  _In_ LPCSTR lpString2);
2831 
2832 LPWSTR
2833 WINAPI
2834 lstrcpyW(
2835  _Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1,
2836  _In_ LPCWSTR lpString2);
2837 
2840 int WINAPI lstrlenA(LPCSTR);
2841 int WINAPI lstrlenW(LPCWSTR);
2843 #define MakeProcInstance(p,i) (p)
2854 int WINAPI MulDiv(_In_ int, _In_ int, _In_ int);
2871 #if (_WIN32_WINNT >= 0x0600)
2873 #endif
2882 #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
2884 #endif
2896 #if (_WIN32_WINNT >= 0x0500)
2898 #endif
2901 
2902 #if (_WIN32_WINNT >= 0x0501)
2903 BOOL
2904 WINAPI
2905 QueryActCtxW(
2906  _In_ DWORD dwFlags,
2907  _In_ HANDLE hActCtx,
2908  _In_opt_ PVOID pvSubInstance,
2909  _In_ ULONG ulInfoClass,
2910  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
2911  _In_ SIZE_T cbBuffer,
2912  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
2913 #endif
2914 
2915 DWORD
2916 WINAPI
2918  _In_opt_ LPCSTR lpDeviceName,
2919  _Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
2920  _In_ DWORD ucchMax);
2921 
2923 #if (_WIN32_WINNT >= 0x0501)
2925 #endif
2928 #if (_WIN32_WINNT >= 0x0600)
2930 #endif
2932 #if (_WIN32_WINNT >= 0x0500)
2934 #endif
2936 
2937 BOOL
2938 WINAPI
2940  _In_opt_ HANDLE hJob,
2941  _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
2942  _Out_writes_bytes_to_(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJobObjectInformation,
2943  _In_ DWORD cbJobObjectInformationLength,
2944  _Out_opt_ LPDWORD lpReturnLength);
2945 
2946 BOOL
2947 WINAPI
2949  _In_ HANDLE hDirectory,
2952  _In_ BOOL bWatchSubtree,
2953  _In_ DWORD dwNotifyFilter,
2956  _In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2957 
2958 BOOL
2959 WINAPI
2961  _In_ HANDLE hEventLog,
2962  _In_ DWORD dwReadFlags,
2963  _In_ DWORD dwRecordOffset,
2964  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2965  _In_ DWORD nNumberOfBytesToRead,
2966  _Out_ DWORD *pnBytesRead,
2967  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2968 
2969 BOOL
2970 WINAPI
2972  _In_ HANDLE hEventLog,
2973  _In_ DWORD dwReadFlags,
2974  _In_ DWORD dwRecordOffset,
2975  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2976  _In_ DWORD nNumberOfBytesToRead,
2977  _Out_ DWORD *pnBytesRead,
2978  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2979 
2984 #if (_WIN32_WINNT >= 0x0600)
2985 VOID WINAPI RecoveryFinished(BOOL);
2986 HRESULT WINAPI RecoveryInProgress(OUT PBOOL);
2989 #endif
2992 #if (_WIN32_WINNT >= 0x0500)
2995 #endif
2996 #if (_WIN32_WINNT >= 0x0501)
2997 void WINAPI