#ifndef _WINERROR_H
#define _WINERROR_H

#ifdef NEED_DOS_ERRORS_H
#define LIBW32(x) LIBW32_##x
#else
#define LIBW32(x) x
#endif

enum {
	LIBW32(NO_ERROR)                         = 0,
	LIBW32(ERROR_SUCCESS)                    = 0,
	LIBW32(ERROR_INVALID_FUNCTION)           = 1,
	LIBW32(ERROR_FILE_NOT_FOUND)             = 2,
	LIBW32(ERROR_PATH_NOT_FOUND)             = 3,
	LIBW32(ERROR_TOO_MANY_OPEN_FILES)        = 4,
	LIBW32(ERROR_ACCESS_DENIED)              = 5,
	LIBW32(ERROR_INVALID_HANDLE)             = 6,
	LIBW32(ERROR_ARENA_TRASHED)              = 7,
	LIBW32(ERROR_NOT_ENOUGH_MEMORY)          = 8,
	LIBW32(ERROR_INVALID_BLOCK)              = 9,
	LIBW32(ERROR_BAD_ENVIRONMENT)            = 10,
	LIBW32(ERROR_BAD_FORMAT)                 = 11,
	LIBW32(ERROR_INVALID_ACCESS)             = 12,
	LIBW32(ERROR_INVALID_DATA)               = 13,
	LIBW32(ERROR_OUTOFMEMORY)                = 14,
	LIBW32(ERROR_INVALID_DRIVE)              = 15,
	LIBW32(ERROR_CURRENT_DIRECTORY)          = 16,
	LIBW32(ERROR_NOT_SAME_DEVICE)            = 17,
	LIBW32(ERROR_NO_MORE_FILES)              = 18,
	LIBW32(ERROR_WRITE_PROTECT)              = 19,
	LIBW32(ERROR_BAD_UNIT)                   = 20,
	LIBW32(ERROR_NOT_READY)                  = 21,
	LIBW32(ERROR_BAD_COMMAND)                = 22,
	LIBW32(ERROR_CRC)                        = 23,
	LIBW32(ERROR_BAD_LENGTH)                 = 24,
	LIBW32(ERROR_SEEK)                       = 25,
	LIBW32(ERROR_NOT_DOS_DISK)               = 26,
	LIBW32(ERROR_SECTOR_NOT_FOUND)           = 27,
	LIBW32(ERROR_WRITE_FAULT)                = 29,
	LIBW32(ERROR_READ_FAULT)                 = 30,
	LIBW32(ERROR_GEN_FAILURE)                = 31,
	LIBW32(ERROR_SHARING_VIOLATION)          = 32,
	LIBW32(ERROR_LOCK_VIOLATION)             = 33,
	LIBW32(ERROR_WRONG_DISK)                 = 34,
	LIBW32(ERROR_SHARING_BUFFER_EXCEEDED)    = 36,
	LIBW32(ERROR_HANDLE_EOF)                 = 38,
	LIBW32(ERROR_HANDLE_DISK_FULL)           = 39,
	LIBW32(ERROR_NOT_SUPPORTED)              = 50,
	LIBW32(ERROR_REM_NOT_LIST)               = 51,
	LIBW32(ERROR_DUP_NAME)                   = 52,
	LIBW32(ERROR_BAD_NETPATH)                = 53,
	LIBW32(ERROR_NETWORK_BUSY)               = 54,
	LIBW32(ERROR_DEV_NOT_EXIST)              = 55,
	LIBW32(ERROR_ADAP_HDW_ERR)               = 57,
	LIBW32(ERROR_BAD_NET_RESP)               = 58,
	LIBW32(ERROR_UNEXP_NET_ERR)              = 59,
	LIBW32(ERROR_BAD_REM_ADAP)               = 60,
	LIBW32(ERROR_PRINTQ_FULL)                = 61,
	LIBW32(ERROR_NO_SPOOL_SPACE)             = 62,
	LIBW32(ERROR_PRINT_CANCELLED)            = 63,
	LIBW32(ERROR_NETNAME_DELETED)            = 64,
	LIBW32(ERROR_NETWORK_ACCESS_DENIED)      = 65,
	LIBW32(ERROR_BAD_DEV_TYPE)               = 66,
	LIBW32(ERROR_BAD_NET_NAME)               = 67,
	LIBW32(ERROR_TOO_MANY_NAMES)             = 68,
	LIBW32(ERROR_TOO_MANY_SESS)              = 69,
	LIBW32(ERROR_SHARING_PAUSED)             = 70,
	LIBW32(ERROR_REQ_NOT_ACCEP)              = 71,
	LIBW32(ERROR_REDIR_PAUSED)               = 72,
	LIBW32(ERROR_FILE_EXISTS)                = 80,
	LIBW32(ERROR_CANNOT_MAKE)                = 82,
	LIBW32(ERROR_FAIL_I24)                   = 83,
	LIBW32(ERROR_OUT_OF_STRUCTURES)          = 84,
	LIBW32(ERROR_ALREADY_ASSIGNED)           = 85,
	LIBW32(ERROR_INVALID_PASSWORD)           = 86,
	LIBW32(ERROR_INVALID_PARAMETER)          = 87,
	LIBW32(ERROR_NET_WRITE_FAULT)            = 88,
	LIBW32(ERROR_NO_PROC_SLOTS)              = 89,
	LIBW32(ERROR_TOO_MANY_SEMAPHORES)        = 100,
	LIBW32(ERROR_EXCL_SEM_ALREADY_OWNED)     = 101,
	LIBW32(ERROR_SEM_IS_SET)                 = 102,
	LIBW32(ERROR_TOO_MANY_SEM_REQUESTS)      = 103,
	LIBW32(ERROR_INVALID_AT_INTERRUPT_TIME)  = 104,
	LIBW32(ERROR_SEM_OWNER_DIED)             = 105,
	LIBW32(ERROR_SEM_USER_LIMIT)             = 106,
	LIBW32(ERROR_DISK_CHANGE)                = 107,
	LIBW32(ERROR_DRIVE_LOCKED)               = 108,
	LIBW32(ERROR_BROKEN_PIPE)                = 109,
	LIBW32(ERROR_OPEN_FAILED)                = 110,
	LIBW32(ERROR_BUFFER_OVERFLOW)            = 111,
	LIBW32(ERROR_DISK_FULL)                  = 112,
	LIBW32(ERROR_NO_MORE_SEARCH_HANDLES)     = 113,
	LIBW32(ERROR_INVALID_TARGET_HANDLE)      = 114,
	LIBW32(ERROR_INVALID_CATEGORY)           = 117,
	LIBW32(ERROR_INVALID_VERIFY_SWITCH)      = 118,
	LIBW32(ERROR_BAD_DRIVER_LEVEL)           = 119,
	LIBW32(ERROR_CALL_NOT_IMPLEMENTED)       = 120,
	LIBW32(ERROR_SEM_TIMEOUT)                = 121,
	LIBW32(ERROR_INSUFFICIENT_BUFFER)        = 122,
	LIBW32(ERROR_INVALID_NAME)               = 123,
	LIBW32(ERROR_INVALID_LEVEL)              = 124,
	LIBW32(ERROR_NO_VOLUME_LABEL)            = 125,
	LIBW32(ERROR_MOD_NOT_FOUND)              = 126,
	LIBW32(ERROR_PROC_NOT_FOUND)             = 127,
	LIBW32(ERROR_WAIT_NO_CHILDREN)           = 128,
	LIBW32(ERROR_CHILD_NOT_COMPLETE)         = 129,
	LIBW32(ERROR_DIRECT_ACCESS_HANDLE)       = 130,
	LIBW32(ERROR_NEGATIVE_SEEK)              = 131,
	LIBW32(ERROR_SEEK_ON_DEVICE)             = 132,
	LIBW32(ERROR_IS_JOIN_TARGET)             = 133,
	LIBW32(ERROR_IS_JOINED)                  = 134,
	LIBW32(ERROR_IS_SUBSTED)                 = 135,
	LIBW32(ERROR_NOT_JOINED)                 = 136,
	LIBW32(ERROR_NOT_SUBSTED)                = 137,
	LIBW32(ERROR_JOIN_TO_JOIN)               = 138,
	LIBW32(ERROR_SUBST_TO_SUBST)             = 139,
	LIBW32(ERROR_JOIN_TO_SUBST)              = 140,
	LIBW32(ERROR_SUBST_TO_JOIN)              = 141,
	LIBW32(ERROR_BUSY_DRIVE)                 = 142,
	LIBW32(ERROR_SAME_DRIVE)                 = 143,
	LIBW32(ERROR_DIR_NOT_ROOT)               = 144,
	LIBW32(ERROR_DIR_NOT_EMPTY)              = 145,
	LIBW32(ERROR_IS_SUBST_PATH)              = 146,
	LIBW32(ERROR_IS_JOIN_PATH)               = 147,
	LIBW32(ERROR_PATH_BUSY)                  = 148,
	LIBW32(ERROR_IS_SUBST_TARGET)            = 149,
	LIBW32(ERROR_SYSTEM_TRACE)               = 150,
	LIBW32(ERROR_INVALID_EVENT_COUNT)        = 151,
	LIBW32(ERROR_TOO_MANY_MUXWAITERS)        = 152,
	LIBW32(ERROR_INVALID_LIST_FORMAT)        = 153,
	LIBW32(ERROR_LABEL_TOO_LONG)             = 154,
	LIBW32(ERROR_TOO_MANY_TCBS)              = 155,
	LIBW32(ERROR_SIGNAL_REFUSED)             = 156,
	LIBW32(ERROR_DISCARDED)                  = 157,
	LIBW32(ERROR_NOT_LOCKED)                 = 158,
	LIBW32(ERROR_BAD_THREADID_ADDR)          = 159,
	LIBW32(ERROR_BAD_ARGUMENTS)              = 160,
	LIBW32(ERROR_BAD_PATHNAME)               = 161,
	LIBW32(ERROR_SIGNAL_PENDING)             = 162,
	LIBW32(ERROR_MAX_THRDS_REACHED)          = 164,
	LIBW32(ERROR_LOCK_FAILED)                = 167,
	LIBW32(ERROR_BUSY)                       = 170,
	LIBW32(ERROR_CANCEL_VIOLATION)           = 173,
	LIBW32(ERROR_ATOMIC_LOCKS_NOT_SUPPORTED) = 174,
	LIBW32(ERROR_INVALID_SEGMENT_NUMBER)     = 180,
	LIBW32(ERROR_INVALID_ORDINAL)            = 182,
	LIBW32(ERROR_ALREADY_EXISTS)             = 183,
	LIBW32(ERROR_INVALID_FLAG_NUMBER)        = 186,
	LIBW32(ERROR_SEM_NOT_FOUND)              = 187,
	LIBW32(ERROR_INVALID_STARTING_CODESEG)   = 188,
	LIBW32(ERROR_INVALID_STACKSEG)           = 189,
	LIBW32(ERROR_INVALID_MODULETYPE)         = 190,
	LIBW32(ERROR_INVALID_EXE_SIGNATURE)      = 191,
	LIBW32(ERROR_EXE_MARKED_INVALID)         = 192,
	LIBW32(ERROR_BAD_EXE_FORMAT)             = 193,
	LIBW32(ERROR_ITERATED_DATA_EXCEEDS_64k)  = 194,
	LIBW32(ERROR_INVALID_MINALLOCSIZE)       = 195,
	LIBW32(ERROR_DYNLINK_FROM_INVALID_RING)  = 196,
	LIBW32(ERROR_IOPL_NOT_ENABLED)           = 197,
	LIBW32(ERROR_INVALID_SEGDPL)             = 198,
	LIBW32(ERROR_AUTODATASEG_EXCEEDS_64k)    = 199,
	LIBW32(ERROR_RING2SEG_MUST_BE_MOVABLE)   = 200,
	LIBW32(ERROR_RELOC_CHAIN_XEEDS_SEGLIM)   = 201,
	LIBW32(ERROR_INFLOOP_IN_RELOC_CHAIN)     = 202,
	LIBW32(ERROR_ENVVAR_NOT_FOUND)           = 203,
	LIBW32(ERROR_NO_SIGNAL_SENT)             = 205,
	LIBW32(ERROR_FILENAME_EXCED_RANGE)       = 206,
	LIBW32(ERROR_RING2_STACK_IN_USE)         = 207,
	LIBW32(ERROR_META_EXPANSION_TOO_LONG)    = 208,
	LIBW32(ERROR_INVALID_SIGNAL_NUMBER)      = 209,
	LIBW32(ERROR_THREAD_1_INACTIVE)          = 210,
	LIBW32(ERROR_LOCKED)                     = 212,
	LIBW32(ERROR_TOO_MANY_MODULES)           = 214,
	LIBW32(ERROR_NESTING_NOT_ALLOWED)        = 215,
	LIBW32(ERROR_EXE_MACHINE_TYPE_MISMATCH)  = 216,
	LIBW32(ERROR_BAD_PIPE)                   = 230,
	LIBW32(ERROR_PIPE_BUSY)                  = 231,
	LIBW32(ERROR_NO_DATA)                    = 232,
	LIBW32(ERROR_PIPE_NOT_CONNECTED)         = 233,
	LIBW32(ERROR_MORE_DATA)                  = 234,
	LIBW32(ERROR_VC_DISCONNECTED)            = 240,
	LIBW32(ERROR_INVALID_EA_NAME)            = 254,
	LIBW32(ERROR_EA_LIST_INCONSISTENT)       = 255,
	LIBW32(ERROR_NO_MORE_ITEMS)              = 259,
	LIBW32(ERROR_CANNOT_COPY)                = 266,
	LIBW32(ERROR_DIRECTORY)                  = 267,
	LIBW32(ERROR_EAS_DIDNT_FIT)              = 275,
	LIBW32(ERROR_EA_FILE_CORRUPT)            = 276,
	LIBW32(ERROR_EA_TABLE_FULL)              = 277,
	LIBW32(ERROR_INVALID_EA_HANDLE)          = 278,
	LIBW32(ERROR_EAS_NOT_SUPPORTED)          = 282,
	LIBW32(ERROR_NOT_OWNER)                  = 288,
	LIBW32(ERROR_TOO_MANY_POSTS)             = 298,
	LIBW32(ERROR_PARTIAL_COPY)               = 299,
	LIBW32(ERROR_OPLOCK_NOT_GRANTED)         = 300,
	LIBW32(ERROR_INVALID_OPLOCK_PROTOCOL)    = 301,
	LIBW32(ERROR_MR_MID_NOT_FOUND)           = 317,
	LIBW32(ERROR_INVALID_ADDRESS)            = 487,
	LIBW32(ERROR_ARITHMETIC_OVERFLOW)        = 534,
	LIBW32(ERROR_PIPE_CONNECTED)             = 535,
	LIBW32(ERROR_PIPE_LISTENING)             = 536,
	LIBW32(ERROR_EA_ACCESS_DENIED)           = 994,
	LIBW32(ERROR_OPERATION_ABORTED)          = 995,
	LIBW32(ERROR_IO_INCOMPLETE)              = 996,
	LIBW32(ERROR_IO_PENDING)                 = 997,
	LIBW32(ERROR_NOACCESS)                   = 998,
	LIBW32(ERROR_SWAPERROR)                  = 999,
	LIBW32(ERROR_CAN_NOT_COMPLETE)           = 1003,
	LIBW32(ERROR_INVALID_FLAGS)              = 1004,
	LIBW32(ERROR_BADKEY)                     = 1010, /* Config reg key invalid */
	LIBW32(ERROR_CANTOPEN)                   = 1011,
	LIBW32(ERROR_CANTREAD)                   = 1012, /* Config reg key couldn't be read */
	LIBW32(ERROR_CANTWRITE)                  = 1013, /* Config reg key couldn't be written */
	LIBW32(ERROR_DLL_INIT_FAILED)            = 1114,
	LIBW32(ERROR_IO_DEVICE)                  = 1117,
	LIBW32(ERROR_POSSIBLE_DEADLOCK)          = 1131,
	LIBW32(ERROR_BAD_DEVICE)                 = 1200,
	LIBW32(ERROR_CONNECTION_UNAVAIL)         = 1201,
	LIBW32(ERROR_DEVICE_ALREADY_REMEMBERED)  = 1202,
	LIBW32(ERROR_NO_NET_OR_BAD_PATH)         = 1203,
	LIBW32(ERROR_BAD_PROVIDER)               = 1204,
	LIBW32(ERROR_CANNOT_OPEN_PROFILE)        = 1205,
	LIBW32(ERROR_BAD_PROFILE)                = 1206,
	LIBW32(ERROR_NOT_CONTAINER)              = 1207,
	LIBW32(ERROR_EXTENDED_ERROR)             = 1208,
	LIBW32(ERROR_INVALID_GROUPNAME)          = 1209,
	LIBW32(ERROR_INVALID_COMPUTERNAME)       = 1210,
	LIBW32(ERROR_INVALID_EVENTNAME)          = 1211,
	LIBW32(ERROR_INVALID_DOMAINNAME)         = 1212,
	LIBW32(ERROR_INVALID_SERVICENAME)        = 1213,
	LIBW32(ERROR_INVALID_NETNAME)            = 1214,
	LIBW32(ERROR_INVALID_SHARENAME)          = 1215,
	LIBW32(ERROR_INVALID_PASSWORDNAME)       = 1216,
	LIBW32(ERROR_INVALID_MESSAGENAME)        = 1217,
	LIBW32(ERROR_INVALID_MESSAGEDEST)        = 1218,
	LIBW32(ERROR_SESSION_CREDENTIAL_CONFLICT) = 1219,
	LIBW32(ERROR_REMOTE_SESSION_LIMIT_EXCEEDED) = 1220,
	LIBW32(ERROR_DUP_DOMAINNAME)             = 1221,
	LIBW32(ERROR_NO_NETWORK)                 = 1222,
	LIBW32(ERROR_CANCELLED)                  = 1223,
	LIBW32(ERROR_USER_MAPPED_FILE)           = 1224,
	LIBW32(ERROR_CONNECTION_REFUSED)         = 1225,
	LIBW32(ERROR_GRACEFUL_DISCONNECT)        = 1226,
	LIBW32(ERROR_ADDRESS_ALREADY_ASSOCIATED) = 1227,
	LIBW32(ERROR_ADDRESS_NOT_ASSOCIATED)     = 1228,
	LIBW32(ERROR_CONNECTION_INVALID)         = 1229,
	LIBW32(ERROR_CONNECTION_ACTIVE)          = 1230,
	LIBW32(ERROR_NETWORK_UNREACHABLE)        = 1231,
	LIBW32(ERROR_HOST_UNREACHABLE)           = 1232,
	LIBW32(ERROR_PROTOCOL_UNREACHABLE)       = 1233,
	LIBW32(ERROR_PORT_UNREACHABLE)           = 1234,
	LIBW32(ERROR_REQUEST_ABORTED)            = 1235,
	LIBW32(ERROR_CONNECTION_ABORTED)         = 1236,
	LIBW32(ERROR_RETRY)                      = 1237,
	LIBW32(ERROR_CONNECTION_COUNT_LIMIT)     = 1238,
	LIBW32(ERROR_LOGIN_TIME_RESTRICTION)     = 1239,
	LIBW32(ERROR_LOGIN_WKSTA_RESTRICTION)    = 1240,
	LIBW32(ERROR_INCORRECT_ADDRESS)          = 1241,
	LIBW32(ERROR_ALREADY_REGISTERED)         = 1242,
	LIBW32(ERROR_SERVICE_NOT_FOUND)          = 1243,
	LIBW32(ERROR_NOT_AUTHENTICATED)          = 1244,
	LIBW32(ERROR_NOT_LOGGED_ON)              = 1245,
	LIBW32(ERROR_CONTINUE)                   = 1246,
	LIBW32(ERROR_ALREADY_INITIALIZED)        = 1247,
	LIBW32(ERROR_NO_MORE_DEVICES)            = 1248,
	LIBW32(ERROR_PRIVILEGE_NOT_HELD)         = 1314,
	LIBW32(ERROR_INVALID_WINDOW_HANDLE)      = 1400,
	LIBW32(ERROR_CANNOT_FIND_WND_CLASS)      = 1407,
	LIBW32(ERROR_WINDOW_OF_OTHER_THREAD)     = 1408,
	LIBW32(ERROR_CLASS_ALREADY_EXISTS)       = 1410,
	LIBW32(ERROR_CLASS_DOES_NOT_EXIST)       = 1411,
	LIBW32(ERROR_CLASS_HAS_WINDOWS)          = 1412,
	LIBW32(ERROR_COMMITMENT_LIMIT)           = 1455,
	LIBW32(ERROR_PRINTER_DRIVER_ALREADY_INSTALLED) = 1795,
	LIBW32(ERROR_UNKNOWN_PORT)               = 1796,
	LIBW32(ERROR_UNKNOWN_PRINTER_DRIVER)     = 1797,
	LIBW32(ERROR_UNKNOWN_PRINTPROCESSOR)     = 1798,
	LIBW32(ERROR_INVALID_SEPARATOR_FILE)     = 1799,
	LIBW32(ERROR_INVALID_PRIORITY)           = 1800,
	LIBW32(ERROR_INVALID_PRINTER_NAME)       = 1801,
	LIBW32(ERROR_PRINTER_ALREADY_EXISTS)     = 1802,
	LIBW32(ERROR_INVALID_PRINTER_COMMAND)    = 1803,
	LIBW32(ERROR_INVALID_DATATYPE)           = 1804,
	LIBW32(ERROR_INVALID_ENVIRONMENT)        = 1805,
	LIBW32(ERROR_BAD_USERNAME)               = 2202,
	LIBW32(ERROR_NOT_CONNECTED)              = 2250,
	LIBW32(ERROR_OPEN_FILES)                 = 2401,
	LIBW32(ERROR_ACTIVE_CONNECTIONS)         = 2402,
	LIBW32(ERROR_DEVICE_IN_USE)              = 2404,
	LIBW32(ERROR_UNKNOWN)                    = 9999,
};

#undef LIBW32

#endif
