Connecting to USB: c++ code

W

weird0

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
 
H

Hari

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
 
W

weird0

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#.
 
T

Thomas J. Gritzan

weird0 said:
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-lite/how-to-post.html#faq-5.9
 
L

Lionel B

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-lite/how-to-post.html#faq-5.9

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

Regards,
 
Joined
Apr 15, 2013
Messages
1
Reaction score
0
I am new to this site. I am interested to develop my C language capabilities. I did programing 20 years ago and my graduate school advisor said that no much changes except for the development of sophisticated graphic classes.

The area of device interface is of great interst.. Communciation with foreign device.. Therefore, you will understand why my interest over USB communication .

May someone elaborate why is the subject not a matter of C# programing? I must be missing something.

If I want to manipulate a device from a C# code.. Please described the process workflow to allow this to happen. It is obvious that there is a step where code is no longer relevant.

Thank you all for any further comment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top