wine  6.0.1
About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs.
  Fossies Dox: wine-6.0.1.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

winbase.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef __WINE_WINBASE_H
20 #define __WINE_WINBASE_H
21 
22 #include <winerror.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #ifndef WINBASEAPI
29 #ifdef _KERNEL32_
30 #define WINBASEAPI
31 #else
32 #define WINBASEAPI DECLSPEC_IMPORT
33 #endif
34 #endif
35 
36 #ifdef _ADVAPI32_
37 #define WINADVAPI
38 #else
39 #define WINADVAPI DECLSPEC_HIDDEN
40 #endif
41 
42 #include <libloaderapi.h>
43 #include <synchapi.h>
44 #include <threadpoolapiset.h>
45 
46  /* Windows Exit Procedure flag values */
47 #define WEP_FREE_DLL 0
48 #define WEP_SYSTEM_EXIT 1
49 
51 
52 typedef VOID (WINAPI *PFIBER_START_ROUTINE)( LPVOID lpFiberParameter );
54 
55 #define FIBER_FLAG_FLOAT_SWITCH 1
56 
60 
64 
65 #define CRITICAL_SECTION_NO_DEBUG_INFO RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO
66 
69 
70 #define SRWLOCK_INIT RTL_SRWLOCK_INIT
71 
73 
74 #define CONDITION_VARIABLE_INIT RTL_CONDITION_VARIABLE_INIT
75 #define CONDITION_VARIABLE_LOCKMODE_SHARED RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
77 
78 #define EXCEPTION_DEBUG_EVENT 1
79 #define CREATE_THREAD_DEBUG_EVENT 2
80 #define CREATE_PROCESS_DEBUG_EVENT 3
81 #define EXIT_THREAD_DEBUG_EVENT 4
82 #define EXIT_PROCESS_DEBUG_EVENT 5
83 #define LOAD_DLL_DEBUG_EVENT 6
84 #define UNLOAD_DLL_DEBUG_EVENT 7
85 #define OUTPUT_DEBUG_STRING_EVENT 8
86 #define RIP_EVENT 9
87 
88 typedef struct _EXCEPTION_DEBUG_INFO {
92 
93 typedef struct _CREATE_THREAD_DEBUG_INFO {
98 
111 
112 typedef struct _EXIT_THREAD_DEBUG_INFO {
115 
116 typedef struct _EXIT_PROCESS_DEBUG_INFO {
119 
120 typedef struct _LOAD_DLL_DEBUG_INFO {
128 
129 typedef struct _UNLOAD_DLL_DEBUG_INFO {
132 
138 
139 typedef struct _RIP_INFO {
143 
144 typedef struct _DEBUG_EVENT {
148  union {
158  } u;
160 
161 typedef PCONTEXT LPCONTEXT;
164 
167 
168 #define OFS_MAXPATHNAME 128
169 typedef struct _OFSTRUCT
170 {
178 
179 #define OF_READ 0x0000
180 #define OF_WRITE 0x0001
181 #define OF_READWRITE 0x0002
182 #define OF_SHARE_COMPAT 0x0000
183 #define OF_SHARE_EXCLUSIVE 0x0010
184 #define OF_SHARE_DENY_WRITE 0x0020
185 #define OF_SHARE_DENY_READ 0x0030
186 #define OF_SHARE_DENY_NONE 0x0040
187 #define OF_PARSE 0x0100
188 #define OF_DELETE 0x0200
189 #define OF_VERIFY 0x0400 /* Used with OF_REOPEN */
190 #define OF_SEARCH 0x0400 /* Used without OF_REOPEN */
191 #define OF_CANCEL 0x0800
192 #define OF_CREATE 0x1000
193 #define OF_PROMPT 0x2000
194 #define OF_EXIST 0x4000
195 #define OF_REOPEN 0x8000
196 
197 /* SetErrorMode values */
198 #define SEM_FAILCRITICALERRORS 0x0001
199 #define SEM_NOGPFAULTERRORBOX 0x0002
200 #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
201 #define SEM_NOOPENFILEERRORBOX 0x8000
202 
203 /* CopyFileEx flags */
204 #define COPY_FILE_FAIL_IF_EXISTS 0x00000001
205 #define COPY_FILE_RESTARTABLE 0x00000002
206 #define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x00000004
207 #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x00000008
208 #define COPY_FILE_COPY_SYMLINK 0x00000800
209 #define COPY_FILE_NO_BUFFERING 0x00001000
210 
211 /* return values for CopyProgressRoutine */
212 #define PROGRESS_CONTINUE 0
213 #define PROGRESS_CANCEL 1
214 #define PROGRESS_STOP 2
215 #define PROGRESS_QUIET 3
216 
217 /* reason codes for CopyProgressRoutine */
218 #define CALLBACK_CHUNK_FINISHED 0
219 #define CALLBACK_STREAM_SWITCH 1
220 
221 /* GetTempFileName() Flags */
222 #define TF_FORCEDRIVE 0x80
223 
224 #define DRIVE_UNKNOWN 0
225 #define DRIVE_NO_ROOT_DIR 1
226 #define DRIVE_REMOVABLE 2
227 #define DRIVE_FIXED 3
228 #define DRIVE_REMOTE 4
229 /* Win32 additions */
230 #define DRIVE_CDROM 5
231 #define DRIVE_RAMDISK 6
232 
233 #define MAX_COMPUTERNAME_LENGTH 15
234 
235 /* The security attributes structure */
236 typedef struct _SECURITY_ATTRIBUTES
237 {
242 
243 #ifndef _FILETIME_
244 #define _FILETIME_
245 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
246 typedef struct _FILETIME
247 {
248 #ifdef WORDS_BIGENDIAN
251 #else
254 #endif
256 #endif /* _FILETIME_ */
257 
258 /* Find* structures */
259 typedef struct _WIN32_FIND_DATAA
260 {
272 
273 typedef struct _WIN32_FIND_DATAW
274 {
286 
287 DECL_WINELIB_TYPE_AW(WIN32_FIND_DATA)
288 DECL_WINELIB_TYPE_AW(PWIN32_FIND_DATA)
289 DECL_WINELIB_TYPE_AW(LPWIN32_FIND_DATA)
290 
292 {
297 
298 #define FIND_FIRST_EX_CASE_SENSITIVE 1
299 #define FIND_FIRST_EX_LARGE_FETCH 2
300 
301 typedef enum _FINDEX_SEARCH_OPS
302 {
308 
309 typedef struct _PROCESS_HEAP_ENTRY
310 {
316  union {
317  struct {
320  } Block;
321  struct {
329 
330 #define PROCESS_HEAP_REGION 0x0001
331 #define PROCESS_HEAP_UNCOMMITTED_RANGE 0x0002
332 #define PROCESS_HEAP_ENTRY_BUSY 0x0004
333 #define PROCESS_HEAP_ENTRY_MOVEABLE 0x0010
334 #define PROCESS_HEAP_ENTRY_DDESHARE 0x0020
335 
336 #define INVALID_HANDLE_VALUE ((HANDLE)~(ULONG_PTR)0)
337 #define INVALID_FILE_SIZE (~0u)
338 #define INVALID_SET_FILE_POINTER (~0u)
339 #define INVALID_FILE_ATTRIBUTES (~0u)
340 
341 #define LOCKFILE_FAIL_IMMEDIATELY 1
342 #define LOCKFILE_EXCLUSIVE_LOCK 2
343 
344 #define FLS_OUT_OF_INDEXES (~0u)
345 #define TLS_OUT_OF_INDEXES (~0u)
346 
347 #define SHUTDOWN_NORETRY 1
348 
349 /* comm */
350 
351 #define CBR_110 0xFF10
352 #define CBR_300 0xFF11
353 #define CBR_600 0xFF12
354 #define CBR_1200 0xFF13
355 #define CBR_2400 0xFF14
356 #define CBR_4800 0xFF15
357 #define CBR_9600 0xFF16
358 #define CBR_14400 0xFF17
359 #define CBR_19200 0xFF18
360 #define CBR_38400 0xFF1B
361 #define CBR_56000 0xFF1F
362 #define CBR_57600 0xFF20
363 #define CBR_115200 0xFF21
364 #define CBR_128000 0xFF23
365 #define CBR_256000 0xFF27
366 
367 #define NOPARITY 0
368 #define ODDPARITY 1
369 #define EVENPARITY 2
370 #define MARKPARITY 3
371 #define SPACEPARITY 4
372 #define ONESTOPBIT 0
373 #define ONE5STOPBITS 1
374 #define TWOSTOPBITS 2
375 
376 #define IGNORE 0
377 #define INFINITE 0xFFFFFFFF
378 
379 #define CE_RXOVER 0x0001
380 #define CE_OVERRUN 0x0002
381 #define CE_RXPARITY 0x0004
382 #define CE_FRAME 0x0008
383 #define CE_BREAK 0x0010
384 #define CE_CTSTO 0x0020
385 #define CE_DSRTO 0x0040
386 #define CE_RLSDTO 0x0080
387 #define CE_TXFULL 0x0100
388 #define CE_PTO 0x0200
389 #define CE_IOE 0x0400
390 #define CE_DNS 0x0800
391 #define CE_OOP 0x1000
392 #define CE_MODE 0x8000
393 
394 #define IE_BADID -1
395 #define IE_OPEN -2
396 #define IE_NOPEN -3
397 #define IE_MEMORY -4
398 #define IE_DEFAULT -5
399 #define IE_HARDWARE -10
400 #define IE_BYTESIZE -11
401 #define IE_BAUDRATE -12
402 
403 #define EV_RXCHAR 0x0001
404 #define EV_RXFLAG 0x0002
405 #define EV_TXEMPTY 0x0004
406 #define EV_CTS 0x0008
407 #define EV_DSR 0x0010
408 #define EV_RLSD 0x0020
409 #define EV_BREAK 0x0040
410 #define EV_ERR 0x0080
411 #define EV_RING 0x0100
412 #define EV_PERR 0x0200
413 #define EV_RX80FULL 0x0400
414 #define EV_EVENT1 0x0800
415 #define EV_EVENT2 0x1000
416 
417 #define SETXOFF 1
418 #define SETXON 2
419 #define SETRTS 3
420 #define CLRRTS 4
421 #define SETDTR 5
422 #define CLRDTR 6
423 #define RESETDEV 7
424 #define SETBREAK 8
425 #define CLRBREAK 9
426 
427 /* Purge functions for Comm Port */
428 #define PURGE_TXABORT 0x0001 /* Kill the pending/current writes to the
429  comm port */
430 #define PURGE_RXABORT 0x0002 /*Kill the pending/current reads to
431  the comm port */
432 #define PURGE_TXCLEAR 0x0004 /* Kill the transmit queue if there*/
433 #define PURGE_RXCLEAR 0x0008 /* Kill the typeahead buffer if there*/
434 
435 
436 /* Modem Status Flags */
437 #define MS_CTS_ON ((DWORD)0x0010)
438 #define MS_DSR_ON ((DWORD)0x0020)
439 #define MS_RING_ON ((DWORD)0x0040)
440 #define MS_RLSD_ON ((DWORD)0x0080)
441 
442 #define RTS_CONTROL_DISABLE 0
443 #define RTS_CONTROL_ENABLE 1
444 #define RTS_CONTROL_HANDSHAKE 2
445 #define RTS_CONTROL_TOGGLE 3
446 
447 #define DTR_CONTROL_DISABLE 0
448 #define DTR_CONTROL_ENABLE 1
449 #define DTR_CONTROL_HANDSHAKE 2
450 
451 
452 #define LMEM_FIXED 0
453 #define LMEM_MOVEABLE 0x0002
454 #define LMEM_NOCOMPACT 0x0010
455 #define LMEM_NODISCARD 0x0020
456 #define LMEM_ZEROINIT 0x0040
457 #define LMEM_MODIFY 0x0080
458 #define LMEM_DISCARDABLE 0x0F00
459 #define LMEM_DISCARDED 0x4000
460 #define LMEM_INVALID_HANDLE 0x8000
461 #define LMEM_LOCKCOUNT 0x00FF
462 
463 #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
464 #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
465 
466 #define NONZEROLHND (LMEM_MOVEABLE)
467 #define NONZEROLPTR (LMEM_FIXED)
468 
469 #define LocalDiscard(h) (LocalReAlloc((h),0,LMEM_MOVEABLE))
470 
471 #define GMEM_FIXED 0x0000
472 #define GMEM_MOVEABLE 0x0002
473 #define GMEM_NOCOMPACT 0x0010
474 #define GMEM_NODISCARD 0x0020
475 #define GMEM_ZEROINIT 0x0040
476 #define GMEM_MODIFY 0x0080
477 #define GMEM_DISCARDABLE 0x0100
478 #define GMEM_NOT_BANKED 0x1000
479 #define GMEM_SHARE 0x2000
480 #define GMEM_DDESHARE 0x2000
481 #define GMEM_NOTIFY 0x4000
482 #define GMEM_LOWER GMEM_NOT_BANKED
483 #define GMEM_DISCARDED 0x4000
484 #define GMEM_LOCKCOUNT 0x00ff
485 #define GMEM_INVALID_HANDLE 0x8000
486 
487 #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
488 #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
489 
490 #define GlobalLRUNewest(h) ((HANDLE)(h))
491 #define GlobalLRUOldest(h) ((HANDLE)(h))
492 #define GlobalDiscard(h) (GlobalReAlloc((h),0,GMEM_MOVEABLE))
493 
494 #define INVALID_ATOM ((ATOM)0)
495 #define MAXINTATOM 0xc000
496 #ifdef WINE_NO_UNICODE_MACROS /* force using a cast */
497 #define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
498 #else
499 #define MAKEINTATOM(atom) ((LPTSTR)((ULONG_PTR)((WORD)(atom))))
500 #endif
501 
502 typedef struct tagMEMORYSTATUS
503 {
513 
514 #include <pshpack8.h>
515 typedef struct tagMEMORYSTATUSEX {
518  DWORDLONG DECLSPEC_ALIGN(8) ullTotalPhys;
519  DWORDLONG DECLSPEC_ALIGN(8) ullAvailPhys;
520  DWORDLONG DECLSPEC_ALIGN(8) ullTotalPageFile;
521  DWORDLONG DECLSPEC_ALIGN(8) ullAvailPageFile;
522  DWORDLONG DECLSPEC_ALIGN(8) ullTotalVirtual;
523  DWORDLONG DECLSPEC_ALIGN(8) ullAvailVirtual;
524  DWORDLONG DECLSPEC_ALIGN(8) ullAvailExtendedVirtual;
526 #include <poppack.h>
527 
532 
533 #ifndef _SYSTEMTIME_
534 #define _SYSTEMTIME_
535 typedef struct _SYSTEMTIME{
545 #endif /* _SYSTEMTIME_ */
546 
547 #include <timezoneapi.h>
548 
549 /* The 'overlapped' data structure used by async I/O functions.
550  */
551 typedef struct _OVERLAPPED {
552 #ifdef WORDS_BIGENDIAN
553  ULONG_PTR InternalHigh;
555 #else
558 #endif
559  union {
560  struct {
561 #ifdef WORDS_BIGENDIAN
562  DWORD OffsetHigh;
563  DWORD Offset;
564 #else
567 #endif
573 
574 typedef struct _OVERLAPPED_ENTRY {
580 
582 
583 /* Process startup information.
584  */
585 
586 /* STARTUPINFO.dwFlags */
587 #define STARTF_USESHOWWINDOW 0x00000001
588 #define STARTF_USESIZE 0x00000002
589 #define STARTF_USEPOSITION 0x00000004
590 #define STARTF_USECOUNTCHARS 0x00000008
591 #define STARTF_USEFILLATTRIBUTE 0x00000010
592 #define STARTF_RUNFULLSCREEN 0x00000020
593 #define STARTF_FORCEONFEEDBACK 0x00000040
594 #define STARTF_FORCEOFFFEEDBACK 0x00000080
595 #define STARTF_USESTDHANDLES 0x00000100
596 #define STARTF_USEHOTKEY 0x00000200
597 
598 typedef struct _STARTUPINFOA{
599  DWORD cb; /* 00: size of struct */
600  LPSTR lpReserved; /* 04: */
601  LPSTR lpDesktop; /* 08: */
602  LPSTR lpTitle; /* 0c: */
603  DWORD dwX; /* 10: */
604  DWORD dwY; /* 14: */
605  DWORD dwXSize; /* 18: */
606  DWORD dwYSize; /* 1c: */
607  DWORD dwXCountChars; /* 20: */
608  DWORD dwYCountChars; /* 24: */
610  DWORD dwFlags; /* 2c: */
611  WORD wShowWindow; /* 30: */
612  WORD cbReserved2; /* 32: */
613  BYTE *lpReserved2; /* 34: */
614  HANDLE hStdInput; /* 38: */
615  HANDLE hStdOutput; /* 3c: */
616  HANDLE hStdError; /* 40: */
618 
619 typedef struct _STARTUPINFOW{
639 
640 DECL_WINELIB_TYPE_AW(STARTUPINFO)
641 DECL_WINELIB_TYPE_AW(LPSTARTUPINFO)
642 
649 
650 /* CreateProcess: dwCreationFlag values
651  */
652 #define DEBUG_PROCESS 0x00000001
653 #define DEBUG_ONLY_THIS_PROCESS 0x00000002
654 #define CREATE_SUSPENDED 0x00000004
655 #define DETACHED_PROCESS 0x00000008
656 #define CREATE_NEW_CONSOLE 0x00000010
657 #define NORMAL_PRIORITY_CLASS 0x00000020
658 #define IDLE_PRIORITY_CLASS 0x00000040
659 #define HIGH_PRIORITY_CLASS 0x00000080
660 #define REALTIME_PRIORITY_CLASS 0x00000100
661 #define CREATE_NEW_PROCESS_GROUP 0x00000200
662 #define CREATE_UNICODE_ENVIRONMENT 0x00000400
663 #define CREATE_SEPARATE_WOW_VDM 0x00000800
664 #define CREATE_SHARED_WOW_VDM 0x00001000
665 #define CREATE_FORCEDOS 0x00002000
666 #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
667 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
668 #define INHERIT_PARENT_AFFINITY 0x00010000
669 #define INHERIT_CALLER_PRIORITY 0x00020000
670 #define CREATE_PROTECTED_PROCESS 0x00040000
671 #define EXTENDED_STARTUPINFO_PRESENT 0x00080000
672 #define PROCESS_MODE_BACKGROUND_BEGIN 0x00100000
673 #define PROCESS_MODE_BACKGROUND_END 0x00200000
674 #define CREATE_SECURE_PROCESS 0x00400000
675 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000
676 #define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000
677 #define CREATE_DEFAULT_ERROR_MODE 0x04000000
678 #define CREATE_NO_WINDOW 0x08000000
679 #define PROFILE_USER 0x10000000
680 #define PROFILE_KERNEL 0x20000000
681 #define PROFILE_SERVER 0x40000000
682 
683 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
684 
685 /* File object type definitions
686  */
687 #define FILE_TYPE_UNKNOWN 0
688 #define FILE_TYPE_DISK 1
689 #define FILE_TYPE_CHAR 2
690 #define FILE_TYPE_PIPE 3
691 #define FILE_TYPE_REMOTE 32768
692 
693 /* File encryption status
694  */
695 #define FILE_ENCRYPTABLE 0
696 #define FILE_IS_ENCRYPTED 1
697 #define FILE_SYSTEM_ATTR 2
698 #define FILE_ROOT_DIR 3
699 #define FILE_SYSTEM_DIR 4
700 #define FILE_UNKNOWN 5
701 #define FILE_SYSTEM_NOT_SUPPORT 6
702 #define FILE_USER_DISALLOWED 7
703 #define FILE_READ_ONLY 8
704 #define FILE_DIR_DISALLOWED 9
705 
708 
709 #define CREATE_FOR_IMPORT (1)
710 #define CREATE_FOR_DIR (2)
711 #define OVERWRITE_HIDDEN (4)
712 #define EFSRPC_SECURE_ONLY (8)
713 
714 /* File creation flags
715  */
716 #define FILE_FLAG_WRITE_THROUGH 0x80000000
717 #define FILE_FLAG_OVERLAPPED 0x40000000
718 #define FILE_FLAG_NO_BUFFERING 0x20000000
719 #define FILE_FLAG_RANDOM_ACCESS 0x10000000
720 #define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000
721 #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
722 #define FILE_FLAG_BACKUP_SEMANTICS 0x02000000
723 #define FILE_FLAG_POSIX_SEMANTICS 0x01000000
724 #define FILE_FLAG_OPEN_REPARSE_POINT 0x00200000
725 #define FILE_FLAG_OPEN_NO_RECALL 0x00100000
726 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
727 
728 #define CREATE_NEW 1
729 #define CREATE_ALWAYS 2
730 #define OPEN_EXISTING 3
731 #define OPEN_ALWAYS 4
732 #define TRUNCATE_EXISTING 5
733 
734 /* Standard handle identifiers
735  */
736 #define STD_INPUT_HANDLE ((DWORD) -10)
737 #define STD_OUTPUT_HANDLE ((DWORD) -11)
738 #define STD_ERROR_HANDLE ((DWORD) -12)
739 
740 /* Flags for GetFinalPathNameByHandle
741  */
742 #define FILE_NAME_NORMALIZED 0x0
743 #define FILE_NAME_OPENED 0x8
744 #define VOLUME_NAME_DOS 0x0
745 #define VOLUME_NAME_GUID 0x1
746 #define VOLUME_NAME_NT 0x2
747 #define VOLUME_NAME_NONE 0x4
748 
750 {
762 
763 typedef enum _FILE_ID_TYPE {
769 
770 typedef struct _FILE_ID_DESCRIPTOR {
773  union {
778 
803 
804 typedef struct _FILE_ID_BOTH_DIR_INFO {
817  WCHAR ShortName[12];
819  WCHAR FileName[1];
821 
822 typedef struct _FILE_BASIC_INFO {
829 
830 typedef struct _FILE_STANDARD_INFO {
837 
838 typedef struct _FILE_NAME_INFO {
840  WCHAR FileName[1];
842 
843 typedef enum _PRIORITY_HINT {
849 
853 
854 typedef struct _FILE_ALLOCATION_INFO {
857 
858 typedef struct _FILE_DISPOSITION_INFO {
861 
862 typedef struct _FILE_END_OF_FILE_INFO {
865 
866 typedef struct _FILE_RENAME_INFO {
870  WCHAR FileName[1];
872 
873 typedef struct _FILE_ATTRIBUTE_TAG_INFO {
877 
878 typedef struct _FILE_COMPRESSION_INFO {
886 
896  struct {
898  } GenericReserved;
899  struct {
900  ULONG Reserved[16];
901  } ProtocolSpecificReserved;
903 
904 #define PIPE_ACCESS_INBOUND 1
905 #define PIPE_ACCESS_OUTBOUND 2
906 #define PIPE_ACCESS_DUPLEX 3
907 
908 #define PIPE_CLIENT_END 0
909 #define PIPE_SERVER_END 1
910 #define PIPE_READMODE_BYTE 0
911 #define PIPE_READMODE_MESSAGE 2
912 #define PIPE_TYPE_BYTE 0
913 #define PIPE_TYPE_MESSAGE 4
914 
915 #define PIPE_WAIT 0
916 #define PIPE_NOWAIT 1
917 
918 #define PIPE_UNLIMITED_INSTANCES 255
919 
920 #define NMPWAIT_WAIT_FOREVER 0xffffffff
921 #define NMPWAIT_NOWAIT 0x00000001
922 #define NMPWAIT_USE_DEFAULT_WAIT 0x00000000
923 
924 /* Security flags for dwFlagsAndAttributes of CreateFile */
925 #define SECURITY_ANONYMOUS (SecurityAnonymous << 16)
926 #define SECURITY_IDENTIFICATION (SecurityIdentification << 16)
927 #define SECURITY_IMPERSONATION (SecurityImpersonation << 16)
928 #define SECURITY_DELEGATION (SecurityDelegation << 16)
929 
930 #define SECURITY_CONTEXT_TRACKING 0x00040000
931 #define SECURITY_EFFECTIVE_ONLY 0x00080000
932 
933 #define SECURITY_SQOS_PRESENT 0x00100000
934 #define SECURITY_VALID_SQOS_FLAGS 0x001f0000
935 
936 typedef struct _SYSTEM_POWER_STATUS
937 {
945 
946 #define AC_LINE_OFFLINE 0x00
947 #define AC_LINE_ONLINE 0x01
948 #define AC_LINE_BACKUP_POWER 0x02
949 #define AC_LINE_UNKNOWN 0xFF
950 
951 #define BATTERY_FLAG_HIGH 0x01
952 #define BATTERY_FLAG_LOW 0x02
953 #define BATTERY_FLAG_CRITICAL 0x04
954 #define BATTERY_FLAG_CHARGING 0x08
955 #define BATTERY_FLAG_NO_BATTERY 0x80
956 #define BATTERY_FLAG_UNKNOWN 0xFF
957 
958 #define BATTERY_PERCENTAGE_UNKNOWN 0xFF
959 
960 #define SYSTEM_STATUS_FLAG_POWER_SAVING_ON 0x01
961 
962 #define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
963 
964 typedef struct _SYSTEM_INFO
965 {
966  union {
967  DWORD dwOemId; /* Obsolete field - do not use */
968  struct {
983 
990 
991 DECL_WINELIB_TYPE_AW(ENUMRESTYPEPROC)
992 DECL_WINELIB_TYPE_AW(ENUMRESNAMEPROC)
993 DECL_WINELIB_TYPE_AW(ENUMRESLANGPROC)
994 
995 /* flags that can be passed to LoadLibraryEx */
996 #define DONT_RESOLVE_DLL_REFERENCES 0x00000001
997 #define LOAD_LIBRARY_AS_DATAFILE 0x00000002
998 #define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
999 #define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x00000010
1000 #define LOAD_LIBRARY_AS_IMAGE_RESOURCE 0x00000020
1001 #define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x00000040
1002 #define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x00000080
1003 #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
1004 #define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
1005 #define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
1006 #define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
1007 #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
1008 
1009 #define GET_MODULE_HANDLE_EX_FLAG_PIN 1
1010 #define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
1011 #define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
1012 
1013 /* flags for SetSearchPathMode */
1014 #define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE 0x00001
1015 #define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
1016 #define BASE_SEARCH_PATH_PERMANENT 0x08000
1017 #define BASE_SEARCH_PATH_INVALID_FLAGS (~0x18001)
1018 
1020 
1024 
1033 
1034 /*
1035  * This one seems to be a Win32 only definition. It also is defined with
1036  * WINAPI instead of CALLBACK in the windows headers.
1037  */
1040  HANDLE, LPVOID);
1041 
1043 
1044 #define RECOVERY_DEFAULT_PING_INTERVAL 5000
1045 #define RECOVERY_MAX_PING_INTERVAL (5*60*1000)
1046 
1047 #define RESTART_MAX_CMD_LINE 1024
1048 
1049 #define RESTART_NO_CRASH 1
1050 #define RESTART_NO_HANG 2
1051 #define RESTART_NO_PATCH 4
1052 #define RESTART_NO_REBOOT 8
1053 
1055 {
1065 
1067 {
1074 
1076 {
1086 
1087 typedef struct COPYFILE2_MESSAGE
1088 {
1091  union
1092  {
1093  struct
1094  {
1103  } ChunkStarted;
1104  struct
1105  {
1106  DWORD dwStreamNumber;
1108  HANDLE hSourceFile;
1109  HANDLE hDestinationFile;
1110  ULARGE_INTEGER uliChunkNumber;
1111  ULARGE_INTEGER uliChunkSize;
1112  ULARGE_INTEGER uliStreamSize;
1114  ULARGE_INTEGER uliTotalFileSize;
1116  } ChunkFinished;
1117  struct
1118  {
1119  DWORD dwStreamNumber;
1120  DWORD dwReserved;
1121  HANDLE hSourceFile;
1122  HANDLE hDestinationFile;
1123  ULARGE_INTEGER uliStreamSize;
1124  ULARGE_INTEGER uliTotalFileSize;
1125  } StreamStarted;
1126  struct
1127  {
1128  DWORD dwStreamNumber;
1129  DWORD dwReserved;
1130  HANDLE hSourceFile;
1131  HANDLE hDestinationFile;
1132  ULARGE_INTEGER uliStreamSize;
1133  ULARGE_INTEGER uliStreamBytesTransferred;
1134  ULARGE_INTEGER uliTotalFileSize;
1135  ULARGE_INTEGER uliTotalBytesTransferred;
1136  } StreamFinished;
1137  struct
1138  {
1139  DWORD dwReserved;
1140  } PollContinue;
1141  struct
1142  {
1144  DWORD dwStreamNumber;
1146  DWORD dwReserved;
1147  ULARGE_INTEGER uliChunkNumber;
1148  ULARGE_INTEGER uliStreamSize;
1149  ULARGE_INTEGER uliStreamBytesTransferred;
1150  ULARGE_INTEGER uliTotalFileSize;
1151  ULARGE_INTEGER uliTotalBytesTransferred;
1153  } Info;
1155 
1157 
1159 {
1166 
1167 #define CREATE_EVENT_MANUAL_RESET 1
1168 #define CREATE_EVENT_INITIAL_SET 2
1169 
1170 #define CREATE_MUTEX_INITIAL_OWNER 1
1171 
1172 #define CREATE_WAITABLE_TIMER_MANUAL_RESET 1
1173 
1174 #define WAIT_FAILED 0xffffffff
1175 #define WAIT_OBJECT_0 0
1176 #define WAIT_ABANDONED STATUS_ABANDONED_WAIT_0
1177 #define WAIT_ABANDONED_0 STATUS_ABANDONED_WAIT_0
1178 #define WAIT_IO_COMPLETION STATUS_USER_APC
1179 #define STILL_ACTIVE STATUS_PENDING
1180 
1181 #define FILE_BEGIN 0
1182 #define FILE_CURRENT 1
1183 #define FILE_END 2
1184 
1185 #define FILE_MAP_COPY 0x00000001
1186 #define FILE_MAP_WRITE 0x00000002
1187 #define FILE_MAP_READ 0x00000004
1188 #define FILE_MAP_ALL_ACCESS 0x000f001f
1189 #define FILE_MAP_EXECUTE 0x00000020
1190 
1191 #define MOVEFILE_REPLACE_EXISTING 0x00000001
1192 #define MOVEFILE_COPY_ALLOWED 0x00000002
1193 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
1194 #define MOVEFILE_WRITE_THROUGH 0x00000008
1195 
1196 #define REPLACEFILE_WRITE_THROUGH 0x00000001
1197 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
1198 
1199 #define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
1200 #define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
1201 #define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
1202 #define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
1203 #define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
1204 #define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
1205 #define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
1206 
1207 #define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
1208 #define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
1209 
1210 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
1211 #define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
1212 #define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
1213 #define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
1214 #define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
1215 #define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
1216 #define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
1217 #define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
1218 #define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
1219 #define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
1220 #define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
1221 #define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
1222 #define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
1223 #define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
1224 #define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
1225 #define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
1226 #define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
1227 #define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
1228 #define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
1229 #define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
1230 #define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
1231 #define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
1232 #define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
1233 
1234 #define HANDLE_FLAG_INHERIT 0x00000001
1235 #define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x00000002
1236 
1237 #define HINSTANCE_ERROR 32
1238 
1239 #define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
1240 #define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
1241 #define THREAD_PRIORITY_NORMAL 0
1242 #define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
1243 #define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
1244 #define THREAD_PRIORITY_ERROR_RETURN (0x7fffffff)
1245 #define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
1246 #define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
1247 
1248 /* flags to FormatMessage */
1249 #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
1250 #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
1251 #define FORMAT_MESSAGE_FROM_STRING 0x00000400
1252 #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800
1253 #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
1254 #define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
1255 #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
1256 
1257 /* flags to ACTCTX[AW] */
1258 #define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID (0x00000001)
1259 #define ACTCTX_FLAG_LANGID_VALID (0x00000002)
1260 #define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID (0x00000004)
1261 #define ACTCTX_FLAG_RESOURCE_NAME_VALID (0x00000008)
1262 #define ACTCTX_FLAG_SET_PROCESS_DEFAULT (0x00000010)
1263 #define ACTCTX_FLAG_APPLICATION_NAME_VALID (0x00000020)
1264 #define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF (0x00000040)
1265 #define ACTCTX_FLAG_HMODULE_VALID (0x00000080)
1266 
1267 /* flags to DeactivateActCtx */
1268 #define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x00000001)
1269 
1270 /* flags to FindActCtxSection{Guid,String[AW]} */
1271 #define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX (0x00000001)
1272 #define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS (0x00000002)
1273 #define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA (0x00000004)
1274 
1275 /* flags to QueryActCtxW */
1276 #define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX (0x00000004)
1277 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE (0x00000008)
1278 #define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS (0x00000010)
1279 #define QUERY_ACTCTX_FLAG_NO_ADDREF (0x80000000)
1280 
1281 typedef struct tagACTCTXA {
1292 
1293 typedef struct tagACTCTXW {
1304 
1305 DECL_WINELIB_TYPE_AW(ACTCTX)
1306 DECL_WINELIB_TYPE_AW(PACTCTX)
1307 
1308 typedef const ACTCTXA *PCACTCTXA;
1309 typedef const ACTCTXW *PCACTCTXW;
1310 DECL_WINELIB_TYPE_AW(PCACTCTX)
1311 
1325 
1334 
1346 
1347  /* Non 2600 extra fields */
1352 
1357 
1359 
1360 typedef struct tagCOMSTAT
1361 {
1373 
1374 typedef struct tagDCB
1375 {
1378  unsigned fBinary :1;
1379  unsigned fParity :1;
1380  unsigned fOutxCtsFlow :1;
1381  unsigned fOutxDsrFlow :1;
1382  unsigned fDtrControl :2;
1383  unsigned fDsrSensitivity :1;
1384  unsigned fTXContinueOnXoff :1;
1385  unsigned fOutX :1;
1386  unsigned fInX :1;
1387  unsigned fErrorChar :1;
1388  unsigned fNull :1;
1389  unsigned fRtsControl :2;
1390  unsigned fAbortOnError :1;
1391  unsigned fDummy2 :17;
1398  char XonChar;
1399  char XoffChar;
1401  char EofChar;
1402  char EvtChar;
1405 
1406 typedef struct tagCOMMCONFIG {
1414  WCHAR wcProviderData[1];
1416 
1417 typedef struct tagCOMMPROP {
1435  WCHAR wcProvChar[1];
1437 
1438 #define SP_SERIALCOMM ((DWORD)1)
1439 
1440 #define BAUD_075 ((DWORD)0x01)
1441 #define BAUD_110 ((DWORD)0x02)
1442 #define BAUD_134_5 ((DWORD)0x04)
1443 #define BAUD_150 ((DWORD)0x08)
1444 #define BAUD_300 ((DWORD)0x10)
1445 #define BAUD_600 ((DWORD)0x20)
1446 #define BAUD_1200 ((DWORD)0x40)
1447 #define BAUD_1800 ((DWORD)0x80)
1448 #define BAUD_2400 ((DWORD)0x100)
1449 #define BAUD_4800 ((DWORD)0x200)
1450 #define BAUD_7200 ((DWORD)0x400)
1451 #define BAUD_9600 ((DWORD)0x800)
1452 #define BAUD_14400 ((DWORD)0x1000)
1453 #define BAUD_19200 ((DWORD)0x2000)
1454 #define BAUD_38400 ((DWORD)0x4000)
1455 #define BAUD_56K ((DWORD)0x8000)
1456 #define BAUD_57600 ((DWORD)0x40000)
1457 #define BAUD_115200 ((DWORD)0x20000)
1458 #define BAUD_128K ((DWORD)0x10000)
1459 #define BAUD_USER ((DWORD)0x10000000)
1460 
1461 #define PST_FAX ((DWORD)0x21)
1462 #define PST_LAT ((DWORD)0x101)
1463 #define PST_MODEM ((DWORD)0x06)
1464 #define PST_NETWORK_BRIDGE ((DWORD)0x100)
1465 #define PST_PARALLELPORT ((DWORD)0x02)
1466 #define PST_RS232 ((DWORD)0x01)
1467 #define PST_RS442 ((DWORD)0x03)
1468 #define PST_RS423 ((DWORD)0x04)
1469 #define PST_RS449 ((DWORD)0x06)
1470 #define PST_SCANNER ((DWORD)0x22)
1471 #define PST_TCPIP_TELNET ((DWORD)0x102)
1472 #define PST_UNSPECIFIED ((DWORD)0x00)
1473 #define PST_X25 ((DWORD)0x103)
1474 
1475 #define PCF_16BITMODE ((DWORD)0x200)
1476 #define PCF_DTRDSR ((DWORD)0x01)
1477 #define PCF_INTTIMEOUTS ((DWORD)0x80)
1478 #define PCF_PARITY_CHECK ((DWORD)0x08)
1479 #define PCF_RLSD ((DWORD)0x04)
1480 #define PCF_RTSCTS ((DWORD)0x02)
1481 #define PCF_SETXCHAR ((DWORD)0x20)
1482 #define PCF_SPECIALCHARS ((DWORD)0x100)
1483 #define PCF_TOTALTIMEOUTS ((DWORD)0x40)
1484 #define PCF_XONXOFF ((DWORD)0x10)
1485 
1486 #define SP_BAUD ((DWORD)0x02)
1487 #define SP_DATABITS ((DWORD)0x04)
1488 #define SP_HANDSHAKING ((DWORD)0x10)
1489 #define SP_PARITY ((DWORD)0x01)
1490 #define SP_PARITY_CHECK ((DWORD)0x20)
1491 #define SP_RLSD ((DWORD)0x40)
1492 #define SP_STOPBITS ((DWORD)0x08)
1493 
1494 #define DATABITS_5 ((DWORD)0x01)
1495 #define DATABITS_6 ((DWORD)0x02)
1496 #define DATABITS_7 ((DWORD)0x04)
1497 #define DATABITS_8 ((DWORD)0x08)
1498 #define DATABITS_16 ((DWORD)0x10)
1499 #define DATABITS_16X ((DWORD)0x20)
1500 
1501 #define STOPBITS_10 ((DWORD)1)
1502 #define STOPBITS_15 ((DWORD)2)
1503 #define STOPBITS_20 ((DWORD)4)
1504 
1505 #undef PARITY_NONE /* defined on Android */
1506 #define PARITY_NONE ((DWORD)0x100)
1507 #define PARITY_ODD ((DWORD)0x200)
1508 #define PARITY_EVEN ((DWORD)0x400)
1509 #define PARITY_MARK ((DWORD)0x800)
1510 #define PARITY_SPACE ((DWORD)0x1000)
1511 
1512 typedef struct tagCOMMTIMEOUTS {
1519 
1520 #define GET_TAPE_MEDIA_INFORMATION 0
1521 #define GET_TAPE_DRIVE_INFORMATION 1
1522 #define SET_TAPE_MEDIA_INFORMATION 0
1523 #define SET_TAPE_DRIVE_INFORMATION 1
1524 
1525 #define PROCESS_NAME_NATIVE 1
1526 
1529 
1531 {
1542 
1543 #define HW_PROFILE_GUIDLEN 39
1544 #define MAX_PROFILE_LEN 80
1545 
1546 #define DOCKINFO_UNDOCKED 0x1
1547 #define DOCKINFO_DOCKED 0x2
1548 #define DOCKINFO_USER_SUPPLIED 0x4
1549 #define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
1550 #define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
1551 
1552 typedef struct tagHW_PROFILE_INFOA {
1554  CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1555  CHAR szHwProfileName[MAX_PROFILE_LEN];
1557 
1558 typedef struct tagHW_PROFILE_INFOW {
1560  WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
1561  WCHAR szHwProfileName[MAX_PROFILE_LEN];
1563 
1564 DECL_WINELIB_TYPE_AW(HW_PROFILE_INFO)
1565 DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO)
1566 
1570  OptIn = 2,
1571  OptOut = 3
1573 
1574 #define PROCESS_DEP_ENABLE 1
1575 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 2
1576 
1577 /* Event Logging */
1578 
1579 #define EVENTLOG_FULL_INFO 0
1580 
1584 
1585 
1586 /* Stream data structures and defines */
1587 /*the types of backup data -- WIN32_STREAM_ID.dwStreamId below*/
1588 #define BACKUP_INVALID 0
1589 #define BACKUP_DATA 1
1590 #define BACKUP_EA_DATA 2
1591 #define BACKUP_SECURITY_DATA 3
1592 #define BACKUP_ALTERNATE_DATA 4
1593 #define BACKUP_LINK 5
1594 #define BACKUP_PROPERTY_DATA 6
1595 #define BACKUP_OBJECT_ID 7
1596 #define BACKUP_REPARSE_DATA 8
1597 #define BACKUP_SPARSE_BLOCK 9
1598 
1599 /*flags for WIN32_STREAM_ID.dwStreamAttributes below*/
1600 #define STREAM_NORMAL_ATTRIBUTE 0
1601 #define STREAM_MODIFIED_WHEN_READ 1
1602 #define STREAM_CONTAINS_SECURITY 2
1603 #define STREAM_CONTAINS_PROPERTIES 4
1604 #define STREAM_SPARSE_ATTRIBUTE 8
1605 
1606 #include <pshpack8.h>
1607 typedef struct _WIN32_STREAM_ID {
1611  DWORD dwStreamNameSize;
1612  WCHAR cStreamName[ANYSIZE_ARRAY];
1614 #include <poppack.h>
1615 
1616 
1617 /* GetBinaryType return values.
1618  */
1619 
1620 #define SCS_32BIT_BINARY 0
1621 #define SCS_DOS_BINARY 1
1622 #define SCS_WOW_BINARY 2
1623 #define SCS_PIF_BINARY 3
1624 #define SCS_POSIX_BINARY 4
1625 #define SCS_OS216_BINARY 5
1626 #define SCS_64BIT_BINARY 6
1627 
1628 /* flags for DefineDosDevice */
1629 #define DDD_RAW_TARGET_PATH 0x00000001
1630 #define DDD_REMOVE_DEFINITION 0x00000002
1631 #define DDD_EXACT_MATCH_ON_REMOVE 0x00000004
1632 #define DDD_NO_BROADCAST_SYSTEM 0x00000008
1633 #define DDD_LUID_BROADCAST_DRIVE 0x00000010
1634 
1635 #define LOGON_WITH_PROFILE 0x00000001
1636 #define LOGON_NETCREDENTIALS_ONLY 0x00000002
1637 #define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
1638 
1639 /* one-time initialisation API */
1643 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
1644 #define INIT_ONCE_CHECK_ONLY RTL_RUN_ONCE_CHECK_ONLY
1645 #define INIT_ONCE_ASYNC RTL_RUN_ONCE_ASYNC
1646 #define INIT_ONCE_INIT_FAILED RTL_RUN_ONCE_INIT_FAILED
1647 /* initialization callback prototype */
1649 
1650 typedef struct _REASON_CONTEXT
1651 {
1654  union
1655  {
1656  struct
1657  {
1662  } Detailed;
1664  } Reason;
1666 
1667 #define RESOURCE_ENUM_LN 0x0001
1668 #define RESOURCE_ENUM_MUI 0x0002
1669 #define RESOURCE_ENUM_MUI_SYSTEM 0x0004
1670 #define RESOURCE_ENUM_VALIDATE 0x0008
1671 
1672 typedef struct _PROC_THREAD_ATTRIBUTE_LIST
1674 
1675 #define PROC_THREAD_ATTRIBUTE_NUMBER 0x0000ffff
1676 #define PROC_THREAD_ATTRIBUTE_THREAD 0x00010000
1677 #define PROC_THREAD_ATTRIBUTE_INPUT 0x00020000
1678 #define PROC_THREAD_ATTRIBUTE_ADDITIVE 0x00040000
1679 
1681 {
1699 
1700 #define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS (ProcThreadAttributeParentProcess | PROC_THREAD_ATTRIBUTE_INPUT)
1701 #define PROC_THREAD_ATTRIBUTE_HANDLE_LIST (ProcThreadAttributeHandleList | PROC_THREAD_ATTRIBUTE_INPUT)
1702 #define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY (ProcThreadAttributeGroupAffinity | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1703 #define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE (ProcThreadAttributePreferredNode | PROC_THREAD_ATTRIBUTE_INPUT)
1704 #define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR (ProcThreadAttributeIdealProcessor | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1705 #define PROC_THREAD_ATTRIBUTE_UMS_THREAD (ProcThreadAttributeUmsThread | PROC_THREAD_ATTRIBUTE_THREAD | PROC_THREAD_ATTRIBUTE_INPUT)
1706 #define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY (ProcThreadAttributeMitigationPolicy | PROC_THREAD_ATTRIBUTE_INPUT)
1707 #define PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES (ProcThreadAttributeSecurityCapabilities | PROC_THREAD_ATTRIBUTE_INPUT)
1708 #define PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL (ProcThreadAttributeProtectionLevel | PROC_THREAD_ATTRIBUTE_INPUT)
1709 #define PROC_THREAD_ATTRIBUTE_JOB_LIST (ProcThreadAttributeJobList | PROC_THREAD_ATTRIBUTE_INPUT)
1710 #define PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY (ProcThreadAttributeChildProcessPolicy | PROC_THREAD_ATTRIBUTE_INPUT)
1711 #define PROC_THREAD_ATTRIBUTE_ALL_APPLICATION_PACKAGES_POLICY (ProcThreadAttributeAllApplicationPackagesPolicy | PROC_THREAD_ATTRIBUTE_INPUT)
1712 #define PROC_THREAD_ATTRIBUTE_WIN32K_FILTER (ProcThreadAttributeWin32kFilter | PROC_THREAD_ATTRIBUTE_INPUT)
1713 #define PROC_THREAD_ATTRIBUTE_DESKTOP_APP_POLICY (ProcThreadAttributeDesktopAppPolicy | PROC_THREAD_ATTRIBUTE_INPUT)
1714 #define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE (ProcThreadAttributePseudoConsole | PROC_THREAD_ATTRIBUTE_INPUT)
1715 
1716 #define SYMBOLIC_LINK_FLAG_DIRECTORY (0x1)
1717 #define VALID_SYMBOLIC_LINK_FLAGS SYMBOLIC_LINK_FLAG_DIRECTORY
1718 
1719 typedef struct _STARTUPINFOEXA
1720 {
1724 
1725 typedef struct _STARTUPINFOEXW
1726 {
1730 
1731 DECL_WINELIB_TYPE_AW(STARTUPINFOEX)
1732 DECL_WINELIB_TYPE_AW(LPSTARTUPINFOEX)
1733 
1734 typedef void *PUMS_CONTEXT;
1735 typedef void *PUMS_COMPLETION_LIST;
1738 {
1744 
1747 
1749 {
1753 
1754 typedef struct _WIN32_FIND_STREAM_DATA {
1756  WCHAR cStreamName[MAX_PATH + 36];
1758 
1767 #define AddAtom WINELIB_NAME_AW(AddAtom)
1777 #define AccessCheckAndAuditAlarm WINELIB_NAME_AW(AccessCheckAndAuditAlarm)
1790 #define BackupEventLog WINELIB_NAME_AW(BackupEventLog)
1797 #define BeginUpdateResource WINELIB_NAME_AW(BeginUpdateResource)
1801 #define BuildCommDCB WINELIB_NAME_AW(BuildCommDCB)
1804 #define BuildCommDCBAndTimeouts WINELIB_NAME_AW(BuildCommDCBAndTimeouts)
1807 #define CallNamedPipe WINELIB_NAME_AW(CallNamedPipe)
1823 #define ClearEventLog WINELIB_NAME_AW(ClearEventLog)
1828 #define CommConfigDialog WINELIB_NAME_AW(CommConfigDialog)
1832 WINBASEAPI BOOL WINAPI CopyContext(CONTEXT*, DWORD, CONTEXT*);
1835 #define CopyFile WINELIB_NAME_AW(CopyFile)
1839 #define CopyFileEx WINELIB_NAME_AW(CopyFileEx)
1848 #define CreateActCtx WINELIB_NAME_AW(CreateActCtx)
1851 #define CreateDirectory WINELIB_NAME_AW(CreateDirectory)
1854 #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx)
1857 #define CreateEvent WINELIB_NAME_AW(CreateEvent)
1860 #define CreateEventEx WINELIB_NAME_AW(CreateEventEx)
1865 #define CreateFile WINELIB_NAME_AW(CreateFile)
1868 #define CreateFileMapping WINELIB_NAME_AW(CreateFileMapping)
1872 #define CreateJobObject WINELIB_NAME_AW(CreateJobObject)
1875 #define CreateMailslot WINELIB_NAME_AW(CreateMailslot)
1879 #define CreateMutex WINELIB_NAME_AW(CreateMutex)
1882 #define CreateMutexEx WINELIB_NAME_AW(CreateMutexEx)
1885 #define CreateNamedPipe WINELIB_NAME_AW(CreateNamedPipe)
1892 #define CreateProcess WINELIB_NAME_AW(CreateProcess)
1895 #define CreateProcessAsUser WINELIB_NAME_AW(CreateProcessAsUser)
1898 #define CreateProcessInternal WINELIB_NAME_AW(CreateProcessInternal)
1905 #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore)
1908 #define CreateSemaphoreEx WINELIB_NAME_AW(CreateSemaphoreEx)
1911 #define CreateSymbolicLink WINELIB_NAME_AW(CreateSymbolicLink)
1914 #define CreateHardLink WINELIB_NAME_AW(CreateHardLink)
1923 #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer)
1926 #define CreateWaitableTimerEx WINELIB_NAME_AW(CreateWaitableTimerEx)
1931 WINBASEAPI void WINAPI DebugBreak(void);
1938 #define DecryptFile WINELIB_NAME_AW(DecryptFile)
1941 #define DefineDosDevice WINELIB_NAME_AW(DefineDosDevice)
1942 #define DefineHandleTable(w) ((w),TRUE)
1949 #define DeleteFile WINELIB_NAME_AW(DeleteFile)
1958 #define DeleteVolumeMountPoint WINELIB_NAME_AW(DeleteVolumeMountPoint)
1967 #define DnsHostnameToComputerName WINELIB_NAME_AW(DnsHostnameToComputerName)
1978 #define EncryptFile WINELIB_NAME_AW(EncryptFile)
1981 #define EndUpdateResource WINELIB_NAME_AW(EndUpdateResource)
1986 #define EnumResourceLanguages WINELIB_NAME_AW(EnumResourceLanguages)
1989 #define EnumResourceLanguagesEx WINELIB_NAME_AW(EnumResourceLanguagesEx)
1992 #define EnumResourceNames WINELIB_NAME_AW(EnumResourceNames)
1995 #define EnumResourceNamesEx WINELIB_NAME_AW(EnumResourceNamesEx)
1998 #define EnumResourceTypes WINELIB_NAME_AW(EnumResourceTypes)
2001 #define EnumResourceTypesEx WINELIB_NAME_AW(EnumResourceTypesEx)
2011 #define ExpandEnvironmentStrings WINELIB_NAME_AW(ExpandEnvironmentStrings)
2014 WINBASEAPI void WINAPI FatalExit(int);
2015 #define FatalAppExit WINELIB_NAME_AW(FatalAppExit)
2018 #define FileEncryptionStatus WINELIB_NAME_AW(FileEncryptionStatus)
2024 #define FindActCtxSectionString WINELIB_NAME_AW(FindActCtxSectionString)
2028 #define FindAtom WINELIB_NAME_AW(FindAtom)
2032 #define FindFirstChangeNotification WINELIB_NAME_AW(FindFirstChangeNotification)
2035 #define FindFirstFile WINELIB_NAME_AW(FindFirstFile)
2038 #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx)
2044 #define FindNextFile WINELIB_NAME_AW(FindNextFile)
2049 #define FindResource WINELIB_NAME_AW(FindResource)
2052 #define FindResourceEx WINELIB_NAME_AW(FindResourceEx)
2055 #define FindFirstVolume WINELIB_NAME_AW(FindFirstVolume)
2058 #define FindFirstVolumeMountPoint WINELIB_NAME_AW(FindFirstVolumeMountPoint)
2061 #define FindNextVolume WINELIB_NAME_AW(FindNextVolume)
2064 #define FindNextVolumeMountPoint WINELIB_NAME_AW(FindNextVolumeMountPoint)
2077 #define FormatMessage WINELIB_NAME_AW(FormatMessage)
2080 #define FreeEnvironmentStrings WINELIB_NAME_AW(FreeEnvironmentStrings)
2083 #define FreeModule(handle) FreeLibrary(handle)
2084 #define FreeProcInstance(proc) /*nothing*/
2093 #define GetAtomName WINELIB_NAME_AW(GetAtomName)
2094 WINBASEAPI BOOL WINAPI GetBinaryTypeA( LPCSTR lpApplicationName, LPDWORD lpBinaryType );
2095 WINBASEAPI BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType );
2096 #define GetBinaryType WINELIB_NAME_AW(GetBinaryType)
2106 #define GetCommandLine WINELIB_NAME_AW(GetCommandLine)
2109 #define GetCompressedFileSize WINELIB_NAME_AW(GetCompressedFileSize)
2112 #define GetComputerName WINELIB_NAME_AW(GetComputerName)
2115 #define GetComputerNameEx WINELIB_NAME_AW(GetComputerNameEx)
2118 #define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
2121 #define GetCurrentHwProfile WINELIB_NAME_AW(GetCurrentHwProfile)
2124 #define GetCurrentTime() GetTickCount()
2128 #define GetDefaultCommConfig WINELIB_NAME_AW(GetDefaultCommConfig)
2132 #define GetDiskFreeSpace WINELIB_NAME_AW(GetDiskFreeSpace)
2135 #define GetDiskFreeSpaceEx WINELIB_NAME_AW(GetDiskFreeSpaceEx)
2138 #define GetDllDirectory WINELIB_NAME_AW(GetDllDirectory)
2141 #define GetDriveType WINELIB_NAME_AW(GetDriveType)
2145 #define GetEnvironmentStrings WINELIB_NAME_AW(GetEnvironmentStrings)
2148 #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable)
2155 #define GetFileAttributes WINELIB_NAME_AW(GetFileAttributes)
2158 #define GetFileAttributesEx WINELIB_NAME_AW(GetFileAttributesEx)
2163 #define GetFinalPathNameByHandle WINELIB_NAME_AW(GetFinalPathNameByHandle)
2166 #define GetFileSecurity WINELIB_NAME_AW(GetFileSecurity)
2171 #define GetFreeSpace(w) (__MSABI_LONG(0x100000))
2174 #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
2182 #define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
2185 #define GetLongPathName WINELIB_NAME_AW(GetLongPathName)
2189 #define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
2192 #define GetModuleHandle WINELIB_NAME_AW(GetModuleHandle)
2195 #define GetModuleHandleEx WINELIB_NAME_AW(GetModuleHandleEx)
2200 #define GetNamedPipeHandleState WINELIB_NAME_AW(GetNamedPipeHandleState)
2221 #define GetPrivateProfileInt WINELIB_NAME_AW(GetPrivateProfileInt)
2224 #define GetPrivateProfileSection WINELIB_NAME_AW(GetPrivateProfileSection)
2227 #define GetPrivateProfileSectionNames WINELIB_NAME_AW(GetPrivateProfileSectionNames)
2230 #define GetPrivateProfileString WINELIB_NAME_AW(GetPrivateProfileString)
2233 #define GetPrivateProfileStruct WINELIB_NAME_AW(GetPrivateProfileStruct)
2251 #define GetProfileInt WINELIB_NAME_AW(GetProfileInt)
2254 #define GetProfileSection WINELIB_NAME_AW(GetProfileSection)
2257 #define GetProfileString WINELIB_NAME_AW(GetProfileString)
2272 #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
2275 #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo)
2279 #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
2290 #define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
2293 #define GetSystemWow64Directory2 WINELIB_NAME_AW(GetSystemWow64Directory2)
2296 #define GetSystemWow64Directory WINELIB_NAME_AW(GetSystemWow64Directory)
2302 #define GetTempFileName WINELIB_NAME_AW(GetTempFileName)
2305 #define GetTempPath WINELIB_NAME_AW(GetTempPath)
2320 #define GetUserName WINELIB_NAME_AW(GetUserName)
2324 #define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
2327 #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation)
2331 #define GetVolumeNameForVolumeMountPoint WINELIB_NAME_AW(GetVolumeNameForVolumeMountPoint)
2334 #define GetVolumePathName WINELIB_NAME_AW(GetVolumePathName)
2337 #define GetVolumePathNamesForVolumeName WINELIB_NAME_AW(GetVolumePathNamesForVolumeName)
2341 #define GetWindowsDirectory WINELIB_NAME_AW(GetWindowsDirectory)
2346 #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
2352 #define GlobalFindAtom WINELIB_NAME_AW(GlobalFindAtom)
2358 #define GlobalGetAtomName WINELIB_NAME_AW(GlobalGetAtomName)
2369 #define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
2409 #define IsBadStringPtr WINELIB_NAME_AW(IsBadStringPtr)
2429 #define LoadLibrary WINELIB_NAME_AW(LoadLibrary)
2432 #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
2448 #define LockSegment(handle) GlobalFix((HANDLE)(handle))
2451 #define LookupAccountName WINELIB_NAME_AW(LookupAccountName)
2454 #define LookupAccountSid WINELIB_NAME_AW(LookupAccountSid)
2457 #define LookupAccountSidLocal WINELIB_NAME_AW(LookupAccountSidLocal)
2463 #define LogonUser WINELIB_NAME_AW(LogonUser)
2466 #define LookupPrivilegeDisplayName WINELIB_NAME_AW(LookupPrivilegeDisplayName)
2469 #define LookupPrivilegeName WINELIB_NAME_AW(LookupPrivilegeName)
2472 #define LookupPrivilegeValue WINELIB_NAME_AW(LookupPrivilegeValue)
2475 #define MakeProcInstance(proc,inst) (proc)
2483 #define MoveFile WINELIB_NAME_AW(MoveFile)
2486 #define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
2489 #define MoveFileTransacted WINELIB_NAME_AW(MoveFiletransacted)
2492 #define MoveFileWithProgress WINELIB_NAME_AW(MoveFileWithProgress)
2496 #define NeedCurrentDirectoryForExePath WINELIB_NAME_AW(NeedCurrentDirectoryForExePath)
2500 #define ObjectCloseAuditAlarm WINELIB_NAME_AW(ObjectCloseAuditAlarm)
2503 #define ObjectDeleteAuditAlarm WINELIB_NAME_AW(ObjectDeleteAuditAlarm)
2506 #define ObjectOpenAuditAlarm WINELIB_NAME_AW(ObjectOpenAuditAlarm)
2509 #define ObjectPrivilegeAuditAlarm WINELIB_NAME_AW(ObjectPrivilegeAuditAlarm)
2512 #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog)
2515 #define OpenEncryptedFileRaw WINELIB_NAME_AW(OpenEncryptedFileRaw)
2518 #define OpenEvent WINELIB_NAME_AW(OpenEvent)
2521 #define OpenEventLog WINELIB_NAME_AW(OpenEventLog)
2525 #define OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
2528 #define OpenJobObject WINELIB_NAME_AW(OpenJobObject)
2531 #define OpenMutex WINELIB_NAME_AW(OpenMutex)
2536 #define OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
2541 #define OpenWaitableTimer WINELIB_NAME_AW(OpenWaitableTimer)
2544 #define OutputDebugString WINELIB_NAME_AW(OutputDebugString)
2552 #define PrivilegedServiceAuditAlarm WINELIB_NAME_AW(PrivilegedServiceAuditAlarm)
2560 #define QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
2563 #define QueryFullProcessImageName WINELIB_NAME_AW(QueryFullProcessImageName)
2575 #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
2584 #define RegisterEventSource WINELIB_NAME_AW(RegisterEventSource)
2595 #define ReplaceFile WINELIB_NAME_AW(ReplaceFile)
2598 #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
2603 #define ReportEvent WINELIB_NAME_AW(ReportEvent)
2610 #define SearchPath WINELIB_NAME_AW(SearchPath)
2619 #define SetComputerName WINELIB_NAME_AW(SetComputerName)
2622 #define SetComputerNameEx WINELIB_NAME_AW(SetComputerNameEx)
2626 #define SetCurrentDirectory WINELIB_NAME_AW(SetCurrentDirectory)
2629 #define SetDefaultCommConfig WINELIB_NAME_AW(SetDefaultCommConfig)
2632 #define SetDllDirectory WINELIB_NAME_AW(SetDllDirectory)
2636 #define SetEnvironmentStrings WINELIB_NAME_AW(SetEnvironmentStrings)
2639 #define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
2646 #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes)
2653 #define SetFileSecurity WINELIB_NAME_AW(SetFileSecurity)
2679 #define SetSwapAreaSize(w) (w)
2686 WINBASEAPI BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *);
2698 #define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
2701 #define SetVolumeMountPoint WINELIB_NAME_AW(SetVolumeMountPoint)