Share via


A Hole In My Head

Doron Holan's musings on drivers and other nibbles and bits

How are power buttons reported in Windows?

There are a few different possible types of power related buttons on a PC. There is the button on...

Author: Doron Holan [MSFT] Date: 09/08/2006

How do I debug a failed device install or disable?

Debugging a failed device install or disable can be tough. The error could be hidden in the depths...

Author: Doron Holan [MSFT] Date: 08/31/2006

It is not like I go read the WDK docs in my spare time, but one day I did and I came across...

Author: Doron Holan [MSFT] Date: 08/29/2006

I want my sleep key back! (or how to hibernate a machine from your app)

One of the first things I do when I get a new desktop machine or install a new build of Windows is...

Author: Doron Holan [MSFT] Date: 08/28/2006

A NULL and zero wait timeout are not the same

When you call KeWaitForSingleObject or KeWaitForMultipleObjects you can provide a pointer to a...

Author: Doron Holan [MSFT] Date: 08/25/2006

In my last post I showed how you can distinguish between to different device interfaces being opened...

Author: Doron Holan [MSFT] Date: 08/23/2006

How do I know which device interface is being opened?

Let's say your device supports two interfaces and you want to expose both of them on the same device...

Author: Doron Holan [MSFT] Date: 08/18/2006

Formatting a WDFREQUEST for any IRP_MJ code

In KMDF, the WDFIOTARGET object provides an abstraction for sending I/O to another PDEVICE_OBJECT...

Author: Doron Holan [MSFT] Date: 08/16/2006

Look Ma, I'm on Channel 9!

I was interviewed for channel 9 a couple of weeks ago, you see the interview here. We talked about...

Author: Doron Holan [MSFT] Date: 08/15/2006

Debugger command (!list) that makes my life easier

Yesterday I introduced the dl command and demonstrated some of its limitations. Today I will talk...

Author: Doron Holan [MSFT] Date: 08/10/2006

Debugger command (dl) that makes my life easier

The use of the LIST_ENTRY structure in WDM is quite pervasive. It is used for nearly all list...

Author: Doron Holan [MSFT] Date: 08/09/2006

IoSetCompletionRoutineEx is not a drop in replacement for IoSetCompletionRoutine

Yesterday I wrote about the evolution of work items. Work items evolved because there was a need to...

Author: Doron Holan [MSFT] Date: 08/08/2006

Why is there an Ex and Io work item in WDM?

Have you ever looked at the work item APIs and wondered why there are two different types of work...

Author: Doron Holan [MSFT] Date: 08/07/2006

Turning setupapi logging up to 11

When debugging a failed device install, one of the first things you should do is look at the...

Author: Doron Holan [MSFT] Date: 08/04/2006

Enhanced Work Item Support in Vista

While writing the threaded and non-threaded PIRP entry, I had the I/O manager developers review what...

Author: Doron Holan [MSFT] Date: 08/03/2006

Viewing your KMDF log in a mini-dump (and other post mortem features)

Your KMDF driver log can also be available in a mini-dump under certain circumstances. If you have a...

Author: Doron Holan [MSFT] Date: 08/02/2006

Customizing the KMDF log for your driver

Yesterday I talked about the KMDF log. The KMDF log is a great tool to debug why a DDI call has...

Author: Doron Holan [MSFT] Date: 08/01/2006

How can I view the KMDF log for my driver?

A lot of developers have a great experience with KMDF, but then they sometimes hit a wall. They add...

Author: Doron Holan [MSFT] Date: 07/31/2006

Threaded and non-threaded PIRPs

Broadly speaking, there are two (*) types of PIRPs in Windows. By "type" I do not mean the...

Author: Doron Holan [MSFT] Date: 07/28/2006

Can I send synchronous I/O on an asynchronous (OVERLAPPED) handle?

The short answer isthat you can't ;). Once you have opened a HANDLE by specifying...

Author: Doron Holan [MSFT] Date: 07/26/2006

A friend of mine is interviewed by Major Nelson

Totally unrelated to kernel model programming...my friend Scott Selfon, a Senior Audio Specialist...

Author: Doron Holan [MSFT] Date: 07/25/2006

Dr Dobbs article related to Windows PnP

Dr Dobb's has an article, Device Trails: How Windows remembers your connection, that I just found...

Author: Doron Holan [MSFT] Date: 07/25/2006

Why is my completion routine's DeviceObject NULL?

At first glance, this is a "what were they thinking when they designed this?" type of issue, but...

Author: Doron Holan [MSFT] Date: 07/25/2006

Apple's Secure Coding Guide

While I don't write apps or drivers for the Macintosh, some of you out there probably do. If you...

Author: Doron Holan [MSFT] Date: 07/24/2006

Debugger commands (stack frame navigation) that makes my life easier

One thing that I have always found clunky is stack frame navigation in windbg/kd. Previously, I...

Author: Doron Holan [MSFT] Date: 07/21/2006

The duality of IoRegisterPlugPlayNotification and when you should call it

IoRegisterPlugPlayNotification() is a pretty scary looking function at first glance. The...

Author: Doron Holan [MSFT] Date: 07/20/2006

New debugger package is now public

You can download the package from WHDC. It is hard for me to keep track of when they go public, we...

Author: Doron Holan [MSFT] Date: 07/19/2006

An easy way to leak pool and locked pages (e.g. sometimes you have to free Irp->MdlAddress)

Did you know that there are times when you must free Irp->MdlAddress in your driver? Even more...

Author: Doron Holan [MSFT] Date: 07/19/2006

This is pretty cool, WHDC has a page linking my blog and a bunch of other Microsoft blogs relating...

Author: Doron Holan [MSFT] Date: 07/18/2006

Trivia: what's in a name?

Ever notice that the KMDF DDIs do not actually have KMDF in their names? Well, there is an...

Author: Doron Holan [MSFT] Date: 07/17/2006

DeviceQuestionsForMe

I have been getting quite a few personal emails with specific questions on how to write a driver or...

Author: Doron Holan [MSFT] Date: 07/10/2006

Debugger commands (!error, .enable_long_status) that makes my life easier

One thing you learn very quickly when writing a driver is that NTSTATUS is used almost everywhere....

Author: Doron Holan [MSFT] Date: 07/07/2006

What is ContextSizeOverride and how do I use it?

One of the lesser used fields in WDF_OBJECT_ATTRIBUTES is ContextSizeOverride. In a typical KMDF...

Author: Doron Holan [MSFT] Date: 06/28/2006

At what IRQL does EvtObjectCleanup get called at?

This has been asked quite a few times on the newsgroups and NTDEV since KMDF has been released and...

Author: Doron Holan [MSFT] Date: 06/27/2006

UMDF 1.0 Beta is now out

Peter wrote about it, but I thought I should mention it here as well. The UMDF v1.0 beta for XP is...

Author: Doron Holan [MSFT] Date: 06/26/2006

Which lock should I use and why?

This is commonly asked by new and experienced driver writers alike: "which locking primitive should...

Author: Doron Holan [MSFT] Date: 06/26/2006

How can I be notified about system state transition before they happen?

A PnP WDM driver gets notified about a system power transition when it receives a...

Author: Doron Holan [MSFT] Date: 06/14/2006

Sorry about the lack of posts

Last week was pretty evil ;(. A bug that should have taken half a day ended up taking an entire week...

Author: Doron Holan [MSFT] Date: 06/13/2006

When is a reported PDO recognized as PDO by PnP?

Sometimes as a bus driver you need to access the PDO's Device Parameters key of its device node (to...

Author: Doron Holan [MSFT] Date: 06/13/2006

Not a big fan of #ifdef or #ifndef

I am not a big fan of the C/C++ preprocessor directives #ifdef or #ifndef. I am not denying that...

Author: Doron Holan [MSFT] Date: 06/02/2006

SDV and PreFast for Drivers (PFD) article on CNET

These tools are essential for any driver writer and the folks who work on them are just down the...

Author: Doron Holan [MSFT] Date: 05/30/2006

What did you think of WinHEC?

First, it was great to meet some of you who are reading my blog in person. It's always nice to have...

Author: Doron Holan [MSFT] Date: 05/26/2006

How to create an exclusive device or debug why your device is exclusive

Certain devices are exclusive access, or in simpler terms, only one handle can be opened for a...

Author: Doron Holan [MSFT] Date: 05/26/2006

Previous command completion in WinDBG

One of the features I like about kd is that since you are using a console window, you get a lot of...

Author: Doron Holan [MSFT] Date: 05/22/2006

Will be at WinHEC this week

Title says it all. You are more then invited to come find me and chat. I will be at the 2 day time...

Author: Doron Holan [MSFT] Date: 05/22/2006

How do I track leaked references on KMDF handles?

In addition to the standard KMDFDV behavior, you can enable further verification on handles by their...

Author: Doron Holan [MSFT] Date: 05/19/2006

What does the KMDF verifier do?

When you turn on the KMDF verifier(KMDFDV), a whole slew of behaviors are verified. Unlike the WDM...

Author: Doron Holan [MSFT] Date: 05/18/2006

Yet another verifier? Yeah, KMDF has one too!

One of the prominant design goals throughout KMDF's development cycle was to create a system that...

Author: Doron Holan [MSFT] Date: 05/17/2006

<Previous Next>