G
Guest
I am developing a com port application and am having trouble getting the following command to receive all sent bytes
BOOL rc
COMMTIMEOUTS CommTimeOuts
CommTimeOuts.ReadIntervalTimeout = 1
CommTimeOuts.ReadTotalTimeoutMultiplier = 1
CommTimeOuts.ReadTotalTimeoutConstant = 5
CommTimeOuts.WriteTotalTimeoutConstant = 1
CommTimeOuts.WriteTotalTimeoutMultiplier = 1
hComm = CreateFile(m_ComPort,GENERIC_READ|GENERIC_WRITE,0,0,OPEN_EXISTING, 0,0)
SetCommTimeouts(hComm,&CommTimeOuts)
rc = ReadFile(hComm,&pDoc->caDeviceReadBuffer,sizeof(pDoc->caDeviceReadBuffer),&dwRead,0)
I don't seem to be able to control the read timeout durations, it seems to always timeout before all characters have been received
Thanks
George
BOOL rc
COMMTIMEOUTS CommTimeOuts
CommTimeOuts.ReadIntervalTimeout = 1
CommTimeOuts.ReadTotalTimeoutMultiplier = 1
CommTimeOuts.ReadTotalTimeoutConstant = 5
CommTimeOuts.WriteTotalTimeoutConstant = 1
CommTimeOuts.WriteTotalTimeoutMultiplier = 1
hComm = CreateFile(m_ComPort,GENERIC_READ|GENERIC_WRITE,0,0,OPEN_EXISTING, 0,0)
SetCommTimeouts(hComm,&CommTimeOuts)
rc = ReadFile(hComm,&pDoc->caDeviceReadBuffer,sizeof(pDoc->caDeviceReadBuffer),&dwRead,0)
I don't seem to be able to control the read timeout durations, it seems to always timeout before all characters have been received
Thanks
George