Accessing USB port

  • Thread starter Thread starter Amjad
  • Start date Start date
A

Amjad

How can we access the USB port to communicate with USB
devices (read/write) using VB.NET ?

Amjad
 
Amjad said:
How can we access the USB port to communicate with USB
devices (read/write) using VB.NET ?


You want to talk to the port directly (raw data), or do you want to talk to
the driver (which would interpert the raw data for you)?

If you want to talk to the driver, you need to contact the manufacturer, or
if it is a standard device, such as a digital camera, then you need to use
the appropriate windows services (for example, you would use WIA for a
scanner/camera).

If you want the raw data, I would imagin that you could use the windows USB
communication functions, but I have no idea what DLL these are hidden in. I
would start by looking up USB communications in the Platform SDK on MSDN
(msdn.microsoft.com).


HTH,
Jeremy
 
Hi,

You normally use whatever API is provided by the USB device manufacturer.
For example, a USB serial port or modem will use standard Windows serial
communications APIs.

However, if you have a special, purpose-built, USB device, you can use USB
APIs. These are described in detail (with examples) in Jan Axelson's book,
USB Complete 2nd Edition. I have a link to it from Books on my homepage.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
Back
Top