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.