Friday, July 31, 2009

How can i access usp port in c# plz?

and i prefer to know can i write a c# code can be compiled on linux system?





finally thanks about ur time

How can i access usp port in c# plz?
You cannot directly access a USB port through C# (as in, there is no standard set of classes to do this in the .Net framework). You have to read the device itself plugged into this port through a device driver the manufacturer provided.





So you have three choices. 1) Find the driver for the device and install it on your PC and hope it has an API that you can use or 2) Hope you can find a USB library that supports the device you want to read/write to (they are hard to find and usually cost money). 3) Lastly, write your own driver using a lower level language like C or maybe even C++.





As for writing code in C# on your linux system, I have included a link that will get you started with a compiler and example code to test if it compiles on your machine.





Enjoy!
Reply:you need a c compiler. the best one out there is gcc. you need gcc as well to compile most stuff


No comments:

Post a Comment