📄 winerror.pas
字号:
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ AccCtrl interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: winerror.h, released June 2000. }
{ The original Pascal code is: WinError.pas, released Dec 2000 }
{ The initial developer of the Pascal code is Marcel van Brakel }
{ (brakelm@bart.nl). }
{ }
{ Portions created by Marcel van Brakel are }
{ Copyright (C) 1999 Marcel van Brakel. }
{ }
{ Obtained through: }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "License"); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}
unit WinError;
{$WEAKPACKAGEUNIT}
{$HPPEMIT ''}
{$HPPEMIT '#include "WinError.h"'}
{$HPPEMIT ''}
{$I WINDEFINES.INC}
interface
uses
WinType;
const
APPLICATION_ERROR_MASK = $20000000;
{$EXTERNALSYM APPLICATION_ERROR_MASK}
ERROR_SEVERITY_SUCCESS = $00000000;
{$EXTERNALSYM ERROR_SEVERITY_SUCCESS}
ERROR_SEVERITY_INFORMATIONAL = $40000000;
{$EXTERNALSYM ERROR_SEVERITY_INFORMATIONAL}
ERROR_SEVERITY_WARNING = DWORD($80000000);
{$EXTERNALSYM ERROR_SEVERITY_WARNING}
ERROR_SEVERITY_ERROR = DWORD($C0000000);
{$EXTERNALSYM ERROR_SEVERITY_ERROR}
//
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
//
// Define the facility codes
//
const
FACILITY_WINDOWS = 8;
{$EXTERNALSYM FACILITY_WINDOWS}
FACILITY_URT = 19;
{$EXTERNALSYM FACILITY_URT}
FACILITY_STORAGE = 3;
{$EXTERNALSYM FACILITY_STORAGE}
FACILITY_SSPI = 9;
{$EXTERNALSYM FACILITY_SSPI}
FACILITY_SCARD = 16;
{$EXTERNALSYM FACILITY_SCARD}
FACILITY_SETUPAPI = 15;
{$EXTERNALSYM FACILITY_SETUPAPI}
FACILITY_SECURITY = 9;
{$EXTERNALSYM FACILITY_SECURITY}
FACILITY_RPC = 1;
{$EXTERNALSYM FACILITY_RPC}
FACILITY_WIN32 = 7;
{$EXTERNALSYM FACILITY_WIN32}
FACILITY_CONTROL = 10;
{$EXTERNALSYM FACILITY_CONTROL}
FACILITY_NULL = 0;
{$EXTERNALSYM FACILITY_NULL}
FACILITY_MSMQ = 14;
{$EXTERNALSYM FACILITY_MSMQ}
FACILITY_MEDIASERVER = 13;
{$EXTERNALSYM FACILITY_MEDIASERVER}
FACILITY_INTERNET = 12;
{$EXTERNALSYM FACILITY_INTERNET}
FACILITY_ITF = 4;
{$EXTERNALSYM FACILITY_ITF}
FACILITY_DISPATCH = 2;
{$EXTERNALSYM FACILITY_DISPATCH}
FACILITY_COMPLUS = 17;
{$EXTERNALSYM FACILITY_COMPLUS}
FACILITY_CERT = 11;
{$EXTERNALSYM FACILITY_CERT}
FACILITY_ACS = 20;
{$EXTERNALSYM FACILITY_ACS}
FACILITY_AAF = 18;
{$EXTERNALSYM FACILITY_AAF}
//
// Define the severity codes
//
//
// MessageId: ERROR_SUCCESS
//
// MessageText:
//
// The operation completed successfully.
//
ERROR_SUCCESS = 0;
{$EXTERNALSYM ERROR_SUCCESS}
NO_ERROR = 0; // dderror
{$EXTERNALSYM NO_ERROR}
SEC_E_OK = HRESULT($00000000);
{$EXTERNALSYM SEC_E_OK}
//
// MessageId: ERROR_INVALID_FUNCTION
//
// MessageText:
//
// Incorrect function.
//
ERROR_INVALID_FUNCTION = 1; // dderror
{$EXTERNALSYM ERROR_INVALID_FUNCTION}
//
// MessageId: ERROR_FILE_NOT_FOUND
//
// MessageText:
//
// The system cannot find the file specified.
//
ERROR_FILE_NOT_FOUND = 2;
{$EXTERNALSYM ERROR_FILE_NOT_FOUND}
//
// MessageId: ERROR_PATH_NOT_FOUND
//
// MessageText:
//
// The system cannot find the path specified.
//
ERROR_PATH_NOT_FOUND = 3;
{$EXTERNALSYM ERROR_PATH_NOT_FOUND}
//
// MessageId: ERROR_TOO_MANY_OPEN_FILES
//
// MessageText:
//
// The system cannot open the file.
//
ERROR_TOO_MANY_OPEN_FILES = 4;
{$EXTERNALSYM ERROR_TOO_MANY_OPEN_FILES}
//
// MessageId: ERROR_ACCESS_DENIED
//
// MessageText:
//
// Access is denied.
//
ERROR_ACCESS_DENIED = 5;
{$EXTERNALSYM ERROR_ACCESS_DENIED}
//
// MessageId: ERROR_INVALID_HANDLE
//
// MessageText:
//
// The handle is invalid.
//
ERROR_INVALID_HANDLE = 6;
{$EXTERNALSYM ERROR_INVALID_HANDLE}
//
// MessageId: ERROR_ARENA_TRASHED
//
// MessageText:
//
// The storage control blocks were destroyed.
//
ERROR_ARENA_TRASHED = 7;
{$EXTERNALSYM ERROR_ARENA_TRASHED}
//
// MessageId: ERROR_NOT_ENOUGH_MEMORY
//
// MessageText:
//
// Not enough storage is available to process this command.
//
ERROR_NOT_ENOUGH_MEMORY = 8; // dderror
{$EXTERNALSYM ERROR_NOT_ENOUGH_MEMORY}
//
// MessageId: ERROR_INVALID_BLOCK
//
// MessageText:
//
// The storage control block address is invalid.
//
ERROR_INVALID_BLOCK = 9;
{$EXTERNALSYM ERROR_INVALID_BLOCK}
//
// MessageId: ERROR_BAD_ENVIRONMENT
//
// MessageText:
//
// The environment is incorrect.
//
ERROR_BAD_ENVIRONMENT = 10;
{$EXTERNALSYM ERROR_BAD_ENVIRONMENT}
//
// MessageId: ERROR_BAD_FORMAT
//
// MessageText:
//
// An attempt was made to load a program with an incorrect format.
//
ERROR_BAD_FORMAT = 11;
{$EXTERNALSYM ERROR_BAD_FORMAT}
//
// MessageId: ERROR_INVALID_ACCESS
//
// MessageText:
//
// The access code is invalid.
//
ERROR_INVALID_ACCESS = 12;
{$EXTERNALSYM ERROR_INVALID_ACCESS}
//
// MessageId: ERROR_INVALID_DATA
//
// MessageText:
//
// The data is invalid.
//
ERROR_INVALID_DATA = 13;
{$EXTERNALSYM ERROR_INVALID_DATA}
//
// MessageId: ERROR_OUTOFMEMORY
//
// MessageText:
//
// Not enough storage is available to complete this operation.
//
ERROR_OUTOFMEMORY = 14;
{$EXTERNALSYM ERROR_OUTOFMEMORY}
//
// MessageId: ERROR_INVALID_DRIVE
//
// MessageText:
//
// The system cannot find the drive specified.
//
ERROR_INVALID_DRIVE = 15;
{$EXTERNALSYM ERROR_INVALID_DRIVE}
//
// MessageId: ERROR_CURRENT_DIRECTORY
//
// MessageText:
//
// The directory cannot be removed.
//
ERROR_CURRENT_DIRECTORY = 16;
{$EXTERNALSYM ERROR_CURRENT_DIRECTORY}
//
// MessageId: ERROR_NOT_SAME_DEVICE
//
// MessageText:
//
// The system cannot move the file to a different disk drive.
//
ERROR_NOT_SAME_DEVICE = 17;
{$EXTERNALSYM ERROR_NOT_SAME_DEVICE}
//
// MessageId: ERROR_NO_MORE_FILES
//
// MessageText:
//
// There are no more files.
//
ERROR_NO_MORE_FILES = 18;
{$EXTERNALSYM ERROR_NO_MORE_FILES}
//
// MessageId: ERROR_WRITE_PROTECT
//
// MessageText:
//
// The media is write protected.
//
ERROR_WRITE_PROTECT = 19;
{$EXTERNALSYM ERROR_WRITE_PROTECT}
//
// MessageId: ERROR_BAD_UNIT
//
// MessageText:
//
// The system cannot find the device specified.
//
ERROR_BAD_UNIT = 20;
{$EXTERNALSYM ERROR_BAD_UNIT}
//
// MessageId: ERROR_NOT_READY
//
// MessageText:
//
// The device is not ready.
//
ERROR_NOT_READY = 21;
{$EXTERNALSYM ERROR_NOT_READY}
//
// MessageId: ERROR_BAD_COMMAND
//
// MessageText:
//
// The device does not recognize the command.
//
ERROR_BAD_COMMAND = 22;
{$EXTERNALSYM ERROR_BAD_COMMAND}
//
// MessageId: ERROR_CRC
//
// MessageText:
//
// Data error (cyclic redundancy check).
//
ERROR_CRC = 23;
{$EXTERNALSYM ERROR_CRC}
//
// MessageId: ERROR_BAD_LENGTH
//
// MessageText:
//
// The program issued a command but the command length is incorrect.
//
ERROR_BAD_LENGTH = 24;
{$EXTERNALSYM ERROR_BAD_LENGTH}
//
// MessageId: ERROR_SEEK
//
// MessageText:
//
// The drive cannot locate a specific area or track on the disk.
//
ERROR_SEEK = 25;
{$EXTERNALSYM ERROR_SEEK}
//
// MessageId: ERROR_NOT_DOS_DISK
//
// MessageText:
//
// The specified disk or diskette cannot be accessed.
//
ERROR_NOT_DOS_DISK = 26;
{$EXTERNALSYM ERROR_NOT_DOS_DISK}
//
// MessageId: ERROR_SECTOR_NOT_FOUND
//
// MessageText:
//
// The drive cannot find the sector requested.
//
ERROR_SECTOR_NOT_FOUND = 27;
{$EXTERNALSYM ERROR_SECTOR_NOT_FOUND}
//
// MessageId: ERROR_OUT_OF_PAPER
//
// MessageText:
//
// The printer is out of paper.
//
ERROR_OUT_OF_PAPER = 28;
{$EXTERNALSYM ERROR_OUT_OF_PAPER}
//
// MessageId: ERROR_WRITE_FAULT
//
// MessageText:
//
// The system cannot write to the specified device.
//
ERROR_WRITE_FAULT = 29;
{$EXTERNALSYM ERROR_WRITE_FAULT}
//
// MessageId: ERROR_READ_FAULT
//
// MessageText:
//
// The system cannot read from the specified device.
//
ERROR_READ_FAULT = 30;
{$EXTERNALSYM ERROR_READ_FAULT}
//
// MessageId: ERROR_GEN_FAILURE
//
// MessageText:
//
// A device attached to the system is not functioning.
//
ERROR_GEN_FAILURE = 31;
{$EXTERNALSYM ERROR_GEN_FAILURE}
//
// MessageId: ERROR_SHARING_VIOLATION
//
// MessageText:
//
// The process cannot access the file because it is being used by another process.
//
ERROR_SHARING_VIOLATION = 32;
{$EXTERNALSYM ERROR_SHARING_VIOLATION}
//
// MessageId: ERROR_LOCK_VIOLATION
//
// MessageText:
//
// The process cannot access the file because another process has locked a portion of the file.
//
ERROR_LOCK_VIOLATION = 33;
{$EXTERNALSYM ERROR_LOCK_VIOLATION}
//
// MessageId: ERROR_WRONG_DISK
//
// MessageText:
//
// The wrong diskette is in the drive.
// Insert %2 (Volume Serial Number: %3)
// into drive %1.
//
ERROR_WRONG_DISK = 34;
{$EXTERNALSYM ERROR_WRONG_DISK}
//
// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
//
// MessageText:
//
// Too many files opened for sharing.
//
ERROR_SHARING_BUFFER_EXCEEDED = 36;
{$EXTERNALSYM ERROR_SHARING_BUFFER_EXCEEDED}
//
// MessageId: ERROR_HANDLE_EOF
//
// MessageText:
//
// Reached the end of the file.
//
ERROR_HANDLE_EOF = 38;
{$EXTERNALSYM ERROR_HANDLE_EOF}
//
// MessageId: ERROR_HANDLE_DISK_FULL
//
// MessageText:
//
// The disk is full.
//
ERROR_HANDLE_DISK_FULL = 39;
{$EXTERNALSYM ERROR_HANDLE_DISK_FULL}
//
// MessageId: ERROR_NOT_SUPPORTED
//
// MessageText:
//
// The network request is not supported.
//
ERROR_NOT_SUPPORTED = 50;
{$EXTERNALSYM ERROR_NOT_SUPPORTED}
//
// MessageId: ERROR_REM_NOT_LIST
//
// MessageText:
//
// The remote computer is not available.
//
ERROR_REM_NOT_LIST = 51;
{$EXTERNALSYM ERROR_REM_NOT_LIST}
//
// MessageId: ERROR_DUP_NAME
//
// MessageText:
//
// A duplicate name exists on the network.
//
ERROR_DUP_NAME = 52;
{$EXTERNALSYM ERROR_DUP_NAME}
//
// MessageId: ERROR_BAD_NETPATH
//
// MessageText:
//
// The network path was not found.
//
ERROR_BAD_NETPATH = 53;
{$EXTERNALSYM ERROR_BAD_NETPATH}
//
// MessageId: ERROR_NETWORK_BUSY
//
// MessageText:
//
// The network is busy.
//
ERROR_NETWORK_BUSY = 54;
{$EXTERNALSYM ERROR_NETWORK_BUSY}
//
// MessageId: ERROR_DEV_NOT_EXIST
//
// MessageText:
//
// The specified network resource or device is no longer available.
//
ERROR_DEV_NOT_EXIST = 55; // dderror
{$EXTERNALSYM ERROR_DEV_NOT_EXIST}
//
// MessageId: ERROR_TOO_MANY_CMDS
//
// MessageText:
//
// The network BIOS command limit has been reached.
//
ERROR_TOO_MANY_CMDS = 56;
{$EXTERNALSYM ERROR_TOO_MANY_CMDS}
//
// MessageId: ERROR_ADAP_HDW_ERR
//
// MessageText:
//
// A network adapter hardware error occurred.
//
ERROR_ADAP_HDW_ERR = 57;
{$EXTERNALSYM ERROR_ADAP_HDW_ERR}
//
// MessageId: ERROR_BAD_NET_RESP
//
// MessageText:
//
// The specified server cannot perform the requested operation.
//
ERROR_BAD_NET_RESP = 58;
{$EXTERNALSYM ERROR_BAD_NET_RESP}
//
// MessageId: ERROR_UNEXP_NET_ERR
//
// MessageText:
//
// An unexpected network error occurred.
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -