GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-Mar-2005, 21:18
dmkst56 dmkst56 is offline
New Member
 
Join Date: Mar 2005
Location: Adelaide, South Australia
Posts: 1
dmkst56 is on a distinguished road

Serial Port communication in C or C++


Hey everyone

I want to make a learning remote control program for my PC, using its infra-red port, but I don't know how to send and receive data from COM ports.

I have set up my PC so that infra-red is on COM2, and I know that communicating with the port is exactly the same as with any other serial communications port.

I want to know how to send and receive data (byte at a time) using COM (serial) ports. What I really need is a function that takes a character (because they're one byte) and transmits it through the serial port and another that returns a single character.

I'm using VC++6 and I know nothing about MFC. I know a little STL and all language constructs. It doesn't matter if any code posted is in C or C++ but it must work on WinXP. I've looked at other sites and in the MSDN library but either can't find what I'm looking for or I don't understand it. I'm only a beginner at C/C++. Can anyone help?

Thanks in advance.
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WinDVD v1.2.96c serial number TK1799 Computer Software Forum - Windows 5 26-Jun-2006 15:54
Problem with string and serial port collinm C Programming Language 13 25-Mar-2005 08:39
In VC++ how can i use a used port ?? samehdi C++ Forum 0 01-Mar-2005 02:35
reading from comm port and displaing in editbox using MFc ib_alam MS Visual C++ / MFC Forum 9 02-Feb-2005 19:57
Send and receive data through port using MFC Dialog Based mithila MS Visual C++ / MFC Forum 1 10-Sep-2004 03:01

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:19.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.