登录
首页 » Com Port » the program demonstrated how the Windows platform using Windows API function to...

the program demonstrated how the Windows platform using Windows API function to...

于 2022-02-06 发布 文件大小:106.44 kB
0 99
下载积分: 2 下载次数: 1

代码说明:

该程序演示了如何在windows平台下使用WindowsAPI函数来操作串口,可以用以实现两台PC机之间的实时聊天。(必须连接串口电缆)-the program demonstrated how the Windows platform using Windows API function to operate serial ports, can be used to achieve between two PC real-time chat. (Must connect serial cable)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 从串口读取数据,有两种方法,1、每接收一个EV_RXCHAR,就用ReadFile读一次,这样我觉得太恐怖了。2、接收到一个EV_RXCHAR后,等一定数据量的...
    从串口读取数据,有两种方法,1、每接收一个EV_RXCHAR,就用ReadFile读一次,这样我觉得太恐怖了。2、接收到一个EV_RXCHAR后,等一定数据量的CPU周期(GetTickCount),再一次性读取缓冲区里的数据。这样做,一般情况下不会有问题,但是,如果数据很多,过了“一定数据量的CPU周期”,还没收完数据怎么办?就会少读数据了。 我用三个线程序来完成串口数据的接收,其实就是第一种方法的变种: 一个侦听EV_RXCHAR,一个对EV_RXCHAR进行分析,其实就是超时判断。如果接收到一个消息后,一段时间没收到下一个EV_RXCHAR,就认为是一个数据包的结束。这个线程就会通知数据接收线程,进行数据接收。一般同一包数据,两个字符之间的时间间隔,应该很小了吧,而两个数据包之间的间隔,应该不会太小吧!(这个地方我不清楚,猜的:( :) )最后一个线程,是接收数据的。-read data from the serial port, there are two methods, one, each receiving a EV_RXCHAR, on the ReadFile read, I think this vote. 2, received a EV_RXCHAR after a certain volume of data, such as CPU cycles (GetTickCount), and the one-time reader, the data buffer. To do so, under normal circumstances there is no problem, but if many of the data, and after a "certain amount of data the CPU cycles," also confiscated End Data how do? Few will read the data. I used three lines to complete serial data reception, the first method is a variant : an interception EV_RXCHAR, one pair of EV_RXCHAR analys
    2023-03-23 09:55:03下载
    积分:1
  • 投篮运球综合是运用单片机技术设计的一个易于算投篮个数的发明,该程序是为此而设计...
    投篮运球综合是运用单片机技术设计的一个易于算投篮个数的发明,该程序是为此而设计-shot dribble integrated microcomputer technology is the design of an easy shot count the number of inventions, the program is designed for this purpose
    2022-03-20 13:32:05下载
    积分:1
  • 手机多串口编程的资料: 多串口协议GSM0710的各种文档以及参考代码。 0. Readme.txt 本文档 1. 710MUX 源代码...
    手机多串口编程的资料: 多串口协议GSM0710的各种文档以及参考代码。 0. Readme.txt 本文档 1. 710MUX 源代码,微软MUX驱动模板 2. E901Mux 源代码,E901手机实际运行的MUX驱动 3. mux 一款参考源代码 4. 3GPP-0710.doc 3GPP的多串口协议文档 5. GSM0710_Version7.0.0.pdf GSM07.10 协议规范(英文) 6. GSM0710中文版.doc 本人对GSM0710_Version7.0.0.pdf的翻译 7. NXP_MuTa_SyUM.pdf NXP对MUX部分的介绍(Part2 and Part3 ) 8. gsm0710.c 一份参考源代码 9. gsm0710.jpg 协议的简要流程图 10. gsm0710总结.txt 简单的总结 11. request.dat 请求的数据原样 12. request.txt 对请求数据的分析 13. reply.dat 响应的数据原样 14. reply.txt 对响应数据的分析-mux GSM0710 doc and source code.
    2023-07-08 08:45:04下载
    积分:1
  • 在Visual C++.NET下COM+组件的实现
    在Visual C++.NET下COM+组件的实现- In Visual C NET under COM module realization
    2022-06-12 18:02:17下载
    积分:1
  • 51红外源代码,NEC代码格式,很精确的代码,请放心使用。
    51红外源代码,NEC代码格式,很精确的代码,请放心使用。-51 infrared source code
    2022-01-22 01:26:28下载
    积分:1
  • Kermit协议的嵌入式系统上使用kermit协议与PC机传输的做…
    kermit protocol 嵌入式系统使用kermit协议,与pc传送文件. 可方便的使用windows 超级终端等.-Kermit protocol embedded systems use Kermit agreement with pc transmission of documents. To facilitate the use of windows Super terminals.
    2022-02-03 16:57:11下载
    积分:1
  • serial communications for use of the two machines running serealcom.exe, but mus...
    串口通讯使用说明 在两台机器运行serealcom.exe, 但必须保证用串口线连接, 选择串口时如出现error, 表明此串口正被其它设备使用。-serial communications for use of the two machines running serealcom.exe, but must ensure that the use serial link, choose when and if there Serial error, the expression of this Serial other equipment is being used.
    2022-04-16 06:13:33下载
    积分:1
  • 从编程实践的角度详细介绍windows环境下和dos环境下的串口通信的基本方法...
    从编程实践的角度详细介绍windows环境下和dos环境下的串口通信的基本方法-programming practice from the perspective of detail windows environment and the environment dos serial communication base this method
    2022-08-07 15:56:11下载
    积分:1
  • 完成MOTOBUS通信,实际03功能码。可实现与具有MOTOBUS通信协议的智能设备进行通信...
    完成MOTOBUS通信,实际03功能码。可实现与具有MOTOBUS通信协议的智能设备进行通信-Completed MOTOBUS communications, the actual function code 03. Can be achieved with MOTOBUS smart device communication protocols to communicate
    2022-02-05 15:29:46下载
    积分:1
  • spcomm是DELPHI,BCB下的,非常好用的VCL控件,比MSCOM好用些。这个源程序给出了spcomm的基本用法。...
    spcomm是DELPHI,BCB下的,非常好用的VCL控件,比MSCOM好用些。这个源程序给出了spcomm的基本用法。-spcomm is Delphi, the BCB, very handy VCL controls more than EMS handy. This is a source spcomm the basic usage.
    2022-02-28 13:43:38下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载