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).
精彩评论