Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一般来说,将16位Windows程序转换为Win32需要做什么?该应用程序用于与驱动程序进行串行通信。我知道如何使用驱动程序的 DLL 文件。那么下一步是什么?我希望听到一些有用的信息,而不是从其他网站复制的。
有问题的代码是 C++
谢谢
如果应用程序使用驱动程序访问串行端口,则完全删除驱动程序。在 Win32 中,您可以使用标准的 Win32 API CreateFile()、ReadFile()和WriteFile()函数通过串行端口读取/写入数据,以及各种SetComm...()函数(SetCommState()、SetCommTimeouts()、SetCommMask()等)来配置端口设置。有关详细信息,请参阅 MSDN:
CreateFile()
ReadFile()
WriteFile()
SetComm...()
SetCommState()
SetCommTimeouts()
SetCommMask()
串行通信