예제 #1
0
파일: Fel.cs 프로젝트: jpcoop/hakchi2
        public static bool DeviceExists(UInt16 vid, UInt16 pid)
        {
            var fel = new Fel();

            try
            {
                fel.Open(vid, pid);
                return(true);
            }
            catch
            {
                return(false);
            }
            finally
            {
                fel.Close();
            }
        }
예제 #2
0
        public static bool DeviceExists(UInt16 vid, UInt16 pid)
        {
            var fel = new Fel();

            try
            {
                fel.Open(vid, pid);
                Debug.WriteLine("Device detection successful");
                return(true);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Device detection error: " + ex.Message + ex.StackTrace);
                return(false);
            }
            finally
            {
                fel.Close();
            }
        }
예제 #3
0
파일: Fel.cs 프로젝트: zilla85/hakchi2
 public static bool DeviceExists(UInt16 vid, UInt16 pid)
 {
     var fel = new Fel();
     try
     {
         if (fel.Open(vid, pid))
         {
             Debug.WriteLine("Device detection successful");
             return true;
         }
         else
         {
             return false;
         }
     }
     finally
     {
         fel.Close();
     }
 }