开发者

MFC Serial Communications

I need to add serial port (e.g. COM8) communications to my MFC application. Which APIs should I be looking at to do this? I need it to be able to wait for n bytes to be in the receive queue before triggering (event, message, callback, etc.). Is there a relatively simple way to do this? All the examples I have looked at appear to use a polling mechanism for receive. This will not work for my application. There needs to be some sort of triggering m开发者_如何学Goechanism that is triggered when there are n bytes in the queue. Thanks.


Overlapped I/O in Win32 works really well: http://www.codeproject.com/KB/system/serial_com.aspx

Also AFAIK, there are no official MFC class(es) for serial communications. (These could be easily wrapped though).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜