![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Controlling USB devices from C#
Hi, every body!
I would want to know, if is there any manner 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, an enable it again, depending on the bussiness logic, 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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: Controlling USB devices from C#
Write your own wrapper around CreateFile and DeviceIoControl, possibly
using pinvoke. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim@storagecraft.com http://www.storagecraft.com "Miguel Gómez" <mikegomez@telefonica.net> wrote in message news:OZLyBHeLIHA.3940@TK2MSFTNGP05.phx.gbl... Hi, every body! I would want to know, if is there any manner 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, an enable it again, depending on the bussiness logic, 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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: Controlling USB devices from C#
Hi, what do you mean by "disabling reading" ?
Do you want to enable the barcode reader from the app only when it needs to scan, and keep it disabled at other times, to avoid interference with keyboard input? --PA "Miguel Gómez" <mikegomez@telefonica.net> wrote in message news:OZLyBHeLIHA.3940@TK2MSFTNGP05.phx.gbl... Hi, every body! I would want to know, if is there any manner 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, an enable it again, depending on the bussiness logic, 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 |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: Controlling USB devices from C#
¡YES, Pavel!, That's exactly what I want to do.
Caan you help me, please? "Pavel A." <pavel_a@NOwritemeNO.com> escribió en el mensaje news:%23cbr4wrLIHA.484@TK2MSFTNGP06.phx.gbl... > Hi, what do you mean by "disabling reading" ? > Do you want to enable the barcode reader from the app only > when it needs to scan, and keep it disabled at other times, > to avoid interference with keyboard input? > > --PA > > "Miguel Gómez" <mikegomez@telefonica.net> wrote in message > news:OZLyBHeLIHA.3940@TK2MSFTNGP05.phx.gbl... > Hi, every body! > > I would want to know, if is there any manner 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, an enable it again, > depending on the bussiness logic, 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 > |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |