---
name: "sc_disconnect_card"
section: "3"
platform: "linux"
package: "libopensc2-dev"
version: "0.11.13-1.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_disconnect_card"
---

# sc\_disconnect\_card(3)

Disconnect from a smart card

## NAME

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.
