473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

C# example programs for accessing USB Devices

Does anyone out there know of where I could find some C#
example programs for accessing USB Devices. There just does
not seem to be much out there on this subject. Even after
doing a Google, Yahoo, Lycos search engines.

Any feed back would be appreciate.

Bradley
Nov 15 '05 #1
4 15160
A good idea is to search for USB in only microsoft.public.dotnet.* at
groups.google.com. Watch for URL wrap:

http://groups.google.com/groups?hl=e...ublic.dotnet.*

Bottom line: won't be easy, lots of P/Invoke of Win32 APIs maybe you can
drill into the samples a little more.

Richard

--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Bradley Grant" <br*******@shaw.ca> wrote in message
news:03****************************@phx.gbl...
Does anyone out there know of where I could find some C#
example programs for accessing USB Devices. There just does
not seem to be much out there on this subject. Even after
doing a Google, Yahoo, Lycos search engines.

Any feed back would be appreciate.

Bradley

Nov 15 '05 #2

That all looks good, thanks, the device I have works well
with the software that came with the device, but it's
limited, so I thought I might try to write my own software.
The driver came with the Device and a Visual basic program
and some Visual Basic 5.0 examples, so I don't have to
write the driver. Just trying to write a program in C#, as
I don't know much about Visual Basic. If you are interested
in the device I'm trying to write a program for, here is
the link. Thanks Again.

Bradley

http://www.bb-elec.com/product.asp?s...sku=daqaichart
Nov 15 '05 #3
You can't access USB devices (or any other device) directly from user mode
applications in windows, this is done by the Device driver. The software
that came with the device includes a Device driver, a COM library and a VB
sample. The VB sample uses the interface exposed by the COM library, if you
want to build new (with extended functionality) applications using C#, you
have to import the typelibrary to access the same COM object from managed
code, However, if you meant that the functionality offered by the library is
rather limitted, you will have to call Device driver API directly from C++
or C#(using Pinvoke), but it's obvious you will need the API's
documentation.

Willy.

"Bradley" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...

That all looks good, thanks, the device I have works well
with the software that came with the device, but it's
limited, so I thought I might try to write my own software.
The driver came with the Device and a Visual basic program
and some Visual Basic 5.0 examples, so I don't have to
write the driver. Just trying to write a program in C#, as
I don't know much about Visual Basic. If you are interested
in the device I'm trying to write a program for, here is
the link. Thanks Again.

Bradley

http://www.bb-elec.com/product.asp?s...sku=daqaichart
Nov 15 '05 #4
Thanks for your information, all I want to do is get the
values from the USB device, and then create a program with
more options. The program that came with this device takes
the values in and displays them, but does not allow you to
compare incoming values to a set point and then calculate
and output to one of the Analog Outputs for automatic
control. The included software only allows you to manually
set the output values with the software. I also look at the
possibility of third party software that had more options,
but the manufacturer was unaware of any, so I guess I am on
my own here.

Thanks again for your information, I really appreciate it.
-----Original Message-----
You can't access USB devices (or any other device) directly from user modeapplications in windows, this is done by the Device driver. The softwarethat came with the device includes a Device driver, a COM library and a VBsample. The VB sample uses the interface exposed by the COM library, if youwant to build new (with extended functionality) applications using C#, youhave to import the typelibrary to access the same COM object from managedcode, However, if you meant that the functionality offered by the library israther limitted, you will have to call Device driver API directly from C++or C#(using Pinvoke), but it's obvious you will need the API's
documentation.

Willy.

"Bradley" <an*******@discussions.microsoft.com> wrote in messagenews:04****************************@phx.gbl...

That all looks good, thanks, the device I have works well
with the software that came with the device, but it's
limited, so I thought I might try to write my own software.
The driver came with the Device and a Visual basic program
and some Visual Basic 5.0 examples, so I don't have to
write the driver. Just trying to write a program in C#, as
I don't know much about Visual Basic. If you are interested
in the device I'm trying to write a program for, here is
the link. Thanks Again.

Bradley

http://www.bb-elec.com/product.asp?s...sku=daqaichart
.

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jimmy | last post by:
Dear All, I have a interesting question, may sound dump. Could I develop a vb6 programs that run under win2000 server terminal services and the program is access by a pocket pc? How could I...
0
by: Ken North | last post by:
During Software Development 2004, we recorded a panel discussion about software trends and the marriage of SQL, XML, web services and grid computing. The panel included: -Rick Cattell ...
4
by: MSDousti | last post by:
Hi, everyone. I have written this code in Tubo C++ 3.0 earlier, and now I want to port it to VC.NET: int out=0; out=(out & 0xDF); outportb(0x378,out); .... As you see, it seeks to parallel...
1
by: Jeronimo Bertran | last post by:
We need to create an ASP.NET application that allows the user on the client machine to activate devices that are connected directly to his machine (cameras and devices connected to the RS232 port)....
2
by: Jimmy Reds | last post by:
Hi, I have a blood glucose meter (a Lifescan OneTouch Ultra in case anyone was wondering) which I connect to my PC using a USB cable and I would like to have a go at accessing the data on this...
4
by: RichG | last post by:
I have looked through all the VB.Net help and this forum but I cannot find any mention of how to read and write to a USB port. Is it possible in VB? Can some one point me to some documentation?...
25
by: Daniel Jonsson | last post by:
So, I've reached the point where my building pipeline tools actually needs to be used by other people in my company. By this reason I actually need to think about the usability, and I've come to...
15
by: Bob | last post by:
Is there anyway to access the global object from inside a function other than doing a "var _global = this;" before declaring the function? Thanks
7
by: hutch75 | last post by:
Hi Folks, Wondering if my logic is bringing me down the right path..was hoping for some feedback before I spend too much time creating the source document / database to test it out. At a high...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.