计算机与现代化 ›› 2009, Vol. 8 ›› Issue (8): 49-53.doi: 10.3969/j.issn.1006-2475.2009.08.014

• 网络与通信 • 上一篇    下一篇

利用WinIo实现并口数据通信

袁军1,谭永东1,任俊2   

  1. 1.西南交通大学电气工程学院,四川 成都 610031;2.西藏军区77516部队气象室,西藏 拉萨 850000
  • 收稿日期:2008-08-26 修回日期:1900-01-01 出版日期:2009-08-21 发布日期:2009-08-21

Implementation of Data Communication Using Parallel Ports with WinIo

YUAN Jun1,TAN Yong-dong1,REN Jun2   

  1. 1. School of Electrical Engineering, Southwest Jiaotong University, Chengdu 610031, China;2. Meteorological Office, 77516 Army in Tibet Military Area, Lasa 850000, China
  • Received:2008-08-26 Revised:1900-01-01 Online:2009-08-21 Published:2009-08-21

摘要: 在Windows 2000/XP/NT下,由于系统安全性的考虑,用户不能对底层I/O口进行直接访问。为了利用并口实现PC机与外部设备之间的数据通信,本文给出了一种利用WinIo函数库提供的虚拟驱动程序绕过系统的保护机制实现并口数据通信的方法。在分析并口硬件工作原理及其工作方式的基础上,通过硬件接口操作试验,最终给出了在应用程序中利用WinIo动态链接库中的函数实现并口通信的过程及实现代码。

关键词: 并行端口, 数据通信, WinIo, PC, Windows 2000/XP/NT

Abstract: Because of security, the I/O ports can’t be accessed directly in Windows 2000/XP/ NT. To realize the communication between PC and peripheral equipments by parallel ports, this paper proposes an approach which circumvents Windows protection mechanisms using virtual X device provided by WinIo library. Based on the analyses of hardware principle and working modes of parallel ports, finally through interface experiment the process of operation, codes to realize communication in application program with functions in dynamic link libraries (DLL) are given.

Key words: parallel port, data communication, WinIo, PC, Windows 2000/XP/NT

中图分类号: