|
Borland Delphi Sample: Acquire and save to BMP file |
Top Previous Next |
|
The following Delphi example all that is required to do the following:
___________________________________________________________ procedure TForm1.Acquire(Sender: TObject); var AcquiredOk:DTWAIN_BOOL;
begin { Check for TWAIN availability } if (DTWAIN_IsTwainAvailable) then begin { Initialize DTWAIN } if (DTWAIN_SysInitialize <> 0) then begin AcquiredOk := DTWAIN_TwainSave("-f test.bmp"); end; end end end; ___________________________________________________________
That's all there is to it. To use DTWAIN with Delphi, your Delphi project must add the DTWAIN32.PAS that comes with DTWAIN to your project.
|