VintaSoftTwain Control v6.0
VintaSoftTwain Object / Device_GetSettings Method
In This Topic
    Device_GetSettings Method
    In This Topic
    Description
    Returns the current device settings as string.
    Syntax
    Visual Basic
    Public Function Device_GetSettings() As Variant
    Return Type
    String that contains settings of opened device.
    Remarks
    Call this method only when device is opened (Device_State == enumDevice_State.DeviceOpened).

    This method has effect only if user interface is not shown (Device_ShowUI == False).
    Example
    Here is an example that shows how to get the current device settings as byte array.
    Private VSTwain1 As New VintaSoftTwain()
    
    
    ''' <summary>
    ''' Returns the device settings as byte array.
    ''' </summary>
    Private Function GetDeviceSettingsAsByteArray() As Byte()
        ' open the device manager
        If Not VSTwain1.DeviceManager_Open() Then
            Throw New ApplicationException(VSTwain1.errorString)
        End If
    
        ' open the device
        If Not VSTwain1.Device_Open Then
            Throw New ApplicationException(VSTwain1.errorString)
        End If
    
        ' get device settings as byte array
        Dim settings As Byte() = CType(VSTwain1.Device_GetSettings(), Byte())
        Return settings
    End Function
    See Also