📄 jwawinerror.pas
字号:
{******************************************************************************}
{ }
{ Windows Error Codes API interface Unit for Object Pascal }
{ }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
{ Corporation. All Rights Reserved. }
{ }
{ The original file is: winerror.h, released June 2000. The original Pascal }
{ code is: WinError.pas, released December 2000. The initial developer of the }
{ Pascal code is Marcel van Brakel (brakelm@chello.nl). }
{ }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
{ Marcel van Brakel. All Rights Reserved. }
{ }
{ 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 or my personal homepage located at }
{ http://members.chello.nl/m.vanbrakel2 }
{ }
{ 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. }
{ }
{ Alternatively, the contents of this file may be used under the terms of the }
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
{ provisions of the LGPL License are applicable instead of those above. }
{ If you wish to allow use of your version of this file only under the terms }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting the provisions above and }
{ replace them with the notice and other provisions required by the LGPL }
{ License. If you do not delete the provisions above, a recipient may use }
{ your version of this file under either the MPL or the LGPL License. }
{ }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ }
{******************************************************************************}
unit JwaWinError;
{$WEAKPACKAGEUNIT}
{$HPPEMIT ''}
{$HPPEMIT '#include "WinError.h"'}
{$HPPEMIT ''}
{$I WINDEFINES.INC}
interface
uses
JwaWinType;
//
// 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_CE = 24;
{$EXTERNALSYM FACILITY_WINDOWS_CE}
FACILITY_WINDOWS = 8;
{$EXTERNALSYM FACILITY_WINDOWS}
FACILITY_URT = 19;
{$EXTERNALSYM FACILITY_URT}
FACILITY_UMI = 22;
{$EXTERNALSYM FACILITY_UMI}
FACILITY_SXS = 23;
{$EXTERNALSYM FACILITY_SXS}
FACILITY_STORAGE = 3;
{$EXTERNALSYM FACILITY_STORAGE}
FACILITY_STATE_MANAGEMENT = 34;
{$EXTERNALSYM FACILITY_STATE_MANAGEMENT}
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_HTTP = 25;
{$EXTERNALSYM FACILITY_HTTP}
FACILITY_DPLAY = 21;
{$EXTERNALSYM FACILITY_DPLAY}
FACILITY_DISPATCH = 2;
{$EXTERNALSYM FACILITY_DISPATCH}
FACILITY_CONFIGURATION = 33;
{$EXTERNALSYM FACILITY_CONFIGURATION}
FACILITY_COMPLUS = 17;
{$EXTERNALSYM FACILITY_COMPLUS}
FACILITY_CERT = 11;
{$EXTERNALSYM FACILITY_CERT}
FACILITY_BACKGROUNDCOPY = 32;
{$EXTERNALSYM FACILITY_BACKGROUNDCOPY}
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 = DWORD(0);
{$EXTERNALSYM ERROR_SUCCESS}
NO_ERROR = DWORD(0); // dderror
{$EXTERNALSYM NO_ERROR}
SEC_E_OK = HRESULT($00000000);
{$EXTERNALSYM SEC_E_OK}
//
// MessageId: ERROR_INVALID_FUNCTION
//
// MessageText:
//
// Incorrect function.
//
ERROR_INVALID_FUNCTION = DWORD(1); // dderror
{$EXTERNALSYM ERROR_INVALID_FUNCTION}
//
// MessageId: ERROR_FILE_NOT_FOUND
//
// MessageText:
//
// The system cannot find the file specified.
//
ERROR_FILE_NOT_FOUND = DWORD(2);
{$EXTERNALSYM ERROR_FILE_NOT_FOUND}
//
// MessageId: ERROR_PATH_NOT_FOUND
//
// MessageText:
//
// The system cannot find the path specified.
//
ERROR_PATH_NOT_FOUND = DWORD(3);
{$EXTERNALSYM ERROR_PATH_NOT_FOUND}
//
// MessageId: ERROR_TOO_MANY_OPEN_FILES
//
// MessageText:
//
// The system cannot open the file.
//
ERROR_TOO_MANY_OPEN_FILES = DWORD(4);
{$EXTERNALSYM ERROR_TOO_MANY_OPEN_FILES}
//
// MessageId: ERROR_ACCESS_DENIED
//
// MessageText:
//
// Access is denied.
//
ERROR_ACCESS_DENIED = DWORD(5);
{$EXTERNALSYM ERROR_ACCESS_DENIED}
//
// MessageId: ERROR_INVALID_HANDLE
//
// MessageText:
//
// The handle is invalid.
//
ERROR_INVALID_HANDLE = DWORD(6);
{$EXTERNALSYM ERROR_INVALID_HANDLE}
//
// MessageId: ERROR_ARENA_TRASHED
//
// MessageText:
//
// The storage control blocks were destroyed.
//
ERROR_ARENA_TRASHED = DWORD(7);
{$EXTERNALSYM ERROR_ARENA_TRASHED}
//
// MessageId: ERROR_NOT_ENOUGH_MEMORY
//
// MessageText:
//
// Not enough storage is available to process this command.
//
ERROR_NOT_ENOUGH_MEMORY = DWORD(8); // dderror
{$EXTERNALSYM ERROR_NOT_ENOUGH_MEMORY}
//
// MessageId: ERROR_INVALID_BLOCK
//
// MessageText:
//
// The storage control block address is invalid.
//
ERROR_INVALID_BLOCK = DWORD(9);
{$EXTERNALSYM ERROR_INVALID_BLOCK}
//
// MessageId: ERROR_BAD_ENVIRONMENT
//
// MessageText:
//
// The environment is incorrect.
//
ERROR_BAD_ENVIRONMENT = DWORD(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 = DWORD(11);
{$EXTERNALSYM ERROR_BAD_FORMAT}
//
// MessageId: ERROR_INVALID_ACCESS
//
// MessageText:
//
// The access code is invalid.
//
ERROR_INVALID_ACCESS = DWORD(12);
{$EXTERNALSYM ERROR_INVALID_ACCESS}
//
// MessageId: ERROR_INVALID_DATA
//
// MessageText:
//
// The data is invalid.
//
ERROR_INVALID_DATA = DWORD(13);
{$EXTERNALSYM ERROR_INVALID_DATA}
//
// MessageId: ERROR_OUTOFMEMORY
//
// MessageText:
//
// Not enough storage is available to complete this operation.
//
ERROR_OUTOFMEMORY = DWORD(14);
{$EXTERNALSYM ERROR_OUTOFMEMORY}
//
// MessageId: ERROR_INVALID_DRIVE
//
// MessageText:
//
// The system cannot find the drive specified.
//
ERROR_INVALID_DRIVE = DWORD(15);
{$EXTERNALSYM ERROR_INVALID_DRIVE}
//
// MessageId: ERROR_CURRENT_DIRECTORY
//
// MessageText:
//
// The directory cannot be removed.
//
ERROR_CURRENT_DIRECTORY = DWORD(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 = DWORD(17);
{$EXTERNALSYM ERROR_NOT_SAME_DEVICE}
//
// MessageId: ERROR_NO_MORE_FILES
//
// MessageText:
//
// There are no more files.
//
ERROR_NO_MORE_FILES = DWORD(18);
{$EXTERNALSYM ERROR_NO_MORE_FILES}
//
// MessageId: ERROR_WRITE_PROTECT
//
// MessageText:
//
// The media is write protected.
//
ERROR_WRITE_PROTECT = DWORD(19);
{$EXTERNALSYM ERROR_WRITE_PROTECT}
//
// MessageId: ERROR_BAD_UNIT
//
// MessageText:
//
// The system cannot find the device specified.
//
ERROR_BAD_UNIT = DWORD(20);
{$EXTERNALSYM ERROR_BAD_UNIT}
//
// MessageId: ERROR_NOT_READY
//
// MessageText:
//
// The device is not ready.
//
ERROR_NOT_READY = DWORD(21);
{$EXTERNALSYM ERROR_NOT_READY}
//
// MessageId: ERROR_BAD_COMMAND
//
// MessageText:
//
// The device does not recognize the command.
//
ERROR_BAD_COMMAND = DWORD(22);
{$EXTERNALSYM ERROR_BAD_COMMAND}
//
// MessageId: ERROR_CRC
//
// MessageText:
//
// Data error (cyclic redundancy check).
//
ERROR_CRC = DWORD(23);
{$EXTERNALSYM ERROR_CRC}
//
// MessageId: ERROR_BAD_LENGTH
//
// MessageText:
//
// The program issued a command but the command length is incorrect.
//
ERROR_BAD_LENGTH = DWORD(24);
{$EXTERNALSYM ERROR_BAD_LENGTH}
//
// MessageId: ERROR_SEEK
//
// MessageText:
//
// The drive cannot locate a specific area or track on the disk.
//
ERROR_SEEK = DWORD(25);
{$EXTERNALSYM ERROR_SEEK}
//
// MessageId: ERROR_NOT_DOS_DISK
//
// MessageText:
//
// The specified disk or diskette cannot be accessed.
//
ERROR_NOT_DOS_DISK = DWORD(26);
{$EXTERNALSYM ERROR_NOT_DOS_DISK}
//
// MessageId: ERROR_SECTOR_NOT_FOUND
//
// MessageText:
//
// The drive cannot find the sector requested.
//
ERROR_SECTOR_NOT_FOUND = DWORD(27);
{$EXTERNALSYM ERROR_SECTOR_NOT_FOUND}
//
// MessageId: ERROR_OUT_OF_PAPER
//
// MessageText:
//
// The printer is out of paper.
//
ERROR_OUT_OF_PAPER = DWORD(28);
{$EXTERNALSYM ERROR_OUT_OF_PAPER}
//
// MessageId: ERROR_WRITE_FAULT
//
// MessageText:
//
// The system cannot write to the specified device.
//
ERROR_WRITE_FAULT = DWORD(29);
{$EXTERNALSYM ERROR_WRITE_FAULT}
//
// MessageId: ERROR_READ_FAULT
//
// MessageText:
//
// The system cannot read from the specified device.
//
ERROR_READ_FAULT = DWORD(30);
{$EXTERNALSYM ERROR_READ_FAULT}
//
// MessageId: ERROR_GEN_FAILURE
//
// MessageText:
//
// A device attached to the system is not functioning.
//
ERROR_GEN_FAILURE = DWORD(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 = DWORD(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 = DWORD(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 = DWORD(34);
{$EXTERNALSYM ERROR_WRONG_DISK}
//
// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
//
// MessageText:
//
// Too many files opened for sharing.
//
ERROR_SHARING_BUFFER_EXCEEDED = DWORD(36);
{$EXTERNALSYM ERROR_SHARING_BUFFER_EXCEEDED}
//
// MessageId: ERROR_HANDLE_EOF
//
// MessageText:
//
// Reached the end of the file.
//
ERROR_HANDLE_EOF = DWORD(38);
{$EXTERNALSYM ERROR_HANDLE_EOF}
//
// MessageId: ERROR_HANDLE_DISK_FULL
//
// MessageText:
//
// The disk is full.
//
ERROR_HANDLE_DISK_FULL = DWORD(39);
{$EXTERNALSYM ERROR_HANDLE_DISK_FULL}
//
// MessageId: ERROR_NOT_SUPPORTED
//
// MessageText:
//
// The request is not supported.
//
ERROR_NOT_SUPPORTED = DWORD(50);
{$EXTERNALSYM ERROR_NOT_SUPPORTED}
//
// MessageId: ERROR_REM_NOT_LIST
//
// MessageText:
//
// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
//
ERROR_REM_NOT_LIST = DWORD(51);
{$EXTERNALSYM ERROR_REM_NOT_LIST}
//
// MessageId: ERROR_DUP_NAME
//
// MessageText:
//
// You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again.
//
ERROR_DUP_NAME = DWORD(52);
{$EXTERNALSYM ERROR_DUP_NAME}
//
// MessageId: ERROR_BAD_NETPATH
//
// MessageText:
//
// The network path was not found.
//
ERROR_BAD_NETPATH = DWORD(53);
{$EXTERNALSYM ERROR_BAD_NETPATH}
//
// MessageId: ERROR_NETWORK_BUSY
//
// MessageText:
//
// The network is busy.
//
ERROR_NETWORK_BUSY = DWORD(54);
{$EXTERNALSYM ERROR_NETWORK_BUSY}
//
// MessageId: ERROR_DEV_NOT_EXIST
//
// MessageText:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -