This function retrieves the largest physical size that can be scanned with a given scan device

[C++Builder]   BOOL IKScanGetPhysicalSize(HANDLE AppHandle, HANDLE SrcHandle, LPCSTR ScanDsName, WORD ScanMode, WORD UnitMode, float *Width, float *Height);
[Delphi]   function IKScanGetPhysicalSize(AppHandle, SrcHandle: THandle; ScanDsName: PAnsiChar; ScanMode, UnitMode: Word; 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), 7: document plate (positive film, using film holder), 8: document plate (positive film, using film area guide))
UnitMode The scan units (0: inches, 1: centimeters, 2: pica, 3: points, 4: twips, 5: pixels, 6: millimeters)
Width The maximum physical width of the scan
Height The maximum physical 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. However if UnitMode is 5 (pixels) then the Width and Height values will also depend on the current resolution (DPI).

[Differences from the ImageKit5]

Function Name          Parameters
IK5ScanGetPhysicalSize:    hWnd, ScanDsName, ScanMode, Width, Height
IKScanGetPhysicalSize:     AppHandle, SrcHandle, ScanDsName, ScanMode, UnitMode, Width, Height

Since the ImageKit6, hWnd is passed by IKScaninitialize and the return value, AppHandle, is used..

[Differences from the ImageKit7]

IKScanGetPhysicalSizeEx was added in the ImageKit10.

 

The ImageKit10 VCL is a product created by Newtone Corporation