This method lists the scan devices.
Parameters
None
Return Value
Returns True when successful, returns False when not successful.
Explanation
The List method lists the scan devices. If successful, the list of scan devices is returned in the DataSourceNameList property. The DataSourceIndex property refers to the currently selected datasource index. 0 indicates the first datasource in the list.
Prior to executing the List method, you must execute the Initialize method.
The List method corresponds to the Scan Control's ScanList method in earlier versions of the ImageKit.
Sample Code:
In C++Builder
bool Ret;
Ret = VImageKit1->Scan->List();
if (Ret == false ||
VImageKit1->Scan->DataSourceNameList->Count == 0)
return;
ComboBox1->Items =
VImageKit1->Scan->DataSourceNameList;
ComboBox1->ItemIndex =
VImageKit1->Scan->DataSourceIndex;
In Delphi
Ret: Boolean;
Ret := VImageKit1.Scan.List;
if (Ret = False) or (VImageKit1.Scan.DataSourceNameList.Count = 0)
then Exit;
ComboBox1.Items := VImageKit1.Scan.DataSourceNameList;
ComboBox1.ItemIndex := VImageKit1.Scan.DataSourceIndex;