31 lines
1.1 KiB
Groff
31 lines
1.1 KiB
Groff
.TH sc_connect_card 3 "April 2003" "OpenSC Programmer's Manual
|
|
.SH NAME
|
|
sc_connect_card \- connect to smart card in reader
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B #include <opensc.h>
|
|
.sp
|
|
.BI "int sc_connect_card(sc_reader_t *" reader ",
|
|
.BI " int " slot ", sc_card_t **" card ");
|
|
.fi
|
|
.SH DESCRIPTION
|
|
This function connects to a card in a reader, resets the card
|
|
and retrieves the ATR (Answer To Reset). Based on the ATR, it
|
|
tries to auto-detect which card driver to use.
|
|
.PP
|
|
The \fIslot\fP parameter identifies the card reader's slot.
|
|
Slots are numbered consecutively, starting at \fB0\fP.
|
|
.PP
|
|
If OpenSC was able to connect to the card, a pointer to the
|
|
\fBsc_card_t\fP object is stored in the location pointer to
|
|
by the \fIcard\fP parameter. The card handle should be
|
|
released with \fBsc_disconnect_card\fP(3) when no longer in used.
|
|
.SH RETURN VALUE
|
|
If an error occurred, a negative error code is returned, as described
|
|
in \fbsc_error\fP(3). Otherwise, the function will return 0.
|
|
.SH SEE ALSO
|
|
.BR sc_establish_context (3),
|
|
.BR sc_disconnect_card (3).
|
|
.SH AUTHOR
|
|
This manual page was written by Olaf Kirch <okir@suse.de>
|