Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I do to know how datas is in my serial buffer ?

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

I would like the command for know how datas I have in my serial buffer when I use CreateFile and ReadFile.

Thanks
 
Hi,
I would like to know how datas is in the InBuffer of my serialport.
I find GetFileSize but nothing.

Can You Help me


ReadFile (hPort, &Byte, 1, &dwBytesTransferred, 0);
dwSize = GetFileSize(hPort, NULL);
// Display the data read.
if (dwBytesTransferred == 1)
// ProcessChar (Byte);
{
m_editReceiveData = Byte;
m_editBuffer = dwBytesTransferred;
m_test = dwSize;
UpdateData(FALSE);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top