473,666 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2529

"c#freeskie r89" <fr*********@di scussions.micro soft.com> wrote in message
news:7B******** *************** ***********@mic rosoft.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********@hot mail.comREMOVET RAIL> wrote in message
news:eY******** *****@TK2MSFTNG P15.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
6564
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 performance: 1. From the command line, type msaccess.exe /decompile. 2. Open the database you want to decompile. 3. Open up any module. Select the Compile All Modules and Save All Modules menu items.
19
2784
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 create a button that will email the same message (and idealy a word attachment) to whatever address is in view on the form (chances are that I just input it). For further explanation:
20
2924
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 can give you a free license if you want to use it. It should install OK but that is part of the problem that needs to be verified on all platforms so that people can just download it in the future, install and use it. It has an mde front...
55
3531
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 Gunderloy http://www.larkware.com/dg4/TheDailyGrind726.html Aside from the Sharepoint feature extension, amazing news.
11
1448
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 more applications are being developed to consume this class library, we are running into deployment and version controll issues. i recall a lot of this kind of thing being solved with distributed application models, such as the EJB...
10
2708
by: shaji | last post by:
Hi, Could anybody tell me how to access the individual bytes that consists of a Windows LONGLONG value?
16
3154
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 parameter will not be changed - so don't worry. 2. It tells the implementor and the maintainer of this function that the parameter should not be changed inside the function. And it is for this reason that some people advocate that it is a good idea to...
15
4104
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 my POS for an online DVD store. It turns out that what the programmer actually gave me was a "license" to use his software. This was not the agreement we made, and he knows this. He took advantage of the fact that I knew very little about...
30
3513
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
8448
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.