VintaSoft Twain .NET SDK v10.2
Load Method (DeviceCapabilityCollection)
Example 




Vintasoft.Twain Namespace > DeviceCapabilityCollection Class : Load Method
Stream with current values of capabilites.
Loads current values of capabilities from the stream.
Syntax
'Declaration
 
Public Sub Load( _
   ByVal stream As Stream _
) 
'Usage
 
Dim instance As DeviceCapabilityCollection
Dim stream As Stream
 
instance.Load(stream)
public void Load( 
   Stream stream
)
public: void Load( 
   Stream* stream
) 
public:
void Load( 
   Stream^ stream
) 

Parameters

stream
Stream with current values of capabilites.
Exceptions
ExceptionDescription
Thrown if stream is null (Nothing in VB).
Thrown if stream does not support reading.
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.
Example
This example shows how to load previously saved values of device capabilities.
Private Sub LoadDeviceCapabilitCollection(ByVal device As Device)
    device.Open()
    Dim fs As New FileStream("scanner-capabilities.xml", FileMode.Open, FileAccess.Read)
    device.Capabilities.Load(fs)
    fs.Close()
    device.Acquire()
End Sub
private void LoadDeviceCapabilitCollection(Device device)
{
    device.Open();
    FileStream fs = new FileStream("scanner-capabilities.xml", FileMode.Open, FileAccess.Read);
    device.Capabilities.Load(fs);
    fs.Close();
    device.Acquire();
}
Requirements

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

See Also

Reference

DeviceCapabilityCollection Class
DeviceCapabilityCollection Members
Save Method