Naughter Software Logo

SCardWrappers v1.05 A set of a set of C++ classes to provide a complete encapsulation of the Smart Card API for Windows

The classes provided are: SCard::CException, SCard::CContext, SCard::CContext2, SCard::CAPDURequest, SCard::CAPDUResponse, SCard::CCard, SCard::CCard2, SCard::CATR, SCard::String, SCard::StringArray, SCard::GUIDArray & SCard::ByteArray.

CException is the exception class used and can be thrown by CContext2 and CCard2 methods. If MFC integration is chosen for the classes then this class will be derived from the CException MFC class and exceptions will be thrown by pointer. If STL integration is chosen then the exception will be throw by standard reference.

CContext provides an encapsulation of a Smart Card SCARDCONTEXT handle.

CContext2 derives from CContext and provides an exception based version of it.

CAPDURequest provides a C++ encapsulation of a request which is sent to the Transmit method of CCard/CCard2. It also provides a Parse method to convert a raw BYTE buffer into a request.

CAPDUResponse provides a C++ encapsulation of a response which is received via the Transmit method of CCard/CCard2. It also provides a Parse method to convert a raw BYTE buffer into a response.

CCard provides an encapsulation of a Smart Card SCARDHANDLE handle.

CCard2 derives from CCard and provides an exception based version of it.

CATR provides an ATR parser class.

String derives from either CString if the classes are using MFC or std::string/std::wstring if using STL.

StringArray derives from either CArray<String..> if the classes are using MFC or std::vector<String> if using STL.

GUIDArray derives from either CArray<GUID..> if the classes are using MFC or std::vector<GUID> if using STL.

ByteArray derives from either CByteArray if the classes are using MFC or std::vector<BYTE> if using STL.

 

 

Features

 

The enclosed zip file contains the SCardWrappers source code and a VC 2008 console based application which demonstrates most of the classes functionality.

 

Copyright

 

Updates

30 April 2017

V1.05 (25 March 2017)

V1.04 (24 July 2016)

V1.03 (2 January 2016)

V1.02 (29 November 2015)

V1.01 (5 April 2015)

V1.0 (28 April 2013)