|Windows System Programming
Author: Johnson M. Hart
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.
|Last Updated ( Sunday, 16 May 2010 )