public D8Reader(int port, int baud, CardType cardType) { this.port = port; this.baud = baud; this.hReader = -1; this.cardType = cardType; }
static extern short dc_authentication_passaddr(DEV_HANDLER hReader, byte mode, byte block, [In] byte[] pin);
static extern short dc_write(DEV_HANDLER hReader, byte block, [In] byte[] inData);
static extern short dc_read(DEV_HANDLER hReader, byte block, [Out] byte[] outData);
public static extern short dc_changeb3(DEV_HANDLER hReader, byte sector, [In] byte[] keyA, byte b0, byte b1, byte b2, byte b3, byte bk, [In] byte[] keyB);
static extern short dc_card_n(DEV_HANDLER hReader, byte mode, ref uint cardIdLen, [Out] byte[] cardId);
static extern short dc_select(DEV_HANDLER hReader, byte[] cardId, ref byte sak);
static extern short dc_anticoll(DEV_HANDLER hReader, byte bcnt, [Out] byte[] cardId);
static extern short dc_request(DEV_HANDLER hReader, byte mode, ref ushort atqa);
static extern short dc_config_card(DEV_HANDLER hReader, char cardType);
static extern short dc_reset(DEV_HANDLER hReader, ushort msec);
static extern short dc_getver(DEV_HANDLER hReader, [Out] byte[] version);
static extern short dc_light(DEV_HANDLER hReader, ushort flag);
static extern short dc_beep(DEV_HANDLER hReader, ushort duration);
static extern short dc_exit(DEV_HANDLER hReader);