FreeCalypso > hg > fc-sim-tools
comparison pcsc/rdlist.c @ 0:f4479a0d4cea
fc-pcsc-list ported over
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 14 Mar 2021 00:45:15 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f4479a0d4cea |
|---|---|
| 1 #include <string.h> | |
| 2 #include <strings.h> | |
| 3 #include <stdio.h> | |
| 4 #include <stdlib.h> | |
| 5 #include <pcsclite.h> | |
| 6 #include <winscard.h> | |
| 7 | |
| 8 extern SCARDCONTEXT hContext; | |
| 9 extern char *reader_list; | |
| 10 | |
| 11 main(argc, argv) | |
| 12 char **argv; | |
| 13 { | |
| 14 char *cp; | |
| 15 unsigned num; | |
| 16 | |
| 17 setup_pcsc_context(); | |
| 18 get_reader_list(); | |
| 19 for (cp = reader_list, num = 0; *cp; num++) { | |
| 20 printf("#%u: %s\n", num, cp); | |
| 21 cp += strlen(cp) + 1; | |
| 22 } | |
| 23 SCardReleaseContext(hContext); | |
| 24 exit(0); | |
| 25 } |
