|
HID OMNIKEY Smart Card Readers' Sample Codes
0.0.0.116
|
Classes | |
| struct | BaudRate |
| struct | ConnectionStatus |
| struct | IoRequest |
| The SCardIORequest structure begins a protocol control information structure. Any protocol-specific information then immediately follows this structure. More... | |
| struct | ReaderState |
| The SCardReaderState structure is used by functions for tracking smart cards within readers. More... | |
Enumerations | |
| enum | Class { Class.VendorInfo = 1, Class.Communication = 2, Class.Protocol = 3, Class.PowerManagement = 4, Class.Security = 5, Class.Mechanical = 6, Class.VendorDefined = 7, Class.InterfaceDeviceProtocol = 8, Class.ICCState = 9, Class.System = 0x7fff } |
| enum | Attribiutes { Attribiutes.VendorName = (Class.VendorInfo << 16) | 0x0100, Attribiutes.VendorInterfaceDeviceType = (Class.VendorInfo << 16) | 0x0101, Attribiutes.VendorInterfaceDeviceTypeVersion = (Class.VendorInfo << 16) | 0x0102, Attribiutes.VendorInterfaceDeviceTypeSerialNumber = (Class.VendorInfo << 16) | 0x0103, Attribiutes.ChannelId = (Class.Communication << 16) | 0x0110, Attribiutes.AsynchronusProtocolTypes = (Class.Protocol << 16) | 0x0120, Attribiutes.DefaultClockRate = (Class.Protocol << 16) | 0x0121, Attribiutes.MaxClockRate = (Class.Protocol << 16) | 0x0122, Attribiutes.DefaultDataRate = (Class.Protocol << 16) | 0x0123, Attribiutes.MaxDataRate = (Class.Protocol << 16) | 0x0124, Attribiutes.MaxInformationFileSizeDevice = (Class.Protocol << 16) | 0x0125, Attribiutes.SyncProtocolTypes = (Class.Protocol << 16) | 0x0126, Attribiutes.PowerManagementSupport = (Class.PowerManagement << 16) | 0x0131, Attribiutes.UserToCardAuthDevice = (Class.Security << 16) | 0x0140, Attribiutes.UserAuthInputDevice = (Class.Security << 16) | 0x0142, Attribiutes.Characteristics = (Class.Mechanical << 16) | 0x0150, Attribiutes.CurrentProtocolType = (Class.InterfaceDeviceProtocol << 16) | 0x0201, Attribiutes.CurrentClockRate = (Class.InterfaceDeviceProtocol << 16) | 0x0202, Attribiutes.CurrentClockConversionFactor = (Class.InterfaceDeviceProtocol << 16) | 0x0203, Attribiutes.CurrentBitRateConversionFactor = (Class.InterfaceDeviceProtocol << 16) | 0x0204, Attribiutes.CurrentGuardTime = (Class.InterfaceDeviceProtocol << 16) | 0x0205, Attribiutes.CurrentWaitingTime = (Class.InterfaceDeviceProtocol << 16) | 0x0206, Attribiutes.CurrentInformationFieldSizeCard = (Class.InterfaceDeviceProtocol << 16) | 0x0207, Attribiutes.CurrentInformationFieldSizeDevice = (Class.InterfaceDeviceProtocol << 16) | 0x0208, Attribiutes.CurrentBlockWaitingTime = (Class.InterfaceDeviceProtocol << 16) | 0x0209, Attribiutes.CurrentCharacterWaitingTime = (Class.InterfaceDeviceProtocol << 16) | 0x020a, Attribiutes.CurrentErrorBlockControlEncoding = (Class.InterfaceDeviceProtocol << 16) | 0x020b, Attribiutes.ExtendedBlockWaitTime = (Class.InterfaceDeviceProtocol << 16) | 0x020c, Attribiutes.ICCPresence = (Class.ICCState << 16) | 0x0300, Attribiutes.ICCInterfaceStatus = (Class.ICCState << 16) | 0x0301, Attribiutes.CurrentIOState = (Class.ICCState << 16) | 0x0302, Attribiutes.AnswerToResetString = (Class.ICCState << 16) | 0x0303, Attribiutes.ICCTypePerAtr = (Class.ICCState << 16) | 0x0304, Attribiutes.EscReset = (Class.VendorDefined << 16) | 0xA000, Attribiutes.EscCancel = (Class.VendorDefined << 16) | 0xA003, Attribiutes.EscAuthRequest = (Class.VendorDefined << 16) | 0xA005, Attribiutes.MaxInput = (Class.VendorDefined << 16) | 0xA007, Attribiutes.DeviceUnit = (Class.System << 16) | 0x0001, Attribiutes.DeviceInUse = (Class.System << 16) | 0x0002, Attribiutes.DeviceFriendlyNameA = (Class.System << 16) | 0x0003, Attribiutes.DeviceSystemNameA = (Class.System << 16) | 0x0004, Attribiutes.DeviceFriendlyNameW = (Class.System << 16) | 0x0005, Attribiutes.DeviceSystemNameW = (Class.System << 16) | 0x0006, Attribiutes.SupressT1InformationFileSizeRequest = (Class.System << 16) | 0x0007, Attribiutes.DeviceFriendlyName = DeviceFriendlyNameA, Attribiutes.DeviceSystemName = DeviceSystemNameA } |
| enum | BaudRates { Rate106 = 0x00, Rate212 = 0x01, Rate424 = 0x02, Rate848 = 0x04 } |
| enum | BookNumber : byte { Book0 = 0x00, Book1 = 0x01 } |
| enum | PageNumber : byte { Page0 = 0x00, Page1 = 0x01, Page2 = 0x02, Page3 = 0x03, Page4 = 0x04, Page5 = 0x05, Page6 = 0x06, Page7 = 0x07 } |
| enum | CardDisposition : int { CardDisposition.Leave = 0, CardDisposition.Reset = 1, CardDisposition.Unpower = 2, CardDisposition.Eject = 3 } |
| Defines the action to take on the card in the connected reader when calling SCardDisconnect WinSCard.SCardDisconnect(IntPtr, int) More... | |
| enum | CardInitialization : int { CardInitialization.Leave = 0, CardInitialization.WarmReset = 1, CardInitialization.ColdReset = 2 } |
| enum | CardState { CardState.Unknown = 1, CardState.Absent = 2, CardState.Present = 4, CardState.Swallowed = 8, CardState.Powered = 16, CardState.Negotiable = 32, CardState.Specific = 64 } |
| State of the smart card in the reader. More... | |
| enum | EnabledCLFeatures : ushort { Felica = 0x0001, EMVCoCL = 0x0002, CalypsoSupport = 0x0004, NfcP2p = 0x0008, SioProcessor = 0x0010, Sdr = 0x0020, NativeFWSecureEngine = 0x0040, Cl = 0x0080, Iso14443a = 0x0100, Iso14443b = 0x0200, Iso15693 = 0x0400, PicoPass15693 = 0x0800, PicoPass14443b = 0x1000, PicoPass14443a = 0x2000, Rfu1 = 0x4000, Rfu2 = 0x8000 } |
| enum | ExchangeLevelFlags { TPDU = 0x01, Short = 0x02, Extended = 0x04 } |
| enum | HostInterfaceFlags { Ethernet = 0x01, Usb = 0x02, SerialRS232 = 0x04, Spi = 0x08, I2c = 0x10 } |
| enum | HumanInterfaceFlags { None = 0x00, KeyPad = 0x01, KeyWedge = 0x02, Display = 0x04, Buzzer = 0x08, Web = 0x10, Led = 0x20 } |
| enum | OperatingModeFlags : byte { Iso7816 = 0x00, EMVCo = 0x01 } |
| enum | PollingFrequency { T24ms = 0x00, T48ms = 0x01, T96ms = 0x02, T200ms = 0x03, T400ms = 0x04, T800ms = 0x05, T1400ms = 0x06, T3100ms = 0x07, T6200ms = 0x08, T12300ms = 0x09 } |
| enum | PollingSearchOrder { None = 0x00, Iso15693 = 0x01, Iso14443a = 0x02, Iso14443b = 0x03, Iclass = 0x04, Felica = 0x06 } |
| enum | Protocol : int { Protocol.None = 0, Protocol.T0 = 1, Protocol.T1 = 2, Protocol.Any = T0|T1, Protocol.Raw = 4, Protocol.T15 = 8 } |
| The Smart Card Protocol More... | |
| enum | DeviceType { FileDeviceSmartCard = 0x31 } |
| enum | ReaderControlCode : int { ReaderControlCode.IOCTL_SMARTCARD_POWER = (DeviceType.FileDeviceSmartCard << 16) + (1 << 2), ReaderControlCode.IOCTL_SMARTCARD_GET_ATTRIBUTE = (DeviceType.FileDeviceSmartCard << 16) + (2 << 2), ReaderControlCode.IOCTL_SMARTCARD_SET_ATTRIBUTE = (DeviceType.FileDeviceSmartCard << 16) + (3 << 2), ReaderControlCode.IOCTL_SMARTCARD_CONFISCATE = (DeviceType.FileDeviceSmartCard << 16) + (4 << 2), ReaderControlCode.IOCTL_SMARTCARD_TRANSMIT = (DeviceType.FileDeviceSmartCard << 16) + (5 << 2), ReaderControlCode.IOCTL_SMARTCARD_EJECT = (DeviceType.FileDeviceSmartCard << 16) + (6 << 2), ReaderControlCode.IOCTL_SMARTCARD_SWALLOW = (DeviceType.FileDeviceSmartCard << 16) + (7 << 2), ReaderControlCode.IOCTL_SMARTCARD_READ = (DeviceType.FileDeviceSmartCard << 16) + (8 << 2), ReaderControlCode.IOCTL_SMARTCARD_WRITE = (DeviceType.FileDeviceSmartCard << 16) + (9 << 2), ReaderControlCode.IOCTL_SMARTCARD_IS_PRESENT = (DeviceType.FileDeviceSmartCard << 16) + (10 << 2), ReaderControlCode.IOCTL_SMARTCARD_IS_ABSENT = (DeviceType.FileDeviceSmartCard << 16) + (11 << 2), ReaderControlCode.IOCTL_SMARTCARD_SET_PROTOCOL = (DeviceType.FileDeviceSmartCard << 16) + (12 << 2), ReaderControlCode.IOCTL_SMARTCARD_GET_STATE = (DeviceType.FileDeviceSmartCard << 16) + (14 << 2), ReaderControlCode.IOCTL_SMARTCARD_GET_LAST_ERROR = (DeviceType.FileDeviceSmartCard << 16) + (15 << 2), ReaderControlCode.IOCTL_SMARTCARD_GET_PERF_CNTR = (DeviceType.FileDeviceSmartCard << 16) + (16 << 2), ReaderControlCode.CM_IOCTL_GET_FW_VERSION = (DeviceType.FileDeviceSmartCard << 16) + (3001 << 2), ReaderControlCode.CM_IOCTL_SIGNAL = (DeviceType.FileDeviceSmartCard << 16) + (3058 << 2), ReaderControlCode.CM_IOCTL_RFID_GENERIC = (DeviceType.FileDeviceSmartCard << 16) + (3105 << 2), ReaderControlCode.CM_IOCTL_SET_OPERATION_MODE = (DeviceType.FileDeviceSmartCard << 16) + (3107 << 2), ReaderControlCode.CM_IOCTL_GET_MAXIMUM_RFID_BAUDRATE = (DeviceType.FileDeviceSmartCard << 16) + (3208 << 2), ReaderControlCode.CM_IOCTL_SET_RFID_CONTROL_FLAGS = (DeviceType.FileDeviceSmartCard << 16) + (3213 << 2), ReaderControlCode.CM_IOCTL_GET_SET_RFID_BAUDRATE = (DeviceType.FileDeviceSmartCard << 16) + (3215 << 2), ReaderControlCode.CM_IOCTL_GET_FEATURE_REQUEST = (DeviceType.FileDeviceSmartCard << 16) + (3400 << 2), ReaderControlCode.IOCTL_CCID_ESCAPE = (DeviceType.FileDeviceSmartCard << 16) + (3500 << 2) } |
| enum | ReaderSharingMode : int { ReaderSharingMode.NotSet = 0, ReaderSharingMode.Exclusive = 1, ReaderSharingMode.Shared = 2, ReaderSharingMode.Direct = 3 } |
| Defines for the share mode input parameter of SCardConnect WinSCardWrapper.SCardConnect(IntPtr, string, int, int, IntPtr, int). More... | |
| enum | ReaderStates : int { ReaderStates.Unaware = 0, ReaderStates.Ignore = 1, ReaderStates.Changed = 1 << 1, ReaderStates.Unknown = 1 << 2, ReaderStates.Unavailable = 1 << 3, ReaderStates.Empty = 1 << 4, ReaderStates.Present = 1 << 5, ReaderStates.AtrMatch = 1 << 6, ReaderStates.Exclusive = 1 << 7, ReaderStates.InUse = 1 << 8, ReaderStates.Mute = 1 << 9, ReaderStates.Unpowered = 1 << 10 } |
| Current state of the reader, as seen by the application. This field can take on any of the following values, in combination, as a bitmask. More... | |
| enum | Scope : int { Scope.User = 0, Scope.Terminal = 1, Scope.System = 2, Scope.Global = 3 } |
| enum | VoltageSequenceFlags : byte { VoltageSequenceFlags.High = 3, VoltageSequenceFlags.Mid = 2, VoltageSequenceFlags.Low = 1, None = 0 } |
|
strong |
|
strong |
|
strong |
|
strong |
State of the smart card in the reader.
|
strong |
|
strong |
The Smart Card Protocol
| Enumerator | |
|---|---|
| None | There is no active protocol, usable when connecting reader in Direct mode. SCardSharedMode.Direct |
| T0 | T0 is a active protocol. |
| T1 | T1 is a active protocol. |
| Any | IFD determines a active protocol. |
| Raw | Raw is a active protocol. |
| T15 | T15 is a active protocol. |
|
strong |
|
strong |
Defines for the share mode input parameter of SCardConnect WinSCardWrapper.SCardConnect(IntPtr, string, int, int, IntPtr, int).
|
strong |
Current state of the reader, as seen by the application. This field can take on any of the following values, in combination, as a bitmask.
| Enumerator | |
|---|---|
| Unaware | The application is unaware of the current state, and would like to know. The use of this value results in an immediate return from state transition monitoring services. This is represented by all bits set to zero. |
| Ignore | The application is not interested in this reader, and it should not be considered during monitoring operations. If this bit value is set, all other bits are ignored. |
| Changed | This implies that there is a difference between the state believed by the application, and the state known by the Service Manager. When this bit is set, the application may assume a significant state change has occurred on this reader. |
| Unknown | This implies that the given reader name is not recognized by the Service Manager. If this bit is set, then ReaderStates.Changed and ReaderStates.Ignore will also be set. |
| Unavailable | The application expects that this reader is not available for use. If this bit is set, then all the following bits are ignored. |
| Empty | The application expects that there is no card in the reader. If this bit is set, all the following bits are ignored. |
| Present | The application expects that there is a card in the reader. |
| AtrMatch | The application expects that there is a card in the reader with an ATR that matches one of the target cards. If this bit is set, ReaderStates.Present is assumed. This bit has no meaning to WinSCardWrapper.SCardGetStatusChange(IntPtr, int, SCardReaderState, int) beyond ReaderStates.Present. |
| Exclusive | The application expects that the card in the reader is allocated for exclusive use by another application. If this bit is set, ReaderStates.Present is assumed. |
| InUse | The application expects that the card in the reader is in use by one or more other applications, but may be connected to in shared mode. If this bit is set, ReaderStates.Present is assumed. |
| Mute | The application expects that there is an unresponsive card in the reader. |
| Unpowered | This implies that the card in the reader has not been powered up. |
|
strong |
|
strong |