USB help

A

Alray

I need to send information through a USB port, so I can control certain
machine on the other side. The data goes through a USB to serial cable, so
I'm only interested in sending data (Though knowing how to receive it, is
always a plus!).
The thing is I've been searching for a USB API for VC++, and I can't seen
to find any functions or libraries that might get the job done. I've read
some things about creating a driver for the device I'm supposedly
connecting, yet there's no device here, only a cable to transfer data!

So if anyone has some page where I can read how to pull this off
(libraries or functions), or some sample code, it would most definitely be
appreciated.

Thanks in advance! See you!
 
T

Thomas Matthews

Alray said:
I need to send information through a USB port, so I can control certain
machine on the other side. The data goes through a USB to serial cable, so
I'm only interested in sending data (Though knowing how to receive it, is
always a plus!).
The thing is I've been searching for a USB API for VC++, and I can't seen
to find any functions or libraries that might get the job done. I've read
some things about creating a driver for the device I'm supposedly
connecting, yet there's no device here, only a cable to transfer data!

So if anyone has some page where I can read how to pull this off
(libraries or functions), or some sample code, it would most definitely be
appreciated.

Thanks in advance! See you!

For better assistance, you will need to ask in a platform specific
newsgroup. USB is not covered in the _standard_ C++ language and
this newsgroup, discusses the standard language.

Read the FAQs and welcome.txt below for better newsgroups.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
M

Martin Stettner

Alray said:
I need to send information through a USB port, so I can control certain
machine on the other side. The data goes through a USB to serial cable, so
I'm only interested in sending data (Though knowing how to receive it, is
always a plus!).
The thing is I've been searching for a USB API for VC++, and I can't seen
to find any functions or libraries that might get the job done. I've read
some things about creating a driver for the device I'm supposedly
connecting, yet there's no device here, only a cable to transfer data!

So if anyone has some page where I can read how to pull this off
(libraries or functions), or some sample code, it would most definitely be
appreciated.

Thanks in advance! See you!
Of course, this is the wrong group, but anyway :) ...

I would think that an USB to serial adapter emulates a serial port in
Windows (e.g. COM3). Perhaps you can confirm that by looking in the
device manager.

Then you just have to look in MSDN on how to write to a serial port
(using CreateFile/WriteFile) or you can search for a serial
communication library (there should be a lot...)

I'm possibly wrong with this "serial port approach", but it might be
worth trying.

cu
Martin
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top