473,385 Members | 1,893 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,385 software developers and data experts.

Simple USB access, but a Significant Dilemma

Can someone please give me some information on sending data through a USB
port. What I am trying to do is use the USB port (I get how to do it on a COM
port). I am using VC# 2005. I have searched the internet repeatedly but
cannot find anything.

Overall, what I am trying to do is just activate a LED with a transistor via
a progam made in C# by hooking up the the BASE pin of the transistor to the
DATA+ pin on the USB cable and then powering the circuit with the cable.
Sorry if this is a horrible description... Then, theoretically, send data
through the data line to flip the transistor on. (btw: this is just an
experiment). I comprehend the electrical. Knowing this I could do more
complex projects, but not knowing how to turn on an led light on with basic
USB would pose to quite a dilemma.

Mainly, I just want to know how to use USB.

Thanks a lot for any assistance!

-freeskier89
--
(Actionscript : C#)
Nov 17 '05 #1
5 2511

"c#freeskier89" <fr*********@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Can someone please give me some information on sending data through a USB
port. What I am trying to do is use the USB port (I get how to do it on a
COM
port). I am using VC# 2005. I have searched the internet repeatedly but
cannot find anything.

Overall, what I am trying to do is just activate a LED with a transistor
via
a progam made in C# by hooking up the the BASE pin of the transistor to
the
DATA+ pin on the USB cable and then powering the circuit with the cable.
Sorry if this is a horrible description... Then, theoretically, send data
through the data line to flip the transistor on. (btw: this is just an
experiment). I comprehend the electrical. Knowing this I could do more
complex projects, but not knowing how to turn on an led light on with
basic
USB would pose to quite a dilemma.

Mainly, I just want to know how to use USB.

Thanks a lot for any assistance!

-freeskier89
--
(Actionscript : C#)


You need a driver for this hmmm.. 'device', you can't directly access USB
devices from user mode applications. Note that you can't write drivers using
C#.

Willy.
Nov 17 '05 #2
You need a driver for this hmmm.. 'device', you can't directly access USB
devices from user mode applications. Note that you can't write drivers
using C#.

Willy.


Why not? I thought you could do anything with .Net that you could with any
other language?
Now I want to go and figure out a way to write one, even though I have no
applicable uses for one atm.

Mythran

Nov 17 '05 #3
Well for this I guess I'll just use the com port, for complex driver writing
seems to be needed for usb applications. Usb integration would be nice, but
for now I think I will just learn more C# and that should lead me closer to
an answer. I just assumed that access to a USB port would have been simple,
but I guess not! Thank you for the replies by the way!
-freeskier89
--
(Actionscript : C#)

Nov 17 '05 #4

"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:eY*************@TK2MSFTNGP15.phx.gbl...
You need a driver for this hmmm.. 'device', you can't directly access USB
devices from user mode applications. Note that you can't write drivers
using C#.

Willy.


Why not? I thought you could do anything with .Net that you could with
any other language?
Now I want to go and figure out a way to write one, even though I have no
applicable uses for one atm.

Mythran


..NET is not a language, C# is a language, and NO you can't use C# for
anything other than normal user mode applications. Drivers, be it user mode
or kernel mode must be written in C possibly mixed with assembly. Even C++
(the language - not the compiler) can't be used for kernel mode device
drivers.
The reason for this is not the language per se, it's most because of the
runtime, you don't wan't to load the CLR in kernel space do you?
Other things that can't be done in C# (or any other pure managed language)
is build DLL's that export function to be loaded dynamically (through
LoadLibrary(Ex)) from non managed code, examples are MMC snap-ins, ISAPI
filters, cluster extentions, etc.....

Willy.

Nov 17 '05 #5

.NET is not a language, C# is a language, and NO you can't use C# for
anything other than normal user mode applications. Drivers, be it user
mode or kernel mode must be written in C possibly mixed with assembly.
Even C++ (the language - not the compiler) can't be used for kernel mode
device drivers.
The reason for this is not the language per se, it's most because of the
runtime, you don't wan't to load the CLR in kernel space do you?
Other things that can't be done in C# (or any other pure managed language)
is build DLL's that export function to be loaded dynamically (through
LoadLibrary(Ex)) from non managed code, examples are MMC snap-ins, ISAPI
filters, cluster extentions, etc.....

Willy.


Yeah yeah, I know that .Net is not the language. Oh well, bah! Thanks :)

Mythran

Nov 17 '05 #6

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

Similar topics

28
by: deko | last post by:
After doing a lot of vba work, I've noticed the size of my mdb has grown, even though no data or objects have been added. I've read that the following procedure will remedy this and improve...
19
by: Bill | last post by:
I have searched through the posts for a question like mine but have only found much more complicated responses. On single record view of a form I have an email address field. I merely want to...
20
by: wolftor | last post by:
Would anyone be willing to beta test my application for me and give me some feedback? I can give you feedback in exchange (ie. if there are parts you're interested in knowing how it was done) or I...
55
by: AnandaSim | last post by:
I just had a google through this NG but have not seen mention of Erik Rucker's blog entry and the new Jet: http://blogs.msdn.com/access/archive/2005/10/05/477549.aspx mentioned by Mike...
11
by: jason | last post by:
we have developed a .NET class library that defines a family of reusable business objects. the class library is developed in C#, and works quite well. one problem, however, is that as more and...
10
by: shaji | last post by:
Hi, Could anybody tell me how to access the individual bytes that consists of a Windows LONGLONG value?
16
by: hzmonte | last post by:
Correct me if I am wrong, declaring formal parameters of functions as const, if they should not be/is not changed, has 2 benefits; 1. It tells the program that calls this function that the...
15
by: chaseexchange | last post by:
First, a brief explanation of why this has happened. I purchased, what I thought, was a fully functional program written in Access last year from a local programmer. This program was to be used as...
30
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.