September 13th, 2011 03:29 PM
#1
[HELP] setting buffer lenght in MSCOMM
Hi,I have a program to read data using Microsoft Communication Control(MSCOMM). I want to set the buffer input length of 1 byte. but it can't run.
this is my program :
Code:
m_comm.SetCommPort(12);
m_comm.SetSettings("9600,N,8,1");
m_comm.SetInputLen(1); // read 1 byte data
m_comm.SetRTSEnable(FALSE);
m_comm.SetRThreshold(0);
m_comm.SetInBufferSize(1); // setting input buffer lenght
m_comm.SetPortOpen(true);
Do you have a solution?
September 13th, 2011 03:35 PM
#2
Re: [HELP] setting buffer lenght in MSCOMM
Define "can't run".
Viggy
September 13th, 2011 03:41 PM
#3
Re: [HELP] setting buffer lenght in MSCOMM
Originally Posted by
azhari24
Hi,I have a program to read data using Microsoft Communication Control(MSCOMM). I want to set the buffer input length of 1 byte. but it can't run...
Do you have a solution?
Yes, I do.
Just get rid of MSCOMM. Use Windows APIs (or better, some free MFC classes like in http://www.flounder.com/serial.htm ) instead.
Victor Nijegorodov
September 13th, 2011 04:31 PM
#4
Re: [HELP] setting buffer lenght in MSCOMM
In addition to Victors post, here's another class you can use for comm communication.
September 13th, 2011 06:46 PM
#5
Re: [HELP] setting buffer lenght in MSCOMM
And here is another one, CSerialPort from PJ Naughter: http://www.naughter.com/serialport.html
Mike
September 13th, 2011 11:48 PM
#6
Re: [HELP] setting buffer lenght in MSCOMM
Originally Posted by
MrViggy
Define "can't run".
Viggy
okey, I will try...
September 13th, 2011 11:49 PM
#7
Re: [HELP] setting buffer lenght in MSCOMM
Originally Posted by
VictorN
okey. thank your answer...
September 13th, 2011 11:52 PM
#8
Re: [HELP] setting buffer lenght in MSCOMM
Originally Posted by
MikeAThon
okey, thanks, do you sample porgram?
September 19th, 2011 09:00 PM
#9
Re: [HELP] setting buffer lenght in MSCOMM
Originally Posted by
azhari24
okey, thanks, do you sample porgram?
At the site I linked to (i.e., at http://www.naughter.com/serialport.html ). Did you even bother to look at it?
Originally Posted by
PJ Naughter's site
The enclosed zip file contains the CSerialPort source code and a simple test program which exercises all class API's.
Mike
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks