VintaSoft Twain .NET SDK v10.3
Vintasoft.Twain Namespace / Device Class / XferCount Property

In This Topic
    XferCount Property (Device)
    In This Topic
    Specifies how many images application wants to receive from the device.
    Public Property XferCount As Short
    Dim instance As Device
    Dim value As Short
    instance.XferCount = value
    value = instance.XferCount
    public short XferCount {get; set;}
    public: __property short get_XferCount();
    public: __property void set_XferCount( 
       short value
    property short XferCount {
       short get();
       void set (    short value);

    Property Value

    Possible values:
    -1 - application wants to receive all available images from the device;
    1..215 - application wants to receive only N images
    Thrown if device is in wrong state.
    Thrown if device does not support capability.
    Thrown if the .NET debugger is used and the function evaluation requires all threads to run.
    Call this property only when device is opened (State == DeviceState.Opened).
    This example shows how to acquire all images from the document feeder of device.
    Public Sub ScanImageFromFeeder(ByVal device As Device)
        device.ShowUI = False
        device.DisableAfterAcquire = True
        device.XferCount = -1
        device.PixelType = PixelType.RGB
        device.UnitOfMeasure = UnitOfMeasure.Inches
        device.Resolution = New Resolution(200.0F, 200.0F)
        If device.DocumentFeeder.DuplexMode <> DuplexMode.None Then
            device.DocumentFeeder.DuplexEnabled = True
        End If
        If device.HasFeeder Then
            device.DocumentFeeder.Enabled = True
            device.XferCount = -1
            If device.DocumentFeeder.Loaded Then
                device.DocumentFeeder.AutoFeed = True
            End If
        End If
    End Sub
    public void ScanImageFromFeeder(Device device)
        device.ShowUI = false;
        device.DisableAfterAcquire = true;
        device.XferCount = -1;
        device.PixelType = PixelType.RGB;
        device.UnitOfMeasure = UnitOfMeasure.Inches;
        device.Resolution = new Resolution(200f, 200f);
        if (device.DocumentFeeder.DuplexMode != DuplexMode.None)
            device.DocumentFeeder.DuplexEnabled = true;
        if (device.HasFeeder)
            device.DocumentFeeder.Enabled = true;
            device.XferCount = -1;
            if (device.DocumentFeeder.Loaded)
                device.DocumentFeeder.AutoFeed = true;

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2016, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also