Moved ...Resource16 routines to loader/resource.c.
[wine] / include / winerror.h
1 #ifndef __WINE_WINERROR_H
2 #define __WINE_WINERROR_H
3
4
5 extern int WIN32_LastError;
6
7 #define FACILITY_WIN32          7
8
9 #define SEVERITY_ERROR          1
10
11
12 #define MAKE_HRESULT(sev,fac,code) \
13     ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
14 #define MAKE_SCODE(sev,fac,code) \
15         ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
16 #define SUCCEEDED(stat) ((HRESULT)(stat)>=0)
17 #define FAILED(stat) ((HRESULT)(stat)<0)
18
19 /* ERROR_UNKNOWN is a placeholder for error conditions which haven't
20  * been tested yet so we're not exactly sure what will be returned.
21  * All instances of ERROR_UNKNOWN should be tested under Win95/NT
22  * and replaced.
23  */
24 #define ERROR_UNKNOWN               99999
25
26 #define SEVERITY_SUCCESS    0
27 #define SEVERITY_ERROR      1
28
29 #define ERROR_SUCCESS               0
30 #define ERROR_FILE_NOT_FOUND        2
31 #define ERROR_PATH_NOT_FOUND        3
32 #define ERROR_TOO_MANY_OPEN_FILES   4
33 #define ERROR_ACCESS_DENIED         5
34 #define ERROR_INVALID_HANDLE        6
35 #define ERROR_NOT_ENOUGH_MEMORY     8
36 #define ERROR_BAD_FORMAT            11
37 #define ERROR_INVALID_ACCESS        12
38 #define ERROR_INVALID_DATA          13
39 #define ERROR_OUTOFMEMORY           14
40 #define ERROR_NO_MORE_FILES         18
41 #define ERROR_SHARING_VIOLATION     32
42 #define ERROR_LOCK_VIOLATION        33
43 #define ERROR_DUP_NAME              52
44 #define ERROR_BAD_NETPATH           53
45 #define ERROR_FILE_EXISTS           80
46 #define ERROR_CANNOT_MAKE           82
47 #define ERROR_INVALID_PARAMETER     87
48 #define ERROR_BROKEN_PIPE           109
49 #define ERROR_DISK_FULL             112
50 #define ERROR_CALL_NOT_IMPLEMENTED  120
51 #define ERROR_INSUFFICIENT_BUFFER   122
52 #define ERROR_SEEK_ON_DEVICE        132
53 #define ERROR_DIR_NOT_EMPTY         145
54 #define ERROR_BAD_PATHNAME          161
55 #define ERROR_BUSY                  170
56 #define ERROR_ALREADY_EXISTS        183
57 #define ERROR_FILENAME_EXCED_RANGE  206
58 #define ERROR_MORE_DATA             234
59 #define ERROR_NO_MORE_ITEMS         259
60 #define ERROR_NOT_OWNER             288
61 #define ERROR_TOO_MANY_POSTS        298
62 #define ERROR_INVALID_ADDRESS       487
63 #define ERROR_INVALID_ACCESS_TO_MEM 998 
64 #define ERROR_CAN_NOT_COMPLETE      1003
65 #define ERROR_BADKEY                1010 /* Config reg key invalid */
66 #define ERROR_CANTREAD              1012 /* Config reg key couldn't be read */
67 #define ERROR_CANTWRITE             1013 /* Config reg key couldn't be written */
68 #define ERROR_IO_DEVICE             1117
69 #define ERROR_POSSIBLE_DEADLOCK     1131
70 #define ERROR_BAD_DEVICE            1200
71 #define ERROR_NO_NETWORK            1222
72 #define ERROR_ALREADY_INITIALIZED   1247
73 #define ERROR_PRIVILEGE_NOT_HELD    1314
74 #define ERROR_INVALID_WINDOW_HANDLE 1400
75 #define ERROR_CANNOT_FIND_WND_CLASS 1407
76 #define ERROR_WINDOW_OF_OTHER_THREAD 1408
77 #define ERROR_CLASS_ALREADY_EXISTS  1410
78 #define ERROR_CLASS_DOES_NOT_EXIST  1411
79 #define ERROR_CLASS_HAS_WINDOWS     1412
80 #define ERROR_COMMITMENT_LIMIT      1455
81 #define ERROR_INVALID_PRINTER_NAME  1801
82
83 /* HRESULT values for OLE, SHELL and other Interface stuff */
84 /* the codes 4000-40ff are reserved for OLE */
85 #define NOERROR                         0
86 #define S_OK                            0
87
88
89 #define E_UNEXPECTED                    0x8000FFFF
90
91 #define E_NOTIMPL                       0x80004001
92 #define E_NOINTERFACE                   0x80004002
93 #define E_POINTER                       0x80004003
94 #define E_ABORT                         0x80004004
95 #define E_FAIL                          0x80004005
96
97 /*#define CO_E_INIT_TLS                 0x80004006
98 #define CO_E_INIT_SHARED_ALLOCATOR      0x80004007
99 #define CO_E_INIT_MEMORY_ALLOCATOR      0x80004008
100 #define CO_E_INIT_CLASS_CACHE           0x80004009
101 #define CO_E_INIT_RPC_CHANNEL           0x8000400A
102 #define CO_E_INIT_TLS_SET_CHANNEL_CONTROL       0x8000400B
103 #define CO_E_INIT_TLS_CHANNEL_CONTROL   0x8000400C
104 #define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR     0x8000400D
105 #define CO_E_INIT_SCM_MUTEX_EXISTS      0x8000400E
106 #define CO_E_INIT_SCM_FILE_MAPPING_EXISTS       0x8000400F
107 #define CO_E_INIT_SCM_MAP_VIEW_OF_FILE  0x80004010
108 #define CO_E_INIT_SCM_EXEC_FAILURE      0x80004011
109 #define CO_E_INIT_ONLY_SINGLE_THREADED  0x80004012 */
110
111 #define OLE_E_ENUM_NOMORE                     0x80040002
112 #define CLASS_E_NOAGGREGATION     0x80040110
113 #define CLASS_E_CLASSNOTAVAILABLE       0x80040111
114 #define E_ACCESSDENIED                        0x80070005
115 #define E_HANDLE                                0x80070006
116 #define E_OUTOFMEMORY                           0x8007000E
117 #define E_INVALIDARG                            0x80070057
118
119 //#define OLE_E_FIRST 0x80040000L
120 //#define OLE_E_LAST  0x800400FFL
121 //#define OLE_S_FIRST 0x00040000L
122 //#define OLE_S_LAST  0x000400FFL
123
124 #define STG_E_INVALIDFUNCTION           0x80030001
125 #define STG_E_FILENOTFOUND              0x80030002
126 #define STG_E_PATHNOTFOUND              0x80030003
127 #define STG_E_TOOMANYOPENFILES          0x80030004
128 #define STG_E_ACCESSDENIED              0x80030005
129 #define STG_E_INVALIDHANDLE             0x80030006
130 #define STG_E_INSUFFICIENTMEMORY        0x80030008
131 #define STG_E_INVALIDPOINTER            0x80030009
132 #define STG_E_NOMOREFILES               0x80030012
133 #define STG_E_DISKISWRITEPROTECTED      0x80030013
134 #define STG_E_SEEKERROR                 0x80030019
135 #define STG_E_WRITEFAULT                0x8003001D
136 #define STG_E_READFAULT                 0x8003001E
137 #define STG_E_SHAREVIOLATION            0x80030020
138 #define STG_E_LOCKVIOLATION             0x80030021
139 #define STG_E_FILEALREADYEXISTS         0x80030050
140 #define STG_E_INVALIDPARAMETER          0x80030057
141 #define STG_E_MEDIUMFULL                0x80030070
142 #define STG_E_ABNORMALAPIEXIT           0x800300FA
143 #define STG_E_INVALIDHEADER             0x800300FB
144 #define STG_E_INVALIDNAME               0x800300FC
145 #define STG_E_UNKNOWN                   0x800300FD
146 #define STG_E_UNIMPLEMENTEDFUNCTION     0x800300FE
147 #define STG_E_INVALIDFLAG               0x800300FF
148 #define STG_E_INUSE                     0x80030100
149 #define STG_E_NOTCURRENT                0x80030101
150 #define STG_E_REVERTED                  0x80030102
151 #define STG_E_CANTSAVE                  0x80030103
152 #define STG_E_OLDFORMAT                 0x80030104
153 #define STG_E_OLDDLL                    0x80030105
154 #define STG_E_SHAREREQUIRED             0x80030106
155 #define STG_E_NOTFILEBASEDSTORAGE       0x80030107
156 #define STG_E_EXTANTMARSHALLINGS        0x80030108
157
158 /* alten versionen
159 #define E_NOTIMPL                       0x80000001
160 #define E_OUTOFMEMORY                   0x80000002
161 #define E_INVALIDARG                    0x80000003
162 #define E_NOINTERFACE                   0x80000004
163 #define E_POINTER                       0x80000005
164 #define E_HANDLE                        0x80000006
165 #define E_ABORT                         0x80000007
166 #define E_FAIL                          0x80000008
167 #define E_ACCESSDENIED                  0x80000009 */
168
169 /* Obtained from lcc-win32 include files */
170 #define GDI_ERROR                       0xffffffff
171
172
173 /* registry errors */
174 #define REGDB_E_READREGDB               0x80040150
175 #define REGDB_E_CLASSNOTREG             0x80040154
176
177 #endif  /* __WINE_WINERROR_H */