MSComm1->Input 二進制模式
来源:互联网 发布:客车订票用什么软件 编辑:程序博客网 时间:2024/06/05 12:00
將MSComm1->Input讀取的數據轉換成二進制并用字符串顯示的方法:
Byte ReciveByte;
int i,rcount;
OleVariant InputText;
MSComm1->InputLen=0; //讀取整個接收緩沖區。
MSComm1->InputMode=1; //將Input模式設為二進制。
rcount=MSComm1->InButtferCount; //獲取接收緩沖區中待讀取的字符數。
InputText=MSComm1->Input; //讀取接收緩沖區中的數據。
for(i=0;i<rcount;i++)
{ReciveByte=InputText.GetElement(i); //使用OleVariant的GetElement方法獲取每個字節的數據。
Memo1->Text=Memo1->Text+String(IntToHex(ReciveByte,1))+" "; //使用IntToHex將每個字節的數據轉換成十六進制,再用將其轉換成字符串。
}
- MSComm1->Input 二進制模式
- input只读模式
- vb mscomm1串口通信接收发送十六进制数据
- input设置为只读模式
- stm32 PWM input捕获输入模式
- 设置input,select,textarea不可编辑模式
- 设置input,select,textarea不可编辑模式
- MQ打开队列模式 input和input_exclusive
- 把input设置成只读模式
- Input
- INPUT
- input
- input()
- input
- input
- input
- input
- input
- 影响Java EE性能的十大问题
- nyoj 511 双向静态链表
- linux 用户管理
- PHP网络编程技术与实例
- 在SQL2005中输出逗号连接的字符串
- MSComm1->Input 二進制模式
- ios6和iphone5的适配<1>之UI适配
- FastReport 中文菜单显示不全或者乱码解决方法
- C/C++中的时间结构
- ios6和iphone5的适配<2>之UIActivityIndicatorView
- 男人就该对自己狠一点
- sicily 1006 Team Rankings
- hdu 3663 Power Stations【DLX】
- 谈谈数字图像的缩放算法