''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright (c) Datacard Corporation.  All Rights Reserved.
'
' constants from microsoft's WinSmCrd.H
' some SCARD... errors from WinError.H
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Namespace dxp01sdk
    Public Enum scard_attr
        SCARD_ATTR_VENDOR_NAME = &H10100
        SCARD_ATTR_VENDOR_IFD_TYPE = &H10101
        SCARD_ATTR_VENDOR_IFD_VERSION = &H10102
        SCARD_ATTR_VENDOR_IFD_SERIAL_NO = &H10103
        SCARD_ATTR_CHANNEL_ID = &H20110
        SCARD_ATTR_PROTOCOL_TYPES = &H30120
        SCARD_ATTR_DEFAULT_CLK = &H30121
        SCARD_ATTR_MAX_CLK = &H30122
        SCARD_ATTR_DEFAULT_DATA_RATE = &H30123
        SCARD_ATTR_MAX_DATA_RATE = &H30124
        SCARD_ATTR_MAX_IFSD = &H30125
        SCARD_ATTR_POWER_MGMT_SUPPORT = &H40131
        SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE = &H50140
        SCARD_ATTR_USER_AUTH_INPUT_DEVICE = &H50142
        SCARD_ATTR_CHARACTERISTICS = &H60150
        SCARD_ATTR_CURRENT_PROTOCOL_TYPE = &H80201
        SCARD_ATTR_CURRENT_CLK = &H80202
        SCARD_ATTR_CURRENT_F = &H80203
        SCARD_ATTR_CURRENT_D = &H80204
        SCARD_ATTR_CURRENT_N = &H80205
        SCARD_ATTR_CURRENT_W = &H80206
        SCARD_ATTR_CURRENT_IFSC = &H80207
        SCARD_ATTR_CURRENT_IFSD = &H80208
        SCARD_ATTR_CURRENT_BWT = &H80209
        SCARD_ATTR_CURRENT_CWT = &H8020A
        SCARD_ATTR_CURRENT_EBC_ENCODING = &H8020B
        SCARD_ATTR_EXTENDED_BWT = &H8020C
        SCARD_ATTR_ICC_PRESENCE = &H90300
        SCARD_ATTR_ICC_INTERFACE_STATUS = &H90301
        SCARD_ATTR_CURRENT_IO_STATE = &H90302
        SCARD_ATTR_ATR_STRING = &H90303
        SCARD_ATTR_ICC_TYPE_PER_ATR = &H90304
        SCARD_ATTR_ESC_RESET = &H7A000
        SCARD_ATTR_ESC_CANCEL = &H7A003
        SCARD_ATTR_ESC_AUTHREQUEST = &H7A005
        SCARD_ATTR_MAXINPUT = &H7A007
        SCARD_ATTR_DEVICE_UNIT = &H7FFF0001
        SCARD_ATTR_DEVICE_IN_USE = &H7FFF0002
        SCARD_ATTR_DEVICE_FRIENDLY_NAME_A = &H7FFF0003
        SCARD_ATTR_DEVICE_SYSTEM_NAME_A = &H7FFF0004
        SCARD_ATTR_DEVICE_FRIENDLY_NAME_W = &H7FFF0005
        SCARD_ATTR_DEVICE_SYSTEM_NAME_W = &H7FFF0006
        SCARD_ATTR_SUPRESS_T1_IFS_REQUEST = &H7FFF0007
        SCARD_PERF_NUM_TRANSMISSIONS = &H7FFE0001
        SCARD_PERF_BYTES_TRANSMITTED = &H7FFE0002
        SCARD_PERF_TRANSMISSION_TIME = &H7FFE0003
    End Enum

    Public Enum scard_protocol As UInteger
        SCARD_PROTOCOL_UNDEFINED = 0
        SCARD_PROTOCOL_T0 = &H1
        SCARD_PROTOCOL_T1 = &H2
        SCARD_PROTOCOL_RAW = &H10000
        SCARD_PROTOCOL_Tx = &H3
        SCARD_PROTOCOL_DEFAULT = &H80000000UI
        SCARD_PROTOCOL_OPTIMAL = 0
    End Enum

    Public Enum scard_disposition
        SCARD_SHARE_EXCLUSIVE = 1
        SCARD_SHARE_SHARED = 2
        SCARD_SHARE_DIRECT = 3
        SCARD_LEAVE_CARD = 0
        SCARD_RESET_CARD = 1
        SCARD_UNPOWER_CARD = 2
        SCARD_EJECT_CARD = 3
    End Enum

    Public Enum scard_error As UInteger
        SCARD_S_SUCCESS = &H0
        SCARD_E_BAD_SEEK = &H80100029UI
        SCARD_E_CANCELLED = &H80100002UI
        SCARD_E_CANT_DISPOSE = &H8010000EUI
        SCARD_E_CARD_UNSUPPORTED = &H8010001CUI
        SCARD_E_CERTIFICATE_UNAVAILABLE = &H8010002DUI
        SCARD_E_COMM_DATA_LOST = &H8010002FUI
        SCARD_E_DIR_NOT_FOUND = &H80100023UI
        SCARD_E_DUPLICATE_READER = &H8010001BUI
        SCARD_E_FILE_NOT_FOUND = &H80100024UI
        SCARD_E_ICC_CREATEORDER = &H80100021UI
        SCARD_E_ICC_INSTALLATION = &H80100020UI
        SCARD_E_INSUFFICIENT_BUFFER = &H80100008UI
        SCARD_E_INVALID_ATR = &H80100015UI
        SCARD_E_INVALID_CHV = &H8010002AUI
        SCARD_E_INVALID_HANDLE = &H80100003UI
        SCARD_E_INVALID_PARAMETER = &H80100004UI
        SCARD_E_INVALID_TARGET = &H80100005UI
        SCARD_E_INVALID_VALUE = &H80100011UI
        SCARD_E_NO_ACCESS = &H80100027UI
        SCARD_E_NO_DIR = &H80100025UI
        SCARD_E_NO_FILE = &H80100026UI
        SCARD_E_NO_KEY_CONTAINER = &H80100030UI
        SCARD_E_NO_MEMORY = &H80100006UI
        SCARD_E_NO_READERS_AVAILABLE = &H8010002EUI
        SCARD_E_NO_SERVICE = &H8010001DUI
        SCARD_E_NO_SMARTCARD = &H8010000CUI
        SCARD_E_NO_SUCH_CERTIFICATE = &H8010002CUI
        SCARD_E_NOT_READY = &H80100010UI
        SCARD_E_NOT_TRANSACTED = &H80100016UI
        SCARD_E_PCI_TOO_SMALL = &H80100019UI
        SCARD_E_PROTO_MISMATCH = &H8010000FUI
        SCARD_E_READER_UNAVAILABLE = &H80100017UI
        SCARD_E_READER_UNSUPPORTED = &H8010001AUI
        SCARD_E_SERVER_TOO_BUSY = &H80100031UI
        SCARD_E_SERVICE_STOPPED = &H8010001EUI
        SCARD_E_SHARING_VIOLATION = &H8010000BUI
        SCARD_E_SYSTEM_CANCELLED = &H80100012UI
        SCARD_E_TIMEOUT = &H8010000AUI
        SCARD_E_UNEXPECTED = &H8010001FUI
        SCARD_E_UNKNOWN_CARD = &H8010000DUI
        SCARD_E_UNKNOWN_READER = &H80100009UI
        SCARD_E_UNKNOWN_RES_MNG = &H8010002BUI
        SCARD_E_UNSUPPORTED_FEATURE = &H80100022UI
        SCARD_E_WRITE_TOO_MANY = &H80100028UI
        SCARD_F_COMM_ERROR = &H80100013UI
        SCARD_F_INTERNAL_ERROR = &H80100001UI
        SCARD_F_UNKNOWN_ERROR = &H80100014UI
        SCARD_F_WAITED_TOO_LONG = &H80100007UI
        SCARD_P_SHUTDOWN = &H80100018UI
        SCARD_W_CANCELLED_BY_USER = &H8010006EUI
        SCARD_W_CARD_NOT_AUTHENTICATED = &H8010006FUI
        SCARD_W_CHV_BLOCKED = &H8010006CUI
        SCARD_W_EOF = &H8010006DUI
        SCARD_W_REMOVED_CARD = &H80100069UI
        SCARD_W_RESET_CARD = &H80100068UI
        SCARD_W_SECURITY_VIOLATION = &H8010006AUI
        SCARD_W_UNPOWERED_CARD = &H80100067UI
        SCARD_W_UNRESPONSIVE_CARD = &H80100066UI
        SCARD_W_UNSUPPORTED_CARD = &H80100065UI
        SCARD_W_WRONG_CHV = &H8010006BUI
    End Enum

    Public Enum scard_state
        SCARD_UNKNOWN = 0
        SCARD_ABSENT = 1
        SCARD_PRESENT = 2
        SCARD_SWALLOWED = 3
        SCARD_POWERED = 4
        SCARD_NEGOTIABLE = 5
        SCARD_SPECIFIC = 6
    End Enum
End Namespace

