473,387 Members | 3,801 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,387 software developers and data experts.

Connecting to USB: c++ code

Hi!
I wish to send and receive data to usb port through c# code. Upon
searching, I found out that
c# only has support for SerialPort in System.IO.Ports and no support
for usb. For that I will have to use c++ wrapper classes.

Please don't tell me use a serial-to-usb convertor coz there are some
hardware issues that I have with the GSM modem.

1. But I can't find any good resource or c++ code, through which i
can do that? Can u tell me the links.

2. What is meant by COM1, COM2 and so on? Can somebody educate me on
that? Are these terms only used for serial ports or usb ports?

Thanks in Advance

Jun 5 '07 #1
4 4025
Hi!
I wish to send and receive data to usb port through c# code. Upon
searching, I found out that
c# only has support for SerialPort in System.IO.Ports and no support
for usb. For that I will have to use c++ wrapper classes.

Please don't tell me use a serial-to-usb convertor coz there are some
hardware issues that I have with the GSM modem.

1. But I can't find any good resource or c++ code, through which i
can do that? Can u tell me the links.

2. What is meant by COM1, COM2 and so on? Can somebody educate me on
that? Are these terms only used for serial ports or usb ports?

Thanks in Advance
Your question does not deal with anything
concerning the C++ language, try a group dedicated to your
OS (as I see, it is Win).

Best,
Pasalic Zaharije

Jun 5 '07 #2
I guess it does because i need the code to connect to usb for c++. I
need the wrapper classes so i can use them in c#.
Jun 5 '07 #3
weird0 schrieb:
I guess it does because i need the code to connect to usb for c++. I
need the wrapper classes so i can use them in c#.
The _language_ C++ doesn't have any way to "connect to usb", so your
question is offtopic in this group.
When doing communication with COM-ports or USB, you use platform specific
libraries like the WinAPI. So your question belongs to a Windows platform
newsgroup.

Read here:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

--
Thomas
http://www.netmeister.org/news/learn2quote.html
Jun 5 '07 #4
On Tue, 05 Jun 2007 11:20:26 +0000, weird0 wrote:
On Tue, 05 Jun 2007 00:53:43 -0700, Hari wrote:
>>Hi!
I wish to send and receive data to usb port through c# code. Upon
searching, I found out that
c# only has support for SerialPort in System.IO.Ports and no support
for usb. For that I will have to use c++ wrapper classes.

[...]
>Your question does not deal with anything concerning the C++ language,
try a group dedicated to your OS (as I see, it is Win).
(Please don't snip relevant context [restored]... your post made
absolutely no sense without it).
I guess it does because i need the code to connect to usb for c++. I
need the wrapper classes so i can use them in c#.
This group deals only with C++ *language* issues - your question really
does not concern a language issue. Please see the FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

This article also contains some links that may be of help to you.

Regards,

--
Lionel B
Jun 5 '07 #5

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

Similar topics

7
by: sanjana | last post by:
hi i wanna detect if a anything is connected to the usb port I am using system.management class for tht purpose this is my code class usbdetect { public static void Main() {
10
by: Zabby | last post by:
hi, i want to turn on/turn off a usb lamp via a vb.net button... i think i would have to turn on/turn off the power for this usb port.... how could i do this? kind regards
0
by: iwdu15 | last post by:
hi, i want to connect to a USB device, it has storage on it but it doesnt show up in windows explorer bc its an MP3 player. how can i make a program to send Mp3s to it? thanks -- -iwdu15
38
by: hkarthik | last post by:
hi, I am doing a project regarding SMS and i am doing it in ASP.NET. My project actually aims at sending message from my PC to mobile and then getting back the reply from the mobile to my pc. I...
2
by: Japan Shah | last post by:
Hello, I am trying to connect my Nokia 6610 using usb cable, I have installed usb-serial driver of it. I hv tested it with Hyperterminal and it works fine. but when I wrote a python...
1
by: Jeff | last post by:
I have located the following code and trying to change this so I know if the USB device has been inserted or removed. The problem I have is I alwayd get the Console.WriteLine("Usb removed") so I...
1
by: Hanna1980 | last post by:
I have been sitting 3 days and reading hundreds of websites, forums and articles and still not sure how I can do this. I am very new and this is a huuuuge task for me. I have a small electronic...
1
by: goodolpete | last post by:
Hello. we're trying out HADR on version 9, and have a primary and secondary db on servers 1 + 2 on the network. Transfer + communication is very slow between the servers, and I was wondering,...
4
by: saintme | last post by:
Hello all, I have a USB modem stick and a PoE network device. I want to connect the device to the Internet using the USB stick. The device has no other interfaces, so I must use its RJ-45 port. I...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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,...
0
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...

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.