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

📄 modmferrno.bas

📁 an example of programming philips pegoda reader
💻 BAS
字号:
Attribute VB_Name = "modMfErrNo"
'     Copyright (c), Philips Semiconductors Gratkorn
'
'                      (C)PHILIPS Electronics N.V. 2000
'                         All rights are reserved.
'   Philips reserves the right to make changes without notice at any time.
'  Philips makes no warranty, expressed, implied or statutory, including but
'  not limited to any implied warranty of merchantibility or fitness for any
' particular purpose, or that the use will not infringe any third party patent,
'  copyright or trademark. Philips must not be liable for any loss or damage
'                           arising from its use.
'
'  Files           : CommonLib.h CommonLib.c OsDefs.h MfErrNo.h DesEncryption.c
'  COMMENT: This header contains error codes for CommonLib project
'
'
'  INCLUDES
'  Reader Error Codes                   Base Address Start:      0000
'                                       Base Address End:        -999
'
Global Const READER_ERR_BASE_START = 0
Global Const MI_OK = 0
Global Const MI_CHK_OK = 0
Global Const MI_CRC_ZERO = 0
'  ICODE1 Error   Codes
Global Const I1_OK = 0
Global Const I1_NO_ERR = 0

Global Const MI_CRC_NOTZERO = 1

Global Const MI_NOTAGERR = (-1)
Global Const MI_CHK_FAILED = (-1)
Global Const MI_CRCERR = (-2)
Global Const MI_CHK_COMPERR = (-2)
Global Const MI_EMPTY = (-3)
Global Const MI_AUTHERR = (-4)
Global Const MI_PARITYERR = (-5)
Global Const MI_CODEERR = (-6)

Global Const MI_SERNRERR = (-8)
Global Const MI_KEYERR = (-9)
Global Const MI_NOTAUTHERR = (-10)
Global Const MI_BITCOUNTERR = (-11)
Global Const MI_BYTECOUNTERR = (-12)
Global Const MI_IDLE = (-13)
Global Const MI_TRANSERR = (-14)
Global Const MI_WRITEERR = (-15)
Global Const MI_INCRERR = (-16)
Global Const MI_DECRERR = (-17)
Global Const MI_READERR = (-18)
Global Const MI_OVFLERR = (-19)
Global Const MI_POLLING = (-20)
Global Const MI_FRAMINGERR = (-21)
Global Const MI_ACCESSERR = (-22)
Global Const MI_UNKNOWN_COMMAND = (-23)
Global Const MI_COLLERR = (-24)
Global Const MI_RESETERR = (-25)
Global Const MI_INITERR = (-25)
Global Const MI_INTERFACEERR = (-26)
Global Const MI_ACCESSTIMEOUT = (-27)
Global Const MI_NOBITWISEANTICOLL = (-28)
Global Const MI_QUIT = (-30)
Global Const MI_CODINGERR = (-31)
Global Const MI_SENDBYTENR = (-51)
Global Const MI_CASCLEVEX = (-52)
Global Const MI_SENDBUF_OVERFLOW = (-53)
Global Const MI_BAUDRATE_NOT_SUPPORTED = (-54)
Global Const MI_SAME_BAUDRATE_REQUIRED = (-55)

Global Const MI_WRONG_PARAMETER_VALUE = (-60)

'  ICODE1 Error   Codes
Global Const I1_WRONGPARAM = (-61)
Global Const I1_NYIMPLEMENTED = (-62)
Global Const I1_TSREADY = (-63)

Global Const I1_TIMEOUT = (-70)
Global Const I1_NOWRITE = (-71)
Global Const I1_NOHALT = (-72)
Global Const I1_MISS_ANTICOLL = (-73)

Global Const I1_COMM_ABORT = (-82)

Global Const MI_BREAK = (-99)
Global Const MI_NY_IMPLEMENTED = (-100)
Global Const MI_NO_MFRC = (-101)
Global Const MI_MFRC_NOTAUTH = (-102)
Global Const MI_WRONG_DES_MODE = (-103)
Global Const MI_HOST_AUTH_FAILED = (-104)

Global Const MI_WRONG_LOAD_MODE = (-106)
Global Const MI_WRONG_DESKEY = (-107)
Global Const MI_MKLOAD_FAILED = (-108)
Global Const MI_FIFOERR = (-109)
Global Const MI_WRONG_ADDR = (-110)
Global Const MI_DESKEYLOAD_FAILED = (-111)

Global Const MI_WRONG_SEL_CNT = (-114)

Global Const MI_WRONG_TEST_MODE = (-117)
Global Const MI_TEST_FAILED = (-118)
Global Const MI_TOC_ERROR = (-119)
Global Const MI_COMM_ABORT = (-120)
Global Const MI_INVALID_BASE = (-121)
Global Const MI_MFRC_RESET = (-122)
Global Const MI_WRONG_VALUE = (-123)
Global Const MI_VALERR = (-124)

Global Const MI_WRONG_MAC_TOKEN = (-149)
Global Const MI_WRONG_TOKEN = (-150)
Global Const MI_NO_VALUE = (-151)
Global Const MI_MFRC150 = (-152)
Global Const MI_MFRC170 = (-153)

Global Const MI_WRONG_BASEADDR = (-180)

Global Const MI_NO_ERROR_TEXT_AVAIL = (-199)

Global Const MI_DRIVER_FAILURE = (-254)

Global Const MI_INTERFACE_FAILURE = (-255)
Global Const MI_PROTOCOL_FAILURE = (-256)

Global Const MI_SERERR = (-260)
Global Const MI_CALLOPEN = (-261)
Global Const MI_RESERVED_BUFFER_OVERFLOW = (-262)
Global Const MI_RECBUF_OVERFLOW = MI_RESERVED_BUFFER_OVERFLOW

Global Const READER_ERR_BASE_END = (-999)

'
'  HostRdCom Error Codes                Base Address Start:     -1000
'                                       Base Address End:       -1100
'
Global Const COM_ERR_BASE_START = (-1000)
Global Const COM_SUCCESS = 0
Global Const COM_ERROR = (COM_ERR_BASE_START - 1)
Global Const COM_NO_INTERFACE_HANDLE = (COM_ERR_BASE_START - 2)
Global Const COM_INTERFACE_OPEN = (COM_ERR_BASE_START - 3)
Global Const COM_INTERFACE_NOT_OPEN = (COM_ERR_BASE_START - 4)
Global Const COM_CREATE_FILE_FAILED = (COM_ERR_BASE_START - 5)
Global Const COM_PURGE_COMM_FAILED = (COM_ERR_BASE_START - 6)
Global Const COM_GET_COMM_STATE_FAILED = (COM_ERR_BASE_START - 7)
Global Const COM_SETUP_COMM_FAILED = (COM_ERR_BASE_START - 8)
Global Const COM_SET_COMM_STATE_FAILED = (COM_ERR_BASE_START - 9)
Global Const COM_SET_COMM_MASK_FAILED = (COM_ERR_BASE_START - 10)
Global Const COM_SET_COMM_TIMEOUTS_FAILED = (COM_ERR_BASE_START - 11)
Global Const COM_WRONG_VALUE = (COM_ERR_BASE_START - 12)
Global Const COM_WSASTARTUP_FAILED = (COM_ERR_BASE_START - 13)
Global Const COM_WSA_SOCKET_FAILED = (COM_ERR_BASE_START - 14)
Global Const COM_GETSOCKOPT_FAILED = (COM_ERR_BASE_START - 15)
Global Const COM_READER_NOT_IN_RANGE = (COM_ERR_BASE_START - 16)
Global Const COM_CONNECT_FAILED = (COM_ERR_BASE_START - 17)
Global Const COM_NEW_FAILED = (COM_ERR_BASE_START - 18)
Global Const COM_INVALID_WT_HANDLE = (COM_ERR_BASE_START - 19)          '  WT - Worker thread
Global Const COM_START_WT_FAILED = (COM_ERR_BASE_START - 20)            '  WT - Worker thread
Global Const COM_INVALID_CB_HANDLE = (COM_ERR_BASE_START - 21)          '  CB - Callback
Global Const COM_LEN_OVERFLOW = (COM_ERR_BASE_START - 22)
Global Const COM_RS232_SERCOM_ERR = (COM_ERR_BASE_START - 23)
Global Const COM_RS232_SEND_CMD_NO_DLE_ERR = (COM_ERR_BASE_START - 24)
Global Const COM_RS232_SEND_DEVICE_ERR = (COM_ERR_BASE_START - 25)
Global Const COM_RS232_RESP_CMD_NAK_ERR = (COM_ERR_BASE_START - 26)
Global Const COM_TIMEOUT = (COM_ERR_BASE_START - 27)
Global Const COM_RS232_RESP_TO_ERR = (COM_ERR_BASE_START - 28)
Global Const COM_RS232_RESP_OVERFLOW_ERR = (COM_ERR_BASE_START - 29)
Global Const COM_RS232_RECV_DEVICE_ERR = (COM_ERR_BASE_START - 30)
Global Const COM_RS232_RESP_UNDERFLOW_ERR = (COM_ERR_BASE_START - 31)
Global Const COM_RS232_DATALENGTH_ERR = (COM_ERR_BASE_START - 32)
Global Const COM_RS232_CHECKSUM_ERR = (COM_ERR_BASE_START - 33)
Global Const COM_RS232_TX_RX_SEQ_ERR = (COM_ERR_BASE_START - 34)
Global Const COM_RS232_COPY_DATA_ERR = (COM_ERR_BASE_START - 35)
Global Const COM_IRDA_SELECT_FAILED = (COM_ERR_BASE_START - 36)
Global Const COM_IRDA_SEND_TIMEOUT = (COM_ERR_BASE_START - 37)
Global Const COM_IRDA_SOCKET_NOT_READY = (COM_ERR_BASE_START - 38)
Global Const COM_IRDA_SEND_DEVICE_ERR = (COM_ERR_BASE_START - 39)
Global Const COM_IRDA_RECV_DEVICE_ERR = (COM_ERR_BASE_START - 40)
Global Const COM_IRDA_RECV_TIMEOUT = (COM_ERR_BASE_START - 41)
Global Const COM_IRDA_TX_RX_SEQ_ERR = (COM_ERR_BASE_START - 42)
Global Const COM_IRDA_COPY_DATA_ERR = (COM_ERR_BASE_START - 43)
Global Const COM_IRDA_LEN_ERR = (COM_ERR_BASE_START - 44)
Global Const COM_NO_PROTOCOL_SET = (COM_ERR_BASE_START - 45)
Global Const COM_USB_DLL_LOAD_ERR = (COM_ERR_BASE_START - 46)
Global Const COM_USB_MISSING_FCT_ADDR = (COM_ERR_BASE_START - 47)
Global Const COM_USB_SEND_DEVICE_ERR = (COM_ERR_BASE_START - 48)
Global Const COM_USB_RECV_DEVICE_ERR = (COM_ERR_BASE_START - 49)
Global Const COM_USB_TX_RX_SEQ_ERR = (COM_ERR_BASE_START - 50)
Global Const COM_USB_LEN_ERR = (COM_ERR_BASE_START - 51)
Global Const COM_USB_COPY_DATA_ERR = (COM_ERR_BASE_START - 52)
Global Const COM_USB_NO_DEVICE_FOUND = (COM_ERR_BASE_START - 53)
Global Const COM_USB_SEND_TIMEOUT = (COM_ERR_BASE_START - 54)
Global Const COM_USB_RECV_TIMEOUT = (COM_ERR_BASE_START - 55)
Global Const COM_USB_FILE_NOT_FOUND = (COM_ERR_BASE_START - 56)
Global Const COM_USB_ACCESS_DENIED = (COM_ERR_BASE_START - 57)
Global Const COM_RS232_ETX_DLE_EXPECTED = (COM_ERR_BASE_START - 58)

Global Const COM_ERR_BASE_END = (COM_ERR_BASE_START - 99)

'
'  T=CL Error Codes                     Base Address Start:     -1100
'                                       Base Address End:       -1150
'
Global Const TCL_ERR_BASE_START = (COM_ERR_BASE_END - 1)

Global Const TCL_OK = 0
Global Const TCL_NOTAGERR = (TCL_ERR_BASE_START - 1)
Global Const TCL_CRCERR = (TCL_ERR_BASE_START - 2)
Global Const TCL_PRITYERR = (TCL_ERR_BASE_START - 3)
Global Const TCL_OTHERERR = (TCL_ERR_BASE_START - 4)
Global Const TCL_SERNRERR = (TCL_ERR_BASE_START - 5)
Global Const TCL_BITCOUNTERR = (TCL_ERR_BASE_START - 6)
Global Const TCL_POLLING = (TCL_ERR_BASE_START - 7)
Global Const TCL_RF_CHANNEL = (TCL_ERR_BASE_START - 8)
Global Const TCL_MULTACT_DISABLED = (TCL_ERR_BASE_START - 9)
Global Const TCL_MULTACT_ENABLED = (TCL_ERR_BASE_START - 10)
Global Const TCL_CID_NOT_ACTIVE = (TCL_ERR_BASE_START - 11)
Global Const TCL_BITANTICOLL = (TCL_ERR_BASE_START - 12)
Global Const TCL_UIDLEN = (TCL_ERR_BASE_START - 13)
Global Const TCL_CIDINVALID = (TCL_ERR_BASE_START - 14)
Global Const TCL_ATSLEN = (TCL_ERR_BASE_START - 15)
Global Const TCL_NO_ATS_AVAILABLE = (TCL_ERR_BASE_START - 16)
Global Const TCL_ATS_ERROR = (TCL_ERR_BASE_START - 17)
Global Const TCL_FATAL_PROTOCOL = (TCL_ERR_BASE_START - 18)
Global Const TCL_RECBUF_OVERFLOW = (TCL_ERR_BASE_START - 19)
Global Const TCL_SENDBYTENR = (TCL_ERR_BASE_START - 20)
Global Const TCL_TRANSMERR_HALTED = (TCL_ERR_BASE_START - 21)
Global Const TCL_TRANSMERR_NOTAG = (TCL_ERR_BASE_START - 22)
Global Const TCL_BAUDRATE_NOT_SUPPORTED_PICC = (TCL_ERR_BASE_START - 23)
Global Const TCL_CID_NOT_SUPPORTED = (TCL_ERR_BASE_START - 24)
Global Const TCL_NAD_NOT_SUPPORTED = (TCL_ERR_BASE_START - 25)
Global Const TCL_PROTOCOL_NOT_SUPPORTED = (TCL_ERR_BASE_START - 26)
Global Const TCL_PPS_FORMAT = (TCL_ERR_BASE_START - 27)
Global Const TCL_ERROR = (TCL_ERR_BASE_START - 28)
Global Const TCL_NADINVALID = (TCL_ERR_BASE_START - 30)
Global Const TCL_OTHER_ERR = (TCL_ERR_BASE_START - 31)
Global Const TCL_BAUDRATE_NOT_SUPPORTED_PCD = (TCL_ERR_BASE_START - 32)
Global Const TCL_CID_ACTIVE = (TCL_ERR_BASE_START - 33)

Global Const TCL_ERR_BASE_END = (TCL_ERR_BASE_START - 49)

'
'  RdMUXError Codes                     Base Address Start:     -1200
'                                       Base Address End:       -1250
'  Author: TR
'
Global Const RdMUX_ERR_BASE_START = (TCL_ERR_BASE_END - 51)

Global Const RdMUX_OK = 0
Global Const RdMUX_NO_RD_AVAIL = (RdMUX_ERR_BASE_START - 1)
Global Const RdMUX_RdINDEX_OUT_OF_RANGE = (RdMUX_ERR_BASE_START - 2)
Global Const RdMUX_MUXMODE_NOT_SUPPORTED_RM = (RdMUX_ERR_BASE_START - 3)
Global Const RdMUX_SELECTED_RD_NAVAIL = (RdMUX_ERR_BASE_START - 4)
Global Const RdMUX_UNKNOWN_PARAMIDX = (RdMUX_ERR_BASE_START - 5)
Global Const RdMUX_SELECTIONLIST_EMPTY = (RdMUX_ERR_BASE_START - 6)
Global Const RdMUX_CHANGES_TREATED = (RdMUX_ERR_BASE_START - 7)

Global Const RdMUX_ERR_BASE_END = (RdMUX_ERR_BASE_START - 49)

'  ---------------------------------------------------------------------------
'   FUNCTION: GetErrMsg
'         IN: err_nr    Error number for which the appropriate error message
'                       is needed
'        OUT: -
'     RETURN: Appropriate error message for passed error number
'    COMMENT: Searches the ErrList for the passed error number.
'             If the error number is found, the approriate error number is
'             return, otherwise "Unknown error" is returned.
'  ---------------------------------------------------------------------------
Declare Function GetErrMsg Lib "CommonLib.dll" Alias "#10" (ByVal err_nr As Byte) As Byte

⌨️ 快捷键说明

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