|
HID OMNIKEY Smart Card Readers' Sample Codes
0.0.0.116
|
Public Member Functions | |
| SmartCardReader (string readerName) | |
| void | Connect (ReaderSharingMode mode, Protocol preferredProtocol) |
| Establishes a connection between the calling application and a smart card. More... | |
| void | ConnectDirect () |
| Establishes a connection between the calling application and a smart card in Direct mode, can be used to send control commands to reader without any smart card present. More... | |
| void | Disconnect (CardDisposition disposeAction) |
| Terminates a connection between the calling application and a smart card. More... | |
| void | Reconnect (CardInitialization initialization, ReaderSharingMode mode, Protocol preferredProtocol) |
| Reestablishes an existing connection from the calling application to the smart card. More... | |
| IReadOnlyList< byte > | Control (ReaderControlCode controlCode, IReadOnlyList< byte > dataBytes) |
| Gets direct control of the reader after Connect is called. More... | |
| string | Control (ReaderControlCode controlCode, string dataBytes) |
| Gets direct control of the reader after Connect is called. More... | |
| IReadOnlyList< byte > | Transmit (IReadOnlyList< byte > apdu) |
| Sends a service request to a smart card. More... | |
| string | Transmit (string apdu) |
| Sends a service request to a smart card. More... | |
| IReadOnlyList< byte > | Transmit (ref IoRequest sendPci, ref IoRequest recivePci, IReadOnlyList< byte > apdu) |
| Sends a service request to a smart card. More... | |
| string | Transmit (ref IoRequest sendPci, ref IoRequest recivePci, string apdu) |
| Sends a service request to a smart card. More... | |
| ConnectionStatus | CheckConnectionStatus () |
| State of smart card in the reader. More... | |
| IReadOnlyList< byte > | GetAttribiute (Attribiutes attribiuteId) |
| Gets the current reader's attributes from a given reader, driver, or smart card. More... | |
| void | SetAttribiute (Attribiutes attribiuteId, IReadOnlyList< byte > attribute) |
| Sets a given reader attribute. More... | |
| void | BeginTransaction () |
| The function waits for the completion of all other transactions before it begins. After the transaction starts, all other applications are blocked from accessing the smart card while the transaction is in progress. More... | |
| void | EndTransaction (CardDisposition disposition) |
| The SCardEndTransaction function completes a previously declared transaction, allowing other applications to resume interactions with the card. More... | |
| void | Dispose () |
Public Attributes | |
| bool | IsConnected => Handle != IntPtr.Zero |
Protected Member Functions | |
| virtual void | Dispose (bool disposing) |
Properties | |
| Encoding | Encoding [get, set] |
| Protocol | ActiveProtocol [get] |
| ReaderSharingMode | ConnectionMode [get] |
| CardState | ActiveCardState [get] |
| string | PcscReaderName [get] |
Properties inherited from HidGlobal.OK.Readers.ISmartCardReader | |
| string | PcscReaderName [get] |
| Reader name seen by Windows Smart Card Resource Manager. More... | |
| Protocol | ActiveProtocol [get] |
| Smart card protocol used in current connection. More... | |
| ReaderSharingMode | ConnectionMode [get] |
| Reader share mode used in current connection.s More... | |
| bool | IsConnected [get] |
| Connection status. More... | |
| void HidGlobal.OK.Readers.SmartCardReader.BeginTransaction | ( | ) |
The function waits for the completion of all other transactions before it begins. After the transaction starts, all other applications are blocked from accessing the smart card while the transaction is in progress.
Implements HidGlobal.OK.Readers.ISmartCardReader.
| ConnectionStatus HidGlobal.OK.Readers.SmartCardReader.CheckConnectionStatus | ( | ) |
| void HidGlobal.OK.Readers.SmartCardReader.Connect | ( | ReaderSharingMode | mode, |
| Protocol | preferredProtocol | ||
| ) |
Establishes a connection between the calling application and a smart card.
| mode | Reader share mode to be used in current connection. |
| preferredProtocol | Smart card protocol to be used in current connection. |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| void HidGlobal.OK.Readers.SmartCardReader.ConnectDirect | ( | ) |
Establishes a connection between the calling application and a smart card in Direct mode, can be used to send control commands to reader without any smart card present.
Implements HidGlobal.OK.Readers.ISmartCardReader.
| IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.Control | ( | ReaderControlCode | controlCode, |
| IReadOnlyList< byte > | dataBytes | ||
| ) |
Gets direct control of the reader after Connect is called.
| controlCode | |
| dataBytes |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| string HidGlobal.OK.Readers.SmartCardReader.Control | ( | ReaderControlCode | controlCode, |
| string | dataBytes | ||
| ) |
Gets direct control of the reader after Connect is called.
| controlCode | |
| dataBytes |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| void HidGlobal.OK.Readers.SmartCardReader.Disconnect | ( | CardDisposition | disposition | ) |
Terminates a connection between the calling application and a smart card.
| disposition | Action to take on the card in the connected reader on close. |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| void HidGlobal.OK.Readers.SmartCardReader.EndTransaction | ( | CardDisposition | disposition | ) |
The SCardEndTransaction function completes a previously declared transaction, allowing other applications to resume interactions with the card.
| disposition | Action to take on the card in the connected reader on close. |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.GetAttribiute | ( | Attribiutes | attribiuteId | ) |
Gets the current reader's attributes from a given reader, driver, or smart card.
| attribiuteId | Identifier for the attribute to get. |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| void HidGlobal.OK.Readers.SmartCardReader.Reconnect | ( | CardInitialization | initialization, |
| ReaderSharingMode | mode, | ||
| Protocol | protocol | ||
| ) |
Reestablishes an existing connection from the calling application to the smart card.
| initialization | Type of initialization that should be performed on the card. |
| mode | Reader share mode to be used in current connection. |
| protocol | Smart card protocol to be used in current connection. |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| void HidGlobal.OK.Readers.SmartCardReader.SetAttribiute | ( | Attribiutes | attribiuteId, |
| IReadOnlyList< byte > | attribiute | ||
| ) |
Sets a given reader attribute.
| attribiuteId | Identifier for the attribute to set. |
| attribiute |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.Transmit | ( | IReadOnlyList< byte > | apdu | ) |
Sends a service request to a smart card.
| apdu |
Implements HidGlobal.OK.Readers.ISmartCardReader.
| string HidGlobal.OK.Readers.SmartCardReader.Transmit | ( | string | apdu | ) |
Sends a service request to a smart card.
| apdu |
Implements HidGlobal.OK.Readers.ISmartCardReader.