469,283 Members | 2,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

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 14979
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jeronimo Bertran | last post: by
2 posts views Thread by Jimmy Reds | last post: by
4 posts views Thread by RichG | last post: by
25 posts views Thread by Daniel Jonsson | last post: by
15 posts views Thread by Bob | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.