Programming the Microsoft Windows Driver Model - page 2


Copyright© 1999 by Walter Oney
[Previous] [Next]

Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399

Copyright © 1999 by Walter Oney

All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher.

Library of Congress Cataloging-in-Publication Data
Oney, Walter.
       Programming the Microsoft Windows Driver Model
           p.      cm.
       Includes index.
       ISBN 0-7356-0588-2
       1. Microsoft Windows NT device drivers (Computer programs)
    2. Computer programming.   I. Title
    QA76.76.D49O54   1999
    005.7'126--dc21                                                                   99-33878

Printed and bound in the United States of America.

1 2 3 4 5 6 7 8 9   QMQM   4 3 2 1 0 9

Distributed in Canada by Penguin Books Canada Limited.

A CIP catalogue record for this book is available from the British Library.

Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at

Intel is a registered trademark of Intel Corporation. Microsoft, Microsoft Press, MSDN, Visual C++, Visual Studio, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.

The example companies, organizations, products, people, and events depicted herein are fictitious. No association with any real company, organization, product, person, or event is intended or should be inferred.

Acquisitions Editor: Ben Ryan

Project Editor: Devon Musgrave

Technical Editor: Robert Lyon

[Previous] [Next]


To my parents, who gave me life and taught me what to do with it.

[Previous] [Next]


The Windows Driver Model traces its roots several years back to an OS called Windows for Workgroups 3.10. At that time we were struggling with support for the myriad of different SCSI controllers, and I was gazing longingly at the assortment of miniports that the Windows NT team had created. It didn’t take long to realize that it would take less effort to re-create the necessary image loader and execution environment that the miniports expected than it would to rewrite and debug all of those miniports in some sort of VxD form.

Unfortunately Windows for Workgroups 3.10 ended up shipping without support for SCSI miniports, due mainly to peripheral issues such as solid ASPI (Advanced SCSI Programming Interface) compatibility. However, the groundwork to share the same executable driver images across the Windows and Windows NT operating systems was in place and would see the light of day in Windows 95, which could share both SCSI and NDIS miniport binaries with Windows NT.

The potential benefits of a shared driver model are significant. For driver developers interested in supporting both platforms, a shared driver model can cut the driver development and testing costs almost in half. For Microsoft, a shared model means easier migration from Windows 9x to Windows 2000 and future releases of this platform. And for the end user, a larger variety of more stable drivers would be available for both platform families.

The next logical step, then, was to create a driver model with the ability to share general purpose drivers across both platforms. But what form should it take? Three requirements were immediately obvious: it must be multiprocessor-capable, it must be processor-independent, and it must support Plug and Play (PnP). Fortunately, the Windows NT 4.0 driver model met the first two requirements, and it seemed clear that the next major release of Windows NT would support PnP as well. As a result, WDM can be considered a proper subset of what is now the Windows NT driver model.

The potential benefits of a shared driver model can be realized today for many classes of devices, and choosing the WDM driver model will continue to pay dividends in the future. For example, a correctly written WDM driver requires only a recompile before functioning in an NT 64-bit environment prototype.

WDM will continue to evolve as new platforms and device classes are supported. Future versions of Windows 9x and Windows 2000 will contain upwardly revised WDM execution environments. Fortunately, WDM is designed to be "backward compatible," meaning that WDM drivers written according to the Windows 2000 DDK and designed to work for the intended environment will continue to work in a subsequent WDM environments.

There is a lot to WDM, and in this book Walter does an excellent job in offering an in-depth tour of every aspect as well as the philosophy of the Windows Driver Model.

Forrest Foltz
Architect, Windows Development
Microsoft Corporation