ReactOS  0.4.15-dev-5608-gafb953a
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 
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 COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
209 
210 #define FILE_FLAG_WRITE_THROUGH 0x80000000
211 #define FILE_FLAG_OVERLAPPED 0x40000000
212 #define FILE_FLAG_NO_BUFFERING 0x20000000
213 #define FILE_FLAG_RANDOM_ACCESS 0x10000000
214 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
215 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
216 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
217 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000
218 #define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000
219 #define FILE_FLAG_OPEN_NO_RECALL 0x00100000
220 #if (_WIN32_WINNT >= 0x0500)
221 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
222 #endif
223 
224 #define CLRDTR 6
225 #define CLRRTS 4
226 #define SETDTR 5
227 #define SETRTS 3
228 #define SETXOFF 1
229 #define SETXON 2
230 #define RESETDEV 7
231 #define SETBREAK 8
232 #define CLRBREAK 9
233 #define STILL_ACTIVE 0x103
234 #define FIND_FIRST_EX_CASE_SENSITIVE 1
235 #define FIND_FIRST_EX_LARGE_FETCH 2
236 #define SCS_32BIT_BINARY 0
237 #define SCS_64BIT_BINARY 6
238 #define SCS_DOS_BINARY 1
239 #define SCS_OS216_BINARY 5
240 #define SCS_PIF_BINARY 3
241 #define SCS_POSIX_BINARY 4
242 #define SCS_WOW_BINARY 2
243 #define MAX_COMPUTERNAME_LENGTH 15
244 #define HW_PROFILE_GUIDLEN 39
245 #define MAX_PROFILE_LEN 80
246 #define DOCKINFO_UNDOCKED 1
247 #define DOCKINFO_DOCKED 2
248 #define DOCKINFO_USER_SUPPLIED 4
249 #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_UNDOCKED)
250 #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_DOCKED)
251 #define DRIVE_REMOVABLE 2
252 #define DRIVE_FIXED 3
253 #define DRIVE_REMOTE 4
254 #define DRIVE_CDROM 5
255 #define DRIVE_RAMDISK 6
256 #define DRIVE_UNKNOWN 0
257 #define DRIVE_NO_ROOT_DIR 1
258 #define FILE_TYPE_UNKNOWN 0
259 #define FILE_TYPE_DISK 1
260 #define FILE_TYPE_CHAR 2
261 #define FILE_TYPE_PIPE 3
262 #define FILE_TYPE_REMOTE 0x8000
263 /* also in ddk/ntapi.h */
264 #define HANDLE_FLAG_INHERIT 0x01
265 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
266 /* end ntapi.h */
267 #define STD_INPUT_HANDLE (DWORD)(0xfffffff6)
268 #define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5)
269 #define STD_ERROR_HANDLE (DWORD)(0xfffffff4)
270 #define INVALID_HANDLE_VALUE (HANDLE)(-1)
271 #define GET_TAPE_MEDIA_INFORMATION 0
272 #define GET_TAPE_DRIVE_INFORMATION 1
273 #define SET_TAPE_MEDIA_INFORMATION 0
274 #define SET_TAPE_DRIVE_INFORMATION 1
275 #define THREAD_PRIORITY_ABOVE_NORMAL 1
276 #define THREAD_PRIORITY_BELOW_NORMAL (-1)
277 #define THREAD_PRIORITY_HIGHEST 2
278 #define THREAD_PRIORITY_IDLE (-15)
279 #define THREAD_PRIORITY_LOWEST (-2)
280 #define THREAD_PRIORITY_NORMAL 0
281 #define THREAD_PRIORITY_TIME_CRITICAL 15
282 #define THREAD_PRIORITY_ERROR_RETURN 2147483647
283 #define TIME_ZONE_ID_UNKNOWN 0
284 #define TIME_ZONE_ID_STANDARD 1
285 #define TIME_ZONE_ID_DAYLIGHT 2
286 #define TIME_ZONE_ID_INVALID 0xFFFFFFFF
287 #define FS_CASE_IS_PRESERVED 2
288 #define FS_CASE_SENSITIVE 1
289 #define FS_UNICODE_STORED_ON_DISK 4
290 #define FS_PERSISTENT_ACLS 8
291 #define FS_FILE_COMPRESSION 16
292 #define FS_VOL_IS_COMPRESSED 32768
293 #define GMEM_FIXED 0
294 #define GMEM_MOVEABLE 2
295 #define GMEM_MODIFY 128
296 #define GPTR 64
297 #define GHND 66
298 #define GMEM_DDESHARE 8192
299 #define GMEM_DISCARDABLE 256
300 #define GMEM_LOWER 4096
301 #define GMEM_NOCOMPACT 16
302 #define GMEM_NODISCARD 32
303 #define GMEM_NOT_BANKED 4096
304 #define GMEM_NOTIFY 16384
305 #define GMEM_SHARE 8192
306 #define GMEM_ZEROINIT 64
307 #define GMEM_DISCARDED 16384
308 #define GMEM_INVALID_HANDLE 32768
309 #define GMEM_LOCKCOUNT 255
310 #define GMEM_VALID_FLAGS 32626
311 #define EXCEPTION_ACCESS_VIOLATION ((DWORD)0xC0000005)
312 #define EXCEPTION_DATATYPE_MISALIGNMENT ((DWORD)0x80000002)
313 #define EXCEPTION_BREAKPOINT ((DWORD)0x80000003)
314 #define EXCEPTION_SINGLE_STEP ((DWORD)0x80000004)
315 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008C)
316 #define EXCEPTION_FLT_DENORMAL_OPERAND ((DWORD)0xC000008D)
317 #define EXCEPTION_FLT_DIVIDE_BY_ZERO ((DWORD)0xC000008E)
318 #define EXCEPTION_FLT_INEXACT_RESULT ((DWORD)0xC000008F)
319 #define EXCEPTION_FLT_INVALID_OPERATION ((DWORD)0xC0000090)
320 #define EXCEPTION_FLT_OVERFLOW ((DWORD)0xC0000091)
321 #define EXCEPTION_FLT_STACK_CHECK ((DWORD)0xC0000092)
322 #define EXCEPTION_FLT_UNDERFLOW ((DWORD)0xC0000093)
323 #define EXCEPTION_INT_DIVIDE_BY_ZERO ((DWORD)0xC0000094)
324 #define EXCEPTION_INT_OVERFLOW ((DWORD)0xC0000095)
325 #define EXCEPTION_PRIV_INSTRUCTION ((DWORD)0xC0000096)
326 #define EXCEPTION_IN_PAGE_ERROR ((DWORD)0xC0000006)
327 #define EXCEPTION_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
328 #define EXCEPTION_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025)
329 #define EXCEPTION_STACK_OVERFLOW ((DWORD)0xC00000FD)
330 #define EXCEPTION_INVALID_DISPOSITION ((DWORD)0xC0000026)
331 #define EXCEPTION_GUARD_PAGE ((DWORD)0x80000001)
332 #define EXCEPTION_INVALID_HANDLE ((DWORD)0xC0000008L)
333 #define CONTROL_C_EXIT ((DWORD)0xC000013A)
334 #define PROCESS_HEAP_REGION 1
335 #define PROCESS_HEAP_UNCOMMITTED_RANGE 2
336 #define PROCESS_HEAP_ENTRY_BUSY 4
337 #define PROCESS_HEAP_ENTRY_MOVEABLE 16
338 #define PROCESS_HEAP_ENTRY_DDESHARE 32
339 
340 // LoadLibraryEx() dwFlags.
341 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
342 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
343 // #define LOAD_PACKAGED_LIBRARY 0x00000004 // Internal use only.
344 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
345 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
346 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
347 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
348 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
349 #define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080
350 #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
351 #define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
352 #define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
353 #define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
354 #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
355 #endif // _WIN32_WINNT_VISTA
356 #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
357 #define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x00002000
358 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER 0x00004000
359 #else // NTDDI_WIN10_RS1
360 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
361 #define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER LOAD_LIBRARY_SEARCH_SYSTEM32
362 #endif // _WIN32_WINNT_VISTA
363 #endif // NTDDI_WIN10_RS1
364 #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
365 #define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000
366 #endif // NTDDI_WIN10_RS2
367 
368 #define LMEM_FIXED 0
369 #define LMEM_MOVEABLE 2
370 #define LMEM_NONZEROLHND 2
371 #define LMEM_NONZEROLPTR 0
372 #define LMEM_DISCARDABLE 3840
373 #define LMEM_NOCOMPACT 16
374 #define LMEM_NODISCARD 32
375 #define LMEM_ZEROINIT 64
376 #define LMEM_DISCARDED 16384
377 #define LMEM_MODIFY 128
378 #define LMEM_INVALID_HANDLE 32768
379 #define LMEM_LOCKCOUNT 255
380 #define LMEM_VALID_FLAGS 0x0F72
381 #define LPTR 64
382 #define LHND 66
383 #define NONZEROLHND 2
384 #define NONZEROLPTR 0
385 #define LOCKFILE_FAIL_IMMEDIATELY 1
386 #define LOCKFILE_EXCLUSIVE_LOCK 2
387 #define LOGON32_PROVIDER_DEFAULT 0
388 #define LOGON32_PROVIDER_WINNT35 1
389 #define LOGON32_PROVIDER_WINNT40 2
390 #define LOGON32_PROVIDER_WINNT50 3
391 #define LOGON32_LOGON_INTERACTIVE 2
392 #define LOGON32_LOGON_NETWORK 3
393 #define LOGON32_LOGON_BATCH 4
394 #define LOGON32_LOGON_SERVICE 5
395 #define LOGON32_LOGON_UNLOCK 7
396 #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
397 #define LOGON32_LOGON_NEW_CREDENTIALS 9
398 #define MOVEFILE_REPLACE_EXISTING 1
399 #define MOVEFILE_COPY_ALLOWED 2
400 #define MOVEFILE_DELAY_UNTIL_REBOOT 4
401 #define MOVEFILE_WRITE_THROUGH 8
402 #define MOVEFILE_CREATE_HARDLINK 16
403 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 32
404 #define MAXIMUM_WAIT_OBJECTS 64
405 #define MAXIMUM_SUSPEND_COUNT 0x7F
406 #define WAIT_OBJECT_0 0
407 #define WAIT_ABANDONED_0 128
408 #ifndef WAIT_TIMEOUT /* also in winerror.h */
409 #define WAIT_TIMEOUT 258
410 #endif
411 #define WAIT_IO_COMPLETION 0xC0
412 #define WAIT_ABANDONED 128
413 #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
414 #define PURGE_TXABORT 1
415 #define PURGE_RXABORT 2
416 #define PURGE_TXCLEAR 4
417 #define PURGE_RXCLEAR 8
418 
419 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 256
420 #define FORMAT_MESSAGE_IGNORE_INSERTS 512
421 #define FORMAT_MESSAGE_FROM_STRING 1024
422 #define FORMAT_MESSAGE_FROM_HMODULE 2048
423 #define FORMAT_MESSAGE_FROM_SYSTEM 4096
424 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 8192
425 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 255
426 #define EV_BREAK 64
427 #define EV_CTS 8
428 #define EV_DSR 16
429 #define EV_ERR 128
430 #define EV_EVENT1 2048
431 #define EV_EVENT2 4096
432 #define EV_PERR 512
433 #define EV_RING 256
434 #define EV_RLSD 32
435 #define EV_RX80FULL 1024
436 #define EV_RXCHAR 1
437 #define EV_RXFLAG 2
438 #define EV_TXEMPTY 4
439 /* also in ddk/ntapi.h */
440 #define SEM_FAILCRITICALERRORS 0x0001
441 #define SEM_NOGPFAULTERRORBOX 0x0002
442 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
443 #define SEM_NOOPENFILEERRORBOX 0x8000
444 /* end ntapi.h */
445 #define SLE_ERROR 1
446 #define SLE_MINORERROR 2
447 #define SLE_WARNING 3
448 #define SHUTDOWN_NORETRY 1
449 #define MAXINTATOM 0xC000
450 #define INVALID_ATOM ((ATOM)0)
451 #define IGNORE 0
452 #define INFINITE 0xFFFFFFFF
453 #define NOPARITY 0
454 #define ODDPARITY 1
455 #define EVENPARITY 2
456 #define MARKPARITY 3
457 #define SPACEPARITY 4
458 #define ONESTOPBIT 0
459 #define ONE5STOPBITS 1
460 #define TWOSTOPBITS 2
461 #define CBR_110 110
462 #define CBR_300 300
463 #define CBR_600 600
464 #define CBR_1200 1200
465 #define CBR_2400 2400
466 #define CBR_4800 4800
467 #define CBR_9600 9600
468 #define CBR_14400 14400
469 #define CBR_19200 19200
470 #define CBR_38400 38400
471 #define CBR_56000 56000
472 #define CBR_57600 57600
473 #define CBR_115200 115200
474 #define CBR_128000 128000
475 #define CBR_256000 256000
476 #define BACKUP_INVALID 0
477 #define BACKUP_DATA 1
478 #define BACKUP_EA_DATA 2
479 #define BACKUP_SECURITY_DATA 3
480 #define BACKUP_ALTERNATE_DATA 4
481 #define BACKUP_LINK 5
482 #define BACKUP_PROPERTY_DATA 6
483 #define BACKUP_OBJECT_ID 7
484 #define BACKUP_REPARSE_DATA 8
485 #define BACKUP_SPARSE_BLOCK 9
486 #define STREAM_NORMAL_ATTRIBUTE 0
487 #define STREAM_MODIFIED_WHEN_READ 1
488 #define STREAM_CONTAINS_SECURITY 2
489 #define STREAM_CONTAINS_PROPERTIES 4
490 
491 #define STARTF_USESHOWWINDOW 0x00000001
492 #define STARTF_USESIZE 0x00000002
493 #define STARTF_USEPOSITION 0x00000004
494 #define STARTF_USECOUNTCHARS 0x00000008
495 #define STARTF_USEFILLATTRIBUTE 0x00000010
496 #define STARTF_RUNFULLSCREEN 0x00000020
497 #define STARTF_FORCEONFEEDBACK 0x00000040
498 #define STARTF_FORCEOFFFEEDBACK 0x00000080
499 #define STARTF_USESTDHANDLES 0x00000100
500 #if (WINVER >= 0x400)
501 #define STARTF_USEHOTKEY 0x00000200
502 #define STARTF_TITLEISLINKNAME 0x00000800
503 #define STARTF_TITLEISAPPID 0x00001000
504 #define STARTF_PREVENTPINNING 0x00002000
505 #endif /* (WINVER >= 0x400) */
506 
507 #define TC_NORMAL 0
508 #define TC_HARDERR 1
509 #define TC_GP_TRAP 2
510 #define TC_SIGNAL 3
511 #define AC_LINE_OFFLINE 0
512 #define AC_LINE_ONLINE 1
513 #define AC_LINE_BACKUP_POWER 2
514 #define AC_LINE_UNKNOWN 255
515 #define BATTERY_FLAG_HIGH 1
516 #define BATTERY_FLAG_LOW 2
517 #define BATTERY_FLAG_CRITICAL 4
518 #define BATTERY_FLAG_CHARGING 8
519 #define BATTERY_FLAG_NO_BATTERY 128
520 #define BATTERY_FLAG_UNKNOWN 255
521 #define BATTERY_PERCENTAGE_UNKNOWN 255
522 #define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
523 #define DDD_RAW_TARGET_PATH 1
524 #define DDD_REMOVE_DEFINITION 2
525 #define DDD_EXACT_MATCH_ON_REMOVE 4
526 #define DDD_NO_BROADCAST_SYSTEM 8
527 #define DDD_LUID_BROADCAST_DRIVE 16
528 #define HINSTANCE_ERROR 32
529 #define MS_CTS_ON 16
530 #define MS_DSR_ON 32
531 #define MS_RING_ON 64
532 #define MS_RLSD_ON 128
533 #define DTR_CONTROL_DISABLE 0
534 #define DTR_CONTROL_ENABLE 1
535 #define DTR_CONTROL_HANDSHAKE 2
536 #define RTS_CONTROL_DISABLE 0
537 #define RTS_CONTROL_ENABLE 1
538 #define RTS_CONTROL_HANDSHAKE 2
539 #define RTS_CONTROL_TOGGLE 3
540 #define SECURITY_ANONYMOUS (SecurityAnonymous<<16)
541 #define SECURITY_IDENTIFICATION (SecurityIdentification<<16)
542 #define SECURITY_IMPERSONATION (SecurityImpersonation<<16)
543 #define SECURITY_DELEGATION (SecurityDelegation<<16)
544 #define SECURITY_CONTEXT_TRACKING 0x40000
545 #define SECURITY_EFFECTIVE_ONLY 0x80000
546 #define SECURITY_SQOS_PRESENT 0x100000
547 #define SECURITY_VALID_SQOS_FLAGS 0x1F0000
548 #define INVALID_FILE_SIZE 0xFFFFFFFF
549 #define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
550 #if (_WIN32_WINNT >= 0x0501)
551 #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x00000001
552 #define ACTCTX_FLAG_LANGID_VALID 0x00000002
553 #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x00000004
554 #define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
555 #define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
556 #define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
557 #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x00000040
558 #define ACTCTX_FLAG_HMODULE_VALID 0x00000080
559 #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
560 #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
561 #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x00000004
562 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x00000008
563 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x00000010
564 #define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000
565 #if (_WIN32_WINNT >= 0x0600)
566 #define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
567 #endif
568 #endif /* (_WIN32_WINNT >= 0x0501) */
569 #if (_WIN32_WINNT >= 0x0500)
570 #define REPLACEFILE_WRITE_THROUGH 0x00000001
571 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
572 #endif /* (_WIN32_WINNT >= 0x0500) */
573 #if (_WIN32_WINNT >= 0x0400)
574 #define FIBER_FLAG_FLOAT_SWITCH 0x1
575 #endif
576 #define FLS_OUT_OF_INDEXES 0xFFFFFFFF
577 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
578 #if (_WIN32_WINNT >= 0x0600)
579 #define MAX_RESTART_CMD_LINE 0x800
580 #define RESTART_CYCLICAL 0x1
581 #define RESTART_NOTIFY_SOLUTION 0x2
582 #define RESTART_NOTIFY_FAULT 0x4
583 #define VOLUME_NAME_DOS 0x0
584 #define VOLUME_NAME_GUID 0x1
585 #define VOLUME_NAME_NT 0x2
586 #define VOLUME_NAME_NONE 0x4
587 #define FILE_NAME_NORMALIZED 0x0
588 #define FILE_NAME_OPENED 0x8
589 #define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
590 #define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
591 #endif
592 #if (_WIN32_WINNT >= 0x0500)
593 #define GET_MODULE_HANDLE_EX_FLAG_PIN 0x1
594 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 0x2
595 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x4
596 #endif
597 #if (_WIN32_WINNT >= 0x0600)
598 #define CREATE_EVENT_MANUAL_RESET 0x1
599 #define CREATE_EVENT_INITIAL_SET 0x2
600 #define CREATE_MUTEX_INITIAL_OWNER 0x1
601 #define CREATE_WAITABLE_TIMER_MANUAL_RESET 0x1
602 #define SRWLOCK_INIT RTL_SRWLOCK_INIT
603 #define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
604 #define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
605 #endif
606 
607 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x00001
608 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
609 #define BASE_SEARCH_PATH_PERMANENT 0x08000
610 #define BASE_SEARCH_PATH_INVALID_FLAGS (~0x18001)
611 
612 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
613 
614 #if (_WIN32_WINNT >= 0x0600)
615 #define PROCESS_DEP_ENABLE 0x00000001
616 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
617 #endif
618 
619 #define LOGON_WITH_PROFILE 0x00000001
620 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
621 
622 #ifndef RC_INVOKED
623 
624 #ifndef _FILETIME_
625 #define _FILETIME_
626 typedef struct _FILETIME {
630 #endif
631 
644 
645 typedef struct _DCB {
668  char XonChar;
669  char XoffChar;
670  char ErrorChar;
671  char EofChar;
672  char EvtChar;
674 } DCB,*LPDCB;
675 
676 typedef struct _COMM_CONFIG {
686 
687 typedef struct _COMMPROP {
707 
708 typedef struct _COMMTIMEOUTS {
715 
716 typedef struct _COMSTAT {
727 } COMSTAT,*LPCOMSTAT;
728 
730 
743 
749 
750 typedef struct _EXCEPTION_DEBUG_INFO {
754 
755 typedef struct _EXIT_THREAD_DEBUG_INFO {
758 
759 typedef struct _EXIT_PROCESS_DEBUG_INFO {
762 
763 typedef struct _LOAD_DLL_DEBUG_INFO {
771 
772 typedef struct _UNLOAD_DLL_DEBUG_INFO {
775 
781 
782 typedef struct _RIP_INFO {
786 
787 typedef struct _DEBUG_EVENT {
791  union {
801  } u;
803 
804 #ifndef MIDL_PASS
808 #endif
809 
810 typedef struct _OVERLAPPED {
813  union {
814  struct {
817  } DUMMYSTRUCTNAME;
819  } DUMMYUNIONNAME;
822 
823 typedef struct _OVERLAPPED_ENTRY {
829 
830 typedef struct _STARTUPINFOA {
850 
851 typedef struct _STARTUPINFOW {
871 
872 typedef struct _PROCESS_INFORMATION {
878 
879 typedef struct _CRITICAL_SECTION_DEBUG {
886 //#ifdef __WINESRC__ //not all wine code is marked so
887  DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */
888 //#else
889  //WORD SpareWORD;
890 //#endif
892 
893 typedef struct _CRITICAL_SECTION {
901 
902 #ifndef _SYSTEMTIME_
903 #define _SYSTEMTIME_
904 typedef struct _SYSTEMTIME {
914 #endif /* _SYSTEMTIME_ */
915 #if (_WIN32_WINNT >= 0x0500)
917 #endif
926 typedef struct _WIN32_FIND_DATAA {
938 typedef struct _WIN32_FIND_DATAW {
950 
951 #if (_WIN32_WINNT >= 0x0501)
952 typedef enum _STREAM_INFO_LEVELS {
953  FindStreamInfoStandard
954 } STREAM_INFO_LEVELS;
955 
956 typedef struct _WIN32_FIND_STREAM_DATA {
957  LARGE_INTEGER StreamSize;
958  WCHAR cStreamName[MAX_PATH + 36];
959 } WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
960 #endif
961 
962 typedef struct _WIN32_STREAM_ID {
969 
970 #if (_WIN32_WINNT >= 0x0600)
971 
972 typedef enum _FILE_ID_TYPE {
973  FileIdType,
974  ObjectIdType,
975  ExtendedFileIdType,
976  MaximumFileIdType
977 } FILE_ID_TYPE, *PFILE_ID_TYPE;
978 
979 typedef struct _FILE_ID_DESCRIPTOR {
980  DWORD dwSize;
981  FILE_ID_TYPE Type;
982  union {
983  LARGE_INTEGER FileId;
984  GUID ObjectId;
985  } DUMMYUNIONNAME;
986 } FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
987 
988 typedef enum _FILE_INFO_BY_HANDLE_CLASS {
989  FileBasicInfo,
990  FileStandardInfo,
991  FileNameInfo,
992  FileRenameInfo,
993  FileDispositionInfo,
994  FileAllocationInfo,
995  FileEndOfFileInfo,
996  FileStreamInfo,
997  FileCompressionInfo,
998  FileAttributeTagInfo,
999  FileIdBothDirectoryInfo,
1000  FileIdBothDirectoryRestartInfo,
1001  FileIoPriorityHintInfo,
1002  FileRemoteProtocolInfo,
1003  FileFullDirectoryInfo,
1004  FileFullDirectoryRestartInfo,
1005  FileStorageInfo,
1006  FileAlignmentInfo,
1007  FileIdInfo,
1008  FileIdExtdDirectoryInfo,
1009  FileIdExtdDirectoryRestartInfo,
1010  MaximumFileInfoByHandlesClass
1011 } FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;
1012 
1013 typedef struct _FILE_ID_BOTH_DIR_INFO {
1014  DWORD NextEntryOffset;
1015  DWORD FileIndex;
1016  LARGE_INTEGER CreationTime;
1017  LARGE_INTEGER LastAccessTime;
1018  LARGE_INTEGER LastWriteTime;
1019  LARGE_INTEGER ChangeTime;
1020  LARGE_INTEGER EndOfFile;
1024  DWORD EaSize;
1025  CCHAR ShortNameLength;
1026  WCHAR ShortName[12];
1027  LARGE_INTEGER FileId;
1028  WCHAR FileName[1];
1029 } FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
1030 
1031 typedef struct _FILE_BASIC_INFO {
1032  LARGE_INTEGER CreationTime;
1033  LARGE_INTEGER LastAccessTime;
1034  LARGE_INTEGER LastWriteTime;
1035  LARGE_INTEGER ChangeTime;
1037 } FILE_BASIC_INFO, *PFILE_BASIC_INFO;
1038 
1039 typedef struct _FILE_STANDARD_INFO {
1041  LARGE_INTEGER EndOfFile;
1042  DWORD NumberOfLinks;
1043  BOOLEAN DeletePending;
1045 } FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
1046 
1047 typedef struct _FILE_NAME_INFO {
1049  WCHAR FileName[1];
1050 } FILE_NAME_INFO, *PFILE_NAME_INFO;
1051 
1052 typedef enum _PRIORITY_HINT {
1053  IoPriorityHintVeryLow,
1054  IoPriorityHintLow,
1055  IoPriorityHintNormal,
1056  MaximumIoPriorityHintType
1057 } PRIORITY_HINT;
1058 
1059 typedef struct _FILE_IO_PRIORITY_HINT_INFO {
1060  PRIORITY_HINT PriorityHint;
1061 } FILE_IO_PRIORITY_HINT_INFO;
1062 
1063 typedef struct _FILE_ALLOCATION_INFO {
1065 } FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
1066 
1067 typedef struct _FILE_DISPOSITION_INFO {
1069 } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
1070 
1071 typedef struct _FILE_END_OF_FILE_INFO {
1072  LARGE_INTEGER EndOfFile;
1073 } FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
1074 
1075 typedef struct _FILE_RENAME_INFO {
1076  BOOLEAN ReplaceIfExists;
1079  WCHAR FileName[1];
1080 } FILE_RENAME_INFO, *PFILE_RENAME_INFO;
1081 
1082 typedef struct _FILE_ATTRIBUTE_TAG_INFO {
1084  DWORD ReparseTag;
1085 } FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
1086 
1087 typedef struct _FILE_COMPRESSION_INFO {
1088  LARGE_INTEGER CompressedFileSize;
1089  WORD CompressionFormat;
1090  UCHAR CompressionUnitShift;
1091  UCHAR ChunkShift;
1092  UCHAR ClusterShift;
1093  UCHAR Reserved[3];
1094 } FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
1095 
1096 typedef struct _FILE_REMOTE_PROTOCOL_INFO {
1097  USHORT StructureVersion;
1098  USHORT StructureSize;
1099  ULONG Protocol;
1100  USHORT ProtocolMajorVersion;
1101  USHORT ProtocolMinorVersion;
1102  USHORT ProtocolRevision;
1103  USHORT Reserved;
1104  ULONG Flags;
1105  struct {
1106  ULONG Reserved[8];
1107  } GenericReserved;
1108  struct {
1109  ULONG Reserved[16];
1110  } ProtocolSpecificReserved;
1111 } FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
1112 
1113 #endif
1114 
1115 typedef enum _FINDEX_INFO_LEVELS {
1120 
1121 typedef enum _FINDEX_SEARCH_OPS {
1127 
1128 typedef struct tagHW_PROFILE_INFOA {
1133 
1134 typedef struct tagHW_PROFILE_INFOW {
1139 
1140 /* Event Logging */
1141 
1142 #define EVENTLOG_FULL_INFO 0
1143 
1147 
1152 
1153 typedef struct _SYSTEM_INFO {
1154  _ANONYMOUS_UNION union {
1156  _ANONYMOUS_STRUCT struct {
1159  } DUMMYSTRUCTNAME;
1160  } DUMMYUNIONNAME;
1171 
1172 typedef struct _SYSTEM_POWER_STATUS {
1180 
1192 
1193 typedef struct _TIME_ZONE_INFORMATION {
1202 
1203 typedef struct _MEMORYSTATUS {
1213 
1214 #if (_WIN32_WINNT >= 0x0500)
1215 typedef struct _MEMORYSTATUSEX {
1216  DWORD dwLength;
1217  DWORD dwMemoryLoad;
1218  DWORDLONG ullTotalPhys;
1219  DWORDLONG ullAvailPhys;
1220  DWORDLONG ullTotalPageFile;
1221  DWORDLONG ullAvailPageFile;
1222  DWORDLONG ullTotalVirtual;
1223  DWORDLONG ullAvailVirtual;
1224  DWORDLONG ullAvailExtendedVirtual;
1225 } MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
1226 #endif
1227 
1228 #ifndef _LDT_ENTRY_DEFINED
1229 #define _LDT_ENTRY_DEFINED
1230 typedef struct _LDT_ENTRY {
1231  WORD LimitLow;
1232  WORD BaseLow;
1233  union {
1234  struct {
1235  BYTE BaseMid;
1236  BYTE Flags1;
1237  BYTE Flags2;
1238  BYTE BaseHi;
1239  } Bytes;
1240  struct {
1241  DWORD BaseMid:8;
1242  DWORD Type:5;
1243  DWORD Dpl:2;
1244  DWORD Pres:1;
1245  DWORD LimitHi:4;
1246  DWORD Sys:1;
1247  DWORD Reserved_0:1;
1248  DWORD Default_Big:1;
1249  DWORD Granularity:1;
1250  DWORD BaseHi:8;
1251  } Bits;
1252  } HighWord;
1254 #endif
1255 
1256 typedef struct _PROCESS_HEAP_ENTRY {
1262  _ANONYMOUS_UNION union {
1263  struct {
1266  } Block;
1267  struct {
1272  } Region;
1273  } DUMMYUNIONNAME;
1275 
1276 typedef struct _OFSTRUCT {
1284 
1285 #if (_WIN32_WINNT >= 0x0501)
1286 typedef struct tagACTCTXA {
1287  ULONG cbSize;
1288  DWORD dwFlags;
1289  LPCSTR lpSource;
1290  USHORT wProcessorArchitecture;
1291  LANGID wLangId;
1292  LPCSTR lpAssemblyDirectory;
1293  LPCSTR lpResourceName;
1294  LPCSTR lpApplicationName;
1295  HMODULE hModule;
1296 } ACTCTXA,*PACTCTXA;
1297 typedef const ACTCTXA *PCACTCTXA;
1298 
1299 typedef struct tagACTCTXW {
1300  ULONG cbSize;
1301  DWORD dwFlags;
1302  LPCWSTR lpSource;
1303  USHORT wProcessorArchitecture;
1304  LANGID wLangId;
1305  LPCWSTR lpAssemblyDirectory;
1306  LPCWSTR lpResourceName;
1307  LPCWSTR lpApplicationName;
1308  HMODULE hModule;
1309 } ACTCTXW,*PACTCTXW;
1310 typedef const ACTCTXW *PCACTCTXW;
1311 
1312 typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
1313  ULONG cbSize;
1314  ULONG ulDataFormatVersion;
1315  PVOID lpData;
1316  ULONG ulLength;
1317  PVOID lpSectionGlobalData;
1318  ULONG ulSectionGlobalDataLength;
1319  PVOID lpSectionBase;
1320  ULONG ulSectionTotalLength;
1321  HANDLE hActCtx;
1322  ULONG ulAssemblyRosterIndex;
1323 } ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
1324 typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
1325 
1326 typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
1327  PVOID lpInformation;
1328  PVOID lpSectionBase;
1329  ULONG ulSectionLength;
1330  PVOID lpSectionGlobalDataBase;
1331  ULONG ulSectionGlobalDataLength;
1332 } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1333 typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1334 
1335 typedef struct tagACTCTX_SECTION_KEYED_DATA {
1336  ULONG cbSize;
1337  ULONG ulDataFormatVersion;
1338  PVOID lpData;
1339  ULONG ulLength;
1340  PVOID lpSectionGlobalData;
1341  ULONG ulSectionGlobalDataLength;
1342  PVOID lpSectionBase;
1343  ULONG ulSectionTotalLength;
1344  HANDLE hActCtx;
1345  ULONG ulAssemblyRosterIndex;
1346  /* Non 2600 extra fields */
1347  ULONG ulFlags;
1348  ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
1349 } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
1350 
1351 typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
1352 
1353 typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
1354  HANDLE hActCtx;
1355  DWORD dwFlags;
1356 } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
1357 typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
1358 
1359 typedef BOOL
1360 (WINAPI *PQUERYACTCTXW_FUNC)(
1361  _In_ DWORD dwFlags,
1362  _In_ HANDLE hActCtx,
1363  _In_opt_ PVOID pvSubInstance,
1364  _In_ ULONG ulInfoClass,
1365  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
1366  _In_ SIZE_T cbBuffer,
1367  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
1368 
1369 typedef enum {
1370  LowMemoryResourceNotification ,
1371  HighMemoryResourceNotification
1372 } MEMORY_RESOURCE_NOTIFICATION_TYPE;
1373 #endif /* (_WIN32_WINNT >= 0x0501) */
1374 
1375 #if (_WIN32_WINNT >= 0x0500)
1376 typedef enum _COMPUTER_NAME_FORMAT {
1377  ComputerNameNetBIOS,
1378  ComputerNameDnsHostname,
1379  ComputerNameDnsDomain,
1380  ComputerNameDnsFullyQualified,
1381  ComputerNamePhysicalNetBIOS,
1382  ComputerNamePhysicalDnsHostname,
1383  ComputerNamePhysicalDnsDomain,
1384  ComputerNamePhysicalDnsFullyQualified,
1385  ComputerNameMax
1386 } COMPUTER_NAME_FORMAT;
1387 #endif /* (_WIN32_WINNT >= 0x0500) */
1388 
1389 #if (_WIN32_WINNT >= 0x0600)
1390 typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
1391 typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
1392 #endif
1393 
1395 
1396 #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1397 #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1398 #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1399 #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1400 
1416 
1417 #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1418 #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1419 #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1420 
1421 typedef DWORD
1423  _In_reads_bytes_(ulLength) PBYTE pbData,
1424  _In_opt_ PVOID pvCallbackContext,
1425  _In_ ULONG ulLength);
1426 
1428 
1429 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
1431 
1444 #if (_WIN32_WINNT >= 0x0600)
1445 typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);
1446 #endif
1447 
1448 #ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
1449 #define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
1450 #else
1451 #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
1452 #endif
1453 
1454 typedef DWORD
1456  _Out_writes_bytes_to_(*ulLength, *ulLength) PBYTE pbData,
1457  _In_opt_ PVOID pvCallbackContext,
1458  _Inout_ PULONG ulLength);
1459 
1460 /* Functions */
1461 #ifndef UNDER_CE
1463 #else
1465 #endif
1467 
1468 long
1469 WINAPI
1470 _hread(
1471  _In_ HFILE hFile,
1472  _Out_writes_bytes_to_(lBytes, return) LPVOID lpBuffer,
1473  _In_ long lBytes);
1474 
1475 long
1476 WINAPI
1477 _hwrite(
1478  _In_ HFILE hFile,
1480  _In_ long lBytes);
1481 
1486 
1487 UINT
1488 WINAPI
1489 _lread(
1490  _In_ HFILE hFile,
1491  _Out_writes_bytes_to_(uBytes, return) LPVOID lpBuffer,
1492  _In_ UINT uBytes);
1493 
1494 UINT
1495 WINAPI
1496 _lwrite(
1497  _In_ HFILE hFile,
1499  _In_ UINT uBytes);
1500 
1502 
1503 BOOL
1504 WINAPI
1506  _In_ LPCSTR SubsystemName,
1507  _In_opt_ LPVOID HandleId,
1513  _In_ BOOL ObjectCreation,
1516  _Out_ LPBOOL pfGenerateOnClose);
1517 
1519 #if (_WIN32_WINNT >= 0x0600)
1522 #endif
1523 #if (_WIN32_WINNT >= 0x0501)
1525 #endif
1528 #if (_WIN32_WINNT >= 0x0500)
1533 #endif
1538 #if (_WIN32_WINNT >= 0x0500)
1540 #endif
1541 #if (_WIN32_WINNT >= 0x0501)
1543 #endif
1544 #if (_WIN32_WINNT >= 0x0500)
1545 _Ret_maybenull_ PVOID WINAPI AddVectoredExceptionHandler(_In_ ULONG, _In_ PVECTORED_EXCEPTION_HANDLER);
1547 #endif
1559 
1560 BOOL
1561 WINAPI
1562 BackupRead(
1563  _In_ HANDLE hFile,
1564  _Out_writes_bytes_to_(nNumberOfBytesToRead, *lpNumberOfBytesRead) LPBYTE lpBuffer,
1565  _In_ DWORD nNumberOfBytesToRead,
1566  _Out_ LPDWORD lpNumberOfBytesRead,
1567  _In_ BOOL bAbort,
1568  _In_ BOOL bProcessSecurity,
1569  _Inout_ LPVOID *lpContext);
1570 
1572 
1573 BOOL
1574 WINAPI
1575 BackupWrite(
1576  _In_ HANDLE hFile,
1579  _Out_ LPDWORD lpNumberOfBytesWritten,
1580  _In_ BOOL bAbort,
1581  _In_ BOOL bProcessSecurity,
1582  _Inout_ LPVOID *lpContext);
1583 
1587 #if (_WIN32_WINNT >= 0x0500)
1589 #endif
1594 
1595 BOOL
1596 WINAPI
1598  _In_ LPCSTR lpNamedPipeName,
1599  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1600  _In_ DWORD nInBufferSize,
1601  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1602  _In_ DWORD nOutBufferSize,
1603  _Out_ LPDWORD lpBytesRead,
1604  _In_ DWORD nTimeOut);
1605 
1606 BOOL
1607 WINAPI
1609  _In_ LPCWSTR lpNamedPipeName,
1610  _In_reads_bytes_opt_(nInBufferSize) LPVOID lpInBuffer,
1611  _In_ DWORD nInBufferSize,
1612  _Out_writes_bytes_to_opt_(nOutBufferSize, *lpBytesRead) LPVOID lpOutBuffer,
1613  _In_ DWORD nOutBufferSize,
1614  _Out_ LPDWORD lpBytesRead,
1615  _In_ DWORD nTimeOut);
1616 
1619 #if (_WIN32_WINNT >= 0x0600)
1620 BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED);
1621 BOOL WINAPI CancelSynchronousIo(HANDLE);
1622 #endif
1624 
1625 #if (_WIN32_WINNT >= 0x0501)
1626 
1627 BOOL
1628 WINAPI
1630  _In_ LPCSTR lpName,
1631  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1632  _In_ DWORD OemNameSize,
1633  _Out_opt_ PBOOL pbNameContainsSpaces,
1634  _Out_ PBOOL pbNameLegal);
1635 
1636 BOOL
1637 WINAPI
1640  _Out_writes_opt_(OemNameSize) LPSTR lpOemName,
1641  _In_ DWORD OemNameSize,
1642  _Out_opt_ PBOOL pbNameContainsSpaces,
1643  _Out_ PBOOL pbNameLegal);
1644 
1646 #endif
1647 
1659 #if (_WIN32_WINNT >= 0x0400)
1661 #endif
1664 BOOL WINAPI CopyFileW(_In_ LPCWSTR lpExistingFileName, _In_ LPCWSTR lpNewFileName, _In_ BOOL bFailIfExists);
1667 #define MoveMemory RtlMoveMemory
1668 #define CopyMemory RtlCopyMemory
1669 #define FillMemory RtlFillMemory
1670 #define ZeroMemory RtlZeroMemory
1671 #define SecureZeroMemory RtlSecureZeroMemory
1673 #if (_WIN32_WINNT >= 0x0501)
1674 HANDLE WINAPI CreateActCtxA(_In_ PCACTCTXA);
1675 HANDLE WINAPI CreateActCtxW(_In_ PCACTCTXW);
1676 #endif
1677 BOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1678 BOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
1681 HANDLE WINAPI CreateEventA(_In_opt_ LPSECURITY_ATTRIBUTES lpEventAttributes, _In_ BOOL bManualReset, _In_ BOOL bInitialState, _In_opt_ LPCSTR lpName);
1683 #if (_WIN32_WINNT >= 0x0600)
1686 #endif
1688 #if (_WIN32_WINNT >= 0x0400)
1690 #endif
1695 #if (_WIN32_WINNT >= 0x0500)
1698 #endif
1700 #if (_WIN32_WINNT >= 0x0500)
1705 #endif
1708 #if (_WIN32_WINNT >= 0x0501)
1709 HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE);
1710 #endif
1713 #if (_WIN32_WINNT >= 0x0600)
1716 #endif
1723 
1724 BOOL
1725 WINAPI
1727  _In_opt_ HANDLE,
1728  _In_opt_ LPCSTR,
1732  _In_ BOOL,
1733  _In_ DWORD,
1734  _In_opt_ PVOID,
1735  _In_opt_ LPCSTR,
1738 
1743 
1744 BOOL
1745 WINAPI
1747  _In_ HANDLE ExistingTokenHandle,
1748  _In_ DWORD Flags,
1749  _In_ DWORD DisableSidCount,
1750  _In_reads_opt_(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable,
1751  _In_ DWORD DeletePrivilegeCount,
1752  _In_reads_opt_(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete,
1753  _In_ DWORD RestrictedSidCount,
1754  _In_reads_opt_(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict,
1756 
1759 #if (_WIN32_WINNT >= 0x0600)
1762 #endif
1764 
1765 #if (_WIN32_WINNT >= 0x0500)
1766 
1768 
1769 BOOL
1770 WINAPI
1772  _Outptr_ PHANDLE,
1773  _In_opt_ HANDLE,
1775  _In_opt_ PVOID,
1776  _In_ DWORD,
1777  _In_ DWORD,
1778  _In_ ULONG);
1779 
1781 BOOL
1782 WINAPI
1784  _In_opt_ HANDLE TimerQueue,
1786  _In_ ULONG DueTime,
1787  _In_ ULONG Period);
1788 
1789 #endif /* (_WIN32_WINNT >= 0x0500) */
1790 
1794 #if (_WIN32_WINNT >= 0x0600)
1796 HANDLE WINAPI CreateWaitableTimerExW(LPSECURITY_ATTRIBUTES,LPCWSTR,DWORD,DWORD);
1797 #endif
1798 #if (_WIN32_WINNT >= 0x0501)
1801 #endif
1803 #if (_WIN32_WINNT >= 0x0501)
1805 #endif
1806 void WINAPI DebugBreak(void);
1807 #if (_WIN32_WINNT >= 0x0501)
1810 #endif
1817 #define DefineHandleTable(w) ((w),TRUE)
1824 #if (_WIN32_WINNT >= 0x0500)
1830 #endif
1835 
1836 #if (_WIN32_WINNT >= 0x0500)
1837 
1838 _Success_(return != FALSE)
1839 BOOL
1840 WINAPI
1842  _In_ LPCSTR Hostname,
1843  _Out_writes_to_opt_(*nSize, *nSize + 1) LPSTR ComputerName,
1845 
1846 _Success_(return != FALSE)
1847 BOOL
1848 WINAPI
1850  _In_ LPCWSTR Hostname,
1851  _Out_writes_to_opt_(*nSize, *nSize + 1) LPWSTR ComputerName,
1853 
1854 #endif
1855 
1879 DECLSPEC_NORETURN void WINAPI ExitThread(_In_ DWORD dwExitCode);
1890 #if (_WIN32_WINNT >= 0x0501)
1894 #endif
1905 #if (_WIN32_WINNT >= 0x0501)
1907 #endif
1909 
1910 #if (_WIN32_WINNT >= 0x0500)
1911 
1912 HANDLE
1913 WINAPI
1915  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1916  _In_ DWORD cchBufferLength);
1917 
1919 
1920 HANDLE
1921 WINAPI
1923  _In_ LPCSTR lpszRootPathName,
1924  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1925  _In_ DWORD cchBufferLength);
1926 
1927 HANDLE
1928 WINAPI
1930  _In_ LPCWSTR lpszRootPathName,
1931  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1932  _In_ DWORD cchBufferLength);
1933 
1934 #endif
1935 
1939 #if (_WIN32_WINNT >= 0x0501)
1941 #endif
1942 
1943 #if (_WIN32_WINNT >= 0x0500)
1944 
1945 BOOL
1946 WINAPI
1948  _Inout_ HANDLE hFindVolume,
1949  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
1950  _In_ DWORD cchBufferLength);
1951 
1953 
1954 BOOL
1955 WINAPI
1957  _In_ HANDLE hFindVolumeMountPoint,
1958  _Out_writes_(cchBufferLength) LPSTR lpszVolumeMountPoint,
1959  _In_ DWORD cchBufferLength);
1960 
1961 BOOL
1962 WINAPI
1964  _In_ HANDLE hFindVolumeMountPoint,
1965  _Out_writes_(cchBufferLength) LPWSTR lpszVolumeMountPoint,
1966  _In_ DWORD cchBufferLength);
1967 
1970 
1971 #endif
1972 
1977 #if (_WIN32_WINNT >= 0x0502)
1978 
1979 DWORD
1980 WINAPI
1982  _In_ LPCSTR lpName,
1983  _In_ LPCSTR lpGuid,
1985  _In_ DWORD nSize);
1986 
1987 DWORD
1988 WINAPI
1991  _In_ LPCWSTR lpGuid,
1993  _In_ DWORD nSize);
1994 
1995 #endif
2003 DWORD WINAPI FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list* Arguments);
2004 DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list* Arguments);
2009 #define FreeModule(m) FreeLibrary(m)
2010 #define FreeProcInstance(p) (void)(p)
2011 #ifndef XFree86Server
2013 #endif /* ndef XFree86Server */
2017 #if (_WIN32_WINNT >= 0x0600)
2020 #endif
2021 
2022 UINT
2023 WINAPI
2024 GetAtomNameA(
2025  _In_ ATOM nAtom,
2026  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2027  _In_ int nSize);
2028 
2029 UINT
2030 WINAPI
2031 GetAtomNameW(
2032  _In_ ATOM nAtom,
2033  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2034  _In_ int nSize);
2035 
2040 
2041 _Success_(return != FALSE)
2042 BOOL
2043 WINAPI
2045  _In_ HANDLE hCommDev,
2048 
2056 
2057 _Success_(return != 0)
2058 BOOL
2059 WINAPI
2063 
2064 _Success_(return != 0)
2065 BOOL
2066 WINAPI
2070 
2071 #if (_WIN32_WINNT >= 0x0500)
2072 BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
2073 BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
2074 #endif
2075 #if (_WIN32_WINNT >= 0x0501)
2077 #endif
2086 #define GetCurrentTime GetTickCount
2087 
2088 BOOL
2089 WINAPI
2091  _In_ LPCSTR lpszName,
2094 
2095 BOOL
2096 WINAPI
2098  _In_ LPCWSTR lpszName,
2101 
2106 
2107 #if (_WIN32_WINNT >= 0x0502)
2108 
2109 _Success_(return != 0 && return < nBufferLength)
2110 DWORD
2111 WINAPI
2115 
2116 _Success_(return != 0 && return < nBufferLength)
2117 DWORD
2118 WINAPI
2122 
2123 #endif
2124 
2134 #if (_WIN32_WINNT >= 0x0600)
2138 #endif
2142 #if (_WIN32_WINNT >= 0x0600)
2144 #endif
2146 
2147 #if (_WIN32_WINNT >= 0x0600)
2148 BOOL
2149 WINAPI
2151  _In_ HANDLE hFile,
2153  _Out_writes_bytes_(dwBufferSize) LPVOID lpFileInformation,
2154  _In_ DWORD dwBufferSize);
2155 #endif
2156 
2157 BOOL
2158 WINAPI
2161  _In_ SECURITY_INFORMATION RequestedInformation,
2162  _Out_writes_bytes_to_opt_(nLength, *lpnLengthNeeded) PSECURITY_DESCRIPTOR pSecurityDescriptor,
2163  _In_ DWORD nLength,
2164  _Out_ LPDWORD lpnLengthNeeded);
2165 
2171 #define GetFreeSpace(w) (0x100000L)
2176 DWORD WINAPI GetLastError(void);
2180 
2181 _Success_(return != 0 && return <= nBufferLength)
2182 DWORD
2183 WINAPI
2187 
2189 #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
2192 #endif
2198 #if (_WIN32_WINNT >= 0x0500)
2201 #endif
2202 
2203 #if _WIN32_WINNT >= 0x0502
2206 #endif
2207 
2208 BOOL
2209 WINAPI
2211  _In_ HANDLE hNamedPipe,
2212  _Out_opt_ LPDWORD lpState,
2213  _Out_opt_ LPDWORD lpCurInstances,
2214  _Out_opt_ LPDWORD lpMaxCollectionCount,
2215  _Out_opt_ LPDWORD lpCollectDataTimeout,
2216  _Out_writes_opt_(nMaxUserNameSize) LPSTR lpUserName,
2217  _In_ DWORD nMaxUserNameSize);
2218 
2219 BOOL
2220 WINAPI
2222  _In_ HANDLE hNamedPipe,
2223  _Out_opt_ LPDWORD lpState,
2224  _Out_opt_ LPDWORD lpCurInstances,
2225  _Out_opt_ LPDWORD lpMaxCollectionCount,
2226  _Out_opt_ LPDWORD lpCollectDataTimeout,
2227  _Out_writes_opt_(nMaxUserNameSize) LPWSTR lpUserName,
2228  _In_ DWORD nMaxUserNameSize);
2229 
2231 #if (_WIN32_WINNT >= 0x0501)
2233 #endif
2234 
2235 BOOL
2236 WINAPI
2238  _In_ HANDLE hEventLog,
2243 
2251 
2252 DWORD
2253 WINAPI
2255  _In_ LPCSTR lpAppName,
2256  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2257  _In_ DWORD nSize,
2259 
2260 DWORD
2261 WINAPI
2263  _In_ LPCWSTR lpAppName,
2264  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2265  _In_ DWORD nSize,
2267 
2268 DWORD
2269 WINAPI
2271  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpszReturnBuffer,
2272  _In_ DWORD nSize,
2274 
2275 DWORD
2276 WINAPI
2278  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpszReturnBuffer,
2279  _In_ DWORD nSize,
2281 
2282 DWORD
2283 WINAPI
2285  _In_opt_ LPCSTR lpAppName,
2286  _In_opt_ LPCSTR lpKeyName,
2287  _In_opt_ LPCSTR lpDefault,
2288  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2289  _In_ DWORD nSize,
2291 
2292 DWORD
2293 WINAPI
2295  _In_opt_ LPCWSTR lpAppName,
2296  _In_opt_ LPCWSTR lpKeyName,
2297  _In_opt_ LPCWSTR lpDefault,
2298  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2299  _In_ DWORD nSize,
2301 
2302 BOOL
2303 WINAPI
2305  _In_ LPCSTR lpszSection,
2306  _In_ LPCSTR lpszKey,
2307  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2308  _In_ UINT uSizeStruct,
2309  _In_opt_ LPCSTR szFile);
2310 
2311 BOOL
2312 WINAPI
2314  _In_ LPCWSTR lpszSection,
2315  _In_ LPCWSTR lpszKey,
2316  _Out_writes_bytes_opt_(uSizeStruct) LPVOID lpStruct,
2317  _In_ UINT uSizeStruct,
2318  _In_opt_ LPCWSTR szFile);
2319 
2322 #if (_WIN32_WINNT >= 0x0502)
2324 #endif
2327 #if (_WIN32_WINNT >= 0x0502)
2330 #endif
2331 #if (_WIN32_WINNT >= 0x0500)
2333 #endif
2338 HWINSTA WINAPI GetProcessWindowStation(void);
2342 
2343 DWORD
2344 WINAPI
2346  _In_ LPCSTR lpAppName,
2347  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2348  _In_ DWORD nSize);
2349 
2350 DWORD
2351 WINAPI
2353  _In_ LPCWSTR lpAppName,
2354  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2355  _In_ DWORD nSize);
2356 
2357 DWORD
2358 WINAPI
2360  _In_opt_ LPCSTR lpAppName,
2361  _In_opt_ LPCSTR lpKeyName,
2362  _In_opt_ LPCSTR lpDefault,
2363  _Out_writes_to_opt_(nSize, return + 1) LPSTR lpReturnedString,
2364  _In_ DWORD nSize);
2365 
2366 DWORD
2367 WINAPI
2369  _In_opt_ LPCWSTR lpAppName,
2370  _In_opt_ LPCWSTR lpKeyName,
2371  _In_opt_ LPCWSTR lpDefault,
2372  _Out_writes_to_opt_(nSize, return + 1) LPWSTR lpReturnedString,
2373  _In_ DWORD nSize);
2374 
2383 
2384 _Success_(return != 0 && return < cchBuffer)
2385 DWORD
2386 WINAPI
2388  _In_ LPCSTR lpszLongPath,
2389  _Out_writes_to_opt_(cchBuffer, return + 1) LPSTR lpszShortPath,
2391 
2402 
2403 WINBASEAPI
2404 UINT
2405 WINAPI
2407  _In_ DWORD FirmwareTableProviderSignature,
2409  _Out_writes_bytes_to_opt_(BufferSize,return) PVOID pFirmwareTableBuffer,
2411 
2414 #if (_WIN32_WINNT >= 0x0502)
2416 #endif
2417 VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
2418 #if (_WIN32_WINNT >= 0x0501)
2420 #endif
2423 #if (_WIN32_WINNT >= 0x0500)
2426 #endif
2427 
2428 #if (_WIN32_WINNT >= 0x0501)
2429 
2430 _Success_(return != 0 && return < uSize)
2431 UINT
2432 WINAPI
2434  _Out_writes_to_opt_(uSize, return + 1) LPSTR lpBuffer,
2435  _In_ UINT uSize);
2436 
2437 _Success_(return != 0 && return < uSize)
2438 UINT
2439 WINAPI
2441  _Out_writes_to_opt_(uSize, return + 1) LPWSTR lpBuffer,
2442  _In_ UINT uSize);
2443 
2444 #endif
2445 
2446 DWORD
2447 WINAPI
2449  _In_ HANDLE hDevice,
2450  _In_ DWORD dwOperation,
2452  _Out_writes_bytes_(*lpdwSize) LPVOID lpTapeInformation);
2453 
2456 
2457 UINT
2458 WINAPI
2460  _In_ LPCSTR lpPathName,
2461  _In_ LPCSTR lpPrefixString,
2462  _In_ UINT uUnique,
2463  _Out_writes_(MAX_PATH) LPSTR lpTempFileName);
2464 
2466 
2467 DWORD
2468 WINAPI
2469 GetTempPathA(
2472 
2475 #if (_WIN32_WINNT >= 0x0502)
2477 #endif
2483 #if (_WIN32_WINNT >= 0x0600)
2485 #endif
2489 
2490 BOOL
2491 WINAPI
2492 GetUserNameA(
2493  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPSTR lpBuffer,
2494  _Inout_ LPDWORD pcbBuffer);
2495 
2496 BOOL
2497 WINAPI
2498 GetUserNameW(
2499  _Out_writes_to_opt_(*pcbBuffer, *pcbBuffer) LPWSTR lpBuffer,
2500  _Inout_ LPDWORD pcbBuffer);
2501 
2502 DWORD WINAPI GetVersion(void);
2505 
2506 BOOL
2507 WINAPI
2509  _In_opt_ LPCSTR lpRootPathName,
2510  _Out_writes_opt_(nVolumeNameSize) LPSTR lpVolumeNameBuffer,
2511  _In_ DWORD nVolumeNameSize,
2512  _Out_opt_ LPDWORD lpVolumeSerialNumber,
2513  _Out_opt_ LPDWORD lpMaximumComponentLength,
2514  _Out_opt_ LPDWORD lpFileSystemFlags,
2515  _Out_writes_opt_(nFileSystemNameSize) LPSTR lpFileSystemNameBuffer,
2516  _In_ DWORD nFileSystemNameSize);
2517 
2519 
2520 #if (_WIN32_WINNT >= 0x0500)
2521 
2522 BOOL
2523 WINAPI
2525  _In_ LPCSTR lpszVolumeMountPoint,
2526  _Out_writes_(cchBufferLength) LPSTR lpszVolumeName,
2527  _In_ DWORD cchBufferLength);
2528 
2530 
2531 BOOL
2532 WINAPI
2534  _In_ LPCSTR lpszFileName,
2535  _Out_writes_(cchBufferLength) LPSTR lpszVolumePathName,
2536  _In_ DWORD cchBufferLength);
2537 
2539 
2540 #endif
2541 
2542 #if (_WIN32_WINNT >= 0x0501)
2543 
2544 BOOL
2545 WINAPI
2547  _In_ LPCSTR lpszVolumeName,
2548  _Out_writes_to_opt_(cchBufferLength, *lpcchReturnLength) _Post_ _NullNull_terminated_ LPCH lpszVolumePathNames,
2549  _In_ DWORD cchBufferLength,
2550  _Out_ PDWORD lpcchReturnLength);
2551 
2553 
2554 #endif
2555 
2563 SIZE_T WINAPI GlobalCompact(_In_ DWORD); /* Obsolete: Has no effect. */
2565 #define GlobalDiscard(m) GlobalReAlloc((m),0,GMEM_MOVEABLE)
2568 VOID WINAPI GlobalFix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2569 UINT WINAPI GlobalFlags(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2571 
2572 UINT
2573 WINAPI
2575  _In_ ATOM nAtom,
2576  _Out_writes_to_(nSize, return + 1) LPSTR lpBuffer,
2577  _In_ int nSize);
2578 
2579 UINT
2580 WINAPI
2582  _In_ ATOM nAtom,
2583  _Out_writes_to_(nSize, return + 1) LPWSTR lpBuffer,
2584  _In_ int nSize);
2585 
2589 #if (_WIN32_WINNT >= 0x0500)
2590 BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
2591 #endif
2594 VOID WINAPI GlobalUnfix(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2596 BOOL WINAPI GlobalUnWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2597 PVOID WINAPI GlobalWire(_In_ HGLOBAL); /* Obsolete: Has no effect. */
2598 #define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
2605 #if (_WIN32_WINNT >= 0x0501)
2607 #endif
2609 #if (_WIN32_WINNT >= 0x0501)
2611 #endif
2622 #if (_WIN32_WINNT >= 0x0600)
2623 VOID WINAPI InitializeConditionVariable(PCONDITION_VARIABLE);
2624 #endif
2630 
2631 #if (_WIN32_WINNT >= 0x0600)
2633 #endif
2634 
2643 #if (_WIN32_WINNT >= 0x0501)
2645 #endif
2648 
2649 BOOL
2650 WINAPI
2652  _In_reads_bytes_(iSize) CONST VOID *lpv,
2653  _In_ int iSize,
2654  _Inout_opt_ LPINT lpiResult);
2655 
2656 #if (_WIN32_WINNT >= 0x0600)
2658 #endif
2662 #if (_WIN32_WINNT >= 0x0501)
2665 #endif
2667 #define LimitEmsPages(n)
2675 SIZE_T WINAPI LocalCompact(_In_ UINT); /* Obsolete: Has no effect. */
2676 #define LocalDiscard(m) (LocalReAlloc((m),0,LMEM_MOVEABLE))
2678 UINT WINAPI LocalFlags(_In_ HLOCAL); /* Obsolete: Has no effect. */
2683 SIZE_T WINAPI LocalShrink(_In_ HLOCAL, _In_ UINT); /* Obsolete: Has no effect. */
2689 #define LockSegment(w) GlobalFix((HANDLE)(w)) /* Obsolete: Has no effect. */
2692 
2693 _Success_(return != FALSE)
2694 BOOL
2695 WINAPI
2696 LogonUserExA(
2697  _In_ LPSTR lpszUsername,
2707 
2708 _Success_(return != FALSE)
2709 BOOL
2710 WINAPI
2711 LogonUserExW(
2712  _In_ LPWSTR lpszUsername,
2722 
2723 _Success_(return != FALSE)
2724 BOOL
2725 WINAPI
2727  _In_opt_ LPCSTR lpSystemName,
2734 
2735 _Success_(return != FALSE)
2736 BOOL
2737 WINAPI
2739  _In_opt_ LPCWSTR lpSystemName,
2746 
2747 _Success_(return != FALSE)
2748 BOOL
2749 WINAPI
2751  _In_opt_ LPCSTR lpSystemName,
2752  _In_ PSID Sid,
2758 
2759 _Success_(return != FALSE)
2760 BOOL
2761 WINAPI
2763  _In_opt_ LPCWSTR lpSystemName,
2764  _In_ PSID Sid,
2770 
2771 _Success_(return != FALSE)
2772 BOOL
2773 WINAPI
2775  _In_opt_ LPCSTR lpSystemName,
2780 
2781 _Success_(return != FALSE)
2782 BOOL
2783 WINAPI
2785  _In_opt_ LPCWSTR lpSystemName,
2790 
2791 _Success_(return != FALSE)
2792 BOOL
2793 WINAPI
2795  _In_opt_ LPCSTR lpSystemName,
2799 
2800 _Success_(return != FALSE)
2801 BOOL
2802 WINAPI
2804  _In_opt_ LPCWSTR lpSystemName,
2805  _In_ PLUID lpLuid,
2808 
2811 
2812 LPSTR
2813 WINAPI
2814 lstrcatA(
2815  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPSTR lpString1,
2816  _In_ LPCSTR lpString2);
2817 
2818 LPWSTR
2819 WINAPI
2820 lstrcatW(
2821  _Inout_updates_z_(_String_length_(lpString1) + _String_length_(lpString2) + 1) LPWSTR lpString1,
2822  _In_ LPCWSTR lpString2);
2823 
2828 
2829 LPSTR
2830 WINAPI
2831 lstrcpyA(
2832  _Out_writes_(_String_length_(lpString2) + 1) LPSTR lpString1,
2833  _In_ LPCSTR lpString2);
2834 
2835 LPWSTR
2836 WINAPI
2837 lstrcpyW(
2838  _Out_writes_(_String_length_(lpString2) + 1) LPWSTR lpString1,
2839  _In_ LPCWSTR lpString2);
2840 
2843 int WINAPI lstrlenA(LPCSTR);
2844 int WINAPI lstrlenW(LPCWSTR);
2846 #define MakeProcInstance(p,i) (p)
2857 int WINAPI MulDiv(_In_ int, _In_ int, _In_ int);
2874 #if (_WIN32_WINNT >= 0x0600)
2876 #endif
2885 #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
2887 #endif
2899 #if (_WIN32_WINNT >= 0x0500)
2901 #endif
2904 
2905 #if (_WIN32_WINNT >= 0x0501)
2906 BOOL
2907 WINAPI
2908 QueryActCtxW(
2909  _In_ DWORD dwFlags,
2910  _In_ HANDLE hActCtx,
2911  _In_opt_ PVOID pvSubInstance,
2912  _In_ ULONG ulInfoClass,
2913  _Out_writes_bytes_to_opt_(cbBuffer, *pcbWrittenOrRequired) PVOID pvBuffer,
2914  _In_ SIZE_T cbBuffer,
2915  _Out_opt_ SIZE_T *pcbWrittenOrRequired);
2916 #endif
2917 
2918 DWORD
2919 WINAPI
2921  _In_opt_ LPCSTR lpDeviceName,
2922  _Out_writes_to_opt_(ucchMax, return) LPSTR lpTargetPath,
2923  _In_ DWORD ucchMax);
2924 
2926 #if (_WIN32_WINNT >= 0x0501)
2928 #endif
2931 #if (_WIN32_WINNT >= 0x0600)
2933 #endif
2935 #if (_WIN32_WINNT >= 0x0500)
2937 #endif
2939 
2940 BOOL
2941 WINAPI
2943  _In_opt_ HANDLE hJob,
2944  _In_ JOBOBJECTINFOCLASS JobObjectInformationClass,
2945  _Out_writes_bytes_to_(cbJobObjectInformationLength, *lpReturnLength) LPVOID lpJobObjectInformation,
2946  _In_ DWORD cbJobObjectInformationLength,
2947  _Out_opt_ LPDWORD lpReturnLength);
2948 
2949 BOOL
2950 WINAPI
2952  _In_ HANDLE hDirectory,
2955  _In_ BOOL bWatchSubtree,
2956  _In_ DWORD dwNotifyFilter,
2959  _In_opt_ LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
2960 
2961 BOOL
2962 WINAPI
2964  _In_ HANDLE hEventLog,
2965  _In_ DWORD dwReadFlags,
2966  _In_ DWORD dwRecordOffset,
2967  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2968  _In_ DWORD nNumberOfBytesToRead,
2969  _Out_ DWORD *pnBytesRead,
2970  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2971 
2972 BOOL
2973 WINAPI
2975  _In_ HANDLE hEventLog,
2976  _In_ DWORD dwReadFlags,
2977  _In_ DWORD dwRecordOffset,
2978  _Out_writes_bytes_to_(nNumberOfBytesToRead, *pnBytesRead) LPVOID lpBuffer,
2979  _In_ DWORD nNumberOfBytesToRead,
2980  _Out_ DWORD *pnBytesRead,
2981  _Out_ DWORD *pnMinNumberOfBytesNeeded);
2982 
2987 #if (_WIN32_WINNT >= 0x0600)
2988 VOID WINAPI RecoveryFinished(BOOL);
2989 HRESULT WINAPI RecoveryInProgress(OUT PBOOL);
2992 #endif
2995 #if (_WIN32_WINNT >= 0x0500)
2998 #endif