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
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)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
A Hole In My Head
Mounting an ISO as a virtual CD rom drive
Posted
over 7 years ago
by
Doron Holan [MSFT]
3
Comments
A few people have emailed me over the past few days how they can see the contents of the KMDF v1.1 ISO (or any other ISO for that matter) without having to burn it to a disc or telling me about the virtual CD tool on http://www.microsoft.com . I am sure...
A Hole In My Head
KMDF V1.1 is now available
Posted
over 7 years ago
by
Doron Holan [MSFT]
0
Comments
Windows 2000 support for everyone who asked: http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx If you have already installed KMDF v1.0 on your machine, you will be asked to remove the v1.0 bits before the v1.1 bits will install. This is by...
A Hole In My Head
OS differences when ejecting an unstarted PDO
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
One of the, errr, joys of owning the PnP state machine in KMDF is that I must be compatible with all the weird and wonderful behaviors of not only drivers, but the PnP manager itself. One such behavior was just fixed for the next release of KMDF (post...
A Hole In My Head
How to break in at the call site that invokes the break point
Posted
over 7 years ago
by
Doron Holan [MSFT]
8
Comments
I think everyone at some point in time wants to embed a break point in there code, whether it be for debugging purposes, path tracing, or detecting edge conditions that have not yet been tested. When I hit a break point, I would prefer that the debugger...
A Hole In My Head
Debugger commands (gu) that make my life easier
Posted
over 7 years ago
by
Doron Holan [MSFT]
3
Comments
It's a quick one today. One of the great features about windbg is that it has a return to caller button . I tend to like to keep my hands on the keyboard even when I am using windbg and Shift+F11 is still too cumbersome (long live the home row!). In the...
A Hole In My Head
Why does /FASTDETECT exist and how did it get its name?
Posted
over 7 years ago
by
Doron Holan [MSFT]
0
Comments
/FASTDETECT is a command line flag in a boot.ini entry. It started showing up in Windows 2000 (W2K) by default. Why does this flag exist? Previous to W2K ntdetect.com performed a tremendous amount of device detection since PnP did not exist previous...
A Hole In My Head
How to test PnP state changes in your driver
Posted
over 7 years ago
by
Doron Holan [MSFT]
0
Comments
I'm still getting back into the flow of things at work, so I will start off this week with a simpler topic and move into meatier topics as get more control over my time. One thing I am constantly asked is "how do I manually test PnP state changes in my...
A Hole In My Head
My leave is over
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
I am back at work. Things are a bit out of order having been gone for a month, but hopefully I will be able to write something tonight once things have quieted down. Needless to say, staying at home with my new son has been an amazing experience. It was...
A Hole In My Head
Programming Note
Posted
over 7 years ago
by
Doron Holan [MSFT]
1
Comments
I will be on parental leave for the month of April :). While I have written up articles to post ahead of time, there is no guarantee I will have time to post them though. I will try for around 3 articles a week, but the pace might be slower then...
A Hole In My Head
Debugger commands (!bpid) that make my life easier (part 6)
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
Today's kernel debugger command is "!bpid", break on process id. This command will break into an application in the application context from within the kernel debugger. Why would you want to do this? Well, you are not always in the right user mode...
A Hole In My Head
Debugger commands (dps, dpp) that make my life easier (part 5)
Posted
over 7 years ago
by
Doron Holan [MSFT]
3
Comments
Today's debugger command is "dps" (display pointers and symbols). You might be familiar with the "dds" command. While dds will always dump a DWORD, dps will dump pointers, where the pointer size is determined by the target. (I used to use dds because...
A Hole In My Head
Avoiding #defines for constant data and using enums instead
Posted
over 7 years ago
by
Doron Holan [MSFT]
27
Comments
I think that the C preprocessor is a very powerful tool, but I like to limit my use of #defines. I have already touched on this when i talked about why I liked FORCEINLINE and I want to talk about it some more. I realize I can't eliminate the use of #defines...
A Hole In My Head
Debugger commands (!sd) that make my life easier (part 3.1)
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
Peter Wieland informed me that you can actually find the security descriptor (SD) using !object, you just have to work harder to get at it. It relies on an undocumented structure, but since this is not being used at runtime and !object also uses it, I...
A Hole In My Head
Debugger commands (dt, ??) that make my life easier (part 4)
Posted
over 7 years ago
by
Doron Holan [MSFT]
4
Comments
Today I will cover how to look at type information from the command line of windbg/kd. You can do all of this in the UI with a mouse, but that takes too long ;). I like to keep my hands on the keyboard and not move around. More importantly, by learning...
A Hole In My Head
Debugger commands (!object) that make my life easier (part 3)
Posted
over 7 years ago
by
Doron Holan [MSFT]
0
Comments
Today I am going to write about !object. One of the tools you can get from sysinternals is WinObj.exe. This allows you to traverse the internal object hierarchy in Windows. It's a neat tool, but it uses internal undocumented APIs which means that when...
A Hole In My Head
Real life usage of loading a driver as a dump file
Posted
over 7 years ago
by
Doron Holan [MSFT]
6
Comments
Today I got a callstack via email (from the NTDEV list), but no dump file. I needed to determine if the bugcheck was due to a KMDF or a USB core bug. Since I had no dump file, I had to work purely on what the message contained. The callstack did have...
A Hole In My Head
Debugger commands (!poaction, !poreqlist) that make my life easier (part 2)
Posted
over 7 years ago
by
Doron Holan [MSFT]
3
Comments
Today's commands are related to power, they are: !poreqlist !poaction !podev (covered in the last topic) !poreqlist will list all outstanding PIRPs on the machine that are a result of any driver calling PoRequestPowerIrp(). Remember how in the...
A Hole In My Head
Debugger commands (!drvobj, !devobj, !podev, !devstack) that make my life easier (part 1)
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
Over the next few days I'll talk about different debugger commands which I use to make driver development easier, especially when debugging my driver. Today I'll talk about how to find your driver, the devices you created and any device object that any...
A Hole In My Head
How to debug missing imports at driver load time
Posted
over 7 years ago
by
Doron Holan [MSFT]
8
Comments
Debugging when your driver fails to load can be exasperating, especially if it is due to a missing import. Windows 2000 would put up a dialog box telling the user which import was missing, but the user can't do anything about it (unless she is the driver...
A Hole In My Head
Loading your driver in user mode
Posted
over 7 years ago
by
Doron Holan [MSFT]
6
Comments
One of the very cool features of windbg/kd is that you can load any PE file as a dump file. That means that you can load an exe, dll, or sys file as a dump file in the debugger. Your driver won't run ;), but you can look at alot of things in it. All you...
A Hole In My Head
Great articles on DMA
Posted
over 7 years ago
by
Doron Holan [MSFT]
2
Comments
Peter Wieland has started a blog . Peter sits around the corner from me and works on UMDF (which exists under the WDF banner alongside KMDF). He has written 4 (so far) excellent entries on DMA, part 1 is here . DMA is one of the aspects of writing a driver...
A Hole In My Head
Beware the shiny light that is MmIsAddressValid
Posted
over 7 years ago
by
Doron Holan [MSFT]
7
Comments
This came up on NTDEV today and has come up in the past (both in the community and internally on the KMDF team). MmIsAddressValid appears to be a great function given its name. You pass in a kernel virtual address (VA from now on) and it returns TRUE...
A Hole In My Head
A KLOCK_QUEUE_HANDLE cannot be shared across multiple threads
Posted
over 7 years ago
by
Doron Holan [MSFT]
0
Comments
Folks like to write wrappers. One very popular wrapper is for a KSPIN_LOCK . An example wrapper would be typedef struct _MY_LOCK { KSPIN_LOCK Lock; KIRQL LockIrql; } MY_LOCK, *PMY_LOCK; VOID FORCEINLINE AcquireMyLock(PMY_LOCK Lock) { KeAcquireSpinLock...
A Hole In My Head
The return value from RtlCompareMemory and memcmp do not mean the same thing!
Posted
over 7 years ago
by
Doron Holan [MSFT]
3
Comments
When I was working on the Bluetooth core, I got this mistake the first time I tried to compare 2 bluetooth addresses (a bluetooth address is 48 bits wide and at the time we were not using a ULONGLONG to represent the address, so we were doing structure...
A Hole In My Head
String buffers and IRQL
Posted
over 7 years ago
by
Doron Holan [MSFT]
13
Comments
If you look at the docs for many Rtl string functions, you will see that they are callable only at IRQL == PASSIVE_LEVEL. This applies to not only Rtl functions but also to CRT functions Why is that? Well, there are a few resaons The Rtl functions...
Page 7 of 8 (195 items)
«
4
5
6
7
8