Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / December 2007

Tip: Looking for answers? Try searching our database.

Controlling USB devices from C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Miguel Gómez - 25 Nov 2007 10:01 GMT
Hi, every body!

I would want to know, if is there any way to control an USB device ( a code
bar reader, for example) connected to the PC, using C# code (or VB). I must
be able, for example, to disable reading, and, depending on the bussiness
logic, enable it again, using C# or VB code.

Does such a class exist in the .NET Framework?

I sicerelly appreciate any help in this subject.

thank you

Mike
Steven Wilmot - 26 Nov 2007 13:26 GMT
> Hi, every body!
>
[quoted text clipped - 6 lines]
>
> Does such a class exist in the .NET Framework?

You might want to take a look at
http://www.icsharpcode.net/OpenSource/SharpUSBLib/default.aspx

However, depending on the device that you're trying to control, there is a
good chance that the manufacturer will instead provide an AP to call.

That would probably be easier than trying to talk to the USB device
yourself.

Steven
Ben Voigt [C++ MVP] - 26 Dec 2007 15:16 GMT
>> Hi, every body!
>>
[quoted text clipped - 6 lines]
>>
>> Does such a class exist in the .NET Framework?

No, Microsoft did not provide for .NET programmers needing to do that.
You'll have to turn to the Win32 API.

If you just want to enable/disable the driver (like right click->Disable in
Device Manager) there is a standard way to do it.

If you need to communicate with the device itself, then you'd need detailed
information on the particular device.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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



©2008 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.