unsigned char m_TxBuf[5];
//Call function to write one byte at a time to serial port
Serialport.WriteByte(m_TxBuf[0]); //Problem compiling
Serialport.WriteByte(m_TxBuf[1]); //Problem compiling
Serialport.WriteByte(m_TxBuf); //No problem if I send the entire data structure
BOOL CSerialPort::WriteByte(BYTE *bybyte)
{
iBytesWritten=0;
if(WriteFile(hComm,bybyte,1,&iBytesWritten,NULL)==0)
return false;
else return true;
}
|