Ioctl.exe: How to Use Various Types of IOCTL
ID: Q178317
|
The information in this article applies to:
-
Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.51, 4.0
SUMMARY
The Ioctl.exe file demonstrates how to use various types of IOCTL and how the I/O manager
handles the user I/O buffer in each case. This sample also helps you
understand how to use some of the memory manager functions.
MORE INFORMATION
The following file is available for download from the Microsoft
Software Library:
Ioctl.exe
Release Date: Apr-1-1999
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Generic Sample IOCTL Driver
The following are included with this file:
- A Windows NT device driver to demonstrate how to use four different
types of IOCTLs and some of the memory manager functions.
- A simple test program that makes all four types of IOCTL calls to the
driver.
This driver is an example of a minimal driver. Neither it nor the sample
programs are intended to be used in a production environment. Rather, they
are intended for educational purposes and as a skeleton driver.
Building the Driver and Examples
To compile the device driver:
- Invoke the checked or free build environment MS-DOS box.
- Run Build. This invokes the Microsoft make routines, which produce log
files called Build.wrn and Build.log. The .wrn file contains
warnings that no components have been extracted from certain libraries,
even if the build succeeds. If the build does succeed, the driver can be found
in the %basedir%\lib\i386\free or %basedir%\lib\i386\checked directory.
- Copy the SYS file to the %SystemRoot%\system32\drivers directory on your
test machine.
To install the Sample IOCTL driver (Sioctl), use the Regini utility to
create the entries listed in the Sioctl.ini file.
Testing
- Reboot your computer.
- Start the driver with "net start sioctl".
- Run Sioctl.exe.
Additional query words:
Keywords : kbfile kbsample kbDDK
Version : winnt:3.51,4.0
Platform : winnt
Issue type :
Last Reviewed: April 2, 1999