本文介绍了如何在vc ++ 2013中使用简单的串口通信程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被分配编写一个在Windows上运行的简单串口通信程序。我可以从网络中找到的资源是整个示例程序项目或代码片段。我在使用资源时遇到了一些麻烦:

1.代码项目几乎在Win32中。这些太旧了,无法在最新版本的Visual Studio中使用;例如VC ++ 2012,2013,...

2.示例代码通常包含CreateFile(),ClosePort(),OpenPort()等函数,以及HANDLE等数据类型导致编译错误。我应该包含哪些头文件?

3.当我使用VC ++ 2013打开代码项目时,所有这些都失败了。



我习惯使用VC#,而不是VC ++。谁能告诉我如何获取我可以使用VC ++ 2010或更高版本立即构建它的示例代码?

I was assigned to write a simple serial port communication program running at Windows. The resources which I can find from network are either the whole sample program project or code pieces. I've got some trouble in using the resources:
1. The code projects are almost in Win32. Those are too old to be used in latest versions of Visual Studio; such as VC++ 2012, 2013, ...
2. The sample codes usual contains functions like CreateFile(), ClosePort(), OpenPort(), ... and data types like HANDLE, which usually causes compilation error. Which header files should I include?
3. When I open the code projects using VC++2013, all of them failed.

I get used to use VC#, not VC++. Could anyone tell me how to get the sample codes which I can build it immediately using VC++ 2010 or above?

推荐答案



这篇关于如何在vc ++ 2013中使用简单的串口通信程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 20:41