Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / February 2005



Tip: Looking for answers? Try searching our database.

USB Detection and support

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fahim Ahmed - 17 Feb 2005 07:36 GMT
Hi!,
I want to detect USB from my VB6 Application that has it's own user in
windows 2000 (Professional). This user can only run that application and can
not access explorer and start menu.
I want to know how this can be done?

Thanks,
Fahim.
Marc Reinig - 18 Feb 2005 00:22 GMT
What exactly do you mean, "I want to detect USB"?

Do you want to know if

1. There is a USB bus?
2. There is a specific USB device?

Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics

> Hi!,
> I want to detect USB from my VB6 Application that has it's own user in
[quoted text clipped - 5 lines]
> Thanks,
> Fahim.
Fahim Ahmed - 18 Feb 2005 06:08 GMT
I want to detect USB device (Flash Drive specifically).
> What exactly do you mean, "I want to detect USB"?
>
[quoted text clipped - 18 lines]
> > Thanks,
> > Fahim.
Dick Grier - 18 Feb 2005 16:43 GMT
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.

Signature

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.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.