Sign In
A Hole In My Head
Doron Holan's musings on drivers and other nibbles and bits
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Coding Thoughts
Design Patterns
KMDF
WDF
WDK Docs
WDM
WinDBG/KD Fun
Archive
Archives
December 2010
(1)
August 2010
(1)
May 2010
(3)
February 2010
(2)
March 2009
(2)
February 2009
(1)
January 2009
(2)
June 2008
(1)
April 2008
(4)
March 2008
(6)
December 2007
(1)
November 2007
(2)
October 2007
(8)
July 2007
(2)
June 2007
(4)
May 2007
(3)
April 2007
(5)
March 2007
(6)
February 2007
(6)
January 2007
(7)
December 2006
(6)
November 2006
(11)
October 2006
(9)
September 2006
(8)
August 2006
(17)
July 2006
(15)
June 2006
(9)
May 2006
(16)
March 2006
(20)
February 2006
(17)
February, 2006
MSDN Blogs
>
A Hole In My Head
>
February, 2006
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
A Hole In My Head
How to correctly initialize a UNICODE_STRING
Posted
over 6 years ago
by
Doron Holan [MSFT]
1
Comments
In the past if you wanted to delcare a UNICODE_STRING and buffer on the stack, you had to manually declare the buffer and then initialize all the fields in the UNICODE_STRING, basically something like this #define SOME_SIZE WCHAR stringBuffer[SOME_SIZE...
A Hole In My Head
ntstrsafe.h now contains safe functions for UNICODE_STRING too!
Posted
over 6 years ago
by
Doron Holan [MSFT]
2
Comments
I don't think this is a well publicized feature, but the Server 2003 SP1 DDK contains a new version of ntstrsafe.h that now supports UNICODE_STRING. I pushed for this new functionality because nearly all ntoskrnl.exe exports which deal with a name expect...
A Hole In My Head
How should I handle symbolic links and IRP_MN_SURPRISE_REMOVAL
Posted
over 6 years ago
by
Doron Holan [MSFT]
2
Comments
For my final entry in surprise removal week (did anyone sense a theme :) ?), let's talk about symbolic links and surprise remove. The DDK docs state that you should not use a symbolic link with a PnP device, but I understand that practically speaking...
A Hole In My Head
How should I handle my hardware when processing IRP_MN_SURPRSISE_REMOVAL?
Posted
over 6 years ago
by
Doron Holan [MSFT]
0
Comments
The quick answer answer that you must assume your hardware is present and at least probe the hardware to see if it responds. You might be thinking, "I thought surprise removal was only sent when my hardware was yanked from the machine." Not so, please...
A Hole In My Head
Do I have to handle IRP_MN_SURPRISE_REMOVAL?
Posted
over 6 years ago
by
Doron Holan [MSFT]
6
Comments
You might think that just because your device is root enumerated or is plugged into fix slot (llike PCI) and not in a hot plug bus (like USB or PCCARD/PCMCIA) that your driver will not get a IRP_MN_SURPRISE_REMOVAL irp. This would be a bad assumption...
A Hole In My Head
Why does my device interface disappear when I replug my device back in?
Posted
over 6 years ago
by
Doron Holan [MSFT]
0
Comments
This is a side affect of not unregistering your device interface during surprise removal . If you do not unregister during surprise removal, this can happen: Instance #1 is built up and start and registers the device interface Instance #1 gets...
A Hole In My Head
When should I disable my device interface & deregister with WMI?
Posted
over 6 years ago
by
Doron Holan [MSFT]
1
Comments
Last week I talked about how a device interfaces and WMI instances are made unique by the kernel. Both of these constructs rely on the device instance path being unique within the system. So the question becomes, when is the device instance path no longer...
A Hole In My Head
I like FORCEINLINE
Posted
over 6 years ago
by
Doron Holan [MSFT]
14
Comments
For kernel mode code, if I have choice between using a #define or a FORCEINLINE function, the FORCEINLINE function wins every time. #defines have their place, especially for quotifying (the # operator) or concatenating (the ## operator), but they have...
A Hole In My Head
Why KMDF does not have a callback for IRP_MN_QUERY_POWER/SystemPowerState
Posted
over 6 years ago
by
Doron Holan [MSFT]
2
Comments
I was going to blog about this after I had some KMDF entries under my belt, but Raymond Chen got things started today with his post about how Windows Vista is not letting applications veto a power transition to a low power state (Sx, see the Glossary...
A Hole In My Head
How are WMI instance IDs guaranteed to be unique?
Posted
over 6 years ago
by
Doron Holan [MSFT]
2
Comments
This is related to today's previous topic of how the manager makes device interface GUIDs unique. Let's now look at how the kernel implementation of WMI (or IRP_MJ_SYSTEM_CONTROL if you are dealing with PIRPs or WBEM to you user mode folks) works. When...
A Hole In My Head
How are device interface strings guaranteed to be unique?
Posted
over 6 years ago
by
Doron Holan [MSFT]
1
Comments
When you register a device interface GUID, you get back a symbolic link name which is the link representing the instance of the device interface. The symbolic link that is returned has to be unique to your device, otherwise 2 devices sharing the same...
A Hole In My Head
Why am I not seeing any new device notifications when calling RegisterDeviceNotification?
Posted
over 6 years ago
by
Doron Holan [MSFT]
3
Comments
Let's define this simple worker function which registers for device interface arrival notifications for a given handle (either an HWND or service HANDLE): HDEVNOTIFY RegisterInterfaceNotificationWorker( HANDLE Recipient, LPCGUID Guid, DWORD Flags ...
A Hole In My Head
Glossary
Posted
over 6 years ago
by
Doron Holan [MSFT]
3
Comments
This is meant to be an organic document that grows over time. If the term you are looking for is not in this a list, you should look at the DDK docs Class Driver : A driver, usually written by Microsoft, which generically controls devices of a certain...
A Hole In My Head
\Device\Suggestions
Posted
over 6 years ago
by
Doron Holan [MSFT]
34
Comments
If you would like me to write about a topic that relates to WDM, the kernel, debugging, WDF, KMDF, UMDF, or anything that I have refered to in other entries, please add a comment to this entry. Comments will be cleared out periodically if there is enough...
A Hole In My Head
PDOs, part 1
Posted
over 6 years ago
by
Doron Holan [MSFT]
1
Comments
Definition: A PDO is a Physical Device Object. This entry is not going into how to enumerate a PDO or the rules involved in PDO enumeration and management. There are two types of PDOs. A raw PDO and a PDO which is not raw (e.g. cooked). Assume that...
A Hole In My Head
KMDF v1.1 announced and it supports Windows 2000!
Posted
over 6 years ago
by
Doron Holan [MSFT]
3
Comments
We've been working on it since we RTW'ed v1.0 late last year and v1.1 is now "official." V1.1 contains minor bug fixes and, most importantly, official support for Windows 2000. Internally, the team wanted this in v1.0, but there was a snag or two along...
A Hole In My Head
Intro
Posted
over 6 years ago
by
Doron Holan [MSFT]
2
Comments
A bit about me: I grew up in the Bay Area and got my B.S in CSc from Cal Poly, SLO I have been working at MSFT for 8.5 years and counting... We own a 100+ year old house, so I have become intimately familiar with home repair ... and now search...
Page 1 of 1 (17 items)