⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scarderr.pas

📁 Delphi 用的PSCS控件即例子程序,本人稍作修改了例子程序
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{******************************************************************}
{                                                                  }
{ Borland Delphi Runtime Library                                   }
{ PCSC interface unit                                              }
{                                                                  }
{ Portions created by Microsoft are                                }
{ Copyright (C) 1996 Microsoft Corporation.                        }
{ All Rights Reserved.                                             }
{                                                                  }
{ The original file is: SCardErr.h                                 }
{ The original Pascal code is: SCardErr.pas                        }
{ The initial developer of the Pascal code is Chris Dickerson      }
{ (chrisd@tsc.com).                                                }
{                                                                  }
{ 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 SCardErr;

interface

uses
   Windows;

const

(*
 scarderr.mc

   Error message codes from the Smart Card Resource Manager
   These messages must be reconciled with winerror.w
   They exist here to provide error messages on pre-Win2K systems.

*)

//
// =============================
// Facility SCARD Error Messages
// =============================
//
   SCARD_S_SUCCESS = 0;
   {$EXTERNALSYM SCARD_S_SUCCESS}

//
//  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
//
   FACILITY_SYSTEM = $0;
   {$EXTERNALSYM FACILITY_SYSTEM}
   FACILITY_SCARD  = $10;
   {$EXTERNALSYM FACILITY_SCARD}

//
// Define the severity codes
//
   STATUS_SEVERITY_WARNING       = $2;
   {$EXTERNALSYM STATUS_SEVERITY_WARNING}
   STATUS_SEVERITY_INFORMATIONAL = $1;
   {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
   STATUS_SEVERITY_ERROR         = $3;
   {$EXTERNALSYM STATUS_SEVERITY_ERROR}

//
// MessageId: SCARD_F_INTERNAL_ERROR
//
// MessageText:
//
//  An internal consistency check failed.
//
   SCARD_F_INTERNAL_ERROR           = DWORD($80100001);
   {$EXTERNALSYM SCARD_F_INTERNAL_ERROR}

//
// MessageId: SCARD_E_CANCELLED
//
// MessageText:
//
//  The action was cancelled by an SCardCancel request.
//
   SCARD_E_CANCELLED                = DWORD($80100002);
   {$EXTERNALSYM SCARD_E_CANCELLED}

//
// MessageId: SCARD_E_INVALID_HANDLE
//
// MessageText:
//
//  The supplied handle was invalid.
//
   SCARD_E_INVALID_HANDLE           = DWORD($80100003);
   {$EXTERNALSYM SCARD_E_INVALID_HANDLE}

//
// MessageId: SCARD_E_INVALID_PARAMETER
//
// MessageText:
//
//  One or more of the supplied parameters could not be properly interpreted.
//
   SCARD_E_INVALID_PARAMETER        = DWORD($80100004);
   {$EXTERNALSYM SCARD_E_INVALID_PARAMETER}

//
// MessageId: SCARD_E_INVALID_TARGET
//
// MessageText:
//
//  Registry startup information is missing or invalid.
//
   SCARD_E_INVALID_TARGET           = DWORD($80100005);
   {$EXTERNALSYM SCARD_E_INVALID_TARGET}

//
// MessageId: SCARD_E_NO_MEMORY
//
// MessageText:
//
//  Not enough memory available to complete this command.
//
   SCARD_E_NO_MEMORY                = DWORD($80100006);
   {$EXTERNALSYM SCARD_E_NO_MEMORY}

//
// MessageId: SCARD_F_WAITED_TOO_LONG
//
// MessageText:
//
//  An internal consistency timer has expired.
//
   SCARD_F_WAITED_TOO_LONG          = DWORD($80100007);
   {$EXTERNALSYM SCARD_F_WAITED_TOO_LONG}

//
// MessageId: SCARD_E_INSUFFICIENT_BUFFER
//
// MessageText:
//
//  The data buffer to receive returned data is too small for the returned data.
//
   SCARD_E_INSUFFICIENT_BUFFER      = DWORD($80100008);
   {$EXTERNALSYM SCARD_E_INSUFFICIENT_BUFFER}

//
// MessageId: SCARD_E_UNKNOWN_READER
//
// MessageText:
//
//  The specified reader name is not recognized.
//
   SCARD_E_UNKNOWN_READER           = DWORD($80100009);
   {$EXTERNALSYM SCARD_E_UNKNOWN_READER}

//
// MessageId: SCARD_E_TIMEOUT
//
// MessageText:
//
//  The user-specified timeout value has expired.
//
   SCARD_E_TIMEOUT                  = DWORD($8010000A);
   {$EXTERNALSYM SCARD_E_TIMEOUT}

//
// MessageId: SCARD_E_SHARING_VIOLATION
//
// MessageText:
//
//  The smart card cannot be accessed because of other connections outstanding.
//
   SCARD_E_SHARING_VIOLATION        = DWORD($8010000B);
   {$EXTERNALSYM SCARD_E_SHARING_VIOLATION}

//
// MessageId: SCARD_E_NO_SMARTCARD
//
// MessageText:
//
//  The operation requires a Smart Card, but no Smart Card is currently in the device.
//
   SCARD_E_NO_SMARTCARD             = DWORD($8010000C);
   {$EXTERNALSYM SCARD_E_NO_SMARTCARD}

//
// MessageId: SCARD_E_UNKNOWN_CARD
//
// MessageText:
//
//  The specified smart card name is not recognized.
//
   SCARD_E_UNKNOWN_CARD             = DWORD($8010000D);
   {$EXTERNALSYM SCARD_E_UNKNOWN_CARD}

//
// MessageId: SCARD_E_CANT_DISPOSE
//
// MessageText:
//
//  The system could not dispose of the media in the requested manner.
//
   SCARD_E_CANT_DISPOSE             = DWORD($8010000E);
   {$EXTERNALSYM SCARD_E_CANT_DISPOSE}

//
// MessageId: SCARD_E_PROTO_MISMATCH
//
// MessageText:
//
//  The requested protocols are incompatible with the protocol currently in use with the smart card.
//
   SCARD_E_PROTO_MISMATCH           = DWORD($8010000F);
   {$EXTERNALSYM SCARD_E_PROTO_MISMATCH}

//
// MessageId: SCARD_E_NOT_READY
//
// MessageText:
//
//  The reader or smart card is not ready to accept commands.
//
   SCARD_E_NOT_READY                = DWORD($80100010);
   {$EXTERNALSYM SCARD_E_NOT_READY}

//
// MessageId: SCARD_E_INVALID_VALUE
//
// MessageText:
//
//  One or more of the supplied parameters values could not be properly interpreted.
//
   SCARD_E_INVALID_VALUE            = DWORD($80100011);
   {$EXTERNALSYM SCARD_E_INVALID_VALUE}

//
// MessageId: SCARD_E_SYSTEM_CANCELLED
//
// MessageText:
//
//  The action was cancelled by the system, presumably to log off or shut down.
//
   SCARD_E_SYSTEM_CANCELLED         = DWORD($80100012);
   {$EXTERNALSYM SCARD_E_SYSTEM_CANCELLED}

//
// MessageId: SCARD_F_COMM_ERROR
//
// MessageText:
//
//  An internal communications error has been detected.
//
   SCARD_F_COMM_ERROR               = DWORD($80100013);
   {$EXTERNALSYM SCARD_F_COMM_ERROR}

//
// MessageId: SCARD_F_UNKNOWN_ERROR
//
// MessageText:
//
//  An internal error has been detected, but the source is unknown.
//
   SCARD_F_UNKNOWN_ERROR            = DWORD($80100014);
   {$EXTERNALSYM SCARD_F_UNKNOWN_ERROR}

//
// MessageId: SCARD_E_INVALID_ATR
//
// MessageText:
//
//  An ATR obtained from the registry is not a valid ATR string.
//
   SCARD_E_INVALID_ATR              = DWORD($80100015);
   {$EXTERNALSYM SCARD_E_INVALID_ATR}

//
// MessageId: SCARD_E_NOT_TRANSACTED
//
// MessageText:
//
//  An attempt was made to end a non-existent transaction.
//
   SCARD_E_NOT_TRANSACTED           = DWORD($80100016);
   {$EXTERNALSYM SCARD_E_NOT_TRANSACTED}

//
// MessageId: SCARD_E_READER_UNAVAILABLE
//
// MessageText:
//
//  The specified reader is not currently available for use.
//
   SCARD_E_READER_UNAVAILABLE       = DWORD($80100017);
   {$EXTERNALSYM SCARD_E_READER_UNAVAILABLE}

//
// MessageId: SCARD_P_SHUTDOWN
//
// MessageText:
//
//  The operation has been aborted to allow the server application to exit.
//
   SCARD_P_SHUTDOWN                 = DWORD($80100018);
   {$EXTERNALSYM SCARD_P_SHUTDOWN}

//
// MessageId: SCARD_E_PCI_TOO_SMALL
//
// MessageText:
//
//  The PCI Receive buffer was too small.
//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -