Click here to Skip to main content
11,632,706 members (91,321 online)
Click here to Skip to main content
Add your own
alternative version

Driver Development Part 4: Introduction to device stacks

, 27 Mar 2005 176.8K 4.4K 243
This article will introduce how devices can interact with each other.
driverdev_src4.zip
driverdev_src4
drivers
example
makefile
examplefilter
makefile
inc
LoadDriver
makefile
loaddriver2
makefile
usedriver
makefile
usedriver2
makefile
usedriver3
makefile
/**********************************************************************
 * 
 *  Toby Opferman
 *
 *  Driver Example
 *
 *  This example is for educational purposes only.  I license this source
 *  out for use in learning how to write a device driver.
 *
 *     Driver Shared Header File
 **********************************************************************/




#ifndef __EXAMPLE_FILTER_H__
#define __EXAMPLE_FILTER_H__

typedef unsigned int UINT;
typedef char * PCHAR;

/* #define __USE_DIRECT__ */
#define __USE_BUFFERED__

NTSTATUS ExampleFilter_Create(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_Close(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_IoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_Write(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_Read(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_UnSupportedFunction(PDEVICE_OBJECT DeviceObject, PIRP Irp);
NTSTATUS ExampleFilter_IoControlInternal(PDEVICE_OBJECT DeviceObject, PIRP Irp);

typedef struct _EXAMPLE_FILTER_EXTENSION
{
    PDEVICE_OBJECT pNextDeviceInChain;

} EXAMPLE_FILTER_EXTENSION, *PEXAMPLE_FILTER_EXTENSION;


#define EXAMPLE_FILTER_POOL_TAG ((ULONG)'pxEF')


#endif






By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Toby Opferman
Engineer Intel
United States United States
Toby Opferman has worked in just about all aspects of Windows development including applications, services and drivers.

He has also played a variety of roles professionally on a wide range of projects. This has included pure researching roles, architect roles and developer roles. He also was also solely responsible for debugging traps and blue screens for a number of years.

Previously of Citrix Systems he is very experienced in the area of Terminal Services. He currently works on Operating Systems and low level architecture at Intel.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150728.1 | Last Updated 28 Mar 2005
Article Copyright 2005 by Toby Opferman
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid