有用程序.docVIP

  • 25
  • 0
  • 约2.24千字
  • 约 4页
  • 2017-06-08 发布于河南
  • 举报
有用程序

// 功能:将单个字符转换为十六进制[9/14/2011 HuangKun] char CCESerialPort::ConvertChartoHex char ch if ch 0 ch 9 return ch-0x30; else if ch A ch F return ch-A+10; else if ch a ch f return ch-a+10; else return -1 ; //功能:获取指定位置的字节 BOOL CBufferData::GetByte int nPos, BYTE Byte if nPos int GetBufferLen return FALSE; Byte m_pBase[nPos]; return TRUE; //功能:获取单个字节 BYTE CBufferData::GetAt int index if index 0 index int GetBufferLen return m_pBase[index]; else return 0; //Returns a pointer to the physical memory determined by the offset PBYTE CBufferData::GetBuffer UINT nPos return m_pBase+nPos;

文档评论(0)

1亿VIP精品文档

相关文档