44 lines
1.2 KiB
XML
44 lines
1.2 KiB
XML
|
<refentry id="scconnectcard">
|
||
|
<refmeta>
|
||
|
<refentrytitle>sc_connect_card</refentrytitle>
|
||
|
<manvolnum>3</manvolnum>
|
||
|
<refmiscinfo>opensc</refmiscinfo>
|
||
|
</refmeta>
|
||
|
|
||
|
<refnamediv>
|
||
|
<refname>sc_connect_card</refname>
|
||
|
<refpurpose>Connect to smartcard in reader</refpurpose>
|
||
|
</refnamediv>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Synopsis</title>
|
||
|
<para>
|
||
|
<programlisting>
|
||
|
&includes;
|
||
|
|
||
|
int sc_connect_card(sc_reader_t *reader, int slot, <link linkend="sccardt">sc_card_t</link> **card);
|
||
|
</programlisting>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<para>
|
||
|
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.
|
||
|
</para>
|
||
|
|
||
|
<para>
|
||
|
The <emphasis>slot</emphasis> parameter identifies the card reader's slot. Slots are numbered
|
||
|
consecutively, starting at 0.
|
||
|
</para>
|
||
|
|
||
|
<para>
|
||
|
If OpenSC was able to connect to the card, a pointer to the sc_card_t object is stored in the
|
||
|
location pointer to by the <emphasis>card</emphasis> parameter. The card handle should be
|
||
|
released with <link linkend="scdisconnectcard">sc_disconnect_card</link> when no longer in use.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
</refentry>
|