AcquireSourceName example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
   nRet: Integer; 
begin
   LEADTwain1.AcquireSourceName:= 'TWAIN Source Name'; 
   nRet:= LEADTwain1.Acquire (LTWAIN_SHOW_USER_INTERFACE); 
   if(nRet <> SUCCESS)then
      ShowMessage('Error acquiring from source'); 
end;