2 Copyright © 2008-2011, The AROS Development Team. All rights reserved.
5 Desc: WinAPI definitions to be used with AROS-side code.
6 Taken from various Mingw32 headers.
11 #define __stdcall __attribute__((ms_abi))
13 #define __stdcall __attribute__((stdcall))
16 #define GENERIC_READ 0x80000000
17 #define GENERIC_WRITE 0x40000000
18 #define GENERIC_EXECUTE 0x20000000
19 #define GENERIC_ALL 0x10000000
21 #define INVALID_FILE_ATTRIBUTES ((ULONG)-1)
23 #define FILE_LIST_DIRECTORY 0x00000001
24 #define FILE_READ_DATA 0x00000001
25 #define FILE_ADD_FILE 0x00000002
26 #define FILE_WRITE_DATA 0x00000002
27 #define FILE_ADD_SUBDIRECTORY 0x00000004
28 #define FILE_APPEND_DATA 0x00000004
29 #define FILE_CREATE_PIPE_INSTANCE 0x00000004
30 #define FILE_READ_EA 0x00000008
31 #define FILE_READ_PROPERTIES 0x00000008
32 #define FILE_WRITE_EA 0x00000010
33 #define FILE_WRITE_PROPERTIES 0x00000010
34 #define FILE_EXECUTE 0x00000020
35 #define FILE_TRAVERSE 0x00000020
36 #define FILE_DELETE_CHILD 0x00000040
37 #define FILE_READ_ATTRIBUTES 0x00000080
38 #define FILE_WRITE_ATTRIBUTES 0x00000100
40 #define FILE_SHARE_READ 0x00000001
41 #define FILE_SHARE_WRITE 0x00000002
42 #define FILE_SHARE_DELETE 0x00000004
43 #define FILE_SHARE_VALID_FLAGS 0x00000007
45 #define FILE_ATTRIBUTE_READONLY 0x00000001
46 #define FILE_ATTRIBUTE_HIDDEN 0x00000002
47 #define FILE_ATTRIBUTE_SYSTEM 0x00000004
48 #define FILE_ATTRIBUTE_DIRECTORY 0x00000010
49 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020
50 #define FILE_ATTRIBUTE_DEVICE 0x00000040
51 #define FILE_ATTRIBUTE_NORMAL 0x00000080
52 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100
53 #define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
54 #define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
55 #define FILE_ATTRIBUTE_COMPRESSED 0x00000800
56 #define FILE_ATTRIBUTE_OFFLINE 0x00001000
57 #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
58 #define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
59 #define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
60 #define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
63 #define CREATE_ALWAYS 2
64 #define OPEN_EXISTING 3
66 #define TRUNCATE_EXISTING 5
68 #define STD_INPUT_HANDLE (ULONG)(0xfffffff6)
69 #define STD_OUTPUT_HANDLE (ULONG)(0xfffffff5)
70 #define STD_ERROR_HANDLE (ULONG)(0xfffffff4)
71 #define INVALID_HANDLE_VALUE (void *)(-1)
73 #define FILE_TYPE_UNKNOWN 0
74 #define FILE_TYPE_DISK 1
75 #define FILE_TYPE_CHAR 2
76 #define FILE_TYPE_PIPE 3
77 #define FILE_TYPE_REMOTE 0x8000
80 #define FILE_CURRENT 1
83 #define ERROR_FILE_NOT_FOUND 2L
84 #define ERROR_PATH_NOT_FOUND 3L
85 #define ERROR_ACCESS_DENIED 5L
86 #define ERROR_NOT_ENOUGH_MEMORY 8L
87 #define ERROR_NO_MORE_FILES 18L
88 #define ERROR_WRITE_PROTECT 19L
89 #define ERROR_SHARING_VIOLATION 32L
90 #define ERROR_LOCK_VIOLATION 33L
91 #define ERROR_HANDLE_EOF 38L
92 #define ERROR_FILE_EXISTS 80L
93 #define WIN32_ERROR_BUFFER_OVERFLOW 111L
94 #define WIN32_ERROR_DISK_FULL 112L
95 #define ERROR_INVALID_NAME 123L
96 #define ERROR_DIR_NOT_EMPTY 145L
97 #define ERROR_IO_PENDING 997L
99 #pragma pack(4) /* Important on 64 bits */
101 typedef struct _WIN32_FIND_DATA
103 ULONG dwFileAttributes
;
104 UQUAD ftCreationTime
;
105 UQUAD ftLastAccessTime
;
106 UQUAD ftLastWriteTime
;
112 char cAlternateFileName
[14];
113 } WIN32_FIND_DATA
, *PWIN32_FIND_DATA
, *LPWIN32_FIND_DATA
;
115 typedef struct _WIN32_FILE_ATTRIBUTE_DATA
117 ULONG dwFileAttributes
;
118 UQUAD ftCreationTime
;
119 UQUAD ftLastAccessTime
;
120 UQUAD ftLastWriteTime
;
123 } WIN32_FILE_ATTRIBUTE_DATA
, *LPWIN32_FILE_ATTRIBUTE_DATA
;