You are previewing Win32 System Services: The Heart of Windows® 98 and Windows® 2000.
O'Reilly logo
Win32 System Services: The Heart of Windows® 98 and Windows® 2000

Book Description

  • The Win32 best-seller, fully updated for Windows 2000 and Windows 98!

  • Master every key Win32 system service

  • Processes, threads, synchronization, and much more

  • Includes extensive coverage of network programming

  • The #1 guide to Win32 system services, totally updated!

  • Includes hundreds of proven code examples —

  • Comprehensive coverage of RPCs and other network programming topics

  • Processes, threads, and synchronization — in depth

  • Expert techniques for effective large-scale development

  • Leveraging Windows 2000's security capabilities

  • Get up-to-speed on the Win32 API, fast!

    The #1 best-seller — now completely updated!

    For years, Marshall Brain's Win32 System Services has been the world's #1 resource for Windows developers seeking to master Win32 services in real-world application development. Now, this worldwide bestseller has been fully updated to reflect the latest Win32 enhancements in Windows 2000 and Windows 98!

    Each self-contained chapter covers a different API service: Win32 files, directory and drive structure, processes and threads, synchronization mechanisms, network communications, Remote Procedure Calls, security, consoles, communications ports, accessing system information, using DLLs to modularize programs, and much more.

    You'll find practical guidance on when to use each service, today's best techniques for integrating services into complex, enterprise-class applications, and extensive proven code examples. Whether you're an experienced Windows developer seeking to deepen your system programming skills, or you're porting applications from other environments, Win32 System Services - The Heart of Windows 98 and Windows 2000, Third Edition will be your most valuable resource.

    Table of Contents

    1. Copyright
    2. PREFACE
    3. About the Authors
    4. Introduction
      1. One Hundred and Twenty-One Questions About Windows 2000 and 98
      2. Compiling Code
      3. Terminology
      4. Error Handling
      5. Handles and Objects
      6. Using the Microsoft Documentation
      7. Bugs in the 32-Bit API
      8. Differences Between Windows 98 and Windows 2000
    5. Files
      1. The Possibilities
      2. Overview
      3. Opening and Reading from a File
      4. Getting and Setting File Information
      5. Temporary Files
      6. File Reading and Writing
      7. Asynchronous File Operations
      8. File Locking
      9. Compressed Files
      10. File Mapping
      11. Conclusion
    6. Drives
      1. The Possibilities
      2. Getting Volume Information
      3. Getting Drive Types
      4. Getting Free Space
      5. Getting Logical Drives and Drive Strings
      6. Setting the Volume Label
      7. WNet Functions
      8. Conclusion
    7. Directories
      1. The Possibilities
      2. Creating and Deleting
      3. Getting and Setting the Current Directory
      4. Searching for a File
      5. Traversing Directory Trees
      6. Combining Capabilities
      7. Detecting Changes to Directories and Files
      8. Conclusion
    8. Active Directory
      1. The Possibilities
      2. Introduction to Active Directory
      3. Active Directory Architecture
      4. Frequently Asked Questions
      5. Conclusion
    9. Processes and Threads
      1. The Possibilities
      2. Introduction
      3. Simple Examples
      4. Using Threads in GUI Applications
      5. Matching the Number of Threads to the Number of CPUs
      6. Using Thread Local Storage
      7. Thread Priorities
      8. Other Thread Functions
      9. Processes
      10. Inheriting Handles
      11. Interprocess Communication
      12. Jobs
      13. Conclusion
    10. Synchronization
      1. Understanding the Problem
      2. Four Different Synchronization Methods
      3. Deadlocks, Starvation, and Other Synchronization Bugs
      4. Wait Functions
      5. Overlapped I/O
      6. Change Functions
      7. Integrating Synchronization into MFC Programs
      8. Conclusion
    11. Network Communications
      1. The Possibilities
      2. Understanding Your Options
      3. Mailslots
      4. Named Pipes
      5. Named Pipe Client/Server Systems
      6. Connecting with UNIX and Other TCP/IP Machines
      7. UDP Connections
      8. TCP Connections
      9. Conclusion
    12. Remote Procedure Calls
      1. The Possibilities
      2. The Basic Idea
      3. Design Issues
      4. Creating RPCs
      5. Understanding RPCs at a High Level
      6. Parameter Passing
      7. Understanding the Code
      8. Setting up a Name Server in the Registry
      9. Manual Binding with Implicit Handles
      10. An RPC Server for Mandelbrot Sets
      11. Improving the Mandelbrot RPC Server
      12. Explicit Handles
      13. Context Handles
      14. Common Questions
      15. Conclusion
    13. Distributed COM (DCOM)
      1. The DCOM Architecture
      2. Components and Reuse
      3. Location Independence
      4. Connection Management
      5. Scalability
      6. Conclusion
    14. Communications
      1. The Possibilities
      2. Understanding Serial Communications
      3. A Simple Communications Application
      4. Getting Communications Events
      5. A Simple Bulletin Board System
      6. Flow Control
      7. A Simple TTY Terminal Program
      8. Other Communications Functions
      9. Conclusion
    15. Windows 2000 Services
      1. The Possibilities
      2. Understanding Services
      3. Service Choreography
      4. The Simplest Service
      5. Installing and Removing a Service
      6. Displaying Dialogs from within a Service
      7. Multiple Services in an Executable
      8. Getting and Setting Configuration Information
      9. Controlling Services
      10. Enumerating Services
      11. Placing an RPC Server in a Service
      12. Conclusion
    16. Security
      1. The Possibilities
      2. Understanding the Terminology and Concepts of the Windows 2000 Security System
      3. Windows 2000 Security Vocabulary
      4. Simple Examples
      5. Securable Objects and Access Rights
      6. Examining Existing
      7. Privileges
      8. Adding and Deleting ACEs
      9. Impersonation
      10. Conclusion
    17. Consoles
      1. The Possibilities
      2. Raw versus Cooked Input
      3. Simple Examples
      4. Raw Input
      5. Other Input Events
      6. Other Capabilities
      7. Conclusion
    18. Microsoft Management Console (MMC)
      1. The Possibilities
      2. MMC Interfaces and Methods
      3. ATL Snap-In Wizard
      4. Conclusion
    19. System Information
      1. The GetSystemInfo Function
      2. Other System Information Functions
      3. Getting and Setting Environment Strings
      4. Shutting Down the System
    20. Dynamic Link Libraries
      1. The Possibilities
      2. Overview
      3. Creating a Simple DLL
      4. Understanding a Simple DLL
      5. Load-time versus Run-time Linking
      6. DLL Entry Points
      7. Memory Models
      8. Conclusion
    21. Component Object Model (COM)
      1. COM Fundamentals
      2. Component Object Library
      3. Summary
    22. COM+
      1. COM+ Programming Overview
      2. COM+ Application Overview
      3. Developing COM+ Applications
      4. COM+ Design Assumptions and Principles
      5. Conclusion
    23. Windows Distributed Network Architecture (DNA)
      1. Frequently Asked Questions about Windows DNA
      2. Microsoft Windows Distributed Internet Application Architecture
      3. The Presentation Tier
      4. Business Services Tier
      5. Data Services Tier
      6. Conclusion
    24. Miscellaneous
      1. Registry
      2. The Event Log
      3. Time
      4. Memory
      5. Structured Exception Handling
      6. Error Handling
    25. Compiling the Code in this Book
      1. Compiling with the Win32 SDK
    26. Contacting the Author
    27. Error Codes
    28. Index