So gehe ich vor
ftwain gibt es auf jeden Fall schon.
Code:
FreeAndNil(ftwain);
fTwain :=TDelphiTwain.Create(nil);
try
if fTwain.LoadLibrary then
begin
fTwain.SourceManagerLoaded := True;
{Allow user to select source}
SelectedSource := fTwain.SelectSource;
ShowMessage(IntToStr (fTwain.SourceCount));
if (SelectedSource <> -1) then
begin
{Load source, select transference method and enable display interface}
fTwain.Source[SelectedSource].Loaded := True;
{Show scanconfig!}
fTwain.Source[SelectedSource].ShowUI := False;
fTwain.Source[SelectedSource].Enabled := True;
end
else
begin
ShowMessage('Twain is not installed.');
end;
end;
except
ShowMessage('Twain is not installed.');
end;