473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Serial communication Receive Problem

21
Hi all,
I am beginner to VC++, I am trying to transmint and receive data through serial port using MSCOM. I am able to transmit data but I am unable to receive the data

here is my receive code;

void CMscomDlg::OnOnCommMscomm1()
{
// TODO: Add your control notification handler code here
CString msg;
UpdateData();
switch( m_msCom.GetCommEvent()){
case 1: // comEvSend
break;
case 2:// comEvReceive
VARIANT data = m_msCom.GetInput();
msg += (CString)data.bstrVal;
break;
case 3:// comEvCTS
break;
}
m_rx = msg;
UpdateData(false);

}

I checked with both Binary mode as well as Text Mode i does not work in both
Plz some body give heart as soon as possible
Mar 17 '08 #1
0 1129

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mimisam | last post by:
hi, I am using Win XP and writing an application to check POS devices (printer and cash drawer).In the application I need to choose the port which the device is connected to. If the port chosen...
4
by: Vidya Bhagwath | last post by:
Hello Experts, I am porting the C++ code into the Visual C#.NET. My C++ code is mainly based on the serial communication. So I am using the windows structure such as DCB.. etc and the windows...
0
by: Haluk Gokmen | last post by:
I had an inquiry about the use of MSComm OCX in a C# application awhile ago and I really appreciated Nicholas Paldino's help, which is listed below... My code worked well in VS2003. I am now...
7
by: Michael Chong | last post by:
I wrote a program that communicate with SerialComm. In every 300 milliseconds, my program continuously send & receive data via the serial port once the program starts. My program is once in a...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
5
by: chapeau_melon | last post by:
Hello, I'm basicly not a programmer... I found some C++ codes on the net that almost satisfy me needs, wich is to communicate with an other device that sends data to me, wich I have to receive...
2
by: Marco Trapanese | last post by:
Hi, every 250 ms (timer event) I must send several commands via serial port. The serial unit will answer to each command sent. I must wait the answer before send the next command. How can I...
2
by: suhabayindir | last post by:
In an application of: Serial Port Communication in C# using sPort_DataReceived() event I have noticed that the maximum number of characters that you can receive using this event is limited to 8,...
2
by: mysticm83 | last post by:
hi i am working with c# on dot net1.0 plateform. my project is to communicate with mirocontrolers through serial port. i am using mscom ocx control of vb6 for serial communication. i am facing a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.