AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Delphi Twain

Ein Thema von HPB · begonnen am 20. Feb 2015 · letzter Beitrag vom 3. Mär 2015
 
hathor
(Gast)

n/a Beiträge
 
#7

AW: Delphi Twain

  Alt 2. Mär 2015, 14:24
So schwer ist das nicht...
Die 64Bit-Version ist ROT:

const
{Name of the Twain library for 32 bits enviroment}
{$IFDEF WIN64}
TWAINLIBRARY: String = 'TWAINDSM.DLL';
{$ELSE}
TWAINLIBRARY: String = 'TWAIN_32.DLL';
{$ENDIF}

Es gibt im WINDOWS-Verzeichnis ein Unterverzeichnis twain_32:
Das könnte mit TwainDirectory gemeint sein.
Vielleicht wird üblicherweise da nach einem Treiber gesucht.
Ich habe nocht etwas Anderes gefunden:
http://sourceforge.net/projects/twain-dsm/files/

Zitat:
TWAIN Data Source Manager [DSM],
compliant with version 2.2 of the TWAIN specification.

[Windows]
The TWAIN DSM is a shared library named TWAINDSM.DLL. There is a 32bit and a
64bit version of this file. TWAINDSM.DLL is installed in the Windows System
directory (normally C:\Windows\System32). If installing the 32bit file on a
64bit system, make sure it ends up in the WOW64 System directory (normally
C:\Windows\SysWow64)

The DSM looks for data sources in C:\Windows\twain_32 or C:\Windows\twain_64.
Data sources are also shared objects, but they have a .ds extension.
ex: datasource.ds

The DSM walks the twain_[32|64] directory and LoadLibrary each .ds
file it finds, then uses GetProcAddress to locate the DS_Entry function.

The DSM looks for the environment variable, TWAINDSM_LOG, for the location of
the log file to write to. If the environment variable is not set, then no log
is kept. Here is an example of setting the environment variable from a
command prompt:
...


Delphi-Quellcode:
function TCustomDelphiTwain.LoadLibrary(): Boolean;
var
  TwainDirectory: String;
begin
  {The library must not be already loaded}
  if (not LibraryLoaded) then
  begin
    Result := FALSE; {Initially returns FALSE}
    {Searches for Twain directory}
    TwainDirectory := GetTwainDirectory();
    {Continue only if twain is installed in an known directory}
    if TwainDirectory <> 'then
    begin

      fHandle := Windows.LoadLibrary(PChar(TwainDirectory + TWAINLIBRARY));
      {If the library was sucessfully loaded}
      if (fHandle <> INVALID_HANDLE_VALUE) then
      begin
...

Geändert von hathor ( 2. Mär 2015 um 14:36 Uhr)
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz