Re: IOCTL codes for parallel port

From: Jochen Eisinger (
Date: Sun Jan 07 2001 - 07:05:07 PST

  • Next message: Jochen Eisinger: "[search engine] server is up & running"


    [Max Vorobyev]
    > I've disassembled HP's driver for ScanJet 5s and convert most
    > branches (according to TWAIN driver description) to C-code. But
    > there is a problem: driver deals with LPT port via DeviceIoControl
    > function with some IOCTL codes. All I have is numeric constants, but
    > I need description of these command codes and (more important)
    > buffer structures for them. Those codes are not described in MSDN.
    > Perhaps, they should be in DDK of Windows NT. Can somebody help me
    > to find descriptions?

    The TWAIN drivers of scanner have to access the parallel port directly
    so they have to run at ring-0 ("root"). Because normal DLL are executed
    at ring-3 they come with a ring-0-dll a so called virtual device driver.
    this VxD (the x is sometimes replaced by the name of the device -
    virtuall keyboard device = VKD). Functions in the ring-0-dll are called
    using DeviceIOControl, the IOCTL number is the function number, the
    inbuffer is the parameter stack the outbuffer is the returnstack.
    However there's no standard that restricts you in anyway. You'll have to
    disassemble the VxD driver and see what functions it implements... nasty
    work, btw ;-)

    -- jochen

    Source code, list archive, and docs:
    To unsubscribe: echo unsubscribe sane-devel | mail

    This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 06:46:30 PST