就这一个函数没法再调试了 if( Com_Read( hHandle, pBuffer, 10, &nBufferSize, 1000 ) > 0 ) int Com_Read( HANDLE AhHandle, unsigned char* ApBuffer, unsigned long AdwBufferLen, unsigned long* AdwReadLen, unsigned long dwMaxWait ) bSuccess = ReadFile( AhHandle, // handle of file to read ApBuffer, // address of buffer that receives data AdwBufferLen, // number of bytes to read AdwReadLen, // address of number of bytes read &m_ov );
buffer为空
谢谢我试下
if( Com_Read( hHandle, pBuffer, 10, &nBufferSize, 1000 ) > 0 ) int Com_Read( HANDLE AhHandle, unsigned char* ApBuffer, unsigned long AdwBufferLen, unsigned long* AdwReadLen, unsigned long dwMaxWait ) bSuccess = ReadFile( AhHandle, // handle of file to read
ApBuffer, // address of buffer that receives data
AdwBufferLen, // number of bytes to read
AdwReadLen, // address of number of bytes read
&m_ov );
获取缓冲区的指针 ??
这个怎能么得到,我是刚碰到串口编程 希望多多帮忙!!谢谢
是不是我的DCB 或其他地方的参数设置有问题呢
我也是找这方面的资料
我是连的一个RS232
PurgeComm(AhHandle,PURGE_RXCLEAR);
可以读出来了
就是不能保证每次都能读出数据----可能是参数设置的问题
你做过这方面的程序吗
RS232 一般的参数设置是怎能么的呢谢谢你
CSDN主要不是谈这个的
下面我找到了这个工控论坛--------这个是专门谈论这方面的论坛
希望有同样问题得不到答案的去
这个地方看看别像我走了弯路