This function retrieves the bit depth supported by the scan device

[C++Builder]   DWORD IKScanGetBitDepth(HANDLE AppHandle, HANDLE SrcHandle, LPCSTR ScanDsName, WORD PixelType, WORD *List, DWORD ListNum);
[Delphi]   function IKScanGetBitDepth(AppHandle, SrcHandle: THandle; ScanDsName: PChar; PixelType: Word; var List: Word; ListNum: DWORD): DWORD;

Parameters

Name Explanation
AppHandle The application handle retrieved by IKScanInitialize
SrcHandle The scan device handle retrieved by IKScanOpenDS or 0
ScanDsName The name of the datasource (scan device) Required when the SrcHandle is 0
PixelType The pixel type (0: Black and White 2 bit, 1: Grayscale, 2: RGB color, 3: Palette color)
List An array containing the bit depths supported by the scan device
In C++Builder, pass the pointer to the first element in the array.
In Delphi, the arguments are returned in the first element of the array List[0].
ListNum The number of elements in the List array

Return Value

When the List and ListNum parameters are set:
The IKScanGetBitDepth function's return value will indicate the number of supported bit depth types for the specified PixelType. If 0 is returned this would indicate an error and you can confirm the type of error using the ErrorStatus. Depending on the datasource (scan device) the pixel type does not matter and all supported bit depths will be retrieved. In such cases the return value will be greater than the actual supported number of bit depths for a given pixel type.

When the List is set to Null or the ListNum is set to 0
The IKScanGetBitDepth function's return value will indicate the number of elements that need to be used in the List array

Explanation

The IKScanGetBitDepth function retrieves the bit depth supported by the scan device. If the SrcHandle is being used with the value retrieved by the IkScanOpenDS then no other application can use the opened scan device until it has been closed. When SrcHandle is 0 and the ScanDsName is blank, then it is necessary to execute the IKScanSelect function. Please make sure to set a value in the PixelType parameter that is supported by the datasource.

 

The ImageKit10 VCL is a product created by Newtone Corporation