HID OMNIKEY Smart Card Readers' Sample Codes  0.0.0.116
HidGlobal.OK.Readers.SmartCardReader Class Reference
Inheritance diagram for HidGlobal.OK.Readers.SmartCardReader:
HidGlobal.OK.Readers.ISmartCardReader

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...
 

Member Function Documentation

◆ BeginTransaction()

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.

◆ CheckConnectionStatus()

ConnectionStatus HidGlobal.OK.Readers.SmartCardReader.CheckConnectionStatus ( )

State of smart card in the reader.

Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Connect()

void HidGlobal.OK.Readers.SmartCardReader.Connect ( ReaderSharingMode  mode,
Protocol  preferredProtocol 
)

Establishes a connection between the calling application and a smart card.

Parameters
modeReader share mode to be used in current connection.
preferredProtocolSmart card protocol to be used in current connection.

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ ConnectDirect()

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.

◆ Control() [1/2]

IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.Control ( ReaderControlCode  controlCode,
IReadOnlyList< byte >  dataBytes 
)

Gets direct control of the reader after Connect is called.

Parameters
controlCode
dataBytes
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Control() [2/2]

string HidGlobal.OK.Readers.SmartCardReader.Control ( ReaderControlCode  controlCode,
string  dataBytes 
)

Gets direct control of the reader after Connect is called.

Parameters
controlCode
dataBytes
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Disconnect()

void HidGlobal.OK.Readers.SmartCardReader.Disconnect ( CardDisposition  disposition)

Terminates a connection between the calling application and a smart card.

Parameters
dispositionAction to take on the card in the connected reader on close.

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ EndTransaction()

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.

Parameters
dispositionAction to take on the card in the connected reader on close.

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ GetAttribiute()

IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.GetAttribiute ( Attribiutes  attribiuteId)

Gets the current reader's attributes from a given reader, driver, or smart card.

Parameters
attribiuteIdIdentifier for the attribute to get.
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Reconnect()

void HidGlobal.OK.Readers.SmartCardReader.Reconnect ( CardInitialization  initialization,
ReaderSharingMode  mode,
Protocol  protocol 
)

Reestablishes an existing connection from the calling application to the smart card.

Parameters
initializationType of initialization that should be performed on the card.
modeReader share mode to be used in current connection.
protocolSmart card protocol to be used in current connection.

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ SetAttribiute()

void HidGlobal.OK.Readers.SmartCardReader.SetAttribiute ( Attribiutes  attribiuteId,
IReadOnlyList< byte >  attribiute 
)

Sets a given reader attribute.

Parameters
attribiuteIdIdentifier for the attribute to set.
attribiute
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Transmit() [1/4]

IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.Transmit ( IReadOnlyList< byte >  apdu)

Sends a service request to a smart card.

Parameters
apdu
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Transmit() [2/4]

string HidGlobal.OK.Readers.SmartCardReader.Transmit ( string  apdu)

Sends a service request to a smart card.

Parameters
apdu
Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Transmit() [3/4]

IReadOnlyList<byte> HidGlobal.OK.Readers.SmartCardReader.Transmit ( ref IoRequest  sendPci,
ref IoRequest  recivePci,
IReadOnlyList< byte >  apdu 
)

Sends a service request to a smart card.

Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.

◆ Transmit() [4/4]

string HidGlobal.OK.Readers.SmartCardReader.Transmit ( ref IoRequest  sendPci,
ref IoRequest  recivePci,
string  apdu 
)

Sends a service request to a smart card.

Returns

Implements HidGlobal.OK.Readers.ISmartCardReader.


The documentation for this class was generated from the following file: