Nicomsoft OCR: Developer's Guide


Scan_ScanToFile


Syntax

C++:int Scan_ScanToFile(HSCAN ScanObj, UNICODECHAR* FileName, int ScannerIndex, int Flags)
C#:int Scan_ScanToFile(int ScanObj, string FileName, int ScannerIndex, int Flags)
Visual Basic:Function Scan_ScanToFile(ByVal ScanObj As Integer, ByVal FileName As String, ByVal ScannerIndex As Integer, ByVal Flags As Integer) As Integer
Java:int Scan_ScanToFile(HSCAN ScanObj, String FileName, int ScannerIndex, int Flags)
Delphi:function Scan_ScanToFile(ScanObj:HSCAN; FileName:PWCHAR; ScannerIndex:integer; Flags:integer):integer;


Description

Scans the document to a TIFF file. The Scan_Enumerate function must be called before this function to enumerate available scanners.


Parameters

ScanObj [IN] – the Scan object.
FileName [IN] – a Unicode, null-terminated string containing the full path and name of the TIFF file that will be created.
ScannerIndex [IN] – the scanner index.
Flags [IN] – the flags. See the SCAN_XXXXX constants for possible values.


Return value

Zero if success, otherwise an error code.


Remarks

None.


Example

See the sample code for the Scan_ScanToImg function.