Re: Talking to USB
From: Don (phoney.email_at_yahoo.com)
Date: 11/27/04
- Next message: CajunCoiler \(http://www.cajuncoiler.tk\): "Re: Code to launch my application on system startup?"
- Previous message: Don: "Re: Talking to USB"
- In reply to: Dick Grier: "Re: Talking to USB"
- Next in thread: Dick Grier: "Re: Talking to USB"
- Reply: Dick Grier: "Re: Talking to USB"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 27 Nov 2004 13:58:20 GMT
Hi Richard,
Actually (and unfortunately) it's none of the above. It's a scanner.
Which APIs should I use to talk to a USB scanner from VB6?
Please note that I intentionally need to bypass TWAIN and talk to the
scanner directly!
To be more specific I need to send (scanner) command bytes to the
device and then receive status bytes back. And, of course, receive
image data once the actual scan commences.
TWAIN is far too high level for this and limits access to standard
TWAIN command set, while I wish to use other commands the device is
capable of.
Don.
On Fri, 26 Nov 2004 11:35:44 -0700, "Dick Grier"
<dick_grierNOSPAM@msn.com> wrote:
>Hi,
>
>You normally use whatever API is required for the specific hardware device
>that is attached to the USB port. There is no general-purpose driver for
>this. So, if you are connecting to a serial device, you use the Windows
>serial APIs. If a sound device, you use the MCI APIs. If a disk drive, you
>use the various file APIs. The actual driver that is installed when Windows
>detects the USB device translates these Windows APIs to the device specific
>commands required for the actual hardware.
>
>However, if you have custom built USB hardware, you need lower level access
>to the device. You must know A LOT about the hardware before this sort of
>thing is useful. I suggest that you get a copy of Jan Axelson's book, USB
>Complete, 2nd Edition. You can get information on it from the Books link on
>my homepage.
>
>If you just want to use a USB serial port adapter to connect to an RS-232
>device, then you may use MSComm or any of the other serial communications
>methods that are described in detail in my book.
>
>--
>Richard Grier (Microsoft Visual Basic MVP)
>
>See www.hardandsoftware.net for contact information.
>
>Author of Visual Basic Programmer's Guide to Serial Communications, 4th
>Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
>www.mabry.com/vbpgser4 to order.
>
>
- Next message: CajunCoiler \(http://www.cajuncoiler.tk\): "Re: Code to launch my application on system startup?"
- Previous message: Don: "Re: Talking to USB"
- In reply to: Dick Grier: "Re: Talking to USB"
- Next in thread: Dick Grier: "Re: Talking to USB"
- Reply: Dick Grier: "Re: Talking to USB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|