Matt Pietrek, author of Windows Internals and coauthor (with Andrew
Schulman and Dave Maxey) of Undocumented Windows is back. His recently
published Windows-95 System Programming Secrets is a 760-page volume
so densely packed with details about the inner workings of Windows 95 that
it's hard to believe it was written by someone outside of Redmond. If you're
familiar with Pietrek's earlier books, you may wonder if Secrets
is Undocumented Windows-95, or if its more akin to Windows-95
Internals. As it turns out, its much closer to Internals than
Undocumented, but its a more useful and better book than either.
Pietrek gives us only ten chapters, the first clue that he covers topics
in exhaustive detail. The chapters are as follows: Putting Windows 95 in
Perspective; Whats New in Windows 95; Modules, Processes, and Threads; USER
and GDI Subsystems; Memory Management; VWINKERNEL32386 (Pietreks contraction
of VWIN32.VXD, KERNEL32.DLL, and KRNL386.EXE); Win16 Modules and Tasks;
The Portable Executable and COFF OBJ Formats; Spelunking on Your Own; and
Writing a Win32 API Spy.
After starting off with a good overview of Windows 95 and its place in the
Microsoft world, the book begins its heavy lifting in Chapter 3. Microsoft
Systems Journal editor Eric Maffei mentions in the foreword that Pietrek
has a degree in physics. Normally, I don't care about such biographical
material, but in this case, it's surprisingly relevant. Read this book and
you'll likely imagine Pietrek firing up his personal bit accelerator to
whack Windows 95 with high-energy ones and zeros, causing structures and
functions, documented and otherwise, to fly out in all directions. Pietrek
then collects the pieces and presents them to the reader in the form of
numerous pseudocode listings and detailed structure definitions. This approach
and underlying philosophy explain the strengths and one potential weakness
of this book.
Secrets is packed with details not likely documented anywhere else,
certainly not to this extent. Some of my favorites include the following:
The black box approach to programming that Microsoft wants us to take is nice when writing Hello World programs, but it fails miserably when attempting to write anything other than toy applications.I couldn't agree more. Microsoft is largely responsible for making the creation of robust, intelligent, and accommodating 32-bit Windows programs as tough as it is. The Win32 documentation seems vast, almost luxurious, until you begin serious work and you discover its shortcomings, like the fact that extended error codes aren't documented, and numerous APIs are documented either incorrectly or so poorly that you must burn precious time testing them to see how they really work (or debugging your code once you, or your users, see that your assumptions were wrong). This sorry situation creates a genuine need for third-party books that fill in the gaps. Secrets provides so much solid information and does it in such an enjoyable and readable fashion that, even at $50.00, its easily one of the best titles you can add to your Windows shelf.