954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to send messages in C++

Hi,
I am writing code in c++ for sending and receiving messages through
ports. I have written code for opening port as

hComm = CreateFile(portname,GENERIC_READ | GENERIC_WRITE, 0,
0,OPEN_EXISTING,0,0);
this is done , but
Now I need to send the message to be send to Port. also need to get reply from port as a message.
How can I do this? Shall i use any existing dll for this? if yes which one? Does I need to do with hardware ( like shortning of pin..)
I need to do it on single PC.
The help is strongly appreciated. please also suggest some links which i can go through...

Thanks
Mukesh :)

MukeshZ
Newbie Poster
17 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 
thekashyap
Practically a Posting Shark
811 posts since Feb 2007
Reputation Points: 254
Solved Threads: 75
 
Check out google.. http://www.google.co.in/search?q=c%2B%2B+socket+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


I don't want socket programming. I need to communicate with device send message to device and the device will respond to it in fix amount of time.( message1 <-----> message2 ) I need the steps for communication for it in C or C++

MukeshZ
Newbie Poster
17 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You