Added a lot of new error definitions.
[wine/multimedia.git] / include / winerror.h
bloba79a3c8d887ae2d6821a6bd78739e9d6b7221cea
1 #ifndef __WINE_WINERROR_H
2 #define __WINE_WINERROR_H
5 extern int WIN32_LastError;
7 #define FACILITY_ITF 4
8 #define FACILITY_WIN32 7
10 #define SEVERITY_ERROR 1
13 #define MAKE_HRESULT(sev,fac,code) \
14 ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
15 #define MAKE_SCODE(sev,fac,code) \
16 ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
17 #define SUCCEEDED(stat) ((HRESULT)(stat)>=0)
18 #define FAILED(stat) ((HRESULT)(stat)<0)
20 /* ERROR_UNKNOWN is a placeholder for error conditions which haven't
21 * been tested yet so we're not exactly sure what will be returned.
22 * All instances of ERROR_UNKNOWN should be tested under Win95/NT
23 * and replaced.
25 #define ERROR_UNKNOWN 99999
27 #define SEVERITY_SUCCESS 0
28 #define SEVERITY_ERROR 1
30 #define NO_ERROR 0
31 #define ERROR_SUCCESS 0
32 #define ERROR_INVALID_FUNCTION 1
33 #define ERROR_FILE_NOT_FOUND 2
34 #define ERROR_PATH_NOT_FOUND 3
35 #define ERROR_TOO_MANY_OPEN_FILES 4
36 #define ERROR_ACCESS_DENIED 5
37 #define ERROR_INVALID_HANDLE 6
38 #define ERROR_ARENA_TRASHED 7
39 #define ERROR_NOT_ENOUGH_MEMORY 8
40 #define ERROR_INVALID_BLOCK 9
41 #define ERROR_BAD_ENVIRONMENT 10
42 #define ERROR_BAD_FORMAT 11
43 #define ERROR_INVALID_ACCESS 12
44 #define ERROR_INVALID_DATA 13
45 #define ERROR_OUTOFMEMORY 14
46 #define ERROR_INVALID_DRIVE 15
47 #define ERROR_CURRENT_DIRECTORY 16
48 #define ERROR_NOT_SAME_DEVICE 17
49 #define ERROR_NO_MORE_FILES 18
50 #define ERROR_WRITE_PROTECT 19
51 #define ERROR_BAD_UNIT 20
52 #define ERROR_NOT_READY 21
53 #define ERROR_BAD_COMMAND 22
54 #define ERROR_CRC 23
55 #define ERROR_BAD_LENGTH 24
56 #define ERROR_SEEK 25
57 #define ERROR_NOT_DOS_DISK 26
58 #define ERROR_SECTOR_NOT_FOUND 27
59 #define ERROR_WRITE_FAULT 29
60 #define ERROR_READ_FAULT 30
61 #define ERROR_GEN_FAILURE 31
62 #define ERROR_SHARING_VIOLATION 32
63 #define ERROR_LOCK_VIOLATION 33
64 #define ERROR_WRONG_DISK 34
65 #define ERROR_SHARING_BUFFER_EXCEEDED 36
66 #define ERROR_HANDLE_EOF 38
67 #define ERROR_HANDLE_DISK_FULL 39
68 #define ERROR_NOT_SUPPORTED 50
69 #define ERROR_REM_NOT_LIST 51
70 #define ERROR_DUP_NAME 52
71 #define ERROR_BAD_NETPATH 53
72 #define ERROR_NETWORK_BUSY 54
73 #define ERROR_DEV_NOT_EXIST 55
74 #define ERROR_ADAP_HDW_ERR 57
75 #define ERROR_BAD_NET_RESP 58
76 #define ERROR_UNEXP_NET_ERR 59
77 #define ERROR_BAD_REM_ADAP 60
78 #define ERROR_PRINTQ_FULL 61
79 #define ERROR_NO_SPOOL_SPACE 62
80 #define ERROR_PRINT_CANCELLED 63
81 #define ERROR_NETNAME_DELETED 64
82 #define ERROR_NETWORK_ACCESS_DENIED 65
83 #define ERROR_BAD_DEV_TYPE 66
84 #define ERROR_BAD_NET_NAME 67
85 #define ERROR_TOO_MANY_NAMES 68
86 #define ERROR_TOO_MANY_SESS 69
87 #define ERROR_SHARING_PAUSED 70
88 #define ERROR_REQ_NOT_ACCEP 71
89 #define ERROR_REDIR_PAUSED 72
90 #define ERROR_FILE_EXISTS 80
91 #define ERROR_CANNOT_MAKE 82
92 #define ERROR_FAIL_I24 83
93 #define ERROR_OUT_OF_STRUCTURES 84
94 #define ERROR_ALREADY_ASSIGNED 85
95 #define ERROR_INVALID_PASSWORD 86
96 #define ERROR_INVALID_PARAMETER 87
97 #define ERROR_NET_WRITE_FAULT 88
98 #define ERROR_NO_PROC_SLOTS 89
99 #define ERROR_TOO_MANY_SEMAPHORES 100
100 #define ERROR_EXCL_SEM_ALREADY_OWNED 101
101 #define ERROR_SEM_IS_SET 102
102 #define ERROR_TOO_MANY_SEM_REQUESTS 103
103 #define ERROR_INVALID_AT_INTERRUPT_TIME 104
104 #define ERROR_SEM_OWNER_DIED 105
105 #define ERROR_SEM_USER_LIMIT 106
106 #define ERROR_DISK_CHANGE 107
107 #define ERROR_DRIVE_LOCKED 108
108 #define ERROR_BROKEN_PIPE 109
109 #define ERROR_OPEN_FAILED 110
110 #define ERROR_BUFFER_OVERFLOW 111
111 #define ERROR_DISK_FULL 112
112 #define ERROR_NO_MORE_SEARCH_HANDLES 113
113 #define ERROR_INVALID_TARGET_HANDLE 114
114 #define ERROR_INVALID_CATEGORY 117
115 #define ERROR_INVALID_VERIFY_SWITCH 118
116 #define ERROR_BAD_DRIVER_LEVEL 119
117 #define ERROR_CALL_NOT_IMPLEMENTED 120
118 #define ERROR_SEM_TIMEOUT 121
119 #define ERROR_INSUFFICIENT_BUFFER 122
120 #define ERROR_INVALID_NAME 123
121 #define ERROR_INVALID_LEVEL 124
122 #define ERROR_NO_VOLUME_LABEL 125
123 #define ERROR_MOD_NOT_FOUND 126
124 #define ERROR_PROC_NOT_FOUND 127
125 #define ERROR_WAIT_NO_CHILDREN 128
126 #define ERROR_CHILD_NOT_COMPLETE 129
127 #define ERROR_DIRECT_ACCESS_HANDLE 130
128 #define ERROR_NEGATIVE_SEEK 131
129 #define ERROR_SEEK_ON_DEVICE 132
130 #define ERROR_IS_JOIN_TARGET 133
131 #define ERROR_IS_JOINED 134
132 #define ERROR_IS_SUBSTED 135
133 #define ERROR_NOT_JOINED 136
134 #define ERROR_NOT_SUBSTED 137
135 #define ERROR_JOIN_TO_JOIN 138
136 #define ERROR_SUBST_TO_SUBST 139
137 #define ERROR_JOIN_TO_SUBST 140
138 #define ERROR_SUBST_TO_JOIN 141
139 #define ERROR_BUSY_DRIVE 142
140 #define ERROR_SAME_DRIVE 143
141 #define ERROR_DIR_NOT_ROOT 144
142 #define ERROR_DIR_NOT_EMPTY 145
143 #define ERROR_IS_SUBST_PATH 146
144 #define ERROR_IS_JOIN_PATH 147
145 #define ERROR_PATH_BUSY 148
146 #define ERROR_IS_SUBST_TARGET 149
147 #define ERROR_SYSTEM_TRACE 150
148 #define ERROR_INVALID_EVENT_COUNT 151
149 #define ERROR_TOO_MANY_MUXWAITERS 152
150 #define ERROR_INVALID_LIST_FORMAT 153
151 #define ERROR_LABEL_TOO_LONG 154
152 #define ERROR_TOO_MANY_TCBS 155
153 #define ERROR_SIGNAL_REFUSED 156
154 #define ERROR_DISCARDED 157
155 #define ERROR_NOT_LOCKED 158
156 #define ERROR_BAD_THREADID_ADDR 159
157 #define ERROR_BAD_ARGUMENTS 160
158 #define ERROR_BAD_PATHNAME 161
159 #define ERROR_SIGNAL_PENDING 162
160 #define ERROR_MAX_THRDS_REACHED 164
161 #define ERROR_LOCK_FAILED 167
162 #define ERROR_BUSY 170
163 #define ERROR_CANCEL_VIOLATION 173
164 #define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174
165 #define ERROR_INVALID_SEGMENT_NUMBER 180
166 #define ERROR_INVALID_ORDINAL 182
167 #define ERROR_ALREADY_EXISTS 183
168 #define ERROR_INVALID_FLAG_NUMBER 186
169 #define ERROR_SEM_NOT_FOUND 187
170 #define ERROR_INVALID_STARTING_CODESEG 188
171 #define ERROR_INVALID_STACKSEG 189
172 #define ERROR_INVALID_MODULETYPE 190
173 #define ERROR_INVALID_EXE_SIGNATURE 191
174 #define ERROR_EXE_MARKED_INVALID 192
175 #define ERROR_BAD_EXE_FORMAT 193
176 #define ERROR_ITERATED_DATA_EXCEEDS_64k 194
177 #define ERROR_INVALID_MINALLOCSIZE 195
178 #define ERROR_DYNLINK_FROM_INVALID_RING 196
179 #define ERROR_IOPL_NOT_ENABLED 197
180 #define ERROR_INVALID_SEGDPL 198
181 #define ERROR_AUTODATASEG_EXCEEDS_64k 199
182 #define ERROR_RING2SEG_MUST_BE_MOVABLE 200
183 #define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201
184 #define ERROR_INFLOOP_IN_RELOC_CHAIN 202
185 #define ERROR_ENVVAR_NOT_FOUND 203
186 #define ERROR_NO_SIGNAL_SENT 205
187 #define ERROR_FILENAME_EXCED_RANGE 206
188 #define ERROR_RING2_STACK_IN_USE 207
189 #define ERROR_META_EXPANSION_TOO_LONG 208
190 #define ERROR_INVALID_SIGNAL_NUMBER 209
191 #define ERROR_THREAD_1_INACTIVE 210
192 #define ERROR_LOCKED 212
193 #define ERROR_TOO_MANY_MODULES 214
194 #define ERROR_NESTING_NOT_ALLOWED 215
195 #define ERROR_EXE_MACHINE_TYPE_MISMATCH 216
196 #define ERROR_BAD_PIPE 230
197 #define ERROR_PIPE_BUSY 231
198 #define ERROR_NO_DATA 232
199 #define ERROR_PIPE_NOT_CONNECTED 233
200 #define ERROR_MORE_DATA 234
201 #define ERROR_VC_DISCONNECTED 240
202 #define ERROR_INVALID_EA_NAME 254
203 #define ERROR_EA_LIST_INCONSISTENT 255
204 #define ERROR_NO_MORE_ITEMS 259
205 #define ERROR_CANNOT_COPY 266
206 #define ERROR_DIRECTORY 267
207 #define ERROR_EAS_DIDNT_FIT 275
208 #define ERROR_EA_FILE_CORRUPT 276
209 #define ERROR_EA_TABLE_FULL 277
210 #define ERROR_INVALID_EA_HANDLE 278
211 #define ERROR_EAS_NOT_SUPPORTED 282
212 #define ERROR_NOT_OWNER 288
213 #define ERROR_TOO_MANY_POSTS 298
214 #define ERROR_PARTIAL_COPY 299
215 #define ERROR_OPLOCK_NOT_GRANTED 300
216 #define ERROR_INVALID_OPLOCK_PROTOCOL 301
217 #define ERROR_MR_MID_NOT_FOUND 317
218 #define ERROR_INVALID_ADDRESS 487
219 #define ERROR_ARITHMETIC_OVERFLOW 534
220 #define ERROR_PIPE_CONNECTED 535
221 #define ERROR_PIPE_LISTENING 536
222 #define ERROR_EA_ACCESS_DENIED 994
223 #define ERROR_OPERATION_ABORTED 995
224 #define ERROR_IO_INCOMPLETE 996
225 #define ERROR_IO_PENDING 997
226 #define ERROR_NOACCESS 998
227 #define ERROR_SWAPERROR 999
228 #define ERROR_CAN_NOT_COMPLETE 1003
229 #define ERROR_BADKEY 1010 /* Config reg key invalid */
230 #define ERROR_CANTREAD 1012 /* Config reg key couldn't be read */
231 #define ERROR_CANTWRITE 1013 /* Config reg key couldn't be written */
232 #define ERROR_IO_DEVICE 1117
233 #define ERROR_POSSIBLE_DEADLOCK 1131
234 #define ERROR_BAD_DEVICE 1200
235 #define ERROR_NO_NETWORK 1222
236 #define ERROR_ALREADY_INITIALIZED 1247
237 #define ERROR_PRIVILEGE_NOT_HELD 1314
238 #define ERROR_INVALID_WINDOW_HANDLE 1400
239 #define ERROR_CANNOT_FIND_WND_CLASS 1407
240 #define ERROR_WINDOW_OF_OTHER_THREAD 1408
241 #define ERROR_CLASS_ALREADY_EXISTS 1410
242 #define ERROR_CLASS_DOES_NOT_EXIST 1411
243 #define ERROR_CLASS_HAS_WINDOWS 1412
244 #define ERROR_COMMITMENT_LIMIT 1455
245 #define ERROR_INVALID_PRINTER_NAME 1801
247 /* HRESULT values for OLE, SHELL and other Interface stuff */
248 /* the codes 4000-40ff are reserved for OLE */
249 #define NOERROR 0L
250 #define S_OK ((HRESULT)0L)
251 #define S_FALSE ((HRESULT)1L)
253 #define DISP_E_BADVARTYPE 0x80020008L
254 #define DISP_E_OVERFLOW 0x8002000AL
255 #define DISP_E_TYPEMISMATCH 0x80020005L
256 #define DISP_E_ARRAYISLOCKED 0x8002000D
257 #define DISP_E_BADINDEX 0x8002000B
261 /* Drag and Drop */
262 #define DRAGDROP_S_DROP 0x00040100L
263 #define DRAGDROP_S_CANCEL 0x00040101L
265 #define E_UNEXPECTED 0x8000FFFF
267 #define E_NOTIMPL 0x80004001
268 #define E_NOINTERFACE 0x80004002
269 #define E_POINTER 0x80004003
270 #define E_ABORT 0x80004004
271 #define E_FAIL 0x80004005
273 /*#define CO_E_INIT_TLS 0x80004006
274 #define CO_E_INIT_SHARED_ALLOCATOR 0x80004007
275 #define CO_E_INIT_MEMORY_ALLOCATOR 0x80004008
276 #define CO_E_INIT_CLASS_CACHE 0x80004009
277 #define CO_E_INIT_RPC_CHANNEL 0x8000400A
278 #define CO_E_INIT_TLS_SET_CHANNEL_CONTROL 0x8000400B
279 #define CO_E_INIT_TLS_CHANNEL_CONTROL 0x8000400C
280 #define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR 0x8000400D
281 #define CO_E_INIT_SCM_MUTEX_EXISTS 0x8000400E
282 #define CO_E_INIT_SCM_FILE_MAPPING_EXISTS 0x8000400F
283 #define CO_E_INIT_SCM_MAP_VIEW_OF_FILE 0x80004010
284 #define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
285 #define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012 */
287 #define CO_E_OBJISREG 0x800401FB
288 #define OLE_E_ENUM_NOMORE 0x80040002
289 #define CLASS_E_NOAGGREGATION 0x80040110
290 #define CLASS_E_CLASSNOTAVAILABLE 0x80040111
291 #define E_ACCESSDENIED 0x80070005
292 #define E_HANDLE 0x80070006
293 #define E_OUTOFMEMORY 0x8007000E
294 #define E_INVALIDARG 0x80070057
296 /*#define OLE_E_FIRST 0x80040000L */
297 /*#define OLE_E_LAST 0x800400FFL */
298 /*#define OLE_S_FIRST 0x00040000L */
299 /*#define OLE_S_LAST 0x000400FFL */
301 #define STG_E_INVALIDFUNCTION 0x80030001
302 #define STG_E_FILENOTFOUND 0x80030002
303 #define STG_E_PATHNOTFOUND 0x80030003
304 #define STG_E_TOOMANYOPENFILES 0x80030004
305 #define STG_E_ACCESSDENIED 0x80030005
306 #define STG_E_INVALIDHANDLE 0x80030006
307 #define STG_E_INSUFFICIENTMEMORY 0x80030008
308 #define STG_E_INVALIDPOINTER 0x80030009
309 #define STG_E_NOMOREFILES 0x80030012
310 #define STG_E_DISKISWRITEPROTECTED 0x80030013
311 #define STG_E_SEEKERROR 0x80030019
312 #define STG_E_WRITEFAULT 0x8003001D
313 #define STG_E_READFAULT 0x8003001E
314 #define STG_E_SHAREVIOLATION 0x80030020
315 #define STG_E_LOCKVIOLATION 0x80030021
316 #define STG_E_FILEALREADYEXISTS 0x80030050
317 #define STG_E_INVALIDPARAMETER 0x80030057
318 #define STG_E_MEDIUMFULL 0x80030070
319 #define STG_E_ABNORMALAPIEXIT 0x800300FA
320 #define STG_E_INVALIDHEADER 0x800300FB
321 #define STG_E_INVALIDNAME 0x800300FC
322 #define STG_E_UNKNOWN 0x800300FD
323 #define STG_E_UNIMPLEMENTEDFUNCTION 0x800300FE
324 #define STG_E_INVALIDFLAG 0x800300FF
325 #define STG_E_INUSE 0x80030100
326 #define STG_E_NOTCURRENT 0x80030101
327 #define STG_E_REVERTED 0x80030102
328 #define STG_E_CANTSAVE 0x80030103
329 #define STG_E_OLDFORMAT 0x80030104
330 #define STG_E_OLDDLL 0x80030105
331 #define STG_E_SHAREREQUIRED 0x80030106
332 #define STG_E_NOTFILEBASEDSTORAGE 0x80030107
333 #define STG_E_EXTANTMARSHALLINGS 0x80030108
335 /* alten versionen
336 #define E_NOTIMPL 0x80000001
337 #define E_OUTOFMEMORY 0x80000002
338 #define E_INVALIDARG 0x80000003
339 #define E_NOINTERFACE 0x80000004
340 #define E_POINTER 0x80000005
341 #define E_HANDLE 0x80000006
342 #define E_ABORT 0x80000007
343 #define E_FAIL 0x80000008
344 #define E_ACCESSDENIED 0x80000009 */
346 /* Obtained from lcc-win32 include files */
347 #define GDI_ERROR 0xffffffff
350 /* registry errors */
351 #define REGDB_E_READREGDB 0x80040150
352 #define REGDB_E_CLASSNOTREG 0x80040154
354 #endif /* __WINE_WINERROR_H */