用mscomm编写串口通信,空字符接收后被忽略,如何解决?
代码如下: 
//set portnum
m_SATSCom.SetCommPort(SATSPort);
//read mode
m_SATSCom.SetInputMode(SATSInputMode);
//set commutation parameter
m_SATSCom.SetSettings(SATSSetting);
//begin to receive when there is one character in receive buffer
m_SATSCom.SetRThreshold(SATSByteNumToReceive);
//set the buffer size 
m_SATSCom.SetInBufferSize(SATSInBuffSize);
m_SATSCom.SetOutBufferSize(SATSOutBuffSize);
//clear the receive buffer
m_SATSCom.SetInBufferCount(SATSEmpty); //open the port
if(!m_SATSCom.GetPortOpen())
{
m_SATSCom.SetPortOpen(TRUE);
}
else
{
AfxMessageBox("Can't open the port which has been opened");
}
////////////////////////////////////////////////
接收如下:
void CDlgComm::OnOnCommSatscom() 
{
// TODO: Add your control notification handler code here
int iEvent;
int iByteNum;
VARIANT InPut;
char str[ReceiveBuffLength];
char * str1=NULL;
CString str2;
char strData[100];//Save the right data, data will be copy to the struct in the end

int i;
iEvent=m_SATSCom.GetCommEvent();
switch(iEvent)
{
case 2:
//get the data num in the receive buff
iByteNum=m_SATSCom.GetInBufferCount();
if(iByteNum>0)
{
InPut=m_SATSCom.GetInput();
memcpy(str,InPut.parray->pvData,iByteNum);
} i=0;
str1=str;
while(i<iByteNum)
{
i++;
str1++;
}
*str1='\0';
str2=(const char*)str;
m_DataFromSATS+=(LPCTSTR)str2;
^^^^^^^^^^^^^
}