Windows 7

Verifier shutdown watchdog

If Windows 7 is taking a long time to shutdown, and you are running with driver verifier turned on, you may come across the following message in kernel debugger to your rescue – Driver Verifier detected that this system didn’t finish shutting down in more than 20 minutes. To display information about the thread that [...]


FltEnlistInTransaction behaviour

FltEnlistInTransaction is a filter manager function that file system mini-filters can use in Vista+ platforms to subscribe to relevant transaction notifications. It is declared in fltkernel.h as follows The idea is when a transaction is committed for example, mini-filter transaction callback is called


Memory dumping on Windows 7

It seems collecting memory dumps on Windows 7 has its own challenges. First things first – engineers always get the best information from a full memory dump but Windows 7 defaults dump type to Kernel Memory Dump. One of the first things to prepare machines for testing or development is changing the dump type to [...]


A tale of two asserts

There are two popular ways to assert in drivers. One can use the the regular ASSERT macro (int 3) or the relatively newer NT_ASSERT macro (int 2C). Since ASSERT calls RtlAssert, when the debugger breaks in, code would be several frames off of where the ASSERT was. If you use NT_ASSERT however, the debugger would [...]


Deleting a file/directory

How do you delete a file or directory1 in Win32/64 ? You have primarily three options – DeleteFile, RemoveDirectory MoveFileEx (…, MOVEFILE_DELAY_UNTIL_REBOOT…) CreateFile (…, FILE_FLAG_DELETE_ON_CLOSE…)  followed by CloseHandle First of all DeleteFile cannot be used to delete a directory, you are supposed to use RemoveDirectory instead. If you pass a directory path to DeleteFile, the [...]


How is Windows 7 Built ?

As Windows 7 nears1 RTM, Technet interviews Windows 7 Build Engineer Istvan Cseri about Microsoft’s massive build infrastructure for building Windows 7.  For the daily build of Windows 7, it takes about 30 machines (about 10 machines each for x86, amd64, ia64) 12 hours to produce 13TB (3300 ISOs) of build bits for different SKUs [...]