Solved

twain components

Posted on 2000-05-01
1
304 Views
Last Modified: 2010-04-04
I want twain components so I want som site address except www.torry.ru
0
Comment
Question by:byongel
1 Comment
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
Comment Utility
hi
 this is Pasted from the paqs:

I am using the eztw32.dll. It is very easy to use.
You just need this DLL in the directory of your
application. I downloaded this DLL some time ago from
the official TWAIN site www.twain.org, but I cannot find
it any longer there. Using Altavista I found another
 place:
http://www.i-rose.si/mare/programing/index.html.
 He provides also a Delphi interface. But you may also
  use mine:

function TWAIN_IsAvailable: integer; stdcall;
  external 'Eztw32.dll' index 26;

function TWAIN_SelectImageSource(Handle: hWnd): integer; stdcall;
  external 'Eztw32.dll' index 38;

function TWAIN_AcquireNative(Handle: hWnd;
  wPixTypes: integer): integer; stdcall;
  external 'Eztw32.dll' index 2;

function TWAIN_WriteNativeToFilename(Handle: THandle;
  FileName: pChar): integer; stdcall;
  external 'Eztw32.dll' index 49;

To scan an image and save it to a BMP file:

  Handle := TWAIN_AcquireNative(0, 0);
  if Handle > 0 then
  begin
    Result := TWAIN_WriteNativeToFileName(Handle, pChar(FileName)) = 0;
    GlobalFree(Handle);
  end;

Its really simple and unlike other interfaces AcquireNative only returns when the document is scanned.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now