A must have book for any Windows developer

I saw a book,  Advanced Windows Debugging, in the Microsoft company store and quickly read through it. It looked pretty awesome in the level of detail and breadth that it covered.  I ordered my own copy and I think it would be an invaluable resource for anyone who develops drivers or applications on Windows.  I learn…

4

Why I should not be writing applications ;)

The first driver I owned when I started at Microsoft in 1997 was i8042prt.sys, the driver that controls your PS2 mouse and keyboard.  I had the job of upgrading it from an NT4 legacy style driver to a PnP enabled Windows 2000 driver.  Of course my dad asked “didn’t keyboards and mice work before you…

5

How to share HW resources with another driver not in the same PnP hierarchy

First, I have to say that I don’t agree with this design pattern at all.  I think it leads to too many problems and complications that are not worth the pain.  The only reason I am writing this entry is that I have seen so many people get this wrong or not account for some…

1

WdfDeviceRetrieveDeviceInterfaceString and PDOs

When you initially create a PDO, it takes a few steps for PnP to recognize it.  I wrote this problem of determining when a PDO becomes a PDO last year.  At the end of the post I mentioned that KMDF handles all of this state management for you underneath the covers.  This works for 99%…

1

Setting a security descriptor on a legacy device object

Setting the security descriptor allows you to control who can open a handle to the device object.  Typically you can call IoCreateDeviceSecure to create the device object and have the correct DACL from the start.  One issue with IoCreateDeviceSecure is that the SDDL string is limited to what it can describe, primarily you can only…

1

Fast Resume and how if affects your driver

Fast resume, which was introduced in Windows XP,  is often mentioned when implementing power support in your WDM driver.  But what does “fast resume” mean and when implementing fast resume, what side effects occur in your driver?  I’ll to answer both of these questions as well as the reasoning behind this feature.  When I started to write this…

2

Vista IO manager changes in handling FILE_DEVICE_SECURE_OPEN

After having the IO manager developer review my last 2 posts, he pointed out to me that the IO manager handling of FILE_DEVICE_SECURE_OPEN (FDSO) has changed slightly in Vista.  News to me and probably news to all of you as well.   The change involves the case where there is a file system mounted on a…

1

Making sure the IO manager evaluates the security of your device

Last time I wrote about how the IO manager handles the creation of file handles and pointed out a potential security hole.  If there is a namespace (or path) after your device’s name in the path passed to CreateFile, the IO managed does not evaluate the security settings set on your device and relies on your driver…

1

Devices and namespaces (or how the IO manager handles file creation)

Ever wonder how the creation of a handle works?  It doesn’t matter type of resource the handle you are opening is backed by (a COM port, a file, a network share, a custom piece of hardware, etc), it all goes through CreateFile (which should be a little obvious since the only way to open an type of handle…

4