Setting the TWAIN Image Acquisition Mode

 

There are functions in the BiTWAIN.DLL and properties in the BiTWAIN.OCX for setting the acquisition mode.

You can scan to memory, to a file on disk or to the clipboard.

 

BiTwain.dll:

 

 

BiTwain.ocx:

 

 

[C++]

 

/* Acquire an image to a disk file */

 

#include “BiTwain.h”

 

/* 1. parameter: number of pages to scan It scans only one

page

   2. parameter: the scans single page files or multipage

image */

 

SetAcquirePages(1, FALSE);

 

/* 1. parameter: Path and name of the file to scan */

 

Acquire(_T(“C:\\Images\\Test.tif”));

 

[C#]

 

/* Acquire an image to a disk file */

 

/*Path and name of the file to scan */

 

BiTwain.FileAcquire = “C:\\Images\\Test.tif”;

 

/* 1. parameter: number of pages to scan It scans only one

page

   2. parameter: the scans single page files or multipage

image */

 

BiTwain.SetAcquirePages(1, false);

 

/* Start scanning */

 

BiTwain.Action =

(short)BITWAINLib.enumScanOperations.TWSCAN_ACQUIRE;