NMPipe.exe Sample Opens a Named Pipe Created in User- Mode
ID: Q178320
|
The information in this article applies to:
-
Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.51, 4.0
SUMMARY
This sample demonstrates how to open a named pipe created in the user-mode,
how to read or write to the pipe, and how to create system thread.
MORE INFORMATIONNMPipe.exe For more information about how to download files from the Microsoft
Download Center, please visit the Download Center at the following Web
address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.
Generic Sample NMPIPE Driver
This sample demonstrates how to open a named pipe created in the user-mode
and read/write to the pipe.
The following are included with this file:
- A Windows NT device driver.
- A simple test program that can be run either as a server or as a client.
As a server it creates a named pipe and waits on the pipe for the driver
to connect. Then it goes into a loop where it reads the data from the
pipe and prints it. As a client it sends an ioctl down to the driver to
start or stop the client thread.
This driver provides an example of a minimal driver. Neither it, nor the
sample program is 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 dos box.
- Run "BUILD". This invokes the Microsoft make routines. They produce log
files called Build.wrn, and Build.log. The WRN file will contain
warnings that no components have been extracted from certain libraries,
even if the build succeeds. If it does succeed the driver can be found
in %basedir%\lib\i386\free or %basedir%\lib\i386\checked directory.
- Copy the sys file to %systemroot%\SYSTEM32\DRIVERS directory where all
the Windows NT device drivers are stored.
To install the Sample NMPIPE driver use the REGINI utility to
create the entries listed in the nmpipe.ini file.
Testing
- Reboot your computer.
- Start the driver with "net start nmpipe".
- Run nmpipe.exe /s - as a server.
- Run nmpipe.exe /c 1 - to start the thread.
- Run nmpipe.exe /c 0 - to stop the thread.
Additional query words:
Keywords : kbfile kbnokeyword kbDDK
Version : winnt:3.51,4.0
Platform : winnt
Issue type :
|