VintaSoft Twain .NET SDK 15.4: Руководство для .NET разработчика
В этом разделе
Устройства WIA
В этом разделе
Диспетчер устройств WIA позволяет программно получить список устройств. Список устройств можно получить с помощью свойства WiaDeviceManager.Devices. Информацию об открытом устройстве можно получить с помощью свойства WiaDeviceManager.OpenedDevice.

Вот пример, демонстрирующий, как открыть диспетчер устройств WIA и отобразить информацию обо всех доступных устройствах WIA:
/// <summary>
/// Opens WIA device manager and displays information about available WIA image scanners.
/// </summary>
void GetWiaDevicesInfo()
{
    // create WIA device manager
    using (Vintasoft.WiaImageScanning.WiaDeviceManager deviceManager = new Vintasoft.WiaImageScanning.WiaDeviceManager())
    {
        // open device manager
        deviceManager.Open();

        Vintasoft.WiaImageScanning.WiaDeviceCollection devices = deviceManager.Devices;
        // for each WIA 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 WIA device manager and displays information about available WIA image scanners.
''' </summary>
Private Sub GetWiaDevicesInfo()
    ' create WIA device manager
    Using deviceManager As New Vintasoft.WiaImageScanning.WiaDeviceManager()
        ' open device manager
        deviceManager.Open()

        ' get count of WIA 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.WiaImageScanning.WiaDeviceCollection = deviceManager.Devices
        ' for each WIA 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