sc_detach()

Close any open smart card session.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_detach(sc_context_t *context,                 
                             sc_card_disposition_t card_disposition)

Since:

BlackBerry 10.2.0

Arguments:

context

The active smart card context. This value cannot be NULL.

card_disposition

The disposition action to be performed upon termination.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

If no connection is currently opened, then an error is returned.

Upon termination, the action indicated by card_disposition is performed, if possible. The allowed actions include:

  • leaving the card
  • resetting the card
  • powering down the card
  • ejecting the card

Any application may reset the card, even in shared access mode. You can turn off the power to a smart card or eject a smart card only if the app has exclusive access to the card.

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus