VintaSoftTwain Control v6.0
VintaSoftTwain Object / DeviceManager_DeviceCount Property
In This Topic
    DeviceManager_DeviceCount Property
    In This Topic
    Description
    Gets count of available TWAIN devices.
    Property type
    Read-only property
    Syntax
    Visual Basic
    Public Property DeviceManager_DeviceCount As Long
    Return Type
    Count of available TWAIN devices.
    Remarks
    Call this property after DeviceManager_Open method

    Information about error that occurs during getting property value can be get using the Error and ErrorString properties.
    Example
    This example shows how to get information about available devices.
    Private VSTwain1 As New VintaSoftTwain()
    
    
    ''' <summary>
    ''' Gets information about devices.
    ''' </summary>
    Private Sub GetDeviceInfo()
        ' open the device manager
        If Not VSTwain1.DeviceManager_Open() Then
            Console.WriteLine(VSTwain1.errorString)
            Exit Sub
        End If
    
        ' for each device
        For i = 0 To (VSTwain1.DeviceManager_DeviceCount - 1)
            ' output the device name
            Console.WriteLine(VSTwain1.Device_Info_GetProductName(i))
        Next
    End Sub
    See Also