VintaSoft Twain .NET SDK 15.3: Documentation for .NET developer
In This Topic
    eSCL devices
    In This Topic
    eSCL device manager allows to get the device list programmatically. Device list can be obtained using EsclDeviceManager.Devices property. Information about an opened device can be obtained using EsclDeviceManager.OpenedDevice property.

    Here is an example that demonstrates how to open eSCL device manager and display information about all available eSCL devices:
    /// <summary>
    /// Opens eSCL device manager and displays information about available local eSCL image scanners.
    /// </summary>
    void GetEsclDevicesInfo()
    {
        // create eSCL device manager
        using (Vintasoft.EsclImageScanning.EsclDeviceManager deviceManager = new Vintasoft.EsclImageScanning.EsclDeviceManager())
        {
            // open device manager
            deviceManager.Open();
    
            // wait while the eSCL device manager searches for eSCL devices
            System.Threading.Thread.Sleep(deviceManager.DeviceSearchTimeout);
            // get count of eSCL devices
            int deviceCount = deviceManager.Devices.Count;
            if (deviceCount == 0)
            {
                System.Console.WriteLine("Devices are not found.");
                return;
            }
    
            Vintasoft.EsclImageScanning.EsclDeviceCollection devices = deviceManager.Devices;
            // for each eSCL device
            for (int i = 0; i < devices.Count; i++)
            {
                // output the device name
                System.Console.WriteLine(string.Format("Device '{0}'", devices[i].Name));
            }
        }
    }
    
    ''' <summary>
    ''' Opens eSCL device manager and displays information about available local eSCL image scanners.
    ''' </summary>
    Private Sub GetEsclDevicesInfo()
        ' create eSCL device manager
        Using deviceManager As New Vintasoft.EsclImageScanning.EsclDeviceManager()
            ' open device manager
            deviceManager.Open()
    
            ' wait while the eSCL device manager searches for eSCL devices
            System.Threading.Thread.Sleep(deviceManager.DeviceSearchTimeout)
            ' get count of eSCL devices
            Dim deviceCount As Integer = deviceManager.Devices.Count
            If deviceCount = 0 Then
                System.Console.WriteLine("Devices are not found.")
                Return
            End If
    
            Dim devices As Vintasoft.EsclImageScanning.EsclDeviceCollection = deviceManager.Devices
            ' for each eSCL device
            For i As Integer = 0 To devices.Count - 1
                ' output the device name
                System.Console.WriteLine(String.Format("Device '{0}'", devices(i).Name))
            Next
        End Using
    End Sub