Open a session to a smart card located in a reader.
#include <smartcard/sc_smart_card.h>
sc_response_code_t sc_attach_by_reader(sc_context_t *context,
const char *reader_name,
sc_card_access_mode_t card_access_mode)
BlackBerry 10.2.0
The active smart card context. This value cannot be NULL.
The name of the reader where the smart card to connect to is located. This value cannot be NULL.
This parameter indicates whether the connection is open for shared or exclusive access. If the requested mode is unavailable, an error is returned.
If the reader is unknown to the smart card subsystem, then an error is returned. Other connection options are set by the driver to optimize communication with the card.
Before opening a session to a smart card, you must first allocate a card handle by calling sc_allocate_handle(). Otherwise, an error is returned.
SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.