Windows System Programming

Author: Johnson M. Hart
Publisher: Addison Wesley
Pages: 656
ISBN: 978-0321657749
Aimed at: Unix programmers and others who want an introduction to low-level programming
Rating: 4
Pros: Modern coverage of Windows 32 and 64
Cons: Doesn't cover windowing API
Reviewed by: Harry Fairhead

This is wonderfully old fashioned book - and this is a sincere compliment! If you have been working at the top end of Windows programming, .NET say, and have always wondered what goes on underneath the covers then this is a good place to start.

However it is important to realise that even in a book of this size some topics are simply not covered - the whole issue of working with the native GUI interface for example.

All of the programs in this book are console applications in C and the topics covered are essentially systems programming from the console applications point of view. That is don't buy this book if you are looking for a deep understanding, or any understanding of windowing, message passing, message pumps, events, message dispatch or any of the API concerning the UI - it simply isn't covered.

As many programmers consider the Windows UI and its windows system to be the core of the system you might well be disappointed that it is not covered. However there is more to Windows than windows and the book does go over some vital areas of systems programming that you most certainly need to master before you get anywhere near a window.

Another problem is that it is doubtful that the book should be called Windows System Programming as this suggests that it is going to be telling you about the inner workings of the OS and how to do kernel-level programming, write device drivers and modify Windows. This is not what the book is about and it says nothing at all about the kernel, device drivers or even accessing the hardware. This is a book about low level Windows programming using the API from C.

It starts out by describing Windows as if the reader was a visitor from Mars or at least Unix and didn't know very much about what it is or its history. On the history side it does manage to explain the different versions of Windows and how they relate but it leaves the horrible story of 16-bit Windows memory management and co-operative multi-tasking unspoken. This is a good thing from the point of view of simplicity.

The first major topic is the file system and Chapters Two and Three deal with NTFS files including locking and the registry. Chapter Four deals with exception handling and dealing with Windows errors and error messages in general.  Chapter Five is where most people consider Windows system programming to get interesting - memory management and DLLs. The details of memory management start out more or less the same as you would find in any C application - a single heap - but quickly move on to multiple heap management and memory mapped files. Of course DLLs are a uniquely Windows technology and while higher level systems such as .NET have attempted to get rid of them they are still the core of shared code facilities in the OS.

After looking at memory management the book moves on to consider what might be considered the main topic of the book - threading and multi-tasking in general. Six chapters cover in detail with examples: process management; threads and scheduling; thread synchronization; locking, performance and NT6 thread improvements; advanced thread synchronization; and inter-process communication. If you have an interest in multiprocessor parallelism implemented at a low level you need to read this.

The book closes with some chapters on a collection of topics - network programming using sockets, writing a Windows service, asynchronous I/O and completion ports and securing Windows object. All core technologies that you have to master to create a Windows application.

If you are a low-level Unix programmer then this book will be of particular help in making the transition to Windows as it tackles Windows in a very Unix style. Of course if you not a Unix programmer you might find this off putting - but it isn't huge problem.

What it covers it covers well and its only shortcomings are that it doesn't go into using the Windows GUI API and it isn't about what most people would consider systems programming.

Highly recommended if you want information on the topics it covers.


Banner


Essential C# 12 (Pearson)

Author: Mark Michaelis
Publisher: Addison-Wesley
Date: December 3, 2023
Pages: 1232
ISBN: 978-0138219512
Print: 0138219516
Kindle: B0CLKY8GNV
Audience: C# developers
Rating: 5
Reviewer: Mike James
The latest edition of a highly recommended book that combines reference and tutorial material.



The Joy of JavaScript (Manning)

Author: Luis Atencio
Publisher: Manning
Date: March 2021
Pages: 360
ISBN: 978-1617295867
Print: 1617295868
Audience: JavaScript developers
Rating: 4
Reviewer: Ian Elliot
Joy you say!


More Reviews

Last Updated ( Sunday, 16 May 2010 )