Hi,
if your device driver supports this feature you can write, for example:
var
i: integer;
begin
for i:=0 to ImageEnView1.IO.TwainParams.SourceCount-1 do
begin
ImageEnView1.IO.TwainParams.SelectedSource := i;
if ImageEnView1.IO.TwainParams.DeviceOnline then
ShowMessage(Format('Device %d (%s) is online', [i, ImageEnView1.IO.TwainParams.SourceName[i]]));
end;
end;
Unfortunately not all devices supports it. Sometime you will see a scanner dialog with errors (when ImageEn tried to communicate with the device, the driver dialog shows up). Sometime you will see erroneous results (DeviceOnline reports true when the device is offline, and viceversa).