GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TwainAcquireToFile Method / TwainAcquireToFile(String,IntPtr) Method
The path of the image file to create.
A Window Handle IE: Me.Handle. In most applications you can use nothing but on Citrix and WTS, this must be a top-level window or a child of a top level window.





In This Topic
TwainAcquireToFile(String,IntPtr) Method
In This Topic
Acquires a single image, from the currently selected Data Source to a file. This method uses the file transfer mode. The disk file mode is ideal when transferring large images that might encounter memory limitations with Native or memory mode. However, Disk File mode is a bit slower than other transfer mode.
Syntax
'Declaration
 
Public Overloads Function TwainAcquireToFile( _
   ByVal FilePath As String, _
   ByVal HANDLE As IntPtr _
) As GdPictureStatus
public GdPictureStatus TwainAcquireToFile( 
   string FilePath,
   IntPtr HANDLE
)
public function TwainAcquireToFile( 
    FilePath: String;
    HANDLE: IntPtr
): GdPictureStatus; 
public function TwainAcquireToFile( 
   FilePath : String,
   HANDLE : IntPtr
) : GdPictureStatus;
public: GdPictureStatus TwainAcquireToFile( 
   string* FilePath,
   IntPtr HANDLE
) 
public:
GdPictureStatus TwainAcquireToFile( 
   String^ FilePath,
   IntPtr HANDLE
) 

Parameters

FilePath
The path of the image file to create.
HANDLE
A Window Handle IE: Me.Handle. In most applications you can use nothing but on Citrix and WTS, this must be a top-level window or a child of a top level window.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

By default, the default data source (DS) is opened, displays its dialog, and determines all the parameters of the acquisition and transfer.

If you want to (try to) hide the DS dialog, see TwainSetHideUI.

Before using this method check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN)

To get the TWAIN state, use the TwainGetState() method.

To set the TWAIN state to 4, use the TwainOpenDefaultSource() or TwainOpenSource() method.

Warning: To works, this method requires that the current Data source allows file transfer mode.

Use the TwainIsFileTransferModeAvailable() to check if the source support this mode of transfer.

The output image format should be negotiated with the TwainSetImageFileFormat() method.

The output image compression should be negotiated with the TwainSetCompression() method.

This method requires the Document Capture (TWAIN / WIA) component to run.

See Also