示例#1
0
        public CardDeviceInfo GetDeviceInfo()
        {
            var info = new StringBuilder();

            CardDllImport.GetDeviceInfo(_handle, info);

            return(new CardDeviceInfo(info.ToString()));
        }
示例#2
0
        public string ReadUid()
        {
            var uid = new StringBuilder();

            CardDllImport.IsoGetUid14443a(_handle, uid);
            if (uid.Length > 0)
            {
                uid.Remove(8, uid.Length - 8);
            }
            return(uid.ToString());
        }
示例#3
0
        public bool OpenDevice()
        {
            var handle = CardDllImport.UsbHidOpen(0x6298, 0x3212);

            if (handle > 0)
            {
                _handle = handle;
                return(true);
            }
            return(false);
        }
示例#4
0
 public void Beep(byte time)
 {
     CardDllImport.Beep(_handle, time);
 }
示例#5
0
 public void CloseDevice()
 {
     CardDllImport.UsbHidClose(ref _handle);
 }