Buy Used
Used - Good See details
$5.81 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Programming the Windows 32 API and UNIX System Services (With CD-ROM)
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Programming the Windows 32 API and UNIX System Services (With CD-ROM) [Paperback]

Don E. Merusi (Author)
2.0 out of 5 stars  See all reviews (2 customer reviews)


Available from these sellers.



Book Description

Prentice Hall Series on Microsoft Technologies November 2000
Nowadays, most companies run both Windows and UNIX/Linux systems -- and thousands of system programmers face the challenge of working in both environments. Programming the Win32 API and UNIX System Services is the first hands-on, practical guide to systems programming in both environments. The book starts with a quick, easy overview of both the Win32 API and UNIX system services in Solaris and Red Hat Linux. Next, it presents complete, in-depth coverage of every key aspect of systems programming in each of these environments, including processes, threads, controlling concurrent activity, signals, file I/O, memory, network programming, security, and much more. Throughout, the book presents easy-to-adapt "cookbook" sample code that solves the key problems systems programmers encounter, helping them become proficient in heterogeneous environments more rapidly than ever before. For all Visual C++, MFC, and other Windows programmers interested in learning system-level programming for Windows 98/2000 or for UNIX; and for all UNIX programmers transitioning to the Windows environment.

Editorial Reviews

From the Inside Flap

Preface

This book attempts to illustrate what facilities exist in both the Microsoft Windows and UNIX programming worlds for performing comparable API functionality. The term UNIX in this book refers to both Sun Microsystem's Solaris V2.6 and Red Hat Linux Version 6.1. Unless a specific distinction is mentioned, the term UNIX refers to both UNIX environments. Although the concept of open systems and platform independent program environments seems to abound, to take advantage of specific system functionality requires understanding facilities particular to each operating system environment. Although the POSIX standard provides for source-level portability, specifics of it are not always guaranteed, and the full range of capability of the system API calls is generally not available from within the POSIX calls. The program examples presented in this book are rudimentary and serve only as a starting point for a more elaborate implementation.

Chapter 1 discusses how to create and manage threads and processes in both the UNIX and Microsoft Windows worlds. The UNIX focus is on POSIX threads, and the user is made aware that on Solaris a separate library, the LWP or lightweight process library, is available which offers some extensions and variations to the POSIX calls. Topics discussed in this chapter under thread management include using thread priorities and controlling thread execution by suspending or resuming their execution. User mode thread scheduling under Microsoft Windows is also discussed using fibers. Along with threads, Microsoft Windows processes and UNIX fork processes are discussed.

With all the asynchronous activity instigated by the functions described in Chapter 2, some means of controlling this activity is required. This chapter discusses various aspects of controlling concurrency by using an assortment of API calls for creating and using mutexes, semaphores, condition variables, critical sections, and many other functions.

Chapter 3 discusses programming for the unexpected: what happens when an unexpected error or condition occurs. Also, how do you ensure that certain actions take place when a program exits from the system? This chapter discusses the UNIX signaling facility and shows how it can be controlled in a multithreaded environment. Microsoft Visual C/C++ offers structured exception handling, which offers a very natural way to design a program for unexpected events. The C++ catch and throw facility is also mentioned. In the UNIX POSIX world, thread cancellation can be used to gracefully terminate threads and to perform an assortment of thread cancellation handlers on the way out. Exit handlers are generally available in both UNIX and the Microsoft Windows platforms. Microsoft Windows asynchronous procedure calls (APCs) are also discussed as a means of improving program throughput.

Chapter 4 discusses various aspects of file systems. Modern file system technology requires programs to be able to perform more than just basic I/O to files. Various portions of files can be locked from access by other threads. Files themselves can be used as coordination mechanisms. Files can also be memory mapped, that is, their contents can be read and even updated as if the file contents existed in a memory buffer. File mapping facilitates sharing information between different programs. File search mechanisms are also discussed for the Microsoft Windows environment.

Chapter 5 discusses memory management functions. These functions are available to users who want a particular level of control in how their memory environment is managed. The virtual memory and heap management routines are discussed for the Microsoft Windows world. The basic UNIX heap management routines are also mentioned for completeness. Certain superuser-level memory management control routines are also discussed for the Solaris environment.

Chapter 6 discusses various aspects of networking and communications. Facilities are categorized as being either connection-oriented or connectionless-oriented. Both UNIX and Microsoft Windows offer a common networking communications environment by allowing TCP and UDP communications to take place between these environments. Other communications facilities discussed in this chapter are mailslots, named and unnamed pipes, and message queues.

Chapter 7 discusses mostly what facilities exist in the Microsoft Windows world for security control. With the advent of Windows NT and 2000, the security APIs have become extremely robust and offer a myriad of options for controlling access to system resources. The basic security components of Windows NT/2000 are discussed first, access tokens and security descriptors next, and then discussions and demonstrations of how to control them are then performed. Access control lists (ACLs) are the unit of access control on both Microsoft Windows and Solaris UNIX, and API calls are available for specifically controlling them. Finally, the UNIX setuid, setgid, chown, and chmod routines are discussed as another collection of security-related functions.

The Appendix lists several programs written by students at Rensselaer at Hartford for a course based on the material presented in this book. The programs depicted represent one of the programming assignments for the course and offer an excellent exercise in understanding how to use and control a multithreaded application.

From the Back Cover

  • Secrets of programming for heterogeneous systems
  • Topic-by-topic walkthrough, filled with compare-and-contrast models
  • Straightforward, cookbook-style reference
  • Includes Solaris V2.6 and Red Hat Linux Version 6.1

Learn to program for Windows and UNIX the same way you use them: side by side Most organizations today rely on a hybrid combination of systems to meet all the needs of the enterprise. Programmers need to create parallel functionalities and interrelated tools to maximize the efficiency of these heterogeneous systems.

Programming the Win32 API and UNIX System Services goes subject by subject, comparing the functionality of Microsoft Windows 95, 98, NT, and 2000 with similar features in Solaris V2.6 and Red Hat Linux Version 6.1. The real-world examples and ongoing case studies illustrate the material for quick comprehension and application, while cookbook-style presentations make reference a breeze.

This book is ideal for users of one system who want to become familiar with the other, and of course it is critically important for anyone who must integrate the two. Programming the Win32 API and UNIX System Services is must reading for all serious professional enterprise programmers.

About the CD-ROM

The CD-ROM contains all the source code examples from the book.

  • Compares functionality across the board
  • Includes threads, concurrency, exception handling, file systems, networks, and security
  • Perfect for integrations or migrations
  • Includes Solaris V2.6 and Red Hat Linux Version 6.1

Product Details

  • Paperback: 320 pages
  • Publisher: Prentice Hall PTR (November 2000)
  • Language: English
  • ISBN-10: 0130259691
  • ISBN-13: 978-0130259691
  • Product Dimensions: 9.2 x 7 x 0.9 inches
  • Shipping Weight: 1.5 pounds
  • Average Customer Review: 2.0 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Best Sellers Rank: #3,059,345 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

2 Reviews
5 star:    (0)
4 star:    (0)
3 star:
 (1)
2 star:    (0)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
2.0 out of 5 stars (2 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

11 of 11 people found the following review helpful:
1.0 out of 5 stars Run a mile!, March 1, 2001
By 
Russell C Page (Sydney, Australia) - See all my reviews
This review is from: Programming the Windows 32 API and UNIX System Services (With CD-ROM) (Paperback)
Would you buy a book on system programming from someone who doesn't even know his implementation language? This guy's examples are all in C++, but he can't even get a "for" loop right.

Sample code from chapter 1:

volatile UINT ktr[3] = {0,0,0};

...

// Create three threads

for (i=0;i<=3;i++)

Yep, and he does this time and time again. Apparently Example 1-3 caused a GPF when he actually ran it, so he fixed that by adding an extra element to the array.

Whole chunks of code in the book wouldn't even compile. Example 4-1 uses "=" instead of "==" and turns a function call into an lvalue.

I gave it a one star because there is no "zero" star.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


0 of 3 people found the following review helpful:
3.0 out of 5 stars Good, but no real insight, January 21, 2001
This review is from: Programming the Windows 32 API and UNIX System Services (With CD-ROM) (Paperback)
This book helped me understand better. This book was easy to read and understand. I would recommend this book for anyone trying to get in the business.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items.
Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Create a Listmania! list

So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject