FreeCalypso > hg > fc-sim-tools
view pcsc/atrmain.c @ 64:dba24129027e
doc/ADM-PIN-numbering article written
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 23 Mar 2021 23:30:00 +0000 |
parents | 11f4f8a8fa33 |
children |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <pcsclite.h> #include <winscard.h> extern SCARDCONTEXT hContext; extern SCARDHANDLE hCard; extern char *selected_reader; main(argc, argv) char **argv; { parse_reader_select_opt(argc, argv); setup_pcsc_context(); get_reader_list(); select_reader_by_num(); printf("Card reader name: %s\n", selected_reader); connect_to_card(); retrieve_atr("ATR:"); SCardDisconnect(hCard, SCARD_UNPOWER_CARD); SCardReleaseContext(hContext); exit(0); }