Re: How to support a scanner without documentation

From: Jochen Eisinger (jochen.eisinger@gmx.net)
Date: Tue Jun 20 2000 - 01:48:45 PDT

  • Next message: Henning Meier-Geinitz: "Re: Towards release 1.0.3?"

    Hi,
    >
    > 5) Disassembling the Windows driver: I have never done this, other people
    > on this list may talk about this. I think it's a lot of work and needs
    > good understatement of assembler and the windows API.

    I've done this with a Mustek PP driver...

    There are several files in the windows/twain/a4s2/ directory. The only
    interesting file was scanobj.dll: this file calls a a4sii300.386 (VxD).
    scanobj.dll is quite easy to read, there are several functions like
    PowerOn/Off, GetDeviceInfo, Start/StopScan, GetImage, SetParameters,
    etc... I used this information for a) figuring out what parameters the
    vxd driver needs and b) what vxd function no is supposed to do. Next I
    disassembled the vxd and translated the assembler code to C code which
    is quite straight forward. Now comes the difficult part. You have to
    replace names like sub9CF or var65535_word with names like lock_port and
    image_width. This is quite difficult, but it's possible. Now you have
    the sources of a working scanner driver...

    -- jochen

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Thu Jun 22 2000 - 09:56:59 PDT