* * *

Author Topic: Migrating a CodeTyphon scanner application to Lazarus  (Read 1210 times)

hrayon

  • Jr. Member
  • **
  • Posts: 78
Migrating a CodeTyphon scanner application to Lazarus
« on: November 21, 2017, 06:45:12 pm »
Hello, I have a problem migrating a CodeTyphon scanner application to Lazarus.
The problem occurs when communicating between DelphiTwain and the scanner driver.
DelphiTwain got here, compatible with the lazarus:
http://www.kluug.net/delphitwain.php
The scanner is the Kodak i1210.
In CodeTyphon 6.0, the scanner call normally occurs, and the following window attached appears and everything works fine.
I tried some versions of Lazarus, with exactly the same program, and the window does not appear and does not present an error.
The versions I tested are:
Lazarus 1.8 + fpc 3.11;
Lazarus 1.6.4 + fpc 3.0.2;
Lazarus 1.9 + fpc 3.11.

To simulate the error you can use the example program that comes with DelphiTwain in the folder:
DelphiTwain \ examples \ Lazarus

It should be something specific with the Kodak twain driver. Using the TWAIN 2 Sample Data Source emulator (https://sourceforge.net/projects/twain-samples/files/?source=navbar) the Lazarus versions work.

I do not know how to make the kodak driver work for Lazarus.

(using google translator)

Handoko

  • Hero Member
  • *****
  • Posts: 2147
  • My goal: build my own game engine using Lazarus
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #1 on: November 21, 2017, 06:50:42 pm »
Do you know ct2laz? You should try it, maybe it is what you need.
https://bitbucket.org/avra/ct2laz/

hrayon

  • Jr. Member
  • **
  • Posts: 78
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #2 on: November 21, 2017, 09:08:25 pm »
Hello Handoko, thanks for the suggestion!
But from what I understand ct2laz converts a specific CodeTyphon package to Lazarus, but DelphiTwain is already for Lazarus.
I could not even quote CodeTyphon, I quoted just because it works on it and it does not work on Lazarus, specifically with the Kodak i1210 Twain driver.
It may be something more specific, in the compilation/code of FPC and not of Lazarus, but when there is no error message, it is difficult to solve the problem.
In the case, the executable tries to present a user interface through the Twain "protocol" in the dll developed by Kodak, but the window does not appear, nor does it give an error.
I get stuck on CodeTyphon.

ttomas

  • Full Member
  • ***
  • Posts: 173
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #3 on: November 22, 2017, 11:18:02 am »
Try to compare source of DelphiTwain in CT, maybe CT Team made some changes and report.

Thaddy

  • Hero Member
  • *****
  • Posts: 5780
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #4 on: November 22, 2017, 11:33:08 am »
Post that question to CodeTyphon forum, they broke it....
recommends {$macro on}{$define Silly:=ObjFpc}

Munair

  • Sr. Member
  • ****
  • Posts: 316
  • Keep it simple.
    • Ditrianum
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #5 on: November 22, 2017, 12:32:06 pm »
Post that question to CodeTyphon forum, they broke it....
:D :D :D
Lazarus 1.6.2, testing 1.8, FPC 3.0.0; Debian 9 KDE 5.8.6 x64; Windows 7 x64, PC-DOS2000

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6097
Re: Migrating a CodeTyphon scanner application to Lazarus
« Reply #6 on: November 22, 2017, 01:48:55 pm »
Thaddy: If you have nothing constructive to say, just leave it.

Does CT compile the 32-bit FPC release COM compatible ( recompile everything with -dTEST_WIN32_SEH) maybe?


 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus