A Hole In My Head
Doron Holan's musings on drivers and other nibbles and bits
More Vista remove lock (remlock) changes
First, a correction to my previous remlock post, where I said that you must still compile your...
Author: Doron Holan [MSFT] Date: 03/22/2007
Supporting query interface in KMDF
In my last post I talked about bidirectional interfaces which can have both input and output...
Author: Doron Holan [MSFT] Date: 03/12/2007
INTERFACEs can contain both input and output parameters…and not just function pointers
When you look at the documentation for an INTERFACE and IRP_MN_QUERY_INTERFACE, it mentions that the...
Author: Doron Holan [MSFT] Date: 03/07/2007
Power relationships in a bus driver
A small but important rule in WDM is that while a PDO is in D0, the parent must be in D0 as well. A...
Author: Doron Holan [MSFT] Date: 03/02/2007
Problems associated with arming yourself for wake
Hindsite in this case is 20/20, but arming your device for wake can open yourself up to multitude of...
Author: Doron Holan [MSFT] Date: 02/27/2007
Which callback is called on surprise or graceful removal?
WDF performs a lot of state tracking for you, from PnP to power state to the number of outstanding...
Author: Doron Holan [MSFT] Date: 02/26/2007
New behind the code on channel 9
Rico Mariani, an awesome developer at Microsoft, was interviewed on behind the code. I was in the...
Author: Doron Holan [MSFT] Date: 02/23/2007
I can't imagine how much work it would be to actually /write/ a book
All I can say is that it is a ton of work to review one. We just finished all of the reviews for the...
Author: Doron Holan [MSFT] Date: 02/20/2007
How many Power IRPs can I have pended in my stack at one time?
First, we have to list all of the different power IRPs a driver can receive. The minor function is...
Author: Doron Holan [MSFT] Date: 02/07/2007
Which PnP and power IRPs are synchronized against each other?
In my previous post, I talked about how state changing PnP IRPs (refered to from now own as just PnP...
Author: Doron Holan [MSFT] Date: 02/07/2007
Which PnP IRPs are state changing?
While not clear in the WDK documentation, there are two types of PnP IRPs: state changing and...
Author: Doron Holan [MSFT] Date: 01/30/2007
Where do I ask driver related questions?
This is a very common question. There are a few resources at your disposal Read the Microsoft public...
Author: Doron Holan [MSFT] Date: 01/24/2007
How does WdfDeviceSetFailed work? (AKA the case of the missing WDK documentation for REENUMERATE_SELF_INTERFACE_STANDARD)
KMDF is built on top of public interfaces. This means that it uses only APIs found in the WDK (or...
Author: Doron Holan [MSFT] Date: 01/23/2007
I have been quiet over the past 2 weeks
A few reasons. First, I have been in a lot of all day meetings which ate up all my time. Second,...
Author: Doron Holan [MSFT] Date: 01/17/2007
Concise and easy to use parameter types in KMDF
One of the goals of KMDF was to use clear and concise types in our parameters and structures so that...
Author: Doron Holan [MSFT] Date: 01/17/2007
Starting the year off with a potentially bad addiction...
My wife gave me a sudoku puzzle book (editted by Will Shortz, one of the easy to hard volumes). I...
Author: Doron Holan [MSFT] Date: 01/08/2007
Annotation (SAL) of the day: __reserved
I just stumbled across the __reserved (as in reserved for future or system use) annotation today....
Author: Doron Holan [MSFT] Date: 01/02/2007
Where are the WDF files in the WDK?
The WDF (both UMDF and KMDF) files in the WDK are not found in a single directory, rather they are...
Author: Doron Holan [MSFT] Date: 12/21/2006
Should I use the chk or fre KMDF coinstaller?
This has been asked quite a few times and is a major point of confusion for KMDF developers. The...
Author: Doron Holan [MSFT] Date: 12/19/2006
How to return the number of bytes required for a subsequent operation
A very common pattern is to allow a caller to ask for the number bytes (or elements) required and...
Author: Doron Holan [MSFT] Date: 12/12/2006
Creating your own InterlockedXxx operation
Sometimes your design requires an Interlocked operation that is not currently supported by the OS,...
Author: Doron Holan [MSFT] Date: 12/06/2006
Why you want to use POBJECT_TYPEs when converting handles to objects
This post concludes my trilogy (see parts 1 and 2) on PBOJECT_TYPE (although I do reserve the right...
Author: Doron Holan [MSFT] Date: 12/05/2006
What is POBJECT_TYPE?
In a previous post I wrote about the newly documented POBJECT_TYPE variables for Vista. You can pass...
Author: Doron Holan [MSFT] Date: 12/04/2006
Getting Vista to open my Inbox the way I want it to
I am a creature of habit. Once I get into a pattern, especially with keyboard keys (i.e. my sleep...
Author: Doron Holan [MSFT] Date: 11/30/2006
Support for double checked locking
Looking through some of the additions to the WDK, I found an interesting structure, RTL_RUN_ONCE....
Author: Doron Holan [MSFT] Date: 11/29/2006
Have you been waiting for a book on WDF?
Well wait no more! We (the technical writers on WHDC and the WDF team) is working on a book and it...
Author: Doron Holan [MSFT] Date: 11/29/2006
New POBJECT_TYPE exports documented in the WDK
When calling ObReferenceObjectByHandle, ObReferenceObjectByPointer, or ObOpenObjectByPointer you...
Author: Doron Holan [MSFT] Date: 11/20/2006
Where did my debug output go in Vista?
If you are using DbgPrint for your debug output in Vista you may have noticed that you cannot see...
Author: Doron Holan [MSFT] Date: 11/14/2006
What is the serial enumeration protocol?
A common question is "how do I write a device driver for my device which is connected over the...
Author: Doron Holan [MSFT] Date: 11/13/2006
The case of amazingly morphing intrinsic function
I was in a code review earlier this week and someone pointed out the InterlockedOr, unlike the other...
Author: Doron Holan [MSFT] Date: 11/10/2006
The Vista party is today. Schweet, I finally get to attend another ship party!
Well, 5 long years later, Vista is out the door. Barely time to breath and enjoy it though, Longhorn...
Author: Doron Holan [MSFT] Date: 11/10/2006
Another WDF blogger
Patrick has started blogging on WDF. He will be looking using both UMDF and KMDF as a way to write a...
Author: Doron Holan [MSFT] Date: 11/06/2006
Weird side affect of the day: #defines can be used in your .def file
I found this one out the hard way today. I was experimenting with the KMDF loader driver...
Author: Doron Holan [MSFT] Date: 11/02/2006
New Driver Verifier feature for Vista: runtime checking for remove locks on fre OS builds
An updated document on WHDC lists the new DV features for Vista. Having used them, there are some...
Author: Doron Holan [MSFT] Date: 11/01/2006
Strings read from the registry are not guaranteed to be NULL terminated
When reading from a string from the registry, most code I have reviewed assumes that it is NULL...
Author: Doron Holan [MSFT] Date: 10/31/2006
The override keyword can be used in C++ afterall (redux on refactoring virtual functions)
Yesterday I wrote about the two methods I use to refactor a virtual function and make sure that I...
Author: Doron Holan [MSFT] Date: 10/27/2006
How I refactor virtual functions
As with many development projects, I had to refactor some code in KMDF. This refactor involved...
Author: Doron Holan [MSFT] Date: 10/26/2006
Hindsight is 20/20, EvtDriverUnload should have not been in KMDF
The KMDF model evolved over the entire development cycle. It was refined and refactored multiple...
Author: Doron Holan [MSFT] Date: 10/23/2006
Another Server 2003 SP1 DDK link
If you want to download the server 2003 SP1 DDK without the KMDF bits, you can find an iso here.
Author: Doron Holan [MSFT] Date: 10/23/2006
Annotating fall through case statements in a switch
Accidental fall throughs in a switch statement can lead to some nasty bugs. I have used the...
Author: Doron Holan [MSFT] Date: 10/20/2006
Using ntintsafe.h is a great idea, but I don't know how readable the results are
The addition of ntintsafe.h for detecting integer overflow/underflow is a great addition to the WDK....
Author: Doron Holan [MSFT] Date: 10/19/2006
It's been a while since I last wrote...
...and I apologize for it. I got back from vacation this week. Jetlag for an adult is one thing, but...
Author: Doron Holan [MSFT] Date: 10/19/2006
Programming notes, past and near future
Sorry about the lack of posts, things have been busy. I was sick with a stomach virus for the past 3...
Author: Doron Holan [MSFT] Date: 10/04/2006
Two more Channel 9 links
This interview is a bit old, but NarG talks about the I/O manager and the driver model. If you ever...
Author: Doron Holan [MSFT] Date: 09/28/2006
On vacation retroactively
Sorry for the lack of posts. I was on vacation from last Thursday until yesterday and didn't have...
Author: Doron Holan [MSFT] Date: 09/28/2006
There are class filter drivers and then there are device filter drivers
As I wrote about last time, you can have a class filter driver. What I didn't mention is that there...
Author: Doron Holan [MSFT] Date: 09/18/2006
Peter Wieland is now on Channel 9
Peter is the dev lead for UMDF. He has a great interview on channel 9. Check it out!
Author: Doron Holan [MSFT] Date: 09/18/2006
There are class drivers and then there are class filter drivers
This came up recently on the newsgroups. The term "class driver" can mean a couple of different...
Author: Doron Holan [MSFT] Date: 09/15/2006
WDM to KMDF porting guide now available on WHDC
We have been working on this one for the last couple of weeks. There is now a WDM to KMDF porting...
Author: Doron Holan [MSFT] Date: 09/12/2006
How PS2 and HID keyboads report power button events
At first glance, one would think that the reporting of a keypress on a power related (sleep, off,...
Author: Doron Holan [MSFT] Date: 09/08/2006