Ioctl.exe: How to Use Various Types of IOCTL

ID: Q178317


The information in this article applies to:


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:

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:

  1. Invoke the checked or free build environment MS-DOS box.


  2. 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.


  3. 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

  1. Reboot your computer.


  2. Start the driver with "net start sioctl".


  3. 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