# OpenSC API Reference

sc_disconnect_card
3
opensc

# sc_disconnect_card

Disconnect from a smart card

## Synopsis

    #include <opensc.h>

    int sc_disconnect_card(sc_card_t *card, int action);

## Description

This function disconnects from card, and frees the card structure. Any locks made by the application must be released before calling this function.

The action parameter is not used at the moment and should be set to 0.

The card is not reset nor powered down after the operation.

## Return value

Returns 0 if successful, or a negative value in case of error.