Exemple #1
0
 public static void Close(int device)
 {
     if ((device < 0) || (device > 3))
     {
         throw new Exception("Invalid device");
     }
     if (m_refCounts[device] == 1)
     {
         K8055D.SetCurrentDevice((long)device);
         K8055D.CloseDevice();
         m_refCounts[device] = 0;
     }
     else if (m_refCounts[device] > 1)
     {
         m_refCounts[device]--;
     }
 }
Exemple #2
0
        public static long SearchDevices()
        {
            int num;

            m_busy = true;
            for (num = 0; num < m_refCounts.Length; num++)
            {
                K8055D.SetCurrentDevice((long)num);
                K8055D.CloseDevice();
            }
            long num2 = K8055D.SearchDevices();

            for (num = 0; num < m_refCounts.Length; num++)
            {
                if (m_refCounts[num] > 0)
                {
                    K8055D.OpenDevice((long)num);
                }
            }
            m_busy = false;
            return(num2);
        }