C.2 OS error codes
The following table lists the error codes set by Windows. This information is provided for reference only; the contents are not guaranteed because the values may differ depending on the OS.
|
Error code |
Error description |
|---|---|
|
-004 |
The memory space for output files is insufficient. |
|
-006 |
A global handle is incorrect. |
|
0001 |
A function is incorrect. |
|
0002 |
The system cannot find a specified file. |
|
0003 |
The system cannot find a specified network name or directory path. |
|
0004 |
A file cannot be opened. |
|
0005 |
Access was denied. Recheck file attributes or security. |
|
0006 |
A handle is invalid. |
|
0007 |
A storage control block has been destroyed. |
|
0008 |
There is insufficient storage to execute this command. |
|
0009 |
The address of a storage control block is invalid. |
|
0010 |
The environment is incorrect. |
|
0011 |
A program with an incorrect format was read. |
|
0012 |
An access code is invalid. |
|
0013 |
Data is invalid. |
|
0014 |
There is insufficient storage to complete this operation. |
|
0015 |
A specified drive cannot be found. |
|
0016 |
A directory cannot be deleted. |
|
0017 |
A file cannot be moved to another directory. |
|
0018 |
There is no higher file. |
|
0019 |
A medium is write-protected. |
|
0020 |
A specified device cannot be found. |
|
0021 |
A device is not ready. |
|
0022 |
A device cannot recognize the command. |
|
0023 |
A data error (cyclic redundancy check (CRC) error) was detected. |
|
0024 |
The program issued a command, but the command length is incorrect. |
|
0025 |
A specified disk area or track cannot be found. |
|
0026 |
A specified disk or floppy disk cannot be accessed. |
|
0027 |
A requested sector cannot be found. |
|
0029 |
Cannot write to a specified device. |
|
0030 |
Cannot read from a specified device. |
|
0031 |
A device connected to the system is not functioning. |
|
0032 |
A process cannot access a file because another process is using the file. |
|
0033 |
A process cannot access a file because another process has locked part of the file. |
|
0036 |
Too many shared files are open. |
|
0038 |
The end of a file was reached. |
|
0039 |
A disk is full. |
|
0050 |
Network requests are not supported. |
|
0051 |
A remote computer cannot be used. |
|
0052 |
The same name already exists in the network. |
|
0053 |
The network path cannot be found. |
|
0054 |
The network is busy. |
|
0055 |
A specified network resource or device cannot be used. |
|
0056 |
The network BIOS command reached the limit. |
|
0057 |
A hardware error occurred in the network adapter. |
|
0058 |
A specified server cannot execute the requested operation. |
|
0059 |
An unexpected network error occurred. |
|
0060 |
The remove adapter is not compatible. |
|
0064 |
The specified network name cannot be used. |
|
0065 |
Network access was rejected. |
|
0066 |
The network resource type is incorrect. |
|
0067 |
The network name cannot be found. |
|
0068 |
The number of names for network adapter cards in the local computer exceeded the limit. |
|
0069 |
The number of network BIOS sessions exceeded the limit. |
|
0070 |
The remote server is temporarily stopped or is being started. |
|
0071 |
Another remote computer cannot be connected because the maximum number of connections to computers has been reached. |
|
0072 |
A specified printer or disk device has stopped temporarily. |
|
0080 |
A file already exists. |
|
0082 |
A directory or file cannot be created. |
|
0084 |
There is insufficient storage to process this request. |
|
0085 |
A local device name is already being used. |
|
0086 |
The specified network password is incorrect. |
|
0087 |
A parameter is incorrect. |
|
0088 |
A write error occurred in the network. |
|
0089 |
Another process cannot be started at this time. |
|
0110 |
A specified device or file cannot be opened. |
|
0111 |
A file name is too long. |
|
0112 |
A disk does not have enough free space. |
|
0123 |
The syntax of a file name, directory name, or volume name is incorrect. |
|
0144 |
A directory is not a subdirectory of the root directory. |
|
0145 |
A directory is not empty. |
|
0148 |
A specified path cannot be used at this time. |
|
0161 |
A specified path is invalid. |
|
0164 |
This system cannot create any more threads. |
|
0167 |
A file area cannot be locked. |
|
0170 |
A requested resource is being used. |
|
0183 |
A file that already exists cannot be created. |
|
0196 |
This application program cannot be executed on this operating system. |
|
0197 |
The current configuration of the operating system does not allow execution of this application program. |
|
0199 |
This application program cannot be executed on this operating system. |
|
0206 |
A file name or extension is too long. |
|
0230 |
A pipe status is disabled. |
|
0231 |
All pipe instances are busy. |
|
0232 |
A pipe is closed. |
|
0240 |
The session was canceled. |
|
0267 |
A directory name is invalid. |
|
1053 |
This service did not respond to the startup or control request within the specified time. |
|
1054 |
A thread cannot be created for the service. |
|
1056 |
A service instance is already being executed. |
|
1057 |
The account name is invalid or does not exist, or the password for the specified account name is invalid. |
|
1058 |
The specified service cannot be started because the service is invalid or is not associated with a valid device. |
|
1060 |
The specified service does not exist as an installed service. |
|
1062 |
This service cannot be started. |
|
1069 |
The service cannot be started because logon failed. |
|
1070 |
The service froze in start wait status after being started. |
|
1073 |
The specified service has already been started. |
|
1078 |
This name is already being used as a service name or a service display name. |
|
1114 |
Execution of the dynamic link library (DLL) initialization routine failed. |
|
1115 |
System shutdown is being executed. |
|
1117 |
The request cannot be executed because an I/O device error occurred. |
|
1123 |
The sector ID field of the floppy disk and the track address of the floppy disk controller track do not match. |
|
1124 |
The floppy disk controller reported an error in which the floppy disk driver is not recognized. |
|
1125 |
The floppy disk controller returned an inconsistent result to the register. |
|
1130 |
The server cannot allocate a storage area required for processing this command. |
|
1131 |
The possibility of a deadlock occurrence was detected. |
|
1176 |
The replacing file cannot be moved to the file to be replaced. The name of the file to be replaced remains the same. |
|
1177 |
The replacing file cannot be moved to the file to be replaced. The name of the file to be replaced has been changed to the backup name. |
|
1326 |
Logon failure: The user name cannot be recognized, or the password is incorrect. |
|
1327 |
Logon failure: User account restriction |
|
1328 |
Logon failure: Constraint violation of the account logon time |
|
1329 |
Logon failure: The user is not allowed to log on to this computer. |
|
1330 |
Logon failure: The effective period of the specified account and password has expired. |
|
1331 |
Logon failure: The account is currently disabled. |
|
1380 |
Logon failure: This computer does not allow users to use the requested type of logon. |
|
1385 |
Logon failure: This computer does not allow users to use the requested type of logon. |
|
1450 |
The requested service cannot be completed because of insufficient system resources. |
|
1451 |
The requested service cannot be completed because of insufficient system resources. |
|
1452 |
The requested service cannot be completed because of insufficient system resources. |
|
7006 |
A service with the same name already exists in the system. |
You can use the GetErrorMessage command to obtain the error contents of the return code that is set after command execution. An example is shown below:
Example
Dim ErrMsg Dim ErrCode ErrCode=21 ErrMsg=GetErrorMessage(ErrCode) Message(Target_File, _BIN_+"ErrMsg.txt", ErrMsg)