41
www.ubisys.de
functions which require a context handle.
std::list<tstring> EnumerateReaders()
const
EnumerateReaders() returns a list of readers known to the system.
DWORD GetReaderStatus(
const
tstring &reader);
Obtains the current status for the specified reader. The result is a bitmask of
SCARD_STATE_XXX
constants, e.g.
SCARD_STATE_PRESENT
indicates that there is a card in the reader.
The method calls SCardGetStatusChange() internally and returns the member dwEventState of the
SCARD_READERSTATE struct.
vector<
unsigned char
> GetATRString(
const
tstring &reader);
Obtains the ATR string (Answer to Reset) generated for the tag in field (if any). Returns an empty
vector if no tag is in the field.
9.2.2.
CSmartCard
9.2.2.1.
Local Type Definitions
The type tstring is defined locally (see CSmartCardContext):
typedef
std::basic_string<TCHAR> tstring;
9.2.2.2.
Constructor
CSmartCard(CSmartCardContext &context,
const
tstring &strReader,
const
DWORD dwShareMode = SCARD_SHARE_SHARED,
const
DWORD dwPrefProtocol = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
const
DWORD dwDisposition = SCARD_LEAVE_CARD);
Constructs a CSmartCard instance which forms the logical connection to a Smart Card/RFID Tag in
the specified reader.
Please note that the connection can only be established once the tag is in the field of the reader
(analogous to a card being inserted into the reader). The provided context must be valid during the
overall lifetime of the class instance, i.e. it must not be deleted/destroyed before the instance of
CSmartCard is destroyed/deleted.
Internally calls SCardConnect(). The destructor will call SCardDisconnect() with the parameter
dwDisposition to release the connection.
The default parameters for dwShareMode, dwPrefProtocol and dwDisposition can be overridden, if
necessary.
Summary of Contents for 7047
Page 1: ...13 56 MHz RFID USB READER REFERENCE MANUAL...
Page 28: ...28 www ubisys de...
Page 34: ...34 www ubisys de...