1SC_READ_RECORD(3)            OpenSC API reference            SC_READ_RECORD(3)
2
3
4

NAME

6       sc_read_record - Read a record from a file
7

SYNOPSIS

9          #include <opensc.h>
10
11          int sc_read_record(struct sc_card *card, unsigned int record,
12                             unsigned char *buf, size_t buflen,
13                             unsigned long flags);
14
15
16

DESCRIPTION

18       This function reads a record-structured elementary file (EF) from card.
19       The function corresponds to the ISO 7816 READ RECORD function. Call
20       sc_select_file() first to select the file to read from.
21
22       record specifies the ID of the record to be read, or, if flags is set
23       to SC_RECORD_BY_REC_NR, the record number. If record is set to zero,
24       the current record will be read.
25
26       The read data is stored in buf, which is buflen bytes long.
27

RETURN VALUE

29       Returns the number of bytes read if successful, or a negative value in
30       case of error.
31
32
33
34opensc                            05/04/2007                 SC_READ_RECORD(3)
Impressum