Attribute VB_Name = "modGetLastError" Option Explicit '============================================================================================================= ' ' modGetLastError Module ' ---------------------- ' ' Created By : Kevin Wilson ' http://www.TheVBZone.com ( The VB Zone ) ' http://www.TheVBZone.net ( The VB Zone .net ) ' ' Last Update : May 11, 2000 ' ' VB Versions : 5.0 / 6.0 ' ' Requires : Nothing ' ' Description : This module contains one function that is designed to make it easy to either find if an error ' occured in the last Windows API called, or display an error message for a specified error number. ' ' Example Use : ' ' Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long ' ' Private Sub Form_Load() ' On Error Resume Next ' ' SetForegroundWindow Me.hwnd ' If GetLastError_Msg(, , "SetForegroundWindow") = True Then ' Unload Me ' End If ' ' End Sub ' '============================================================================================================= ' ' LEGAL: ' ' You are free to use this code as long as you keep the above heading information intact and unchanged. Credit ' given where credit is due. Also, it is not required, but it would be appreciated if you would mention ' somewhere in your compiled program that that your program makes use of code written and distributed by ' Kevin Wilson (www.TheVBZone.com). Feel free to link to this code via your web site or articles. ' ' You may NOT take this code and pass it off as your own. You may NOT distribute this code on your own server ' or web site. You may NOT take code created by Kevin Wilson (www.TheVBZone.com) and use it to create products, ' utilities, or applications that directly compete with products, utilities, and applications created by Kevin ' Wilson, TheVBZone.com, or Wilson Media. You may NOT take this code and sell it for profit without first ' obtaining the written consent of the author Kevin Wilson. ' ' These conditions are subject to change at the discretion of the owner Kevin Wilson at any time without ' warning or notice. Copyright© by Kevin Wilson. All rights reserved. ' '============================================================================================================= ' Errors constants that are documented in the Windows API, but not in the VB API Viewer Public Const ERROR_ACCOUNT_LOCKED_OUT = 1909 Public Const ERROR_ACTIVE_CONNECTIONS = 2402 Public Const ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227 Public Const ERROR_ADDRESS_NOT_ASSOCIATED = 1228 Public Const ERROR_ALREADY_INITIALIZED = 1247 Public Const ERROR_ALREADY_REGISTERED = 1242 Public Const ERROR_APP_WRONG_OS = 1151 Public Const ERROR_CANCELLED = 1223 Public Const ERROR_COMMITMENT_LIMIT = 1455 Public Const ERROR_CONNECTION_ABORTED = 1236 Public Const ERROR_CONNECTION_ACTIVE = 1230 Public Const ERROR_CONNECTION_COUNT_LIMIT = 1238 Public Const ERROR_CONNECTION_INVALID = 1229 Public Const ERROR_CONNECTION_REFUSED = 1225 Public Const ERROR_CONTINUE = 1246 Public Const ERROR_DDE_FAIL = 1156 Public Const ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079 Public Const ERROR_DLL_NOT_FOUND = 1157 Public Const ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908 Public Const ERROR_GLOBAL_ONLY_HOOK = 1429 Public Const ERROR_GRACEFUL_DISCONNECT = 1226 Public Const ERROR_HOOK_TYPE_NOT_ALLOWED = 1458 Public Const ERROR_HOST_UNREACHABLE = 1232 Public Const ERROR_INCORRECT_ADDRESS = 1241 Public Const ERROR_INVALID_DLL = 1154 Public Const ERROR_INVALID_KEYBOARD_HANDLE = 1457 Public Const ERROR_INVALID_PRINT_MONITOR = 3007 Public Const ERROR_LICENSE_QUOTA_EXCEEDED = 1395 Public Const ERROR_LOGIN_TIME_RESTRICTION = 1239 Public Const ERROR_LOGIN_WKSTA_RESTRICTION = 1240 Public Const ERROR_MENU_ITEM_NOT_FOUND = 1456 Public Const ERROR_NETWORK_UNREACHABLE = 1231 Public Const ERROR_NO_ASSOCIATION = 1155 Public Const ERROR_NO_MORE_DEVICES = 1248 Public Const ERROR_NO_SYSTEM_RESOURCES = 1450 Public Const ERROR_NONPAGED_SYSTEM_RESOURCES = 1451 Public Const ERROR_NOT_AUTHENTICATED = 1244 Public Const ERROR_NOT_LOGGED_ON = 1245 Public Const ERROR_OLD_WIN_VERSION = 1150 Public Const ERROR_PAGED_SYSTEM_RESOURCES = 1452 Public Const ERROR_PAGEFILE_QUOTA = 1454 Public Const ERROR_PARTIAL_COPY = 299 Public Const ERROR_PASSWORD_MUST_CHANGE = 1907 Public Const ERROR_PORT_UNREACHABLE = 1234 Public Const ERROR_PRINT_MONITOR_IN_USE = 3008 Public Const ERROR_PRINTER_HAS_JOBS_QUEUED = 3009 Public Const ERROR_PROTOCOL_UNREACHABLE = 1233 Public Const ERROR_REQUEST_ABORTED = 1235 Public Const ERROR_RETRY = 1237 Public Const ERROR_RMODE_APP = 1153 Public Const ERROR_SERVICE_NOT_FOUND = 1243 Public Const ERROR_SET_POWER_STATE_FAILED = 1141 Public Const ERROR_SET_POWER_STATE_VETOED = 1140 Public Const ERROR_SINGLE_INSTANCE_APP = 1152 Public Const ERROR_SUCCESS_REBOOT_REQUIRED = 3010 Public Const ERROR_SUCCESS_RESTART_REQUIRED = 3011 Public Const ERROR_TOO_MANY_LINKS = 1142 Public Const ERROR_USER_MAPPED_FILE = 1224 Public Const ERROR_WORKING_SET_QUOTA = 1453 Public Const LZERROR_GLOBALLOC = -5 Public Const OR_INVALID_OID = 1911 Public Const RPC_S_BINDING_INCOMPLETE = 1819 Public Const RPC_S_CALL_CANCELLED = 1818 Public Const RPC_S_COMM_FAILURE = 1820 Public Const RPC_S_NO_PRINC_NAME = 1822 Public Const RPC_S_NOT_CANCELLED = 1826 Public Const RPC_S_NOT_RPC_ERROR = 1823 Public Const RPC_S_SEC_PKG_ERROR = 1825 Public Const RPC_S_SEND_INCOMPLETE = 1913 Public Const RPC_S_SERVER_OUT_OF_MEMORY = 1130 Public Const RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821 Public Const RPC_S_UUID_LOCAL_ONLY = 1824 Public Const RPC_X_INVALID_ES_ACTION = 1827 Public Const RPC_X_INVALID_PIPE_OBJECT = 1830 Public Const RPC_X_INVALID_PIPE_OPERATION = 1831 Public Const RPC_X_SS_CONTEXT_MISMATCH = 6 Public Const RPC_X_WRONG_ES_VERSION = 1828 Public Const RPC_X_WRONG_PIPE_VERSION = 1832 Public Const RPC_X_WRONG_STUB_VERSION = 1829 ' Error constants that are in the VB API Viewer Public Const NO_ERROR = 0 Public Const EPT_S_CANT_CREATE = 1899& Public Const EPT_S_CANT_PERFORM_OP = 1752& Public Const EPT_S_INVALID_ENTRY = 1751& Public Const EPT_S_NOT_REGISTERED = 1753& Public Const ERROR_ACCESS_DENIED = 5& Public Const ERROR_ACCOUNT_DISABLED = 1331& Public Const ERROR_ACCOUNT_EXPIRED = 1793& Public Const ERROR_ACCOUNT_RESTRICTION = 1327& Public Const ERROR_ADAP_HDW_ERR = 57& Public Const ERROR_ALIAS_EXISTS = 1379& Public Const ERROR_ALLOTTED_SPACE_EXCEEDED = 1344& Public Const ERROR_ALREADY_ASSIGNED = 85& Public Const ERROR_ALREADY_EXISTS = 183& Public Const ERROR_ALREADY_RUNNING_LKG = 1074& Public Const ERROR_ALREADY_WAITING = 1904& Public Const ERROR_ARENA_TRASHED = 7& Public Const ERROR_ARITHMETIC_OVERFLOW = 534& Public Const ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174& Public Const ERROR_AUTODATASEG_EXCEEDS_64k = 199& Public Const ERROR_BAD_ARGUMENTS = 160& Public Const ERROR_BAD_COMMAND = 22& Public Const ERROR_BAD_DESCRIPTOR_FORMAT = 1361& Public Const ERROR_BAD_DEV_TYPE = 66& Public Const ERROR_BAD_DEVICE = 1200& Public Const ERROR_BAD_DRIVER = 2001 Public Const ERROR_BAD_DRIVER_LEVEL = 119& Public Const ERROR_BAD_ENVIRONMENT = 10& Public Const ERROR_BAD_EXE_FORMAT = 193& Public Const ERROR_BAD_FORMAT = 11& Public Const ERROR_BAD_IMPERSONATION_LEVEL = 1346& Public Const ERROR_BAD_INHERITANCE_ACL = 1340& Public Const ERROR_BAD_LENGTH = 24& Public Const ERROR_BAD_LOGON_SESSION_STATE = 1365& Public Const ERROR_BAD_NET_NAME = 67& Public Const ERROR_BAD_NET_RESP = 58& Public Const ERROR_BAD_NETPATH = 53& Public Const ERROR_BAD_PATHNAME = 161& Public Const ERROR_BAD_PIPE = 230& Public Const ERROR_BAD_PROFILE = 1206& Public Const ERROR_BAD_PROVIDER = 1204& Public Const ERROR_BAD_REM_ADAP = 60& Public Const ERROR_BAD_THREADID_ADDR = 159& Public Const ERROR_BAD_TOKEN_TYPE = 1349& Public Const ERROR_BAD_UNIT = 20& Public Const ERROR_BAD_USERNAME = 2202& Public Const ERROR_BAD_VALIDATION_CLASS = 1348& Public Const ERROR_BADDB = 1009& Public Const ERROR_BADKEY = 1010& Public Const ERROR_BEGINNING_OF_MEDIA = 1102& Public Const ERROR_BOOT_ALREADY_ACCEPTED = 1076& Public Const ERROR_BROKEN_PIPE = 109& Public Const ERROR_BUFFER_OVERFLOW = 111& Public Const ERROR_BUS_RESET = 1111& Public Const ERROR_BUSY = 170& Public Const ERROR_BUSY_DRIVE = 142& Public Const ERROR_CALL_NOT_IMPLEMENTED = 120& Public Const ERROR_CAN_NOT_COMPLETE = 1003& Public Const ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001 Public Const ERROR_CANCEL_VIOLATION = 173& Public Const ERROR_CANNOT_COPY = 266& Public Const ERROR_CANNOT_FIND_WND_CLASS = 1407& Public Const ERROR_CANNOT_IMPERSONATE = 1368& Public Const ERROR_CANNOT_MAKE = 82& Public Const ERROR_CANNOT_OPEN_PROFILE = 1205& Public Const ERROR_CANT_ACCESS_DOMAIN_INFO = 1351& Public Const ERROR_CANT_DISABLE_MANDATORY = 1310& Public Const ERROR_CANT_OPEN_ANONYMOUS = 1347& Public Const ERROR_CANTOPEN = 1011& Public Const ERROR_CANTREAD = 1012& Public Const ERROR_CANTWRITE = 1013& Public Const ERROR_CHILD_MUST_BE_VOLATILE = 1021& Public Const ERROR_CHILD_NOT_COMPLETE = 129& Public Const ERROR_CHILD_WINDOW_MENU = 1436& Public Const ERROR_CIRCULAR_DEPENDENCY = 1059& Public Const ERROR_CLASS_ALREADY_EXISTS = 1410& Public Const ERROR_CLASS_DOES_NOT_EXIST = 1411& Public Const ERROR_CLASS_HAS_WINDOWS = 1412& Public Const ERROR_CLIPBOARD_NOT_OPEN = 1418& Public Const ERROR_CLIPPING_NOT_SUPPORTED = 2005 Public Const ERROR_CONNECTION_UNAVAIL = 1201& Public Const ERROR_CONTROL_ID_NOT_FOUND = 1421& Public Const ERROR_COUNTER_TIMEOUT = 1121& Public Const ERROR_CRC = 23& Public Const ERROR_CURRENT_DIRECTORY = 16& Public Const ERROR_DATABASE_DOES_NOT_EXIST = 1065& Public Const ERROR_DC_NOT_FOUND = 1425& Public Const ERROR_DEPENDENT_SERVICES_RUNNING = 1051& Public Const ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435& Public Const ERROR_DEV_NOT_EXIST = 55 Public Const ERROR_DEVICE_ALREADY_REMEMBERED = 1202& Public Const ERROR_DEVICE_IN_USE = 2404& Public Const ERROR_DEVICE_NOT_PARTITIONED = 1107& Public Const ERROR_DIR_NOT_EMPTY = 145& Public Const ERROR_DIR_NOT_ROOT = 144& Public Const ERROR_DIRECT_ACCESS_HANDLE = 130& Public Const ERROR_DIRECTORY = 267& Public Const ERROR_DISCARDED = 157& Public Const ERROR_DISK_CHANGE = 107& Public Const ERROR_DISK_CORRUPT = 1393& Public Const ERROR_DISK_FULL = 112& Public Const ERROR_DISK_OPERATION_FAILED = 1127& Public Const ERROR_DISK_RECALIBRATE_FAILED = 1126& Public Const ERROR_DISK_RESET_FAILED = 1128& Public Const ERROR_DLL_INIT_FAILED = 1114& Public Const ERROR_DOMAIN_EXISTS = 1356& Public Const ERROR_DOMAIN_LIMIT_EXCEEDED = 1357& Public Const ERROR_DOMAIN_TRUST_INCONSISTENT = 1810& Public Const ERROR_DRIVE_LOCKED = 108& Public Const ERROR_DUP_DOMAINNAME = 1221& Public Const ERROR_DUP_NAME = 52& Public Const ERROR_DUPLICATE_SERVICE_NAME = 1078& Public Const ERROR_DYNLINK_FROM_INVALID_RING = 196& Public Const ERROR_EA_ACCESS_DENIED = 994& Public Const ERROR_EA_FILE_CORRUPT = 276& Public Const ERROR_EA_LIST_INCONSISTENT = 255& Public Const ERROR_EA_TABLE_FULL = 277& Public Const ERROR_EAS_DIDNT_FIT = 275& Public Const ERROR_EAS_NOT_SUPPORTED = 282& Public Const ERROR_END_OF_MEDIA = 1100& Public Const ERROR_ENVVAR_NOT_FOUND = 203& Public Const ERROR_EOM_OVERFLOW = 1129& Public Const ERROR_EVENTLOG_CANT_START = 1501& Public Const ERROR_EVENTLOG_FILE_CHANGED = 1503& Public Const ERROR_EVENTLOG_FILE_CORRUPT = 1500& Public Const ERROR_EXCEPTION_IN_SERVICE = 1064& Public Const ERROR_EXCL_SEM_ALREADY_OWNED = 101& Public Const ERROR_EXE_MARKED_INVALID = 192& Public Const ERROR_EXTENDED_ERROR = 1208& Public Const ERROR_FAIL_I24 = 83& Public Const ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063& Public Const ERROR_FILE_CORRUPT = 1392& Public Const ERROR_FILE_EXISTS = 80& Public Const ERROR_FILE_INVALID = 1006& Public Const ERROR_FILE_NOT_FOUND = 2& Public Const ERROR_FILEMARK_DETECTED = 1101& Public Const ERROR_FILENAME_EXCED_RANGE = 206& Public Const ERROR_FLOPPY_BAD_REGISTERS = 1125& Public Const ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122& Public Const ERROR_FLOPPY_UNKNOWN_ERROR = 1124& Public Const ERROR_FLOPPY_WRONG_CYLINDER = 1123& Public Const ERROR_FULL_BACKUP = 4004 Public Const ERROR_FULLSCREEN_MODE = 1007& Public Const ERROR_GEN_FAILURE = 31& Public Const ERROR_GENERIC_NOT_MAPPED = 1360& Public Const ERROR_GROUP_EXISTS = 1318& Public Const ERROR_HANDLE_DISK_FULL = 39& Public Const ERROR_HANDLE_EOF = 38& Public Const ERROR_HOOK_NEEDS_HMOD = 1428& Public Const ERROR_HOOK_NOT_INSTALLED = 1431& Public Const ERROR_HOTKEY_ALREADY_REGISTERED = 1409& Public Const ERROR_HOTKEY_NOT_REGISTERED = 1419& Public Const ERROR_HWNDS_HAVE_DIFF_PARENT = 1441& Public Const ERROR_ILL_FORMED_PASSWORD = 1324& Public Const ERROR_INC_BACKUP = 4003 Public Const ERROR_INFLOOP_IN_RELOC_CHAIN = 202& Public Const ERROR_INSUFFICIENT_BUFFER = 122 Public Const ERROR_INTERNAL_DB_CORRUPTION = 1358& Public Const ERROR_INTERNAL_DB_ERROR = 1383& Public Const ERROR_INTERNAL_ERROR = 1359& Public Const ERROR_INVALID_ACCEL_HANDLE = 1403& Public Const ERROR_INVALID_ACCESS = 12& Public Const ERROR_INVALID_ACCOUNT_NAME = 1315& Public Const ERROR_INVALID_ACL = 1336& Public Const ERROR_INVALID_ADDRESS = 487& Public Const ERROR_INVALID_AT_INTERRUPT_TIME = 104& Public Const ERROR_INVALID_BLOCK = 9& Public Const ERROR_INVALID_BLOCK_LENGTH = 1106& Public Const ERROR_INVALID_CATEGORY = 117& Public Const ERROR_INVALID_COMBOBOX_MESSAGE = 1422& Public Const ERROR_INVALID_COMPUTERNAME = 1210& Public Const ERROR_INVALID_CURSOR_HANDLE = 1402& Public Const ERROR_INVALID_DATA = 13& Public Const ERROR_INVALID_DATATYPE = 1804& Public Const ERROR_INVALID_DOMAIN_ROLE = 1354& Public Const ERROR_INVALID_DOMAIN_STATE = 1353& Public Const ERROR_INVALID_DOMAINNAME = 1212& Public Const ERROR_INVALID_DRIVE = 15& Public Const ERROR_INVALID_DWP_HANDLE = 1405& Public Const ERROR_INVALID_EA_HANDLE = 278& Public Const ERROR_INVALID_EA_NAME = 254& Public Const ERROR_INVALID_EDIT_HEIGHT = 1424& Public Const ERROR_INVALID_ENVIRONMENT = 1805& Public Const ERROR_INVALID_EVENT_COUNT = 151& Public Const ERROR_INVALID_EVENTNAME = 1211& Public Const ERROR_INVALID_EXE_SIGNATURE = 191& Public Const ERROR_INVALID_FILTER_PROC = 1427& Public Const ERROR_INVALID_FLAG_NUMBER = 186& Public Const ERROR_INVALID_FLAGS = 1004& Public Const ERROR_INVALID_FORM_NAME = 1902& Public Const ERROR_INVALID_FORM_SIZE = 1903& Public Const ERROR_INVALID_FUNCTION = 1 Public Const ERROR_INVALID_GROUP_ATTRIBUTES = 1345& Public Const ERROR_INVALID_GROUPNAME = 1209& Public Const ERROR_INVALID_GW_COMMAND = 1443& Public Const ERROR_INVALID_HANDLE = 6& Public Const ERROR_INVALID_HOOK_FILTER = 1426& Public Const ERROR_INVALID_HOOK_HANDLE = 1404& Public Const ERROR_INVALID_ICON_HANDLE = 1414& Public Const ERROR_INVALID_ID_AUTHORITY = 1343& Public Const ERROR_INVALID_INDEX = 1413& Public Const ERROR_INVALID_LB_MESSAGE = 1432& Public Const ERROR_INVALID_LEVEL = 124& Public Const ERROR_INVALID_LIST_FORMAT = 153& Public Const ERROR_INVALID_LOGON_HOURS = 1328& Public Const ERROR_INVALID_LOGON_TYPE = 1367& Public Const ERROR_INVALID_MEMBER = 1388& Public Const ERROR_INVALID_MENU_HANDLE = 1401& Public Const ERROR_INVALID_MESSAGE = 1002& Public Const ERROR_INVALID_MESSAGEDEST = 1218& Public Const ERROR_INVALID_MESSAGENAME = 1217& Public Const ERROR_INVALID_MINALLOCSIZE = 195& Public Const ERROR_INVALID_MODULETYPE = 190& Public Const ERROR_INVALID_MSGBOX_STYLE = 1438& Public Const ERROR_INVALID_NAME = 123& Public Const ERROR_INVALID_NETNAME = 1214& Public Const ERROR_INVALID_ORDINAL = 182& Public Const ERROR_INVALID_OWNER = 1307& Public Const ERROR_INVALID_PARAMETER = 87 Public Const ERROR_INVALID_PASSWORD = 86& Public Const ERROR_INVALID_PASSWORDNAME = 1216& Public Const ERROR_INVALID_PIXEL_FORMAT = 2000 Public Const ERROR_INVALID_PRIMARY_GROUP = 1308& Public Const ERROR_INVALID_PRINTER_COMMAND = 1803& Public Const ERROR_INVALID_PRINTER_NAME = 1801& Public Const ERROR_INVALID_PRINTER_STATE = 1906& Public Const ERROR_INVALID_PRIORITY = 1800& Public Const ERROR_INVALID_SCROLLBAR_RANGE = 1448& Public Const ERROR_INVALID_SECURITY_DESCR = 1338& Public Const ERROR_INVALID_SEGDPL = 198& Public Const ERROR_INVALID_SEGMENT_NUMBER = 180& Public Const ERROR_INVALID_SEPARATOR_FILE = 1799& Public Const ERROR_INVALID_SERVER_STATE = 1352& Public Const ERROR_INVALID_SERVICE_ACCOUNT = 1057& Public Const ERROR_INVALID_SERVICE_CONTROL = 1052& Public Const ERROR_INVALID_SERVICE_LOCK = 1071& Public Const ERROR_INVALID_SERVICENAME = 1213& Public Const ERROR_INVALID_SHARENAME = 1215& Public Const ERROR_INVALID_SHOWWIN_COMMAND = 1449& Public Const ERROR_INVALID_SID = 1337& Public Const ERROR_INVALID_SIGNAL_NUMBER = 209& Public Const ERROR_INVALID_SPI_VALUE = 1439& Public Const ERROR_INVALID_STACKSEG = 189& Public Const ERROR_INVALID_STARTING_CODESEG = 188& Public Const ERROR_INVALID_SUB_AUTHORITY = 1335& Public Const ERROR_INVALID_TARGET_HANDLE = 114& Public Const ERROR_INVALID_THREAD_ID = 1444& Public Const ERROR_INVALID_TIME = 1901& Public Const ERROR_INVALID_USER_BUFFER = 1784& Public Const ERROR_INVALID_VERIFY_SWITCH = 118& Public Const ERROR_INVALID_WINDOW_HANDLE = 1400& Public Const ERROR_INVALID_WINDOW_STYLE = 2002 Public Const ERROR_INVALID_WORKSTATION = 1329& Public Const ERROR_IO_DEVICE = 1117& Public Const ERROR_IO_INCOMPLETE = 996& Public Const ERROR_IO_PENDING = 997 Public Const ERROR_IOPL_NOT_ENABLED = 197& Public Const ERROR_IRQ_BUSY = 1119& Public Const ERROR_IS_JOIN_PATH = 147& Public Const ERROR_IS_JOIN_TARGET = 133& Public Const ERROR_IS_JOINED = 134& Public Const ERROR_IS_SUBST_PATH = 146& Public Const ERROR_IS_SUBST_TARGET = 149& Public Const ERROR_IS_SUBSTED = 135& Public Const ERROR_ITERATED_DATA_EXCEEDS_64k = 194& Public Const ERROR_JOIN_TO_JOIN = 138& Public Const ERROR_JOIN_TO_SUBST = 140& Public Const ERROR_JOURNAL_HOOK_SET = 1430& Public Const ERROR_KEY_DELETED = 1018& Public Const ERROR_KEY_HAS_CHILDREN = 1020& Public Const ERROR_LABEL_TOO_LONG = 154& Public Const ERROR_LAST_ADMIN = 1322& Public Const ERROR_LB_WITHOUT_TABSTOPS = 1434& Public Const ERROR_LISTBOX_ID_NOT_FOUND = 1416& Public Const ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390& Public Const ERROR_LOCAL_USER_SESSION_KEY = 1303& Public Const ERROR_LOCK_FAILED = 167& Public Const ERROR_LOCK_VIOLATION = 33& Public Const ERROR_LOCKED = 212& Public Const ERROR_LOG_FILE_FULL = 1502& Public Const ERROR_LOGON_FAILURE = 1326& Public Const ERROR_LOGON_NOT_GRANTED = 1380& Public Const ERROR_LOGON_SESSION_COLLISION = 1366& Public Const ERROR_LOGON_SESSION_EXISTS = 1363& Public Const ERROR_LOGON_TYPE_NOT_GRANTED = 1385& Public Const ERROR_LUIDS_EXHAUSTED = 1334& Public Const ERROR_MAPPED_ALIGNMENT = 1132& Public Const ERROR_MAX_THRDS_REACHED = 164& Public Const ERROR_MEDIA_CHANGED = 1110& Public Const ERROR_MEMBER_IN_ALIAS = 1378& Public Const ERROR_MEMBER_IN_GROUP = 1320& Public Const ERROR_MEMBER_NOT_IN_ALIAS = 1377& Public Const ERROR_MEMBER_NOT_IN_GROUP = 1321& Public Const ERROR_MEMBERS_PRIMARY_GROUP = 1374& Public Const ERROR_META_EXPANSION_TOO_LONG = 208& Public Const ERROR_METAFILE_NOT_SUPPORTED = 2003 Public Const ERROR_MOD_NOT_FOUND = 126& Public Const ERROR_MORE_DATA = 234 Public Const ERROR_MORE_WRITES = 1120& Public Const ERROR_MR_MID_NOT_FOUND = 317& Public Const ERROR_NEGATIVE_SEEK = 131& Public Const ERROR_NESTING_NOT_ALLOWED = 215& Public Const ERROR_NET_WRITE_FAULT = 88& Public Const ERROR_NETLOGON_NOT_STARTED = 1792& Public Const ERROR_NETNAME_DELETED = 64& Public Const ERROR_NETWORK_ACCESS_DENIED = 65& Public Const ERROR_NETWORK_BUSY = 54& Public Const ERROR_NO_BROWSER_SERVERS_FOUND = 6118& Public Const ERROR_NO_DATA = 232& Public Const ERROR_NO_DATA_DETECTED = 1104& Public Const ERROR_NO_IMPERSONATION_TOKEN = 1309& Public Const ERROR_NO_INHERITANCE = 1391& Public Const ERROR_NO_LOG_SPACE = 1019& Public Const ERROR_NO_LOGON_SERVERS = 1311& Public Const ERROR_NO_MEDIA_IN_DRIVE = 1112& Public Const ERROR_NO_MORE_FILES = 18& Public Const ERROR_NO_MORE_ITEMS = 259& Public Const ERROR_NO_MORE_SEARCH_HANDLES = 113& Public Const ERROR_NO_NET_OR_BAD_PATH = 1203& Public Const ERROR_NO_NETWORK = 1222& Public Const ERROR_NO_PROC_SLOTS = 89& Public Const ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302& Public Const ERROR_NO_SCROLLBARS = 1447& Public Const ERROR_NO_SECURITY_ON_OBJECT = 1350& Public Const ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116& Public Const ERROR_NO_SIGNAL_SENT = 205& Public Const ERROR_NO_SPOOL_SPACE = 62& Public Const ERROR_NO_SUCH_ALIAS = 1376& Public Const ERROR_NO_SUCH_DOMAIN = 1355& Public Const ERROR_NO_SUCH_GROUP = 1319& Public Const ERROR_NO_SUCH_LOGON_SESSION = 1312& Public Const ERROR_NO_SUCH_MEMBER = 1387& Public Const ERROR_NO_SUCH_PACKAGE = 1364& Public Const ERROR_NO_SUCH_PRIVILEGE = 1313& Public Const ERROR_NO_SUCH_USER = 1317& Public Const ERROR_NO_SYSTEM_MENU = 1437& Public Const ERROR_NO_TOKEN = 1008& Public Const ERROR_NO_TRUST_LSA_SECRET = 1786& Public Const ERROR_NO_TRUST_SAM_ACCOUNT = 1787& Public Const ERROR_NO_UNICODE_TRANSLATION = 1113& Public Const ERROR_NO_USER_SESSION_KEY = 1394& Public Const ERROR_NO_VOLUME_LABEL = 125& Public Const ERROR_NO_WILDCARD_CHARACTERS = 1417& Public Const ERROR_NOACCESS = 998& Public Const ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807& Public Const ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809& Public Const ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808& Public Const ERROR_NON_MDICHILD_WINDOW = 1445& Public Const ERROR_NONE_MAPPED = 1332& Public Const ERROR_NOT_ALL_ASSIGNED = 1300& Public Const ERROR_NOT_CHILD_WINDOW = 1442& Public Const ERROR_NOT_CONNECTED = 2250& Public Const ERROR_NOT_CONTAINER = 1207& Public Const ERROR_NOT_DOS_DISK = 26& Public Const ERROR_NOT_ENOUGH_MEMORY = 8 Public Const ERROR_NOT_ENOUGH_QUOTA = 1816& Public Const ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130& Public Const ERROR_NOT_JOINED = 136& Public Const ERROR_NOT_LOCKED = 158& Public Const ERROR_NOT_LOGON_PROCESS = 1362& Public Const ERROR_NOT_OWNER = 288& Public Const ERROR_NOT_READY = 21& Public Const ERROR_NOT_REGISTRY_FILE = 1017& Public Const ERROR_NOT_SAME_DEVICE = 17& Public Const ERROR_NOT_SUBSTED = 137& Public Const ERROR_NOT_SUPPORTED = 50& Public Const ERROR_NOTIFY_ENUM_DIR = 1022& Public Const ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386& Public Const ERROR_NULL_LM_PASSWORD = 1304& Public Const ERROR_OPEN_FAILED = 110& Public Const ERROR_OPEN_FILES = 2401& Public Const ERROR_OPERATION_ABORTED = 995& Public Const ERROR_OUT_OF_PAPER = 28& Public Const ERROR_OUT_OF_STRUCTURES = 84& Public Const ERROR_OUTOFMEMORY = 14& Public Const ERROR_PARTITION_FAILURE = 1105& Public Const ERROR_PASSWORD_EXPIRED = 1330& Public Const ERROR_PASSWORD_RESTRICTION = 1325& Public Const ERROR_PATH_BUSY = 148& Public Const ERROR_PATH_NOT_FOUND = 3& Public Const ERROR_PIPE_BUSY = 231& Public Const ERROR_PIPE_CONNECTED = 535& Public Const ERROR_PIPE_LISTENING = 536& Public Const ERROR_PIPE_NOT_CONNECTED = 233& Public Const ERROR_POPUP_ALREADY_ACTIVE = 1446& Public Const ERROR_POSSIBLE_DEADLOCK = 1131& Public Const ERROR_PRINT_CANCELLED = 63& Public Const ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006 Public Const ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005 Public Const ERROR_PRINTER_ALREADY_EXISTS = 1802& Public Const ERROR_PRINTER_DELETED = 1905& Public Const ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795& Public Const ERROR_PRINTER_DRIVER_IN_USE = 3001 Public Const ERROR_PRINTQ_FULL = 61& Public Const ERROR_PRIVATE_DIALOG_INDEX = 1415& Public Const ERROR_PRIVILEGE_NOT_HELD = 1314& Public Const ERROR_PROC_NOT_FOUND = 127& Public Const ERROR_PROCESS_ABORTED = 1067& Public Const ERROR_PUBLIC_ONLY_HOOK = 1429& Public Const ERROR_READ_FAULT = 30& Public Const ERROR_REC_NON_EXISTENT = 4005 Public Const ERROR_REDIR_PAUSED = 72& Public Const ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794& Public Const ERROR_REGISTRY_CORRUPT = 1015& Public Const ERROR_REGISTRY_IO_FAILED = 1016& Public Const ERROR_REGISTRY_RECOVERED = 1014& Public Const ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201& Public Const ERROR_REM_NOT_LIST = 51& Public Const ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220& Public Const ERROR_REQ_NOT_ACCEP = 71& Public Const ERROR_RESOURCE_DATA_NOT_FOUND = 1812& Public Const ERROR_RESOURCE_LANG_NOT_FOUND = 1815& Public Const ERROR_RESOURCE_NAME_NOT_FOUND = 1814& Public Const ERROR_RESOURCE_TYPE_NOT_FOUND = 1813& Public Const ERROR_REVISION_MISMATCH = 1306& Public Const ERROR_RING2_STACK_IN_USE = 207& Public Const ERROR_RING2SEG_MUST_BE_MOVABLE = 200& Public Const ERROR_RPL_NOT_ALLOWED = 4006 Public Const ERROR_RXACT_COMMIT_FAILURE = 1370& Public Const ERROR_RXACT_INVALID_STATE = 1369& Public Const ERROR_SAME_DRIVE = 143& Public Const ERROR_SCREEN_ALREADY_LOCKED = 1440& Public Const ERROR_SECRET_TOO_LONG = 1382& Public Const ERROR_SECTOR_NOT_FOUND = 27& Public Const ERROR_SEEK = 25& Public Const ERROR_SEEK_ON_DEVICE = 132& Public Const ERROR_SEM_IS_SET = 102& Public Const ERROR_SEM_NOT_FOUND = 187& Public Const ERROR_SEM_OWNER_DIED = 105& Public Const ERROR_SEM_TIMEOUT = 121& Public Const ERROR_SEM_USER_LIMIT = 106& Public Const ERROR_SERIAL_NO_DEVICE = 1118& Public Const ERROR_SERVER_DISABLED = 1341& Public Const ERROR_SERVER_HAS_OPEN_HANDLES = 1811& Public Const ERROR_SERVER_NOT_DISABLED = 1342& Public Const ERROR_SERVICE_ALREADY_RUNNING = 1056& Public Const ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061& Public Const ERROR_SERVICE_DATABASE_LOCKED = 1055& Public Const ERROR_SERVICE_DEPENDENCY_DELETED = 1075& Public Const ERROR_SERVICE_DEPENDENCY_FAIL = 1068& Public Const ERROR_SERVICE_DISABLED = 1058& Public Const ERROR_SERVICE_DOES_NOT_EXIST = 1060& Public Const ERROR_SERVICE_EXISTS = 1073& Public Const ERROR_SERVICE_LOGON_FAILED = 1069& Public Const ERROR_SERVICE_MARKED_FOR_DELETE = 1072& Public Const ERROR_SERVICE_NEVER_STARTED = 1077& Public Const ERROR_SERVICE_NO_THREAD = 1054& Public Const ERROR_SERVICE_NOT_ACTIVE = 1062& Public Const ERROR_SERVICE_REQUEST_TIMEOUT = 1053& Public Const ERROR_SERVICE_SPECIFIC_ERROR = 1066& Public Const ERROR_SERVICE_START_HANG = 1070& Public Const ERROR_SESSION_CREDENTIAL_CONFLICT = 1219& Public Const ERROR_SETCOUNT_ON_BAD_LB = 1433& Public Const ERROR_SETMARK_DETECTED = 1103& Public Const ERROR_SEVERITY_ERROR = &HC0000000 Public Const ERROR_SEVERITY_INFORMATIONAL = &H40000000 Public Const ERROR_SEVERITY_SUCCESS = &H0 Public Const ERROR_SEVERITY_WARNING = &H80000000 Public Const ERROR_SHARING_BUFFER_EXCEEDED = 36& Public Const ERROR_SHARING_PAUSED = 70& Public Const ERROR_SHARING_VIOLATION = 32& Public Const ERROR_SHUTDOWN_IN_PROGRESS = 1115& Public Const ERROR_SIGNAL_PENDING = 162& Public Const ERROR_SIGNAL_REFUSED = 156& Public Const ERROR_SOME_NOT_MAPPED = 1301& Public Const ERROR_SPECIAL_ACCOUNT = 1371& Public Const ERROR_SPECIAL_GROUP = 1372& Public Const ERROR_SPECIAL_USER = 1373& Public Const ERROR_SPL_NO_ADDJOB = 3004 Public Const ERROR_SPL_NO_STARTDOC = 3003 Public Const ERROR_SPOOL_FILE_NOT_FOUND = 3002 Public Const ERROR_STACK_OVERFLOW = 1001& Public Const ERROR_STATIC_INIT = 4002 Public Const ERROR_SUBST_TO_JOIN = 141& Public Const ERROR_SUBST_TO_SUBST = 139& Public Const ERROR_SUCCESS = 0& Public Const ERROR_SWAPERROR = 999& Public Const ERROR_SYSTEM_TRACE = 150& Public Const ERROR_THREAD_1_INACTIVE = 210& Public Const ERROR_TLW_WITH_WSCHILD = 1406& Public Const ERROR_TOKEN_ALREADY_IN_USE = 1375& Public Const ERROR_TOO_MANY_CMDS = 56& Public Const ERROR_TOO_MANY_CONTEXT_IDS = 1384& Public Const ERROR_TOO_MANY_LUIDS_REQUESTED = 1333& Public Const ERROR_TOO_MANY_MODULES = 214& Public Const ERROR_TOO_MANY_MUXWAITERS = 152& Public Const ERROR_TOO_MANY_NAMES = 68& Public Const ERROR_TOO_MANY_OPEN_FILES = 4& Public Const ERROR_TOO_MANY_POSTS = 298& Public Const ERROR_TOO_MANY_SECRETS = 1381& Public Const ERROR_TOO_MANY_SEM_REQUESTS = 103& Public Const ERROR_TOO_MANY_SEMAPHORES = 100& Public Const ERROR_TOO_MANY_SESS = 69& Public Const ERROR_TOO_MANY_SIDS = 1389& Public Const ERROR_TOO_MANY_TCBS = 155& Public Const ERROR_TRANSFORM_NOT_SUPPORTED = 2004 Public Const ERROR_TRUST_FAILURE = 1790& Public Const ERROR_TRUSTED_DOMAIN_FAILURE = 1788& Public Const ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789& Public Const ERROR_UNABLE_TO_LOCK_MEDIA = 1108& Public Const ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109& Public Const ERROR_UNEXP_NET_ERR = 59& Public Const ERROR_UNKNOWN_PORT = 1796& Public Const ERROR_UNKNOWN_PRINT_MONITOR = 3000 Public Const ERROR_UNKNOWN_PRINTER_DRIVER = 1797& Public Const ERROR_UNKNOWN_PRINTPROCESSOR = 1798& Public Const ERROR_UNKNOWN_REVISION = 1305& Public Const ERROR_UNRECOGNIZED_MEDIA = 1785& Public Const ERROR_UNRECOGNIZED_VOLUME = 1005& Public Const ERROR_USER_EXISTS = 1316& Public Const ERROR_VC_DISCONNECTED = 240& Public Const ERROR_WAIT_NO_CHILDREN = 128& Public Const ERROR_WINDOW_NOT_COMBOBOX = 1423& Public Const ERROR_WINDOW_NOT_DIALOG = 1420& Public Const ERROR_WINDOW_OF_OTHER_THREAD = 1408& Public Const ERROR_WINS_INTERNAL = 4000 Public Const ERROR_WRITE_FAULT = 29& Public Const ERROR_WRITE_PROTECT = 19& Public Const ERROR_WRONG_DISK = 34& Public Const ERROR_WRONG_PASSWORD = 1323& Public Const LZERROR_BADINHANDLE = (-1) Public Const LZERROR_BADOUTHANDLE = (-2) Public Const LZERROR_BADVALUE = (-7) Public Const LZERROR_GLOBLOCK = (-6) Public Const LZERROR_PUBLICLOC = (-5) Public Const LZERROR_READ = (-3) Public Const LZERROR_UNKNOWNALG = (-8) Public Const LZERROR_WRITE = (-4) Public Const RPC_S_ADDRESS_ERROR = 1768& Public Const RPC_S_ALREADY_LISTENING = 1713& Public Const RPC_S_ALREADY_REGISTERED = 1711& Public Const RPC_S_BINDING_HAS_NO_AUTH = 1746& Public Const RPC_S_CALL_FAILED = 1726& Public Const RPC_S_CALL_FAILED_DNE = 1727& Public Const RPC_S_CALL_IN_PROGRESS = 1791& Public Const RPC_S_CANNOT_SUPPORT = 1764& Public Const RPC_S_CANT_CREATE_ENDPOINT = 1720& Public Const RPC_S_DUPLICATE_ENDPOINT = 1740& Public Const RPC_S_ENTRY_ALREADY_EXISTS = 1760& Public Const RPC_S_ENTRY_NOT_FOUND = 1761& Public Const RPC_S_FP_DIV_ZERO = 1769& Public Const RPC_S_FP_OVERFLOW = 1771& Public Const RPC_S_FP_UNDERFLOW = 1770& Public Const RPC_S_GROUP_MEMBER_NOT_FOUND = 1898& Public Const RPC_S_INCOMPLETE_NAME = 1755& Public Const RPC_S_INTERFACE_NOT_FOUND = 1759& Public Const RPC_S_INTERNAL_ERROR = 1766& Public Const RPC_S_INVALID_AUTH_IDENTITY = 1749& Public Const RPC_S_INVALID_BINDING = 1702& Public Const RPC_S_INVALID_BOUND = 1734& Public Const RPC_S_INVALID_ENDPOINT_FORMAT = 1706& Public Const RPC_S_INVALID_NAF_ID = 1763& Public Const RPC_S_INVALID_NAME_SYNTAX = 1736& Public Const RPC_S_INVALID_NET_ADDR = 1707& Public Const RPC_S_INVALID_NETWORK_OPTIONS = 1724& Public Const RPC_S_INVALID_OBJECT = 1900& Public Const RPC_S_INVALID_RPC_PROTSEQ = 1704& Public Const RPC_S_INVALID_STRING_BINDING = 1700& Public Const RPC_S_INVALID_STRING_UUID = 1705& Public Const RPC_S_INVALID_TAG = 1733& Public Const RPC_S_INVALID_TIMEOUT = 1709& Public Const RPC_S_INVALID_VERS_OPTION = 1756& Public Const RPC_S_MAX_CALLS_TOO_SMALL = 1742& Public Const RPC_S_NAME_SERVICE_UNAVAILABLE = 1762& Public Const RPC_S_NO_BINDINGS = 1718& Public Const RPC_S_NO_CALL_ACTIVE = 1725& Public Const RPC_S_NO_CONTEXT_AVAILABLE = 1765& Public Const RPC_S_NO_ENDPOINT_FOUND = 1708& Public Const RPC_S_NO_ENTRY_NAME = 1735& Public Const RPC_S_NO_MORE_BINDINGS = 1806& Public Const RPC_S_NO_MORE_MEMBERS = 1757& Public Const RPC_S_NO_PROTSEQS = 1719& Public Const RPC_S_NO_PROTSEQS_REGISTERED = 1714& Public Const RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758& Public Const RPC_S_NOT_LISTENING = 1715& Public Const RPC_S_NOTHING_TO_EXPORT = 1754& Public Const RPC_S_OBJECT_NOT_FOUND = 1710& Public Const RPC_S_OUT_OF_RESOURCES = 1721& Public Const RPC_S_PROCNUM_OUT_OF_RANGE = 1745& Public Const RPC_S_PROTOCOL_ERROR = 1728& Public Const RPC_S_PROTSEQ_NOT_FOUND = 1744& Public Const RPC_S_PROTSEQ_NOT_SUPPORTED = 1703& Public Const RPC_S_SERVER_TOO_BUSY = 1723& Public Const RPC_S_SERVER_UNAVAILABLE = 1722& Public Const RPC_S_STRING_TOO_LONG = 1743& Public Const RPC_S_TYPE_ALREADY_REGISTERED = 1712& Public Const RPC_S_UNKNOWN_AUTHN_LEVEL = 1748& Public Const RPC_S_UNKNOWN_AUTHN_SERVICE = 1747& Public Const RPC_S_UNKNOWN_AUTHN_TYPE = 1741& Public Const RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750& Public Const RPC_S_UNKNOWN_IF = 1717& Public Const RPC_S_UNKNOWN_MGR_TYPE = 1716& Public Const RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737& Public Const RPC_S_UNSUPPORTED_TRANS_SYN = 1730& Public Const RPC_S_UNSUPPORTED_TYPE = 1732& Public Const RPC_S_UUID_NO_ADDRESS = 1739& Public Const RPC_S_WRONG_KIND_OF_BINDING = 1701& Public Const RPC_S_ZERO_DIVIDE = 1767& Public Const RPC_X_BAD_STUB_DATA = 1783& Public Const RPC_X_BYTE_COUNT_TOO_SMALL = 1782& Public Const RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781& Public Const RPC_X_NO_MORE_ENTRIES = 1772& Public Const RPC_X_NULL_REF_POINTER = 1780& Public Const RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779& Public Const RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773& Public Const RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774& Public Const RPC_X_SS_CONTEXT_DAMAGED = 1777& Public Const RPC_X_SS_HANDLES_MISMATCH = 1778& Public Const RPC_X_SS_IN_NULL_CONTEXT = 1775& Public Declare Sub SetLastError Lib "KERNEL32" (ByVal dwErrCode As Long) Public Declare Function GetLastError Lib "KERNEL32" () As Long '============================================================================================================= ' GetLastError_Msg ' ' Purpose : ' Function that gets the last error caused by Windows API's. This only works ' with functions that use the GetLastError function to return an error code. ' Not all Windows API's do. ' ' If no error has occured, no message is displayed. ' ' Param Use ' ------------------------------------ ' ErrorNumber Optional. Error number to display. If this is set to ' zero, then the GetLastError API is called to see if an ' error occured. If no error occured, the function exits. ' LastAPICalled Optional. Tells the user which API caused the error. ' ' Return ' ------ ' If no error occured, no message is displayed & function returns FALSE. ' If an error occured, an error message is displayed & the function returns TRUE. ' '============================================================================================================= Public Function GetLastError_Msg(Optional ByVal ErrorNumber As Long, Optional ByVal LastAPICalled As String = "last") As Boolean On Error Resume Next Dim ErrMsg As String ' If no error message is specified then check for one If ErrorNumber = 0 Then ErrorNumber = GetLastError If ErrorNumber = 0 Then GetLastError_Msg = False Exit Function End If End If ' Get which error occured Select Case ErrorNumber Case NO_ERROR ErrMsg = "No error." Exit Function Case EPT_S_CANT_CREATE ErrMsg = "The endpoint mapper database could not be created." Case EPT_S_CANT_PERFORM_OP ErrMsg = "The operation cannot be performed." Case EPT_S_INVALID_ENTRY ErrMsg = "The entry is invalid." Case EPT_S_NOT_REGISTERED ErrMsg = "There are no more endpoints available from the endpoint mapper." Case ERROR_ACCESS_DENIED ErrMsg = "Access is denied." Case ERROR_ACCOUNT_DISABLED ErrMsg = "The referenced account is currently disabled and cannot be logged on to." Case ERROR_ACCOUNT_EXPIRED ErrMsg = "The user’s account has expired." Case ERROR_ACCOUNT_LOCKED_OUT '1909L ErrMsg = "The referenced account is currently locked out and may not be logged on to." Case ERROR_ACCOUNT_RESTRICTION ErrMsg = "Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions)." Case ERROR_ACTIVE_CONNECTIONS '2402L ErrMsg = "Active connections still exist." Case ERROR_ADAP_HDW_ERR ErrMsg = "A network adapter hardware error occurred." Case ERROR_ADDRESS_ALREADY_ASSOCIATED '1227L ErrMsg = "The network transport endpoint already has an address associated with it." Case ERROR_ADDRESS_NOT_ASSOCIATED '1228L ErrMsg = "An address has not yet been associated with the network endpoint." Case ERROR_ALIAS_EXISTS ErrMsg = "The specified alias already exists." Case ERROR_ALLOTTED_SPACE_EXCEEDED ErrMsg = "When a block of memory is allotted for future updates, such as the memory allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted. Since quota may already have been charged to several processes that have handles of the object, it is not reasonable to alter the size of the allocated memory. Instead, a request that requires more memory than has been allotted must fail and the ERROR_ALLOTTED_SPACE_EXCEEDED error returned." Case ERROR_ALREADY_ASSIGNED ErrMsg = "The local device name is already in use." Case ERROR_ALREADY_EXISTS ErrMsg = "Attempt to create file that already exists." Case ERROR_ALREADY_INITIALIZED '1247L ErrMsg = "An attempt was made to perform an initialization operation when initialization has already been completed." Case ERROR_ALREADY_REGISTERED '1242L ErrMsg = "The service is already registered." Case ERROR_ALREADY_RUNNING_LKG ErrMsg = "The system is currently running with the last-known-good configuration." Case ERROR_ALREADY_WAITING ErrMsg = "The specified Printer handle is already being waited on" Case ERROR_APP_WRONG_OS '1151L ErrMsg = "The specified program is not a Windows or MS-DOS program." Case ERROR_ARENA_TRASHED ErrMsg = "The storage control blocks were destroyed." Case ERROR_ARITHMETIC_OVERFLOW ErrMsg = "Arithmetic result exceeded 32-bits." Case ERROR_ATOMIC_LOCKS_NOT_SUPPORTED ErrMsg = "The file system does not support atomic changing of the lock type." Case ERROR_AUTODATASEG_EXCEEDS_64k ErrMsg = "The operating system cannot run this application program." Case ERROR_BAD_ARGUMENTS ErrMsg = "The argument string passed to DosExecPgm is incorrect." Case ERROR_BAD_COMMAND ErrMsg = "The device does not recognize the command." Case ERROR_BAD_DESCRIPTOR_FORMAT ErrMsg = "Indicates a security descriptor is not in the required format (absolute or self-relative)." Case ERROR_BAD_DEV_TYPE ErrMsg = "The network resource type is incorrect." Case ERROR_BAD_DEVICE ErrMsg = "The specified device name is invalid." Case ERROR_BAD_DRIVER ErrMsg = "The specified driver is invalid." Case ERROR_BAD_DRIVER_LEVEL ErrMsg = "The system does not support the requested command." Case ERROR_BAD_ENVIRONMENT ErrMsg = "The environment is incorrect." Case ERROR_BAD_EXE_FORMAT ErrMsg = "This is not a valid Windows-based application." Case ERROR_BAD_FORMAT ErrMsg = "An attempt was made to load a program with an incorrect format." Case ERROR_BAD_IMPERSONATION_LEVEL ErrMsg = "A specified impersonation level is invalid. Also used to indicate a required impersonation level was not provided." Case ERROR_BAD_INHERITANCE_ACL ErrMsg = "Indicates that an attempt to build either an inherited ACL or ACE did not succeed. One of the more probable causes is the replacement of a CreatorId with an SID that didn’t fit into the ACE or ACL." Case ERROR_BAD_LENGTH ErrMsg = "The program issued a command but the command length is incorrect." Case ERROR_BAD_LOGON_SESSION_STATE ErrMsg = "The logon session is not in a state consistent with the requested operation." Case ERROR_BAD_NET_NAME ErrMsg = "The network name cannot be found." Case ERROR_BAD_NET_RESP ErrMsg = "The specified server cannot perform the requested operation." Case ERROR_BAD_NETPATH ErrMsg = "The network path was not found." Case ERROR_BAD_PATHNAME ErrMsg = "The specified path name is invalid." Case ERROR_BAD_PIPE ErrMsg = "The pipe state is invalid." Case ERROR_BAD_PROFILE ErrMsg = "The network connection profile is damaged." Case ERROR_BAD_PROVIDER ErrMsg = "The specified network provider name is invalid." Case ERROR_BAD_REM_ADAP ErrMsg = "The remote adapter is not compatible." Case ERROR_BAD_THREADID_ADDR ErrMsg = "The address for the thread ID is incorrect." Case ERROR_BAD_TOKEN_TYPE ErrMsg = "The type of token object is inappropriate for its attempted use." Case ERROR_BAD_UNIT ErrMsg = "The system cannot find the specified device." Case ERROR_BAD_USERNAME ErrMsg = "The specified user name is invalid." Case ERROR_BAD_VALIDATION_CLASS ErrMsg = "The requested validation information class is invalid." Case ERROR_BADDB ErrMsg = "The configuration registry database is damaged." Case ERROR_BADKEY ErrMsg = "The configuration registry key is invalid." Case ERROR_BEGINNING_OF_MEDIA ErrMsg = "The beginning of the tape or partition was encountered." Case ERROR_BOOT_ALREADY_ACCEPTED ErrMsg = "The current boot has already been accepted for use as the last-known-good control set." Case ERROR_BROKEN_PIPE ErrMsg = "The pipe was ended." Case ERROR_BUFFER_OVERFLOW ErrMsg = "The file name is too long." Case ERROR_BUS_RESET ErrMsg = "The I/O bus was reset." Case ERROR_BUSY ErrMsg = "The requested resource is in use." Case ERROR_BUSY_DRIVE ErrMsg = "The system cannot perform a JOIN or SUBST at this time." Case ERROR_CALL_NOT_IMPLEMENTED ErrMsg = "The Application Program Interface (API) entered will only work in Windows/NT mode." Case ERROR_CAN_NOT_COMPLETE ErrMsg = "Cannot complete function for some reason." Case ERROR_CAN_NOT_DEL_LOCAL_WINS ErrMsg = "The local WINS can not be deleted." Case ERROR_CANCEL_VIOLATION ErrMsg = "A lock request was not outstanding for the supplied cancel region." Case ERROR_CANCELLED '1223L ErrMsg = "The operation was cancelled by the user." Case ERROR_CANNOT_COPY ErrMsg = "The Copy API cannot be used." Case ERROR_CANNOT_FIND_WND_CLASS ErrMsg = "Cannot find window class." Case ERROR_CANNOT_IMPERSONATE ErrMsg = "Indicates that an attempt was made to impersonate via a named pipe was not yet read from." Case ERROR_CANNOT_MAKE ErrMsg = "The directory or file cannot be created." Case ERROR_CANNOT_OPEN_PROFILE ErrMsg = "Unable to open the network connection profile." Case ERROR_CANT_ACCESS_DOMAIN_INFO ErrMsg = "Indicates a domain controller could not be contacted or that objects within the domain are protected and necessary information could not be retrieved." Case ERROR_CANT_DISABLE_MANDATORY ErrMsg = "A mandatory group cannot be disabled." Case ERROR_CANT_OPEN_ANONYMOUS ErrMsg = "An attempt was made to open an anonymous level token. Anonymous tokens cannot be opened." Case ERROR_CANTOPEN ErrMsg = "The configuration registry key cannot be opened." Case ERROR_CANTREAD ErrMsg = "The configuration registry key cannot be read." Case ERROR_CANTWRITE ErrMsg = "The configuration registry key cannot be written." Case ERROR_CHILD_MUST_BE_VOLATILE ErrMsg = "An attempt was made to create a stable subkey under a volatile parent key." Case ERROR_CHILD_NOT_COMPLETE ErrMsg = "This application cannot be run in Windows mode." Case ERROR_CHILD_WINDOW_MENU ErrMsg = "Child windows can’t have menus." Case ERROR_CIRCULAR_DEPENDENCY ErrMsg = "Circular service dependency was specified." Case ERROR_CLASS_ALREADY_EXISTS ErrMsg = "Class already exists." Case ERROR_CLASS_DOES_NOT_EXIST ErrMsg = "Class does not exist." Case ERROR_CLASS_HAS_WINDOWS ErrMsg = "Class still has open windows." Case ERROR_CLIPBOARD_NOT_OPEN ErrMsg = "Thread doesn’t have clipboard open." Case ERROR_CLIPPING_NOT_SUPPORTED ErrMsg = "The requested clipping operation is not supported." Case ERROR_COMMITMENT_LIMIT '1455L ErrMsg = "The paging file is too small for this operation to complete." Case ERROR_CONNECTION_ABORTED '1236L ErrMsg = "The network connection was aborted by the local system." Case ERROR_CONNECTION_ACTIVE '1230L ErrMsg = "An invalid operation was attempted on an active network connection." Case ERROR_CONNECTION_COUNT_LIMIT '1238L ErrMsg = "A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached." Case ERROR_CONNECTION_INVALID '1229L ErrMsg = "An operation was attempted on a non-existent network connection." Case ERROR_CONNECTION_REFUSED '1225L ErrMsg = "The remote system refused the network connection." Case ERROR_CONNECTION_UNAVAIL ErrMsg = "The device is not currently connected but is a remembered connection." Case ERROR_CONTINUE '1246L ErrMsg = "Return that wants caller to continue with work in progress." Case ERROR_CONTROL_ID_NOT_FOUND ErrMsg = "Control ID not found." Case ERROR_COUNTER_TIMEOUT ErrMsg = "A serial I/O operation completed because the time-out period expired. (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)" Case ERROR_CRC ErrMsg = "Data error (cyclic redundancy check)." Case ERROR_CURRENT_DIRECTORY ErrMsg = "The directory cannot be removed." Case ERROR_DATABASE_DOES_NOT_EXIST ErrMsg = "The database specified does not exist." Case ERROR_DC_NOT_FOUND ErrMsg = "Invalid HDC passed to ReleaseDC." Case ERROR_DDE_FAIL '1156L ErrMsg = "An error occurred in sending the command to the application." Case ERROR_DEPENDENT_SERVICES_RUNNING ErrMsg = "A stop control has been sent to a service which other running services are dependent on." Case ERROR_DESTROY_OBJECT_OF_OTHER_THREAD ErrMsg = "Cannot destroy object created by another thread." Case ERROR_DEV_NOT_EXIST ErrMsg = "The specified network resource is no longer available." Case ERROR_DEVICE_ALREADY_REMEMBERED ErrMsg = "An attempt was made to remember a device that was previously remembered." Case ERROR_DEVICE_IN_USE ErrMsg = "The device is in use by an active process and cannot be disconnected." Case ERROR_DEVICE_NOT_PARTITIONED ErrMsg = "Tape partition information could not be found when loading a tape." Case ERROR_DIFFERENT_SERVICE_ACCOUNT '1079L ErrMsg = "The account specified for this service is different from the account specified for other services running in the same process." Case ERROR_DIR_NOT_EMPTY ErrMsg = "The directory is not empty." Case ERROR_DIR_NOT_ROOT ErrMsg = "The directory is not a subdirectory of the root directory." Case ERROR_DIRECT_ACCESS_HANDLE ErrMsg = "Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O." Case ERROR_DIRECTORY ErrMsg = "The directory name is invalid." Case ERROR_DISCARDED ErrMsg = "The segment is already discarded and cannot be locked." Case ERROR_DISK_CHANGE ErrMsg = "Program stopped because alternate disk was not inserted." Case ERROR_DISK_CORRUPT ErrMsg = "The disk structure is damaged and nonreadable." Case ERROR_DISK_FULL ErrMsg = "There is not enough space on the disk." Case ERROR_DISK_OPERATION_FAILED ErrMsg = "While accessing the hard disk, a disk operation failed even after retries." Case ERROR_DISK_RECALIBRATE_FAILED ErrMsg = "While accessing the hard disk, a recalibrate operation failed, even after retries." Case ERROR_DISK_RESET_FAILED ErrMsg = "While accessing the hard disk, a disk controller reset was needed, but even that failed." Case ERROR_DLL_INIT_FAILED ErrMsg = "A DLL initialization routine failed." Case ERROR_DLL_NOT_FOUND '1157L ErrMsg = "One of the library files needed to run this application cannot be found." Case ERROR_DOMAIN_CONTROLLER_NOT_FOUND '1908L ErrMsg = "Could not find the domain controller for this domain." Case ERROR_DOMAIN_EXISTS ErrMsg = "The specified domain already exists." Case ERROR_DOMAIN_LIMIT_EXCEEDED ErrMsg = "An attempt to exceed the limit on the number of domains per server for this release." Case ERROR_DOMAIN_TRUST_INCONSISTENT ErrMsg = "The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain." Case ERROR_DRIVE_LOCKED ErrMsg = "The disk is in use or locked by another process." Case ERROR_DUP_DOMAINNAME ErrMsg = "The workgroup or domain name is already in use by another computer on the network." Case ERROR_DUP_NAME ErrMsg = "A duplicate name exists on the network." Case ERROR_DUPLICATE_SERVICE_NAME ErrMsg = "The name is already in use as either a service name or a service display name." Case ERROR_DYNLINK_FROM_INVALID_RING ErrMsg = "The operating system cannot run this application program." Case ERROR_EA_ACCESS_DENIED ErrMsg = "Access to the EA is denied." Case ERROR_EA_FILE_CORRUPT ErrMsg = "The EA file on the mounted file system is damaged." Case ERROR_EA_LIST_INCONSISTENT ErrMsg = "The EAs are inconsistent." Case ERROR_EA_TABLE_FULL ErrMsg = "The EA table in the EA file on the mounted file system is full." Case ERROR_EAS_DIDNT_FIT ErrMsg = "The EAs did not fit in the buffer." Case ERROR_EAS_NOT_SUPPORTED ErrMsg = "The mounted file system does not support extended attributes." Case ERROR_END_OF_MEDIA ErrMsg = "The physical end of the tape has been reached." Case ERROR_ENVVAR_NOT_FOUND ErrMsg = "The system could not find the environment option entered." Case ERROR_EOM_OVERFLOW ErrMsg = "Physical end of tape encountered." Case ERROR_EVENTLOG_CANT_START ErrMsg = "No event log file could be opened, so the event logging service did not start." Case ERROR_EVENTLOG_FILE_CHANGED ErrMsg = "The event log file has changed between reads." Case ERROR_EVENTLOG_FILE_CORRUPT ErrMsg = "One of the Eventlog logfiles is damaged." Case ERROR_EXCEPTION_IN_SERVICE ErrMsg = "An exception occurred in the service when handling the control request." Case ERROR_EXCL_SEM_ALREADY_OWNED ErrMsg = "The exclusive semaphore is owned by another process." Case ERROR_EXE_MARKED_INVALID ErrMsg = "The operating system cannot run this." Case ERROR_EXTENDED_ERROR ErrMsg = "An extended error has occurred." Case ERROR_FAIL_I24 ErrMsg = "Fail on INT 24." Case ERROR_FAILED_SERVICE_CONTROLLER_CONNECT ErrMsg = "The service process could not connect to the service controller." Case ERROR_FILE_CORRUPT ErrMsg = "The file or directory is damaged and nonreadable." Case ERROR_FILE_EXISTS ErrMsg = "The file exists." Case ERROR_FILE_INVALID ErrMsg = "The volume for a file was externally altered and the opened file is no longer valid." Case ERROR_FILE_NOT_FOUND ErrMsg = "The system cannot find the file specified." Case ERROR_FILEMARK_DETECTED ErrMsg = "A tape access reached a filemark." Case ERROR_FILENAME_EXCED_RANGE ErrMsg = "The file name or extension is too long." Case ERROR_FLOPPY_BAD_REGISTERS ErrMsg = "The floppy disk controller returned inconsistent results in its registers." Case ERROR_FLOPPY_ID_MARK_NOT_FOUND ErrMsg = "No ID address mark was found on the floppy disk." Case ERROR_FLOPPY_WRONG_CYLINDER ErrMsg = "Mismatch between the floppy disk sector ID field and the floppy disk controller track address." Case ERROR_FLOPPY_UNKNOWN_ERROR ErrMsg = "The floppy disk controller reported an error that is not recognized by the floppy disk driver." Case ERROR_FULL_BACKUP ErrMsg = "The backup failed. Check the directory that you are backing the database to." Case ERROR_FULLSCREEN_MODE ErrMsg = "The requested operation cannot be performed in full-screen mode." Case ERROR_GEN_FAILURE ErrMsg = "A device attached to the system is not functioning." Case ERROR_GENERIC_NOT_MAPPED ErrMsg = "Indicates generic access types were contained in an access mask that should already be mapped to non-generic access types." Case ERROR_GLOBAL_ONLY_HOOK '1429L ErrMsg = "This hook can only be set globally." Case ERROR_GRACEFUL_DISCONNECT '1226L ErrMsg = "The network connection was gracefully closed." Case ERROR_GROUP_EXISTS ErrMsg = "The specified group already exists." Case ERROR_HANDLE_DISK_FULL ErrMsg = "The disk is full." Case ERROR_HANDLE_EOF ErrMsg = "Reached End Of File." Case ERROR_HOOK_NEEDS_HMOD ErrMsg = "Cannot set non-local hook without an module handle." Case ERROR_HOOK_NOT_INSTALLED ErrMsg = "Hook is not installed." Case ERROR_HOOK_TYPE_NOT_ALLOWED '1458L ErrMsg = "Hook type not allowed." Case ERROR_HOST_UNREACHABLE '1232L ErrMsg = "The remote system is not reachable by the transport." Case ERROR_HOTKEY_ALREADY_REGISTERED ErrMsg = "Hotkey is already registered." Case ERROR_HOTKEY_NOT_REGISTERED ErrMsg = "Hotkey is not registered." Case ERROR_HWNDS_HAVE_DIFF_PARENT ErrMsg = "All DeferWindowPos HWNDs must have same parent." Case ERROR_ILL_FORMED_PASSWORD ErrMsg = "When trying to update a password, this return status indicates the value provided for the new password contains values not allowed in passwords." Case ERROR_INC_BACKUP ErrMsg = "The backup failed. Was a full backup done before ?" Case ERROR_INCORRECT_ADDRESS '1241L ErrMsg = "The network address could not be used for the operation requested." Case ERROR_INFLOOP_IN_RELOC_CHAIN ErrMsg = "The operating system cannot run this." Case ERROR_INSUFFICIENT_BUFFER ErrMsg = "The data area passed to a system call is too small." Case ERROR_INTERNAL_DB_CORRUPTION ErrMsg = "This error indicates the requested operation cannot be completed due to a catastrophic media failure or on-disk data structure corruption." Case ERROR_INTERNAL_DB_ERROR ErrMsg = "The Local Security Authority (LSA) database contains in internal inconsistency." Case ERROR_INTERNAL_ERROR ErrMsg = "This error indicates the SAM server has encounterred an internal consistency error in its database. This catastrophic failure prevents further operation of SAM." Case ERROR_INVALID_ACCEL_HANDLE ErrMsg = "Invalid accelerator-table handle." Case ERROR_INVALID_ACCESS ErrMsg = "The access code is invalid." Case ERROR_INVALID_ACCOUNT_NAME ErrMsg = "The name provided is not a properly formed account name." Case ERROR_INVALID_ACL ErrMsg = "Indicates the ACL structure is not valid." Case ERROR_INVALID_ADDRESS ErrMsg = "Attempt to access invalid address." Case ERROR_INVALID_AT_INTERRUPT_TIME ErrMsg = "Cannot request exclusive semaphores at interrupt time." Case ERROR_INVALID_BLOCK ErrMsg = "The storage control block address is invalid." Case ERROR_INVALID_BLOCK_LENGTH ErrMsg = "When accessing a new tape of a multivolume partition, the current block size is incorrect." Case ERROR_INVALID_CATEGORY ErrMsg = "The IOCTL call made by the application program is incorrect." Case ERROR_INVALID_COMBOBOX_MESSAGE ErrMsg = "Invalid Message, combo box doesn’t have an edit control." Case ERROR_INVALID_COMPUTERNAME ErrMsg = "The format of the specified computer name is invalid." Case ERROR_INVALID_CURSOR_HANDLE ErrMsg = "The cursor handle is invalid." Case ERROR_INVALID_DATA ErrMsg = "The data is invalid." Case ERROR_INVALID_DATATYPE ErrMsg = "The specified datatype is invalid." Case ERROR_INVALID_DLL '1154L ErrMsg = "One of the library files needed to run this application is damaged." Case ERROR_INVALID_DOMAINNAME ErrMsg = "The format of the specified domain name is invalid." Case ERROR_INVALID_DOMAIN_ROLE ErrMsg = "Indicates the requested operation cannot be completed with the domain in its present role." Case ERROR_INVALID_DOMAIN_STATE ErrMsg = "Indicates the domain is in the wrong state to perform the desired operation." Case ERROR_INVALID_DRIVE ErrMsg = "The system cannot find the specified drive." Case ERROR_INVALID_DWP_HANDLE ErrMsg = "The DeferWindowPos handle is invalid." Case ERROR_INVALID_EA_HANDLE ErrMsg = "The specified EA handle is invalid." Case ERROR_INVALID_EA_NAME ErrMsg = "The specified EA name is invalid." Case ERROR_INVALID_EDIT_HEIGHT ErrMsg = "Height must be less than 256." Case ERROR_INVALID_ENVIRONMENT ErrMsg = "The Environment specified is invalid." Case ERROR_INVALID_EVENT_COUNT ErrMsg = "The number of specified semaphore events is incorrect." Case ERROR_INVALID_EVENTNAME ErrMsg = "The format of the specified event name is invalid." Case ERROR_INVALID_EXE_SIGNATURE ErrMsg = "This cannot be run in Windows/NT mode." Case ERROR_INVALID_FILTER_PROC ErrMsg = "The filter proc is invalid." Case ERROR_INVALID_FLAG_NUMBER ErrMsg = "The flag passed is incorrect." Case ERROR_INVALID_FLAGS ErrMsg = "The flags are invalid." Case ERROR_INVALID_FUNCTION ErrMsg = "The function is incorrect." Case ERROR_INVALID_GROUP_ATTRIBUTES ErrMsg = "The specified attributes are invalid, or incompatible with the attributes for the group as a whole." Case ERROR_INVALID_GROUPNAME ErrMsg = "The format of the specified group name is invalid." Case ERROR_INVALID_GW_COMMAND ErrMsg = "The GW_* command is invalid." Case ERROR_INVALID_FORM_NAME ErrMsg = "The specified Form name is invalid." Case ERROR_INVALID_FORM_SIZE ErrMsg = "The specified Form size is invalid" Case ERROR_INVALID_HANDLE ErrMsg = "The internal file identifier is incorrect." Case ERROR_INVALID_HOOK_FILTER ErrMsg = "The hook filter type is invalid." Case ERROR_INVALID_HOOK_HANDLE ErrMsg = "The hook handle is invalid." Case ERROR_INVALID_ICON_HANDLE ErrMsg = "The icon handle is invalid." Case ERROR_INVALID_ID_AUTHORITY ErrMsg = "The value provided is an invalid value for an identifier authority." Case ERROR_INVALID_INDEX ErrMsg = "The index is invalid." Case ERROR_INVALID_KEYBOARD_HANDLE '1457L ErrMsg = "Invalid keyboard layout handle." Case ERROR_INVALID_LB_MESSAGE ErrMsg = "The message for single-selection list box is invalid." Case ERROR_INVALID_LEVEL ErrMsg = "The system call level is incorrect." Case ERROR_INVALID_LIST_FORMAT ErrMsg = "The list is not correct." Case ERROR_INVALID_LOGON_HOURS ErrMsg = "The user account has time restrictions and cannot be logged onto at this time." Case ERROR_INVALID_LOGON_TYPE ErrMsg = "Indicates an invalid value has been provided for LogonType has been requested." Case ERROR_INVALID_MEMBER ErrMsg = "A new member could not be added to an alias because the member has the wrong account type." Case ERROR_INVALID_MENU_HANDLE ErrMsg = "The menu handle is invalid." Case ERROR_INVALID_MESSAGE ErrMsg = "Window can’t handle sent message." Case ERROR_INVALID_MESSAGEDEST ErrMsg = "The format of the specified message destination is invalid." Case ERROR_INVALID_MESSAGENAME ErrMsg = "The format of the specified message name is invalid." Case ERROR_INVALID_MINALLOCSIZE ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_MODULETYPE ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_MSGBOX_STYLE ErrMsg = "The message box style is invalid." Case ERROR_INVALID_NAME ErrMsg = "The file name, directory name, or volume label is syntactically incorrect." Case ERROR_INVALID_NETNAME ErrMsg = "The format of the specified network name is invalid." Case ERROR_INVALID_ORDINAL ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_OWNER ErrMsg = "Indicates a particular Security ID cannot be assigned as the owner of an object." Case ERROR_INVALID_PARAMETER ErrMsg = "The parameter is incorrect." Case ERROR_INVALID_PASSWORD ErrMsg = "The specified network password is incorrect." Case ERROR_INVALID_PASSWORDNAME ErrMsg = "The format of the specified password is invalid." Case ERROR_INVALID_PIXEL_FORMAT ErrMsg = "The pixel format is invalid." Case ERROR_INVALID_PRIMARY_GROUP ErrMsg = "Indicates a particular Security ID cannot be assigned as the primary group of an object." Case ERROR_INVALID_PRINT_MONITOR '3007L ErrMsg = "The specified print monitor does not have the required functions." Case ERROR_INVALID_PRINTER_COMMAND ErrMsg = "The printer command is invalid." Case ERROR_INVALID_PRINTER_NAME ErrMsg = "The printer name is invalid." Case ERROR_INVALID_PRINTER_STATE ErrMsg = "The state of the Printer is invalid" Case ERROR_INVALID_PRIORITY ErrMsg = "The specified priority is invalid." Case ERROR_INVALID_SCROLLBAR_RANGE ErrMsg = "Scrollbar range greater than 0x7FFF." Case ERROR_INVALID_SECURITY_DESCR ErrMsg = "Indicates the SECURITY_DESCRIPTOR structure is invalid." Case ERROR_INVALID_SEGDPL ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_SEGMENT_NUMBER ErrMsg = "The system detected a segment number that is incorrect." Case ERROR_INVALID_SEPARATOR_FILE ErrMsg = "The specified separator file is invalid." Case ERROR_INVALID_SERVER_STATE ErrMsg = "Indicates the Sam Server was in the wrong state to perform the desired operation." Case ERROR_INVALID_SERVICE_ACCOUNT ErrMsg = "The account name is invalid or does not exist." Case ERROR_INVALID_SERVICE_CONTROL ErrMsg = "The requested control is not valid for this service" Case ERROR_INVALID_SERVICE_LOCK ErrMsg = "The specified service database lock is invalid." Case ERROR_INVALID_SERVICENAME ErrMsg = "The format of the specified service name is invalid." Case ERROR_INVALID_SHARENAME ErrMsg = "The format of the specified share name is invalid." Case ERROR_INVALID_SHOWWIN_COMMAND ErrMsg = "The ShowWindow command is invalid." Case ERROR_INVALID_SID ErrMsg = "Indicates the SID structure is invalid." Case ERROR_INVALID_SIGNAL_NUMBER ErrMsg = "The signal being posted is incorrect." Case ERROR_INVALID_SPI_VALUE ErrMsg = "The SPI_* parameter is invalid." Case ERROR_INVALID_STACKSEG ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_STARTING_CODESEG ErrMsg = "The operating system cannot run this." Case ERROR_INVALID_SUB_AUTHORITY ErrMsg = "Indicates the sub-authority value is invalid for the particular use." Case ERROR_INVALID_TARGET_HANDLE ErrMsg = "The target internal file identifier is incorrect." Case ERROR_INVALID_THREAD_ID ErrMsg = "The thread ID is invalid." Case ERROR_INVALID_TIME ErrMsg = "The specified time is invalid." Case ERROR_INVALID_USER_BUFFER ErrMsg = "The supplied user buffer is invalid for the requested operation." Case ERROR_INVALID_VERIFY_SWITCH ErrMsg = "The verify-on-write switch parameter value is incorrect." Case ERROR_INVALID_WINDOW_HANDLE ErrMsg = "The window handle invalid." Case ERROR_INVALID_WINDOW_STYLE ErrMsg = "The window style or class attribute is invalid for this operation." Case ERROR_INVALID_WORKSTATION ErrMsg = "The user account is restricted and cannot be used to log on from the source workstation." Case ERROR_IO_DEVICE ErrMsg = "The request could not be performed because of an I/O device error." Case ERROR_IO_INCOMPLETE ErrMsg = "Overlapped IO event not in signaled state." Case ERROR_IO_PENDING ErrMsg = "Overlapped IO operation in progress." Case ERROR_IOPL_NOT_ENABLED ErrMsg = "The operating system is not presently configured to run this application." Case ERROR_IRQ_BUSY ErrMsg = "Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened." Case ERROR_IS_JOIN_PATH ErrMsg = "Not enough resources are available to process this command." Case ERROR_IS_JOIN_TARGET ErrMsg = "A JOIN or SUBST command cannot be used for a drive that contains previously joined drives." Case ERROR_IS_JOINED ErrMsg = "An attempt was made to use a JOIN or SUBST command on a drive that is already joined." Case ERROR_IS_SUBST_PATH ErrMsg = "The path specified is being used in a substitute." Case ERROR_IS_SUBST_TARGET ErrMsg = "An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute." Case ERROR_IS_SUBSTED ErrMsg = "An attempt was made to use a JOIN or SUBST command on a drive already substituted." Case ERROR_ITERATED_DATA_EXCEEDS_64k ErrMsg = "The operating system cannot run this." Case ERROR_JOIN_TO_JOIN ErrMsg = "The system tried to join a drive to a directory on a joined drive." Case ERROR_JOIN_TO_SUBST ErrMsg = "The system tried to join a drive to a directory on a substituted drive." Case ERROR_JOURNAL_HOOK_SET ErrMsg = "The journal hook is already installed." Case ERROR_KEY_DELETED ErrMsg = "Illegal operation attempted on a registry key that has been marked for deletion." Case ERROR_KEY_HAS_CHILDREN ErrMsg = "An attempt was made to create a symbolic link in a registry key that already has subkeys or values." Case ERROR_LABEL_TOO_LONG ErrMsg = "The volume label entered exceeds the 11 character limit. The first 11 characters were written to disk. Any characters that exceeded the 11 character limit were automatically deleted." Case ERROR_LAST_ADMIN ErrMsg = "Indicates the requested operation would disable or delete the last remaining administration account. This is not allowed to prevent creating a situation where the system will not be administrable." Case ERROR_LB_WITHOUT_TABSTOPS ErrMsg = "This list box doesn’t support tab stops." Case ERROR_LICENSE_QUOTA_EXCEEDED '1395L ErrMsg = "The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept." Case ERROR_LISTBOX_ID_NOT_FOUND ErrMsg = "List box ID not found." Case ERROR_LM_CROSS_ENCRYPTION_REQUIRED ErrMsg = "An attempt was made to change a user password in the security account manager without providing the required LM cross-encrypted password." Case ERROR_LOCAL_USER_SESSION_KEY ErrMsg = "A user session key was requested for a local RPC connection. The session key returned is a constant value and not unique to this connection." Case ERROR_LOCK_FAILED ErrMsg = "Attempt to lock a region of a file failed." Case ERROR_LOCK_VIOLATION ErrMsg = "The process cannot access the file because another process has locked a portion of the file." Case ERROR_LOCKED ErrMsg = "The segment is locked and cannot be reallocated." Case ERROR_LOG_FILE_FULL ErrMsg = "The event log file is full." Case ERROR_LOGIN_TIME_RESTRICTION '1239L ErrMsg = "Attempting to login during an unauthorized time of day for this account." Case ERROR_LOGIN_WKSTA_RESTRICTION '1240L ErrMsg = "The account is not authorized to login from this station." Case ERROR_LOGON_FAILURE ErrMsg = "The attempted logon is invalid. This is due to either a bad user name or authentication information." Case ERROR_LOGON_NOT_GRANTED ErrMsg = "A requested type of logon, such as Interactive, Network, or Service, is not granted by the target system’s local security policy. The system administrator can grant the required form of logon." Case ERROR_LOGON_SESSION_COLLISION ErrMsg = "The logon session ID is already in use." Case ERROR_LOGON_SESSION_EXISTS ErrMsg = "An attempt was made to start a new session manager or LSA logon session with an ID already in use." Case ERROR_LOGON_TYPE_NOT_GRANTED ErrMsg = "A user has requested a type of logon, such as interactive or network, that was not granted. An administrator has control over who may logon interactively and through the network." Case ERROR_LUIDS_EXHAUSTED ErrMsg = "Indicates there are no more LUID to allocate." Case ERROR_MAPPED_ALIGNMENT ErrMsg = "The base address or the file offset specified does not have the proper alignment." Case ERROR_MAX_THRDS_REACHED ErrMsg = "No more threads can be created in the system." Case ERROR_MEDIA_CHANGED ErrMsg = "Media in drive may have changed." Case ERROR_MEMBER_IN_ALIAS ErrMsg = "The specified account name is not a member of the alias." Case ERROR_MEMBER_IN_GROUP ErrMsg = "The specified user account is already in the specified group account. Also used to indicate a group can not be deleted because it contains a member." Case ERROR_MEMBER_NOT_IN_ALIAS ErrMsg = "The specified account name is not a member of the alias." Case ERROR_MEMBER_NOT_IN_GROUP ErrMsg = "The specified user account is not a member of the specified group account." Case ERROR_MEMBERS_PRIMARY_GROUP ErrMsg = "Indicates a member cannot be removed from a group because the group is currently the member’s primary group." Case ERROR_MENU_ITEM_NOT_FOUND '1456L ErrMsg = "A menu item was not found." Case ERROR_META_EXPANSION_TOO_LONG ErrMsg = "The global filename characters * or ? are entered incorrectly, or too many global filename characters are specified." Case ERROR_METAFILE_NOT_SUPPORTED ErrMsg = "The requested metafile operation is not supported." Case ERROR_MOD_NOT_FOUND ErrMsg = "The specified module cannot be found." Case ERROR_MORE_DATA ErrMsg = "More data is available." Case ERROR_MORE_WRITES ErrMsg = "A serial I/O operation was completed by another write to the serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)" Case ERROR_MR_MID_NOT_FOUND ErrMsg = "The system cannot find message for message number 0x%1 in message file for %2." Case ERROR_NEGATIVE_SEEK ErrMsg = "An attempt was made to move the file pointer before the beginning of the file." Case ERROR_NESTING_NOT_ALLOWED ErrMsg = "Can’t nest calls to LoadModule." Case ERROR_NETLOGON_NOT_STARTED ErrMsg = "An attempt was made to logon, but the network logon service was not started." Case ERROR_NET_WRITE_FAULT ErrMsg = "A write fault occurred on the network." Case ERROR_NETNAME_DELETED ErrMsg = "The specified network name is no longer available." Case ERROR_NETWORK_ACCESS_DENIED ErrMsg = "Network access is denied." Case ERROR_NETWORK_BUSY ErrMsg = "The network is busy." Case ERROR_NETWORK_UNREACHABLE '1231L ErrMsg = "The remote network is not reachable by the transport." Case ERROR_NO_ASSOCIATION '1155L ErrMsg = "No application is associated with the specified file for this operation." Case ERROR_NO_BROWSER_SERVERS_FOUND ErrMsg = "The list of servers for this workgroup is not currently available" Case ERROR_NO_DATA ErrMsg = "Pipe close in progress." Case ERROR_NO_DATA_DETECTED ErrMsg = "During a tape access, the end of the data marker was reached." Case ERROR_NO_IMPERSONATION_TOKEN ErrMsg = "An attempt was made to operate on an impersonation token by a thread was not currently impersonating a client." Case ERROR_NO_INHERITANCE ErrMsg = "Indicates an ACL contains no inheritable components." Case ERROR_NO_LOG_SPACE ErrMsg = "System could not allocate required space in a registry log." Case ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ErrMsg = "The account used is an interdomain trust account. Use your normal user account or remote user account to access this server." Case ERROR_NOLOGON_SERVER_TRUST_ACCOUNT ErrMsg = "The account used is an server trust account. Use your normal user account or remote user account to access this server." Case ERROR_NO_LOGON_SERVERS ErrMsg = "There are currently no logon servers available to service the logon request." Case ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT ErrMsg = "The account used is a workstation trust account. Use your normal user account or remote user account to access this server." Case ERROR_NO_MEDIA_IN_DRIVE ErrMsg = "Tape query failed because of no media in drive." Case ERROR_NO_MORE_DEVICES '1248L ErrMsg = "No more local devices." Case ERROR_NO_MORE_FILES ErrMsg = "There are no more files." Case ERROR_NO_MORE_ITEMS ErrMsg = "No more data is available." Case ERROR_NO_MORE_SEARCH_HANDLES ErrMsg = "No more internal file identifiers available." Case ERROR_NO_NET_OR_BAD_PATH ErrMsg = "No network provider accepted the given network path." Case ERROR_NO_NETWORK ErrMsg = "The network is not present or not started." Case ERROR_NO_PROC_SLOTS ErrMsg = "The system cannot start another process at this time." Case ERROR_NO_QUOTAS_FOR_ACCOUNT ErrMsg = "No system quota limits are specifically set for this account." Case ERROR_NO_SCROLLBARS ErrMsg = "Window does not have scroll bars." Case ERROR_NO_SECURITY_ON_OBJECT ErrMsg = "Indicates an attempt was made to operate on the security of an object that does not have security associated with it." Case ERROR_NO_SHUTDOWN_IN_PROGRESS ErrMsg = "An attempt to abort the shutdown of the system failed because no shutdown was in progress." Case ERROR_NO_SIGNAL_SENT ErrMsg = "No process in the command subtree has a signal handler." Case ERROR_NO_SPOOL_SPACE ErrMsg = "Space to store the file waiting to be printed is not available on the server." Case ERROR_NO_SUCH_ALIAS ErrMsg = "The specified alias does not exist." Case ERROR_NO_SUCH_DOMAIN ErrMsg = "The specified domain does not exist." Case ERROR_NO_SUCH_GROUP ErrMsg = "The specified group does not exist." Case ERROR_NO_SUCH_LOGON_SESSION ErrMsg = "A specified logon session does not exist. It may already have been terminated." Case ERROR_NO_SUCH_MEMBER ErrMsg = "A new member cannot be added to an alias because the member does not exist." Case ERROR_NO_SUCH_PACKAGE ErrMsg = "A specified authentication package is unknown." Case ERROR_NO_SUCH_PRIVILEGE ErrMsg = "A specified privilege does not exist." Case ERROR_NO_SUCH_USER ErrMsg = "The specified user does not exist." Case ERROR_NO_SYSTEM_MENU ErrMsg = "Window does not have system menu." Case ERROR_NO_SYSTEM_RESOURCES '1450L ErrMsg = "Insufficient system resources exist to complete the requested service." Case ERROR_NO_TOKEN ErrMsg = "An attempt was made to reference a token that does not exist." Case ERROR_NO_TRUST_LSA_SECRET ErrMsg = "The workstation does not have a trust secret." Case ERROR_NO_TRUST_SAM_ACCOUNT ErrMsg = "The domain controller does not have an account for this workstation." Case ERROR_NO_UNICODE_TRANSLATION ErrMsg = "No mapping for the Unicode character exists in the target multi-byte code page." Case ERROR_NO_USER_SESSION_KEY ErrMsg = "There is no user session key for the specified logon session." Case ERROR_NO_VOLUME_LABEL ErrMsg = "The disk has no volume label." Case ERROR_NO_WILDCARD_CHARACTERS ErrMsg = "No wildcard characters found." Case ERROR_NOACCESS ErrMsg = "Invalid access to memory location." Case ERROR_NON_MDICHILD_WINDOW ErrMsg = "DefMDIChildProc called with a non-MDI child window." Case ERROR_NONE_MAPPED ErrMsg = "None of the information to be mapped has been translated." Case ERROR_NONPAGED_SYSTEM_RESOURCES '1451L ErrMsg = "Insufficient system resources exist to complete the requested service." Case ERROR_NOT_ALL_ASSIGNED ErrMsg = "Indicates not all privileges referenced are assigned to the caller. This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned." Case ERROR_NOT_AUTHENTICATED '1244L ErrMsg = "The operation being requested was not performed because the user has not been authenticated." Case ERROR_NOT_CHILD_WINDOW ErrMsg = "Window is not a child window." Case ERROR_NOT_CONNECTED ErrMsg = "This network connection does not exist." Case ERROR_NOT_CONTAINER ErrMsg = "Cannot enumerate a non-container." Case ERROR_NOT_DOS_DISK ErrMsg = "The specified disk cannot be accessed." Case ERROR_NOT_ENOUGH_MEMORY ErrMsg = "Not enough storage is available to process this command." Case ERROR_NOT_ENOUGH_QUOTA ErrMsg = "Not enough quota is available to process this command." Case ERROR_NOT_ENOUGH_SERVER_MEMORY ErrMsg = "Not enough server storage is available to process this command." Case ERROR_NOT_JOINED ErrMsg = "The system attempted to delete the JOIN of a drive not previously joined." Case ERROR_NOT_LOCKED ErrMsg = "The segment is already unlocked." Case ERROR_NOT_LOGGED_ON '1245L ErrMsg = "The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist." Case ERROR_NOT_LOGON_PROCESS ErrMsg = "The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process." Case ERROR_NOT_OWNER ErrMsg = "Attempt to release mutex not owned by caller." Case ERROR_NOT_READY ErrMsg = "The drive is not ready." Case ERROR_NOT_REGISTRY_FILE ErrMsg = "The system attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file." Case ERROR_NOT_SAME_DEVICE ErrMsg = "The system cannot move the file to a different disk drive." Case ERROR_NOT_SUBSTED ErrMsg = "The system attempted to delete the substitution of a drive not previously substituted." Case ERROR_NOT_SUPPORTED ErrMsg = "The network request is not supported." Case ERROR_NOTIFY_ENUM_DIR ErrMsg = "This indicates that a notify change request is being completed and the information is not being returned in the caller’s buffer. The caller now needs to enumerate the files to find the changes." Case ERROR_NT_CROSS_ENCRYPTION_REQUIRED ErrMsg = "An attempt was made to change a user password in the security account manager without providing the necessary NT cross-encrypted password." Case ERROR_NULL_LM_PASSWORD ErrMsg = "The Windows NT password is too complex to be converted to a Windows-networking password. The Windows-networking password returned is a NULL string." Case ERROR_OLD_WIN_VERSION '1150L ErrMsg = "The specified program requires a newer version of Windows." Case ERROR_OPEN_FAILED ErrMsg = "The system cannot open the specified device or file." Case ERROR_OPEN_FILES ErrMsg = "There are open files or requests pending on this connection." Case ERROR_OPERATION_ABORTED ErrMsg = "The I/O operation was aborted due to either thread exit or application request." Case ERROR_OUT_OF_PAPER ErrMsg = "The printer is out of paper." Case ERROR_OUT_OF_STRUCTURES ErrMsg = "Storage to process this request is not available." Case ERROR_OUTOFMEMORY ErrMsg = "Not enough storage is available to complete this operation." Case ERROR_PAGED_SYSTEM_RESOURCES '1452L ErrMsg = "Insufficient system resources exist to complete the requested service." Case ERROR_PAGEFILE_QUOTA '1454L ErrMsg = "Insufficient quota to complete the requested service." Case ERROR_PARTIAL_COPY '299L ErrMsg = "Only part of a Read/WriteProcessMemory request was completed." Case ERROR_PARTITION_FAILURE ErrMsg = "Tape could not be partitioned." Case ERROR_PASSWORD_EXPIRED ErrMsg = "The user account’s password has expired." Case ERROR_PASSWORD_MUST_CHANGE '1907 ErrMsg = "The user must change his password before he logs on the first time." Case ERROR_PASSWORD_RESTRICTION ErrMsg = "When trying to update a password, this status indicates that some password update rule was violated. For example, the password may not meet length criteria." Case ERROR_PATH_BUSY ErrMsg = "The specified path cannot be used at this time." Case ERROR_PATH_NOT_FOUND ErrMsg = "The system cannot find the specified path." Case ERROR_PIPE_BUSY ErrMsg = "All pipe instances busy." Case ERROR_PIPE_CONNECTED ErrMsg = "There is a process on other end of the pipe." Case ERROR_PIPE_LISTENING ErrMsg = "Waiting for a process to open the other end of the pipe." Case ERROR_PIPE_NOT_CONNECTED ErrMsg = "No process on other end of pipe." Case ERROR_POPUP_ALREADY_ACTIVE ErrMsg = "Pop-up menu already active." Case ERROR_PORT_UNREACHABLE '1234L ErrMsg = "No service is operating at the destination network endpoint on the remote system." Case ERROR_POSSIBLE_DEADLOCK ErrMsg = "A potential deadlock condition has been detected." Case ERROR_PRINT_CANCELLED ErrMsg = "File waiting to be printed was deleted." Case ERROR_PRINT_MONITOR_ALREADY_INSTALLED ErrMsg = "The specified print monitor has already been installed." Case ERROR_PRINT_MONITOR_IN_USE '3008L ErrMsg = "The specified print monitor is currently in use." Case ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED ErrMsg = "The specified print processor has already been installed." Case ERROR_PRINTER_ALREADY_EXISTS ErrMsg = "The printer already exists." Case ERROR_PRINTER_DELETED ErrMsg = "The specified Printer has been deleted" Case ERROR_PRINTER_DRIVER_ALREADY_INSTALLED ErrMsg = "The specified printer driver is already installed." Case ERROR_PRINTER_DRIVER_IN_USE ErrMsg = "The specified printer driver is currently in use." Case ERROR_PRINTER_HAS_JOBS_QUEUED '3009 ErrMsg = "The requested operation is not allowed when there are jobs queued to the printer." Case ERROR_PRINTQ_FULL ErrMsg = "The printer queue is full." Case ERROR_PRIVATE_DIALOG_INDEX ErrMsg = "Using private DIALOG window words." Case ERROR_PRIVILEGE_NOT_HELD ErrMsg = "A required privilege is not held by the client." Case ERROR_PROC_NOT_FOUND ErrMsg = "The specified procedure could not be found." Case ERROR_PROCESS_ABORTED ErrMsg = "The process terminated unexpectedly." Case ERROR_PROTOCOL_UNREACHABLE '1233L ErrMsg = "The remote system does not support the transport protocol." Case ERROR_READ_FAULT ErrMsg = "The system cannot read from the specified device." Case ERROR_REC_NON_EXISTENT ErrMsg = "The name does not exist in the WINS database." Case ERROR_REDIR_PAUSED ErrMsg = "The specified printer or disk device has been paused." Case ERROR_REDIRECTOR_HAS_OPEN_HANDLES ErrMsg = "The redirector is in use and cannot be unloaded." Case ERROR_REGISTRY_CORRUPT ErrMsg = "The registry is damaged. The structure of one of the files that contains registry data is damaged, or the system’s in memory image of the file is damaged, or the file could not be recovered because its alternate copy or log was absent or damaged." Case ERROR_REGISTRY_IO_FAILED ErrMsg = "The registry initiated an I/O operation that had an unrecoverable failure. The registry could not read in, or write out, or flush, one of the files that contain the system’s image of the registry." Case ERROR_REGISTRY_RECOVERED ErrMsg = "One of the files containing the system’s registry data had to be recovered by use of a log or alternate copy. The recovery succeeded." Case ERROR_RELOC_CHAIN_XEEDS_SEGLIM ErrMsg = "The operating system cannot run this." Case ERROR_REM_NOT_LIST ErrMsg = "The remote computer is not available." Case ERROR_REMOTE_SESSION_LIMIT_EXCEEDED ErrMsg = "An attempt was made to establish a session to a LAN Manager server, but there are already too many sessions established to that server." Case ERROR_REQ_NOT_ACCEP ErrMsg = "The network request was not accepted." Case ERROR_REQUEST_ABORTED '1235L ErrMsg = "The request was aborted." Case ERROR_RESOURCE_DATA_NOT_FOUND ErrMsg = "The specified image file did not contain a resource section." Case ERROR_RESOURCE_LANG_NOT_FOUND ErrMsg = "The specified resource language ID cannot be found in the image file." Case ERROR_RESOURCE_NAME_NOT_FOUND ErrMsg = "The specified resource name can not be found in the image file." Case ERROR_RESOURCE_TYPE_NOT_FOUND ErrMsg = "The specified resource type can not be found in the image file." Case ERROR_RETRY '1237L ErrMsg = "The operation could not be completed. A retry should be performed." Case ERROR_REVISION_MISMATCH ErrMsg = "Indicates two revision levels are incompatible." Case ERROR_RING2_STACK_IN_USE ErrMsg = "The ring 2 stack is in use." Case ERROR_RING2SEG_MUST_BE_MOVABLE ErrMsg = "The code segment cannot be greater than or equal to 64KB." Case ERROR_RMODE_APP '1153L ErrMsg = "The specified program was written for an older version of Windows." Case ERROR_RPL_NOT_ALLOWED ErrMsg = "Replication with a non-configured partner is not allowed." Case ERROR_RXACT_COMMIT_FAILURE ErrMsg = "Indicates an error occurred during a registry transaction commit. The database has been left in an unknown state. The state of the registry transaction is left as COMMITTING. This status value is returned by the runtime library (RTL) registry transaction package (RXact)." Case ERROR_RXACT_INVALID_STATE ErrMsg = "Indicates that the transaction state of a registry sub-tree is incompatible with the requested operation. For example, a request has been made to start a new transaction with one already in progress, or a request to apply a transaction when one is not currently in progress. This status value is returned by the runtime library (RTL) registry transaction package (RXact)." Case ERROR_SAME_DRIVE ErrMsg = "The system cannot join or substitute a drive to or for a directory on the same drive." Case ERROR_SCREEN_ALREADY_LOCKED ErrMsg = "Screen already locked." Case ERROR_SECRET_TOO_LONG ErrMsg = "The length of a secret exceeds the maximum length allowed. The length and number of secrets is limited to satisfy the United States State Department export restrictions." Case ERROR_SECTOR_NOT_FOUND ErrMsg = "The drive cannot find the requested sector." Case ERROR_SEEK ErrMsg = "The drive cannot locate a specific area or track on the disk." Case ERROR_SEEK_ON_DEVICE ErrMsg = "The file pointer cannot be set on the specified device or file." Case ERROR_SEM_IS_SET ErrMsg = "The semaphore is set and cannot be closed." Case ERROR_SEM_NOT_FOUND ErrMsg = "The specified system semaphore name was not found." Case ERROR_SEM_OWNER_DIED ErrMsg = "The previous ownership of this semaphore has ended." Case ERROR_SEM_TIMEOUT ErrMsg = "The semaphore timeout period has expired." Case ERROR_SEM_USER_LIMIT ErrMsg = "Insert the disk for drive 1." Case ERROR_SERIAL_NO_DEVICE ErrMsg = "No serial device was successfully initialized. The serial driver will unload." Case ERROR_SERVER_DISABLED ErrMsg = "The GUID allocation server is already disabled at the moment." Case ERROR_SERVER_HAS_OPEN_HANDLES ErrMsg = "The server is in use and cannot be unloaded." Case ERROR_SERVER_NOT_DISABLED ErrMsg = "The GUID allocation server is already enabled at the moment." Case ERROR_SERVICE_ALREADY_RUNNING ErrMsg = "An instance of the service is already running." Case ERROR_SERVICE_CANNOT_ACCEPT_CTRL ErrMsg = "The service cannot accept control messages at this time." Case ERROR_SERVICE_DATABASE_LOCKED ErrMsg = "The service database is locked." Case ERROR_SERVICE_DEPENDENCY_DELETED ErrMsg = "The dependency service does not exist or has been marked for deletion." Case ERROR_SERVICE_DEPENDENCY_FAIL ErrMsg = "The dependency service or group failed to start." Case ERROR_SERVICE_DISABLED ErrMsg = "The specified service is disabled and cannot be started." Case ERROR_SERVICE_DOES_NOT_EXIST ErrMsg = "The specified service does not exist as an installed service." Case ERROR_SERVICE_EXISTS ErrMsg = "The specified service already exists." Case ERROR_SERVICE_LOGON_FAILED ErrMsg = "The service did not start due to a logon failure." Case ERROR_SERVICE_MARKED_FOR_DELETE ErrMsg = "The specified service has been marked for deletion." Case ERROR_SERVICE_NEVER_STARTED ErrMsg = "No attempts to start the service have been made since the last boot." Case ERROR_SERVICE_NO_THREAD ErrMsg = "A thread could not be created for the service." Case ERROR_SERVICE_NOT_ACTIVE ErrMsg = "The service has not been started." Case ERROR_SERVICE_NOT_FOUND '1243L ErrMsg = "The specified service does not exist." Case ERROR_SERVICE_REQUEST_TIMEOUT ErrMsg = "The service did not respond to the start or control request in a timely fashion." Case ERROR_SERVICE_SPECIFIC_ERROR ErrMsg = "The service has returned a service-specific error code." Case ERROR_SERVICE_START_HANG ErrMsg = "After starting, the service hung in a start-pending state." Case ERROR_SESSION_CREDENTIAL_CONFLICT ErrMsg = "The credentials supplied conflict with an existing set of credentials." Case ERROR_SET_POWER_STATE_FAILED '1141L ErrMsg = "The system BIOS failed an attempt to change the system power state." Case ERROR_SET_POWER_STATE_VETOED '1140L ErrMsg = "An attempt to change the system power state was vetoed by another application or driver." Case ERROR_SETCOUNT_ON_BAD_LB ErrMsg = "LB_SETCOUNT sent to non-lazy list box." Case ERROR_SETMARK_DETECTED ErrMsg = "A tape access reached a setmark." Case ERROR_SHARING_BUFFER_EXCEEDED ErrMsg = "Too many files opened for sharing." Case ERROR_SHARING_PAUSED ErrMsg = "The remote server is paused or is in the process of being started." Case ERROR_SHARING_VIOLATION ErrMsg = "The process cannot access the file because it is being used by another process." Case ERROR_SHUTDOWN_IN_PROGRESS ErrMsg = "A system shutdown is in progress." Case ERROR_SIGNAL_PENDING ErrMsg = "A signal is already pending." Case ERROR_SIGNAL_REFUSED ErrMsg = "The recipient process has refused the signal." Case ERROR_SINGLE_INSTANCE_APP '1152L ErrMsg = "Cannot start more than one instance of the specified program." Case ERROR_SOME_NOT_MAPPED ErrMsg = "Some of the information to be mapped has not been translated." Case ERROR_SPECIAL_ACCOUNT ErrMsg = "Indicates an operation was attempted on a built-in (special) SAM account that is incompatible with built-in accounts. For example, built-in accounts cannot be renamed or deleted." Case ERROR_SPECIAL_GROUP ErrMsg = "The requested operation cannot be performed on the specified group because it is a built-in special group." Case ERROR_SPECIAL_USER ErrMsg = "The requested operation cannot be performed on the specified user because it is a built-in special user." Case ERROR_SPL_NO_ADDJOB ErrMsg = "An AddJob call was not issued." Case ERROR_SPL_NO_STARTDOC ErrMsg = "A StartDocPrinter call was not issued." Case ERROR_SPOOL_FILE_NOT_FOUND ErrMsg = "The spool file was not found." Case ERROR_STACK_OVERFLOW ErrMsg = "Recursion too deep, stack overflowed." Case ERROR_STATIC_INIT ErrMsg = "The importation from the file failed." Case ERROR_SUBST_TO_JOIN ErrMsg = "The system attempted to SUBST a drive to a directory on a joined drive." Case ERROR_SUBST_TO_SUBST ErrMsg = "The system attempted to substitute a drive to a directory on a substituted drive." Case ERROR_SUCCESS ErrMsg = "The operation was successfully completed." Case ERROR_SUCCESS_REBOOT_REQUIRED '3010L ErrMsg = "The requested operation is successful. Changes will not be effective until the system is rebooted." Case ERROR_SUCCESS_RESTART_REQUIRED '3011L ErrMsg = "The requested operation is successful. Changes will not be effective until the service is restarted." Case ERROR_SWAPERROR ErrMsg = "Error accessing paging file." Case ERROR_SYSTEM_TRACE ErrMsg = "System trace information not specified in your CONFIG.SYS file, or tracing is not allowed." Case ERROR_TRANSFORM_NOT_SUPPORTED ErrMsg = "The requested transformation operation is not supported." Case ERROR_THREAD_1_INACTIVE ErrMsg = "The signal handler cannot be set." Case ERROR_TLW_WITH_WSCHILD ErrMsg = "CreateWindow failed, creating top-level window with WS_CHILD style." Case ERROR_TOKEN_ALREADY_IN_USE ErrMsg = "An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time." Case ERROR_TOO_MANY_CMDS ErrMsg = "The network BIOS command limit has been reached." Case ERROR_TOO_MANY_CONTEXT_IDS ErrMsg = "During a logon attempt, the user’s security context accumulated too many security IDs. Remove the user from some groups or aliases to reduce the number of security ids to incorporate into the security context." Case ERROR_TOO_MANY_LINKS '1142L ErrMsg = "An attempt was made to create more links on a file than the file system supports." Case ERROR_TOO_MANY_LUIDS_REQUESTED ErrMsg = "The number of LUID requested cannot be allocated with a single allocation." Case ERROR_TOO_MANY_MODULES ErrMsg = "Too many dynamic link modules are attached to this program or dynamic link module." Case ERROR_TOO_MANY_MUXWAITERS ErrMsg = "Too many semaphores are already set." Case ERROR_TOO_MANY_NAMES ErrMsg = "The name limit for the local computer network adapter card exceeded." Case ERROR_TOO_MANY_OPEN_FILES ErrMsg = "The system cannot open the file." Case ERROR_TOO_MANY_POSTS ErrMsg = "Too many posts made to a semaphore." Case ERROR_TOO_MANY_SECRETS ErrMsg = "The maximum number of secrets that can be stored in a single system was exceeded. The length and number of secrets is limited to satisfy the United States State Department export restrictions." Case ERROR_TOO_MANY_SEM_REQUESTS ErrMsg = "The semaphore cannot be set again." Case ERROR_TOO_MANY_SEMAPHORES ErrMsg = "Cannot create another system semaphore." Case ERROR_TOO_MANY_SESS ErrMsg = "The network BIOS session limit exceeded." Case ERROR_TOO_MANY_SIDS ErrMsg = "Too many SIDs specified." Case ERROR_TOO_MANY_TCBS ErrMsg = "Cannot create another thread." Case ERROR_TRUST_FAILURE ErrMsg = "The network logon failed." Case ERROR_TRUSTED_DOMAIN_FAILURE ErrMsg = "The trust relationship between the primary domain and the trusted domain failed." Case ERROR_TRUSTED_RELATIONSHIP_FAILURE ErrMsg = "The trust relationship between this workstation and the primary domain failed." Case ERROR_UNABLE_TO_LOCK_MEDIA ErrMsg = "Attempt to lock the eject media mechanism failed." Case ERROR_UNABLE_TO_UNLOAD_MEDIA ErrMsg = "Unload media failed." Case ERROR_UNEXP_NET_ERR ErrMsg = "An unexpected network error occurred." Case ERROR_UNKNOWN_PORT ErrMsg = "The specified port is unknown." Case ERROR_UNKNOWN_PRINT_MONITOR ErrMsg = "The specified print monitor is unknown." Case ERROR_UNKNOWN_PRINTPROCESSOR ErrMsg = "The print processor is unknown." Case ERROR_UNKNOWN_PRINTER_DRIVER ErrMsg = "The printer driver is unknown." Case ERROR_UNKNOWN_REVISION ErrMsg = "Indicates an encountered or specified revision number is not one known by the service. The service may not be aware of a more recent revision." Case ERROR_UNRECOGNIZED_MEDIA ErrMsg = "The disk media is not recognized. It may not be formatted." Case ERROR_UNRECOGNIZED_VOLUME ErrMsg = "The volume does not contain a recognized file system. Make sure that all required file system drivers are loaded and the volume is not damaged." Case ERROR_USER_EXISTS ErrMsg = "The specified user already exists." Case ERROR_USER_MAPPED_FILE '1224L ErrMsg = "The requested operation cannot be performed on a file with a user mapped section open." Case ERROR_VC_DISCONNECTED ErrMsg = "The session was canceled." Case ERROR_WAIT_NO_CHILDREN ErrMsg = "There are no child processes to wait for." Case ERROR_WINDOW_NOT_COMBOBOX ErrMsg = "The window is not a combo box." Case ERROR_WINDOW_NOT_DIALOG ErrMsg = "The window is not a valid dialog window." Case ERROR_WINDOW_OF_OTHER_THREAD ErrMsg = "Invalid window, belongs to other thread." Case ERROR_WINS_INTERNAL ErrMsg = "WINS encountered an error while processing the command." Case ERROR_WORKING_SET_QUOTA '1453L ErrMsg = "Insufficient quota to complete the requested service." Case ERROR_WRITE_FAULT ErrMsg = "The system cannot write to the specified device." Case ERROR_WRITE_PROTECT ErrMsg = "The media is write protected." Case ERROR_WRONG_DISK ErrMsg = "The wrong disk is in the drive." Case ERROR_WRONG_PASSWORD ErrMsg = "When trying to update a password, this return status indicates the value provided as the current password is incorrect." Case LZERROR_BADINHANDLE ErrMsg = "Invalid input handle." Case LZERROR_BADOUTHANDLE ErrMsg = "Invalid output handle." Case LZERROR_BADVALUE ErrMsg = "Input parameter out of acceptable range." Case LZERROR_GLOBALLOC '-5 ErrMsg = "Insufficient memory for LZFile structure." Case LZERROR_GLOBLOCK ErrMsg = "Bad global handle." Case LZERROR_READ ErrMsg = "Corrupt compressed file format." Case LZERROR_WRITE ErrMsg = "Out of space for output file." Case LZERROR_UNKNOWNALG ErrMsg = "Compression algorithm not recognized." Case OR_INVALID_OID '1911L ErrMsg = "The object specified was not found." Case RPC_S_ADDRESS_ERROR ErrMsg = "An addressing error occurred in the server." Case RPC_S_ALREADY_LISTENING ErrMsg = "The server is already listening." Case RPC_S_ALREADY_REGISTERED ErrMsg = "The object UUID already registered." Case RPC_S_BINDING_HAS_NO_AUTH ErrMsg = "The binding does not contain any authentication information." Case RPC_S_BINDING_INCOMPLETE '1819L ErrMsg = "The binding handle does not contain all required information." Case RPC_S_CALL_CANCELLED '1818L ErrMsg = "The server was altered while processing this call." Case RPC_S_CALL_FAILED ErrMsg = "The remote procedure call failed." Case RPC_S_CALL_FAILED_DNE ErrMsg = "The remote procedure call failed and did not execute." Case RPC_S_CALL_IN_PROGRESS ErrMsg = "A remote procedure call is already in progress for this thread." Case RPC_S_CANNOT_SUPPORT ErrMsg = "The requested operation is not supported." Case RPC_S_CANT_CREATE_ENDPOINT ErrMsg = "The endpoint cannot be created." Case RPC_S_COMM_FAILURE '1820L ErrMsg = "Communications failure." Case RPC_S_DUPLICATE_ENDPOINT ErrMsg = "The endpoint is a duplicate." Case RPC_S_ENTRY_ALREADY_EXISTS ErrMsg = "The entry already exists." Case RPC_S_ENTRY_NOT_FOUND ErrMsg = "The entry is not found." Case RPC_S_FP_DIV_ZERO ErrMsg = "A floating point operation at the server caused a divide by zero." Case RPC_S_FP_OVERFLOW ErrMsg = "A floating point overflow occurred at the server." Case RPC_S_FP_UNDERFLOW ErrMsg = "A floating point underflow occurred at the server." Case RPC_S_GROUP_MEMBER_NOT_FOUND ErrMsg = "The group member was not found." Case RPC_S_INCOMPLETE_NAME ErrMsg = "The entry name is incomplete." Case RPC_S_INTERFACE_NOT_FOUND ErrMsg = "The interface was not found." Case RPC_S_INTERNAL_ERROR ErrMsg = "An internal error occurred in RPC." Case RPC_S_INVALID_AUTH_IDENTITY ErrMsg = "The security context is invalid." Case RPC_S_INVALID_BINDING ErrMsg = "The binding handle is invalid." Case RPC_S_INVALID_BOUND ErrMsg = "The array bounds are invalid." Case RPC_S_INVALID_ENDPOINT_FORMAT ErrMsg = "The endpoint format is invalid." Case RPC_S_INVALID_NAME_SYNTAX ErrMsg = "The name syntax is invalid." Case RPC_S_INVALID_NET_ADDR ErrMsg = "The network address is invalid." Case RPC_S_INVALID_NETWORK_OPTIONS ErrMsg = "The network options are invalid." Case RPC_S_INVALID_OBJECT ErrMsg = "The object universal unique identifier (UUID) is the nil UUID." Case RPC_S_INVALID_RPC_PROTSEQ ErrMsg = "The RPC protocol sequence is invalid." Case RPC_S_INVALID_STRING_BINDING ErrMsg = "The string binding is invalid." Case RPC_S_INVALID_STRING_UUID ErrMsg = "The string UUID is invalid." Case RPC_S_INVALID_TAG ErrMsg = "The tag is invalid." Case RPC_S_INVALID_TIMEOUT ErrMsg = "The timeout value is invalid." Case RPC_S_INVALID_VERS_OPTION ErrMsg = "The version option is invalid." Case RPC_S_MAX_CALLS_TOO_SMALL ErrMsg = "The maximum number of calls is too small." Case RPC_S_NAME_SERVICE_UNAVAILABLE ErrMsg = "The name service is unavailable." Case RPC_S_NO_BINDINGS ErrMsg = "There are no bindings." Case RPC_S_NO_CALL_ACTIVE ErrMsg = "There is not a remote procedure call active in this thread." Case RPC_S_NO_CONTEXT_AVAILABLE ErrMsg = "No security context is available to allow impersonation." Case RPC_S_NO_ENDPOINT_FOUND ErrMsg = "No endpoint was found." Case RPC_S_NO_ENTRY_NAME ErrMsg = "The binding does not contain an entry name." Case RPC_S_NO_MORE_BINDINGS ErrMsg = "There are no more bindings." Case RPC_S_NO_MORE_MEMBERS ErrMsg = "There are no more members." Case RPC_S_NO_PRINC_NAME '1822L ErrMsg = "No principal name registered." Case RPC_S_NO_PROTSEQS ErrMsg = "There are no protocol sequences." Case RPC_S_NO_PROTSEQS_REGISTERED ErrMsg = "No protocol sequences were registered." Case RPC_S_NOT_LISTENING ErrMsg = "The server is not listening." Case RPC_S_NOT_ALL_OBJS_UNEXPORTED ErrMsg = "There is nothing to unexport." Case RPC_S_NOT_CANCELLED '1826L ErrMsg = "Thread is not cancelled." Case RPC_S_NOT_RPC_ERROR '1823L ErrMsg = "The error specified is not a valid Windows RPC error code." Case RPC_S_OBJECT_NOT_FOUND ErrMsg = "The object UUID was not found." Case RPC_S_OUT_OF_RESOURCES ErrMsg = "Not enough resources are available to complete this operation." Case RPC_S_PROCNUM_OUT_OF_RANGE ErrMsg = "The procedure number is out of range." Case RPC_S_PROTOCOL_ERROR ErrMsg = "An RPC protocol error occurred." Case RPC_S_PROTSEQ_NOT_FOUND ErrMsg = "The RPC protocol sequence was not found." Case RPC_S_PROTSEQ_NOT_SUPPORTED ErrMsg = "The RPC protocol sequence is not supported." Case RPC_S_SEC_PKG_ERROR '1825L ErrMsg = "A security package specific error occurred." Case RPC_S_SEND_INCOMPLETE '1913L ErrMsg = "Some data remains to be sent in the request buffer." Case RPC_S_SERVER_OUT_OF_MEMORY '1130L ErrMsg = "The server has insufficient memory to complete this operation." Case RPC_S_SERVER_TOO_BUSY ErrMsg = "The server is too busy to complete this operation." Case RPC_S_SERVER_UNAVAILABLE ErrMsg = "The server is unavailable." Case RPC_S_STRING_TOO_LONG ErrMsg = "The string is too long." Case RPC_S_TYPE_ALREADY_REGISTERED ErrMsg = "The type UUID is already registered." Case RPC_S_UNKNOWN_AUTHN_LEVEL ErrMsg = "The authentication level is unknown." Case RPC_S_UNKNOWN_AUTHN_SERVICE ErrMsg = "The authentication service is unknown." Case RPC_S_UNKNOWN_AUTHN_TYPE ErrMsg = "The authentication type is unknown." Case RPC_S_UNKNOWN_AUTHZ_SERVICE ErrMsg = "The authorization service is unknown." Case RPC_S_UNKNOWN_IF ErrMsg = "The interface is unknown." Case RPC_S_UNKNOWN_MGR_TYPE ErrMsg = "The manager type is unknown." Case RPC_S_UNSUPPORTED_AUTHN_LEVEL '1821L ErrMsg = "The requested authentication level is not supported." Case RPC_S_UNSUPPORTED_NAME_SYNTAX ErrMsg = "The name syntax is not supported." Case RPC_S_UNSUPPORTED_TRANS_SYN ErrMsg = "The transfer syntax is not supported by the server." Case RPC_S_UNSUPPORTED_TYPE ErrMsg = "The type UUID is not supported." Case RPC_S_UUID_LOCAL_ONLY '1824L ErrMsg = "A UUID that is valid only on this computer has been allocated." Case RPC_S_UUID_NO_ADDRESS ErrMsg = "No network address is available to use to construct a UUID." Case RPC_S_WRONG_KIND_OF_BINDING ErrMsg = "The binding handle is the incorrect type." Case RPC_S_ZERO_DIVIDE ErrMsg = "The server attempted an integer divide by zero." Case RPC_X_BAD_STUB_DATA ErrMsg = "The stub received bad data." Case RPC_X_BYTE_COUNT_TOO_SMALL ErrMsg = "The byte count is too small." Case RPC_X_ENUM_VALUE_OUT_OF_RANGE ErrMsg = "The enumeration value is out of range." Case RPC_X_INVALID_ES_ACTION '1827L ErrMsg = "Invalid operation on the encoding/decoding handle." Case RPC_X_INVALID_PIPE_OBJECT '1830L ErrMsg = "The idl pipe object is invalid or corrupted." Case RPC_X_INVALID_PIPE_OPERATION '1831L ErrMsg = "The operation is invalid for a given idl pipe object." Case RPC_X_NO_MORE_ENTRIES ErrMsg = "The list of servers available for auto_handle binding was exhausted." Case RPC_X_NULL_REF_POINTER ErrMsg = "A null reference pointer was passed to the stub." Case RPC_X_SS_CANNOT_GET_CALL_HANDLE ErrMsg = "The stub is unable to get the call handle." Case RPC_X_SS_CHAR_TRANS_OPEN_FAIL ErrMsg = "The file designated by DCERPCCHARTRANS cannot be opened." Case RPC_X_SS_CHAR_TRANS_SHORT_FILE ErrMsg = "The file containing the character translation table has fewer than 512 bytes." Case RPC_X_SS_CONTEXT_DAMAGED ErrMsg = "The context handle changed during a call." Case RPC_X_SS_CONTEXT_MISMATCH '6L ErrMsg = "The context handle does not match any known context handles." Case RPC_X_SS_HANDLES_MISMATCH ErrMsg = "The binding handles passed to a remote procedure call do not match." Case RPC_X_SS_IN_NULL_CONTEXT ErrMsg = "A null context handle is passed as an [in] parameter." Case RPC_X_WRONG_ES_VERSION '1828L ErrMsg = "Incompatible version of the serializing package." Case RPC_X_WRONG_PIPE_VERSION '1832L ErrMsg = "The idl pipe version is not supported." Case RPC_X_WRONG_STUB_VERSION '1829L ErrMsg = "Incompatible version of the RPC stub." Case Else ErrMsg = "Unknown Error" End Select ' Display the error message MsgBox "An error occured while calling the " & LastAPICalled & " Windows API function." & Chr(13) & "Below is the error information:" & Chr(13) & Chr(13) & "Error Number = " & CStr(ErrorNumber) & Chr(13) & "Error Description = " & ErrMsg, vbOKOnly + vbExclamation, " Windows API Error" ' Set the last error to 0 (no error) so next time through it doesn't report the same error twice SetLastError NO_ERROR ' Return that an error occured GetLastError_Msg = True End Function