Exemplo n.º 1
0
 static public int GetReaderPID(out byte[] PID)
 {
     PID = null;
     //if(_IsOpen == false) return -1;
     //if (_CommMode != UsbMode.ACM)
     //{
     //    PID = InstanceofHID.GetReaderPID();
     //    Array.Reverse(PID);
     //    return 0;
     //}
     //else if (_CommMode == UsbMode.ACM)
     //{
     //    PID = InstanceofVC.GetReaderPID();
     //    if (PID == null) return -1;
     //    return 0;
     //}
     //else return -1;
     PID = HID.GetReaderPID();
     if (PID != null)
     {
         Array.Reverse(PID);
         return(0);
     }
     PID = VirtualCom.GetReaderPID();
     if (PID != null)
     {
         return(0);
     }
     return(-1);
 }