BYTE cmdBuffer[10]={0x01,0x02,0xAD,0x2B,0x55'};
CByteArray m_Array;
m_Array.RemoveAll();
int Length = 10;
m_Array.SetSize(Length );
for(int i=0;i<Length ;i++)
m_Array.SetAt(i,*(cmdBuffer+i));
m_MScomm.SetOutput(COleVariant(m_Array));
温馨提示:内容为网友见解,仅供参考