4#if !defined(_KERNEL32_)
5#define WINBASEAPI DECLSPEC_IMPORT
18#pragma warning(disable:4201)
19#pragma warning(disable:4214)
20#pragma warning(disable:4820)
23#define PROCESS_NAME_NATIVE 1
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
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
36#define COMMPROP_INITIALIZED 0xE73CF52E
37#define SP_SERIALCOMM 1
38#define PST_UNSPECIFIED 0
40#define PST_PARALLELPORT 2
46#define PST_SCANNER 0x22
47#define PST_NETWORK_BRIDGE 0x100
49#define PST_TCPIP_TELNET 0x102
63#define BAUD_14400 4096
64#define BAUD_19200 8192
65#define BAUD_38400 16384
67#define BAUD_128K 65536
68#define BAUD_115200 131072
69#define BAUD_57600 262144
70#define BAUD_USER 0x10000000
74#define PCF_PARITY_CHECK 8
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
85#define SP_HANDSHAKING 16
86#define SP_PARITY_CHECK 32
93#define DATABITS_16X 32
97#define PARITY_NONE 256
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
111#define HFILE_ERROR ((HFILE)-1)
113#define FILE_CURRENT 1
115#define INVALID_SET_FILE_POINTER ((DWORD)-1)
117#define OF_READWRITE 2
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
127#define OF_EXIST 16384
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
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
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
200#define CREATE_ALWAYS 2
201#define OPEN_EXISTING 3
203#define TRUNCATE_EXISTING 5
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
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
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
253#define DRIVE_REMOTE 4
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
264#define HANDLE_FLAG_INHERIT 0x01
265#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
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
294#define GMEM_MOVEABLE 2
295#define GMEM_MODIFY 128
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
341#define DONT_RESOLVE_DLL_REFERENCES 0x00000001
342#define LOAD_LIBRARY_AS_DATAFILE 0x00000002
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
356#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
357#define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x00002000
358#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER 0x00004000
360#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
361#define LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER LOAD_LIBRARY_SEARCH_SYSTEM32
364#if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
365#define LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY 0x00008000
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
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
409#define WAIT_TIMEOUT 258
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
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
430#define EV_EVENT1 2048
431#define EV_EVENT2 4096
435#define EV_RX80FULL 1024
440#define SEM_FAILCRITICALERRORS 0x0001
441#define SEM_NOGPFAULTERRORBOX 0x0002
442#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
443#define SEM_NOOPENFILEERRORBOX 0x8000
446#define SLE_MINORERROR 2
448#define SHUTDOWN_NORETRY 1
449#define MAXINTATOM 0xC000
450#define INVALID_ATOM ((ATOM)0)
452#define INFINITE 0xFFFFFFFF
459#define ONE5STOPBITS 1
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
478#define BACKUP_EA_DATA 2
479#define BACKUP_SECURITY_DATA 3
480#define BACKUP_ALTERNATE_DATA 4
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
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
501#define STARTF_USEHOTKEY 0x00000200
502#define STARTF_TITLEISLINKNAME 0x00000800
503#define STARTF_TITLEISAPPID 0x00001000
504#define STARTF_PREVENTPINNING 0x00002000
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
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
569#if (_WIN32_WINNT >= 0x0500)
570#define REPLACEFILE_WRITE_THROUGH 0x00000001
571#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
573#if (_WIN32_WINNT >= 0x0400)
574#define FIBER_FLAG_FLOAT_SWITCH 0x1
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
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
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
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)
612#define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
614#if (_WIN32_WINNT >= 0x0600)
615#define PROCESS_DEP_ENABLE 0x00000001
616#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
619#define LOGON_WITH_PROFILE 0x00000001
620#define LOGON_NETCREDENTIALS_ONLY 0x00000002
915#if (_WIN32_WINNT >= 0x0500)
951#if (_WIN32_WINNT >= 0x0501)
952typedef enum _STREAM_INFO_LEVELS {
953 FindStreamInfoStandard
956typedef struct _WIN32_FIND_STREAM_DATA {
959} WIN32_FIND_STREAM_DATA, *PWIN32_FIND_STREAM_DATA;
970#if (_WIN32_WINNT >= 0x0600)
972typedef enum _FILE_ID_TYPE {
977} FILE_ID_TYPE, *PFILE_ID_TYPE;
979typedef struct _FILE_ID_DESCRIPTOR {
988#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(__REACTOS__)
989typedef enum _FILE_INFO_BY_HANDLE_CLASS {
999 FileAttributeTagInfo,
1000 FileIdBothDirectoryInfo,
1001 FileIdBothDirectoryRestartInfo,
1002 FileIoPriorityHintInfo,
1003 FileRemoteProtocolInfo,
1004 FileFullDirectoryInfo,
1005 FileFullDirectoryRestartInfo,
1006#if (NTDDI_VERSION >= NTDDI_WIN8) || defined(__REACTOS__)
1010 FileIdExtdDirectoryInfo,
1011 FileIdExtdDirectoryRestartInfo,
1013#if (NTDDI_VERSION >= NTDDI_WIN10_RS1) || defined(__REACTOS__)
1014 FileDispositionInfoEx,
1017#if (NTDDI_VERSION >= NTDDI_WIN10_19H1) || defined(__REACTOS__)
1018 FileCaseSensitiveInfo,
1019 FileNormalizedNameInfo,
1021 MaximumFileInfoByHandleClass
1025typedef struct _FILE_ID_BOTH_DIR_INFO {
1026 DWORD NextEntryOffset;
1037 CCHAR ShortNameLength;
1041} FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
1043typedef struct _FILE_BASIC_INFO {
1049} FILE_BASIC_INFO, *PFILE_BASIC_INFO;
1051typedef struct _FILE_STANDARD_INFO {
1054 DWORD NumberOfLinks;
1057} FILE_STANDARD_INFO, *PFILE_STANDARD_INFO;
1059typedef struct _FILE_NAME_INFO {
1062} FILE_NAME_INFO, *PFILE_NAME_INFO;
1064typedef enum _PRIORITY_HINT {
1065 IoPriorityHintVeryLow,
1067 IoPriorityHintNormal,
1068 MaximumIoPriorityHintType
1071typedef struct _FILE_IO_PRIORITY_HINT_INFO {
1073} FILE_IO_PRIORITY_HINT_INFO;
1075typedef struct _FILE_ALLOCATION_INFO {
1077} FILE_ALLOCATION_INFO, *PFILE_ALLOCATION_INFO;
1079typedef struct _FILE_DISPOSITION_INFO {
1081} FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO;
1083typedef struct _FILE_END_OF_FILE_INFO {
1085} FILE_END_OF_FILE_INFO, *PFILE_END_OF_FILE_INFO;
1087typedef struct _FILE_RENAME_INFO {
1092} FILE_RENAME_INFO, *PFILE_RENAME_INFO;
1094typedef struct _FILE_ATTRIBUTE_TAG_INFO {
1097} FILE_ATTRIBUTE_TAG_INFO, *PFILE_ATTRIBUTE_TAG_INFO;
1099typedef struct _FILE_COMPRESSION_INFO {
1101 WORD CompressionFormat;
1102 UCHAR CompressionUnitShift;
1106} FILE_COMPRESSION_INFO, *PFILE_COMPRESSION_INFO;
1108typedef struct _FILE_REMOTE_PROTOCOL_INFO {
1112 USHORT ProtocolMajorVersion;
1113 USHORT ProtocolMinorVersion;
1122 } ProtocolSpecificReserved;
1123} FILE_REMOTE_PROTOCOL_INFO, *PFILE_REMOTE_PROTOCOL_INFO;
1154#define EVENTLOG_FULL_INFO 0
1226#if (_WIN32_WINNT >= 0x0500)
1227typedef struct _MEMORYSTATUSEX {
1237} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
1240#ifndef _LDT_ENTRY_DEFINED
1241#define _LDT_ENTRY_DEFINED
1297#if (_WIN32_WINNT >= 0x0501)
1298typedef struct tagACTCTXA {
1302 USHORT wProcessorArchitecture;
1304 LPCSTR lpAssemblyDirectory;
1306 LPCSTR lpApplicationName;
1309typedef const ACTCTXA *PCACTCTXA;
1311typedef struct tagACTCTXW {
1315 USHORT wProcessorArchitecture;
1322typedef const ACTCTXW *PCACTCTXW;
1324typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
1326 ULONG ulDataFormatVersion;
1329 PVOID lpSectionGlobalData;
1330 ULONG ulSectionGlobalDataLength;
1331 PVOID lpSectionBase;
1332 ULONG ulSectionTotalLength;
1334 ULONG ulAssemblyRosterIndex;
1335} ACTCTX_SECTION_KEYED_DATA_2600, *PACTCTX_SECTION_KEYED_DATA_2600;
1336typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
1338typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
1339 PVOID lpInformation;
1340 PVOID lpSectionBase;
1341 ULONG ulSectionLength;
1342 PVOID lpSectionGlobalDataBase;
1343 ULONG ulSectionGlobalDataLength;
1344} ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, *PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1345typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
1347typedef struct tagACTCTX_SECTION_KEYED_DATA {
1349 ULONG ulDataFormatVersion;
1352 PVOID lpSectionGlobalData;
1353 ULONG ulSectionGlobalDataLength;
1354 PVOID lpSectionBase;
1355 ULONG ulSectionTotalLength;
1357 ULONG ulAssemblyRosterIndex;
1360 ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
1363typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
1365typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
1368} ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
1369typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
1372(
WINAPI *PQUERYACTCTXW_FUNC)(
1382 LowMemoryResourceNotification ,
1383 HighMemoryResourceNotification
1384} MEMORY_RESOURCE_NOTIFICATION_TYPE;
1387#if (_WIN32_WINNT >= 0x0500)
1388typedef enum _COMPUTER_NAME_FORMAT {
1389 ComputerNameNetBIOS,
1390 ComputerNameDnsHostname,
1391 ComputerNameDnsDomain,
1392 ComputerNameDnsFullyQualified,
1393 ComputerNamePhysicalNetBIOS,
1394 ComputerNamePhysicalDnsHostname,
1395 ComputerNamePhysicalDnsDomain,
1396 ComputerNamePhysicalDnsFullyQualified,
1398} COMPUTER_NAME_FORMAT;
1401#if (_WIN32_WINNT >= 0x0600)
1408#define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1409#define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1410#define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1411#define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1429#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1430#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1431#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1456#if (_WIN32_WINNT >= 0x0600)
1460#ifdef WINE_NO_UNICODE_MACROS
1461#define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
1463#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
1530BOOL WINAPI AccessCheckAndAuditAlarmW(
LPCWSTR,
LPVOID,
LPWSTR,
LPWSTR,
PSECURITY_DESCRIPTOR,
DWORD,
PGENERIC_MAPPING,
BOOL,
PDWORD,
PBOOL,
PBOOL);
1531#if (_WIN32_WINNT >= 0x0600)
1535#if (_WIN32_WINNT >= 0x0501)
1540#if (_WIN32_WINNT >= 0x0500)
1550#if (_WIN32_WINNT >= 0x0500)
1553#if (_WIN32_WINNT >= 0x0501)
1556#if (_WIN32_WINNT >= 0x0500)
1593BOOL WINAPI AllocateAndInitializeSid(
PSID_IDENTIFIER_AUTHORITY,
BYTE,
DWORD,
DWORD,
DWORD,
DWORD,
DWORD,
DWORD,
DWORD,
DWORD,
PSID*);
1629#if (_WIN32_WINNT >= 0x0500)
1661#if (_WIN32_WINNT >= 0x0600)
1667#if (_WIN32_WINNT >= 0x0501)
1701#if (_WIN32_WINNT >= 0x0400)
1709#define MoveMemory RtlMoveMemory
1710#define CopyMemory RtlCopyMemory
1711#define FillMemory RtlFillMemory
1712#define ZeroMemory RtlZeroMemory
1713#define SecureZeroMemory RtlSecureZeroMemory
1715#if (_WIN32_WINNT >= 0x0501)
1725#if (_WIN32_WINNT >= 0x0600)
1730#if (_WIN32_WINNT >= 0x0400)
1737#if (_WIN32_WINNT >= 0x0500)
1742#if (_WIN32_WINNT >= 0x0500)
1750#if (_WIN32_WINNT >= 0x0501)
1755#if (_WIN32_WINNT >= 0x0600)
1781BOOL WINAPI CreateProcessAsUserW(
HANDLE,
LPCWSTR,
LPWSTR,
LPSECURITY_ATTRIBUTES,
LPSECURITY_ATTRIBUTES,
BOOL,
DWORD,
PVOID,
LPCWSTR,
LPSTARTUPINFOW,
LPPROCESS_INFORMATION);
1782BOOL WINAPI CreateProcessWithLogonW(
LPCWSTR,
LPCWSTR,
LPCWSTR,
DWORD,
LPCWSTR,
LPWSTR,
DWORD,
LPVOID,
LPCWSTR,
LPSTARTUPINFOW,
LPPROCESS_INFORMATION);
1801#if (_WIN32_WINNT >= 0x0600)
1807#if (_WIN32_WINNT >= 0x0500)
1836#if (_WIN32_WINNT >= 0x0600)
1840#if (_WIN32_WINNT >= 0x0501)
1845#if (_WIN32_WINNT >= 0x0501)
1849#if (_WIN32_WINNT >= 0x0501)
1859#define DefineHandleTable(w) ((w),TRUE)
1866#if (_WIN32_WINNT >= 0x0500)
1878#if (_WIN32_WINNT >= 0x0500)
1932#if (_WIN32_WINNT >= 0x0501)
1947#if (_WIN32_WINNT >= 0x0501)
1952#if (_WIN32_WINNT >= 0x0500)
1981#if (_WIN32_WINNT >= 0x0501)
1985#if (_WIN32_WINNT >= 0x0500)
2033#define FreeModule(m) FreeLibrary(m)
2034#define FreeProcInstance(p) (void)(p)
2039#if (_WIN32_WINNT >= 0x0600)
2093#if (_WIN32_WINNT >= 0x0500)
2097#if (_WIN32_WINNT >= 0x0501)
2108#define GetCurrentTime GetTickCount
2129#if (_WIN32_WINNT >= 0x0502)
2156#if (_WIN32_WINNT >= 0x0600)
2164#if (_WIN32_WINNT >= 0x0600)
2169#if (_WIN32_WINNT >= 0x0600)
2193#define GetFreeSpace(w) (0x100000L)
2211#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
2220#if (_WIN32_WINNT >= 0x0500)
2225#if _WIN32_WINNT >= 0x0502
2253#if (_WIN32_WINNT >= 0x0501)
2344#if (_WIN32_WINNT >= 0x0502)
2349#if (_WIN32_WINNT >= 0x0502)
2353#if (_WIN32_WINNT >= 0x0500)
2427#if (_WIN32_WINNT >= 0x0502)
2431#if (_WIN32_WINNT >= 0x0501)
2436#if (_WIN32_WINNT >= 0x0500)
2441#if (_WIN32_WINNT >= 0x0501)
2488#if (_WIN32_WINNT >= 0x0502)
2496#if (_WIN32_WINNT >= 0x0600)
2533#if (_WIN32_WINNT >= 0x0500)
2555#if (_WIN32_WINNT >= 0x0501)
2578#define GlobalDiscard(m) GlobalReAlloc((m),0,GMEM_MOVEABLE)
2602#if (_WIN32_WINNT >= 0x0500)
2611#define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
2618#if (_WIN32_WINNT >= 0x0501)
2622#if (_WIN32_WINNT >= 0x0501)
2635#if (_WIN32_WINNT >= 0x0600)
2644#if (_WIN32_WINNT >= 0x0600)
2656#if (_WIN32_WINNT >= 0x0501)
2669#if (_WIN32_WINNT >= 0x0600)
2675#if (_WIN32_WINNT >= 0x0501)
2680#define LimitEmsPages(n)
2689#define LocalDiscard(m) (LocalReAlloc((m),0,LMEM_MOVEABLE))
2702#define LockSegment(w) GlobalFix((HANDLE)(w))