Author: Dale Roberts, Direct I/O and Windows NT
Here are two helpful hints to get you going with GIVEIO. The first
section below mentions the INSTDRV utility that is provided with the
Microsoft DDK. If you do not have access to the DDK, you can use Paula
Tomlinson's program LOADDRV instead. She describes it in her May 1995
article in Windows/DOS Developer's Journal (now Windows Developer's
Journal). You can get the program from their FTP site at:
ftp://ftp.mfi.com/pub/windev/1995/may95.zip.
------------------------------------------------------------------
Device Driver Installation Made Easy
The Microsoft NT Device Driver Kit documentation implies in several
places that there are several steps involved in installing a device driver
and making it accessible to a Win32 application. It explains that you
should edit the registry manually and then reboot the system. But
device drivers are dynamically loadable and unloadable in NT, and the
DDK comes with a very handy utility called INSTDRV that
demonstrates this facility in a very practical manner.
INSTDRV is a console application that will register, load, and start a
kernel mode device driver. It does not require you to edit the registry
manually or reboot the computer. On the command line you simply
give the name of your device driver and the complete path to the .SYS
file (which does not need to be in the system's DRIVERS directory).
After this command is executed, you will find that the driver has been
registered with the system and appears in the Devices applet in the
control panel. If you give the word remove instead of the path, the
driver is removed from the system and taken out of the driver database.
Once the driver is loaded and started, you can use the control panel's
Devices applet to start and stop it, or you can use the net start and net
stop commands (these are much faster) from a console window. When
a kernel mode device is stopped, it is in also unloaded from memory.
The next time you start the device, a fresh copy of the driver is read
from the hard drive, if it has been modified. This makes it very
convenient to develop device drivers, since you can go through the
modify, stop, start cycle repeatedly without ever needing to reboot. If
you need your driver to load at boot time, you can go into the Devices
applet and change its startup mode to boot.
The other component that is needed to make the driver visible to user
mode applications, so they can use CreateFile() calls to access the
driver, is registering the name in the DOS Devices name space. This
can be done, as documented in the DDK, by editing the registry
manually and rebooting. Or, much more simply, the kernel mode
driver can call the IoCreateSymbolicLink() function to register the
name itself. The GIVEIO driver shown in Listing Four uses the later
technique. Once the name is registered, user mode applications can get
a file handle to the device driver by calling CreateFile() with the driver
name as the file parameter, but preceding the driver name with the
special cookie \\.\. The TESTIO application in Listing Five uses this
technique.
------------------------------------------------------------------
Quick Trick: Using DEBUG With Port I/O
Sometimes you just need to do a quick I/O operation to a port. In DOS,
you could use the DEBUG program to accomplish this. In NT, once
you have the GIVEIO device driver up and running, you can once
again use DEBUG for port I/O. If you look at the source code for the
test application, you'll see that all it does is open and close the GIVEIO
device driver. It uses the special cookie \\.\ before the driver name in
order to access it. Without modifying DEBUG, you can have it open
this device driver by simply typing debug \\.\giveio in an NT console
window. You will get an error message complaining that the file
\\.\giveio is not found, but it will give DEBUG I/O access anyway.
Subsequent DOS applications that are run from this console window
will also have I/O access.
WIN32 applications executed from this console window will still cause
exceptions. This is because DEBUG (and any other DOS application)
runs in the context of the VDM (Virtual DOS Machine) process of the
console box, whereas each WIN32 application gets its own process.
The VDM process stays active as long as the console window is open,
but each WIN32 application creates a brand new process with the
IOPM offset initialized to point beyond the end of the TSS.
没有合适的资源?快使用搜索试试~ 我知道了~
GEC2440(广嵌)开发板配带光盘资料
共43个文件
exe:6个
c:5个
pdf:5个
5星 · 超过95%的资源 需积分: 38 252 下载量 37 浏览量
2008-11-28
22:25:39
上传
评论 7
收藏 12.09MB RAR 举报
温馨提示
GEC2440(广嵌)开发板配带光盘部分资料: Flash烧写工具、 Xlight FTP Server传送工具、 串口工具DNW、 GEC2440 用户手册-V1.1、 GEC2440实战手册-光盘版、 H-JtagDebugFinal详细使用教程、 GEC2440开发板原理图 (极极难得的资料,赶快下载吧)
资源推荐
资源详情
资源评论
收起资源包目录
GEC2440(广嵌)开发板配带光盘资料.rar (43个子文件)
GEC2440(广嵌)开发板配带光盘资料
用户手册
GEC2440实战手册-光盘版.pdf 9.04MB
GEC2440 用户手册-V1.1.pdf 2.09MB
H-JtagDebugFinal详细使用教程.pdf 511KB
实用工具
串口工具DNW
dnw.ini 115B
dnw.exe 52KB
AT91RM9200.cfg 141B
Xlight FTP Server
language_en.ini 23KB
ftpd.rules 2B
xlightftpd224_readu.txt 1KB
xlight.exe 1.06MB
odbc_tables.sql 2KB
remote_admin.exe 333KB
ftpd.hosts 54B
ftpd.users 138B
xlight_help.chm 71KB
language.ini 19KB
ftpd.password 94B
Flash烧写工具
GEC2440_BIOS.bin 40KB
安装驱动.exe 520KB
sjf2440.bat 27B
sjf2440.exe 208KB
GIVEIO.SYS 5KB
readme.txt 334B
GIVEIO
giveio.INI 195B
giveio.inf 2KB
GIVEIO.SYS 2KB
Giveio
POKEIO.C 2KB
TOTALIO
OBJ
_OBJECTS.MAC 254B
I386
TOTALIO.OBJ 1KB
TOTALIO.C 4KB
I386
FREE
TOTALIO.SYS 2KB
MAKEFILE 267B
SOURCES 97B
POKEPROC.C 652B
TSTIO
TSTIO.OBJ 33KB
TSTIO.C 2KB
TSTIO.EXE 33KB
README.TXT 5KB
GIVEIO
OBJ
I386
I386
FREE
MAKEFILE 267B
SOURCES 95B
GIVEIO.C 6KB
原理图
gec2440_core_boardv1.1.pdf 193KB
gec2440_base_boardv1.1.pdf 146KB
共 43 条
- 1
wqygogo
- 粉丝: 62
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ACR122u写卡软件
- 【java毕业设计】职称评审管理系统源码(springboot+vue+mysql+说明文档+LW).zip
- 【java毕业设计】springboot校园志愿者服务管理系统(springboot+vue+mysql+说明文档).zip
- 【java毕业设计】springboot毕业生追踪系统(springboot+vue+mysql+说明文档).zip
- 【java毕业设计】招生管理系统源码(springboot+vue+mysql+说明文档+LW).zip
- springboot中华传统服饰文化传播系统61792(数据库+源码)
- 【java毕业设计】招聘信息管理系统源码(springboot+vue+mysql+说明文档+LW).zip
- genad-horizon-gridsample.zip
- vscode-pylance-2023.5.21-vsixhub.com.vsix
- 计算机网络课程实验报告-3.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页