By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,192 Members | 856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,192 IT Pros & Developers. It's quick & easy.

Connecting to USB: c++ code

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.