This project has moved. For the latest updates, please go here.

Getting wrong scanner info

Aug 14, 2014 at 9:02 AM
Hi,

I am trying to get the scanner name using the library. Below is the code I have.

I have 1 scanner attached with my pc and multiple scanner drivers are installed in my pc.
For one user login, i am getting the correct scanner name for other users, it shows the first scanner name which is incorrect and not attached with my pc.

please help.

Thanks

Sub Main()
    Dim _scannerName As String = String.Empty
    Try

        Using _twain32 As New Saraff.Twain.Twain32
            _twain32.OpenDSM()

            _scannerName = _twain32.GetSourceProductName(_twain32.SourceIndex)
        End Using

    Catch ex As Exception

    End Try
    Console.WriteLine(_scannerName)
    Console.Read()

End Sub

Coordinator
Aug 14, 2014 at 10:11 AM
Hello, Sri721!
Try invoke Twain32.SelectSource(). This allows you to select the default source. See minimal implementation.
Marked as answer by SARAFF on 8/19/2014 at 12:47 AM