This function retrieves the smallest size in pixels that can be scanned with a given scan device

[C++Builder]   BOOL IKScanGetMinimumSizeEx(HANDLE AppHandle, HANDLE SrcHandle, LPCSTR ScanDsName, WORD ScanMode, WORD UnitMode, int Xdpi, int Ydpi, float * Width, float * Height);
[Delphi]   function IKScanGetMinimumSizeEx(AppHandle, SrcHandle: THandle; ScanDsName: PAnsiChar; ScanMode, UnitMode: Word; Xdpi, Ydpi: Integer; var Width, Height: Single): LongBool;

Parameters

Name Explanation
AppHandle The application handle retrieved by IKScanInitialize
SrcHandle The scan device handle retrieved by IKScanOpenDS or 0
ScanDsName The datasource name (Required when SrcHandle is 0)
ScanMode The scan mode (0: document plate (transmissive or reflective), 1: ADF single side (transmissive or reflective), 2: ADF double side (transmissive or reflective))
UnitMode The scan units (0: inches, 1: centimeters, 2: pica, 3: points, 4: twips, 5: pixels, 6: millimeters)
Xdpi The horizontal resolution in DPI when the UnitMode is 5.
Ydpi The vertical resolution in DPI when the UnitMode is 5.
Width The minimum width of the scan
Height The minimum height of the scan

Return Value

Returns True (nonzero) when successful, returns False (0) when not successful.

Explanation

If using the value retrieved from IKScanOpenDS in SrcHandle, then no other application can use the opened datasource (scan device) until the datasource is closed. If SrcHandle is 0 and ScanDsName is blank then you must execute the IKScanSelect function. ("" or null means the datasource selected by IKScanSelect will be used) Please set a value for the UnitMode parameter that is supported by the datasource. The Width and Height values depend on the ScanMode and UnitMode values. If UnitMode is 5 (pixels) then the Width and Height values will also depend on the values set in Xdpi and Ydpi.

 

The ImageKit10 VCL is a product created by Newtone Corporation