Programming Books C Java PHP Python Learn more Browse Programming Books
Buy Used
FREE Shipping on orders over $35.
Used: Good | Details
Sold by Murfbooks
Condition: Used: Good
Comment: Book is in good condition. May have some wear on the cover. Free delivery confirmation with every order.
Access codes and supplements are not guaranteed with used items.
Add to Cart
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Windows System Programming (3rd Edition) Hardcover – November 5, 2004

ISBN-13: 978-0321256195 ISBN-10: 0321256190 Edition: 3rd

Price: $19.88
19 New from $6.90 47 Used from $0.01
Amazon Price New from Used from
"Please retry"
$6.90 $0.01



Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Hardcover: 576 pages
  • Publisher: Addison-Wesley Professional; 3 edition (November 5, 2004)
  • Language: English
  • ISBN-10: 0321256190
  • ISBN-13: 978-0321256195
  • Product Dimensions: 1.2 x 7.5 x 9.5 inches
  • Shipping Weight: 2.4 pounds
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #1,212,070 in Books (See Top 100 in Books)

Editorial Reviews

About the Author

Johnson M. Hart is a software trainer and consultant specializing in Windows, L inux, and UNIX application development, enhancement, and maintenance. John develops and delivers professional training courses and seminars to clients worldwide, and he is the author of numerous technical articles.

Excerpt. © Reprinted by permission. All rights reserved.

This book describes application development using the Microsoft Windows Application Programming Interface (API), concentrating on the core system services, including the file system, process and thread management, interprocess communication, network programming, and synchronization. User interfaces, internals, and I/O drivers, although important and interesting topics, are beyond the book's scope. The examples concentrate on realistic scenarios, and in many cases the examples can be used as the foundations for real applications.

The Win32/Win64 API, or the Windows API, is supported by Microsoft's family of 32-bit and 64-bit operating systems, which currently consists of Windows XP, Windows 2000, and Windows 2003. Older Windows family members include Windows NT, Me, 98, and 95; these systems are considered obsolete, but they will run many of the example programs. Migration issues from Win32 to the emerging Win64 are discussed as required. Win64, supported as a 64-bit interface on some versions of Windows 2003 and XP, is nearly identical to Win32.

There is no doubt that the Windows API is an important factor for application development, in many cases replacing the POSIX API, supported by UNIX and Linux, as the preferred, or at least peer, API for applications targeted at desktop and server systems. Therefore, many experienced programmers will want to learn the Windows API quickly, and this book is designed to help them do so.

The first objectives are to explain what Windows is, show how to use it in realistic situations, and do so as quickly as possible without burdening the reader with unnecessary detail. This book is, therefore, not a reference guide, but it explains the central features of the most important functions and shows how to use them in practical programming situations. Equipped with this knowledge, the reader will be able to use the comprehensive Microsoft reference documentation to explore details, advanced options, and the more obscure functions as requirements or interests dictate. I have found the Windows API easy to learn using this approach, and I have greatly enjoyed developing Windows programs, despite occasional frustration. This enthusiasm will show through at times, as it should. This does not mean that I feel that Windows is necessarily better than other operating system (OS) APIs, but it certainly has many attractive features.

Many Windows books spend a great deal of time explaining how processes, virtual memory, interprocess communication, and preemptive scheduling work without showing how to use them in realistic situations. A programmer experienced in UNIX, Linux, IBM MVS, OpenVMS, or another OS will be familiar with these concepts and will be impatient to find out how they are implemented in Windows. Most Windows books also spend a great deal of space on user interface programming. This book avoids the user interface, beyond discussing simple character-based console I/O, in the interest of concentrating on the important core features.

The book takes the point of view that Windows is just an OS API, providing a well-understood set of features. Many programmers, regardless of experience level, need to learn Windows quickly, and an understanding of Windows is invaluable in discussing subjects such as Microsoft's Component Object Model (COM). The Windows systems, when compared with other systems, have good, bad, and average features and quality. The purpose of this book is to show how to use those features efficiently and in realistic situations to develop useful, high-quality, and high-performance applications.


  • Anyone who wants to learn about Windows application development quickly, regardless of previous experience.
  • Programmers and software engineers who must port existing applications, often in UNIX, to Windows for operation on any of the Windows platforms. The book contains many comparisons among Windows, UNIX, and standard C library functions and programming models. All common UNIX functionality, including process management, synchronization, file systems, and interprocess communication, is covered in Windows terms.
  • Readers starting new projects who are not constrained by the need to port existing code. Many aspects of program design and implementation are covered, and Windows functions are used to create useful applications and to solve common programming problems.
  • Programmers using COM and .NET Framework, who will find much of the information here helpful in understanding dynamic link libraries (DLLs), thread usage and models, interfaces, and synchronization.
  • Computer science students at the upper-class undergraduate or beginning graduate level in courses covering systems programming or application development. This book will also be useful to those who are learning multithreaded programming or need to build networked applications. This book would be a useful complementary text to a book such as W. Richard Stevens' Advanced Programming in the UNIX Environment (see the Bibliography) so that students could compare Windows and UNIX. Students in OS courses will find this book to be a useful supplement as it illustrates how a commercially important OS provides essential OS functionality.

The only other assumption, implicit in all the others, is a knowledge of C programming.

Changes in the Third Edition

The third edition presents extensive new material along with significant updating and reorganization of the first and second editions. Objectives of the third edition include the following

  • Cover important new features of Windows XP, 2000, and 2003 along with Win64 migration.
  • Make obsolete Windows 95, 98, and Me (the "Windows 9x" family), since Windows XP is now provided with personal systems and Windows 9x limitations are no longer relevant.* Program examples freely exploit features found only in current Windows versions, even though some programs will not operate on Windows 9x.
  • Provide enhanced coverage of threads and synchronization, including performance, scalability, and reliability considerations. Chapter 9 is new, as are some examples in Chapter 10.
  • Emphasize the increasingly important role and new features of Windows 2000 and 2003 in running high-performance, scalable, multithreaded server applications.
  • Study performance implications of different program designs, especially in multithreaded programs with synchronization and when running on symmetric multiprocessor (SMP) systems.
  • Incorporate reader and student feedback to fix defects, improve explanations, improve the organization, and address numerous details, large and small.


Chapters are organized topically so that the features required in even a single-threaded application are covered first, followed by process and thread management features, and finally network programming in a multithreaded environment. This organization allows the reader to advance logically from file systems to memory management and file mapping, and then to processes, threads, and synchronization, followed by interprocess and network communication and security. This organization also allows the examples to evolve in a natural way, much as a developer might create a simple prototype and then add additional capability. The advanced features, such as asynchronous I/O and security, appear last.

Within each chapter, after introducing the functionality area, such as process management or memory-mapped files, we discuss important Windows functions and their relationships in detail. Illustrative examples follow. Within the text, only essential parts of programs are listed; complete programs and the required include files, utility functions, and the like are in Appendix A or on the book's Web site ( Throughout, we identify those features supported only by current Windows versions (XP, 2000, and 2003) but not by earlier versions such as Windows 9x and NT, which do not implement many advanced features. Each chapter suggests related additional reading and gives some exercises. Many exercises address interesting and important issues that did not fit within the normal text, and others allow the reader to explore advanced or specialized topics.

Chapter 1 is a high-level introduction to the Windows OS family and Windows. A simple example program shows the basic elements of Windows programming style and lays the foundation for more advanced Windows features. Win64 and migration issues are introduced in Chapter 1, described extensively in Chapter 16, and included throughout the book as required.

Chapters 2 and 3 deal with file systems, console I/O, file locking, and directory management. Unicode, the extended character set used by Windows, is also introduced in Chapter 2. Examples include sequential and direct file processing, directory traversal, and file archiving. Chapter 3 ends with a discussion of registry management programming, which is similar in many ways to file and directory management.

Chapter 4 introduces Windows' exception handling, including Structured Exception Handling (SEH), which will be used extensively throughout the book. Many books defer SEH to later chapters, but by introducing it early, we will be able to use SEH throughout and thus simplify some programming tasks and improve quality. Vectored exception handling, a newer feature, is also described.

Chapter 5 treats Windows' memory management and shows how to use memory-mapped files both to simplify programming and to improve performance. This chapter also covers DLLs.

Chapter 6 introduces Windows' processes, process management, and simple process synchronization. Chapter 7 then describes thread management in similar terms. Examples in each chapter show the many benefits, including program simplicity and performance, of threads and processes.

Chapters 8, 9, and 10 provide an extended, in-depth treatment of Windows' thread synchro...

Customer Reviews

4.6 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 15 customer reviews
The book is well written and very readable.
S. Bailey
Johnson's "Win32 System Programming" reminds me of W. Richard Steven's "UNIX Network Programming".
Highly recommended for every Windows programmer!

Most Helpful Customer Reviews

53 of 54 people found the following review helpful By Joe Green on May 25, 2005
Format: Hardcover
"Windows System Programming" is clearly written, with subjects presented in a logical order. The program examples tie the topics together so that you can see how the Windows API functions work in real Windows application programs. This is not an internals book; it explains the core Windows API, and the author clearly defines the book's scope.

The subject matter is very important in a lot of practical application development situations where the GUI is not an issue (this is the code "under" the GUI that does the real work). I was able to adapt two of the example programs ("JobShell" from the Process Mgt chapter and "Pipe" from the Interprocess Comm chapter) for use in a recent consulting job. Everything worked well and the changes for my particular task were easy to do, but I would not have been able to figure it out myself without spending a lot of time. I'm thinking of adapting one of the thread synchronization examples in an upcoming assignment. I looked at other books, and none of them had anything even close to these very useful examples.

By the way, the example code (download it from the URL given in the book) is clear, quite reliable (maybe it's not perfect for all I know, but what code is?), and it performs extensive error checking. The code listed in the text is usually streamlined so that the reader can see the logic without getting bogged down in error checking details (the author explains this in the text). I disagree with the March 28 reviewer about this, but maybe he was only looking at the code in the text.
Read more ›
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
21 of 22 people found the following review helpful By J. Carroll on January 20, 2007
Format: Hardcover
I'm an old system's programmer, and I loved this book. It provides the exact information you need if your an experienced system's coder, and just need the specifics of how to accomplish the operations on windows. Multithreading, memory mapped file i/o, process & thread management, networking, you name it, and it's in here.

I use this text hand and glove with "Windows Internals" by Russinovich. Winternals explains what needs to be done, and Hart's book describes how. This is really an excellant text.

I particularly liked Appendix "C". Sprinkled throughout the text are example programs. Then Appendix "C" compares the real world performance of running the programs. The author does an excellant job of explaining why one approach is suprior to the other, than backs it up with timing examples (on difference versions of windows, using different hardware, and even the differences between FAT & NTFS).

About the only imrpovement to the text I could suggest, is less reference to Unix/POSIX. Most systems programmers are familiar with Unix, and it helps to have previous understanding from another platform, but I think people who buy this text are looking to learn the "Windows Way". Also, the text would benefit from a deeper treatment of the Windows Security model. As it stands, a demonstration of Unix-Style permissions for NTFS is not terribly useful in the real world.
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
16 of 17 people found the following review helpful By F. Huynh on December 9, 2004
Format: Hardcover
The author does a wonderful job in explaining the fundamentals of windows systems programming. His writing style is clear and concise. This doesn't mean that he glosses over the details however, he makes a good attempt at highlighting tricky or confusing areas in the API and makes sure the reader knows what to watch out for. I reccomend this book for those wanting a good overview of the Win32/64 API. It take to notice that this book does not cover GUI in anyway.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
10 of 10 people found the following review helpful By mrjoltcola on February 23, 2010
Format: Hardcover
What W. Richard Stevens is to UNIX, Johson M. Hart is to Win32. Any UNIX programmer that's been around has at least one Steven's book. Johnson's "Win32 System Programming" reminds me of W. Richard Steven's "UNIX Network Programming".

Clear, concise, just what you need. It is a classic.

I used this to write several Windows subsystems over the years, including the IO layer for the Parrot Virtual Machine.

I have a short list of "gems" on my shelf, and this is one of them. If I could only keep 2 Windows Programming books, it'd be this one and Petzold's.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
14 of 16 people found the following review helpful By Scott B. Drummonds on March 1, 2005
Format: Hardcover
As a veteran UNIX developer I recently picked up this book to help me with a new Windows assignment at work. In a matter of hours I had a working prototype that involved services, thread synchronization, and named pipes. The organization, clarity of description, and comprehensive index helped me do my job quickly. I can confidently say that I can handle most system-level programming projects with this book on my desk.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
7 of 7 people found the following review helpful By J. S. Hardman on August 5, 2007
Format: Hardcover
What impressed me most about this book was the subject range. It doesn't cover GUI stuff, but does cover UNICODE, threading, file handling, sockets, writing services, structured exception handling etc, and is pretty much up to date at time of writing this review (it doesn't cover Vista but does touch on 64-bit issues). There are books that cover some of these subjects more deeply, but I cannot think of a book that currently attempts to cover all of these subjects to the level that this book does or with such a consistent usage of Windows techniques.

Although this book does cover bits of the C run-time library, it concentrates more on what the Windows API can do for you that the C run-time cannot. This particularly showed through in the section on file handling. For someone like me who started working with the C and the C run-time library 20+ years ago, has worked with Windows APIs since the very first version of MS Windows appeared, worked with C++ for more than 10 years and worked on numerous UNIX projects too (often with code portable between Windows and UNIX), this book provides numerous reminders of why I should consider Windows APIs instead of C run-time libraries on projects where I don't need my code to be portable to UNIX. That's the key thing though - for an experienced developer this book largely acts as a reminder or as a trigger to go investigate certain things further, for rarely did it feel like an authoritative guide to the topics included. It is good, but not authoritative enough to be worthy of 5 stars. For example, my speciality is high-performance, multi-threaded servers handling protocols such as TCP/IP.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Customer Images

Most Recent Customer Reviews


What Other Items Do Customers Buy After Viewing This Item?