HighTechTalks DotNet Forums  

Re: Controlling USB devices from C#

Dotnet Framework (SDK) microsoft.public.dotnet.framework.sdk


Discuss Re: Controlling USB devices from C# in the Dotnet Framework (SDK) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Steven Wilmot
 
Posts: n/a

Default Re: Controlling USB devices from C# - 11-26-2007 , 08:26 AM







"Miguel Gómez" <mikegomez (AT) telefonica (DOT) net> wrote

Quote:
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?

You might want to take a look at
http://www.icsharpcode.net/OpenSourc...b/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




Reply With Quote
  #2  
Old   
Ben Voigt [C++ MVP]
 
Posts: n/a

Default Re: Controlling USB devices from C# - 12-26-2007 , 10:16 AM







"Steven Wilmot" <steven-news (AT) wilmot (DOT) me.uk> wrote

Quote:
"Miguel Gómez" <mikegomez (AT) telefonica (DOT) net> wrote in message
news:eXx2to0LIHA.2064 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
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?

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.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.