Win32 System Programming: A Windows 2000 Application Developer's Guide, 2/e (Hardcover)
暫譯: Win32 系統程式設計:Windows 2000 應用程式開發者指南,第二版 (精裝本)
Johnson M. Hart
- 出版商: Addison Wesley
- 出版日期: 2000-09-22
- 售價: $2,390
- 貴賓價: 9.5 折 $2,271
- 語言: 英文
- 頁數: 544
- 裝訂: Hardcover
- ISBN: 0201703106
- ISBN-13: 9780201703108
已過版
買這商品的人也買了...
-
$1,029Fundamentals of Data Structures in C++
-
$580$458 -
$680$537 -
$970Introduction to Algorithms, 2/e
-
$600$474 -
$920$727 -
$880$695 -
$560$504 -
$690$587 -
$420$328 -
$620$527 -
$780$741 -
$650$514 -
$760$600 -
$580$493 -
$590$466 -
$750$585 -
$690$538 -
$420$332 -
$720$569 -
$750$638 -
$560$476 -
$880$695 -
$480$379 -
$750$593
商品描述
Description
The expert guide to serious Win32 server-side and system programming -- now completely updated for Windows 2000.
- Includes up-to-the-minute coverage of the coming migration to Win64.
- Specific techniques for porting UNIX/Linux applications to Win32.
- Doesn't waste time on topics experienced system programmers already understand or don't care about!
Johnson Hart is a consultant specializing in distributed computing and software engineering. He is also a Technical Fellow for Peritus Software Services. Hart is co-author of Client/Server Computing for Technical Professionals: Concepts and Solutions (Addison-Wesley).
Table Of Contents
Preface.1. Getting Started with Win32 and Win64.
Win32 and Windows 2000, NT, 9x, and CE.
Win32, Standards, and Open Systems.
Win32 Principles.
Getting Ready for Win64.
The Standard C Library: When to Use It for File Processing.
What You Need to Use This Book.
Example: A Simple Sequential File Copy.
Summary.
Exercises.
2. Using the Win32 File System and Character I/O.
File Naming.
Opening, Reading, Writing, and Closing Files.
Interlude: Unicode and Generic Characters.
Unicode Strategies.
Standard Devices and Console I/O.
Example: Printing and Prompting.
Example: Error Processing.
Example: Copying Multiple Files to Standard Output.
Example: ASCII to Unicode Conversion.
File and Directory Management.
Example: Printing the Current Directory.
Summary.
Exercises.
3. Advanced File and Directory Processing, and the Registry.
File Pointers.
Getting the File Size.
Example: Viewing the Tail of a File.
File Attributes and Directory Processing.
Example: Listing File Attributes.
Example: Setting File Times.
File Processing Strategies.
File Locking.
The Registry.
Registry Management.
Example: Listing Registry Keys and Contents.
Summary.
Exercises.
4. Structured Exception Handling.
Floating-Point Exceptions.
Errors and Exceptions.
Example: Treating Errors as Exceptions.
Termination Handlers.
Example: Using Termination Handlers to Improve Program Quality.
Example: Using a Filter Function.
Console Control Handlers.
Example: A Console Control Handler.
Summary.
Exercises.
5. Securing Win32 Objects.
Security Overview: The Security Descriptor.
Security Identifiers.
Managing ACLs.
Example: UNIX-Style Permission for NTFS Files.
Example: Initializing Security Attributes.
Reading and Changing Security Descriptors.
Example: Reading File Permissions.
Example: Changing File Permissions.
Overview of Additional Security Features.
Summary.
Exercises.
6. Memory Management, Memory-Mapped Files, and DLLs.
Heaps.
Managing Heap Memory.
Example: Sorting Files with a Binary Search Tree.
Memory-Mapped Files.
Example: Sequential File Processing with Mapped Files.
Example: Sorting a Memory-Mapped File.
Example: Using Based Pointers.
Dynamic Link Libraries.
Example: Explicitly Linking a File Conversion Function.
The DLL Entry Point.
Summary.
Exercises.
7. Process Management.
Process Creation.
Process Identities.
Duplicating Handles.
Exiting and Terminating a Process.
Waiting for a Process to Terminate.
Environment Blocks and Strings.
Example: Parallel Pattern Searching.
Process Execution Times.
Example: Process Execution Times.
Generating Console Control Events.
Example: Simple Job Management.
Job Objects.
Summary.
Exercises.
8. Threads and Scheduling.
Thread Basics.
Thread Management.
Using the C Library in Threads.
Example: Multithreaded Pattern Searching.
The Boss/Worker and Other Threading Models.
Example: Merge-Sort — Divide and Conquer to Exploit SMP.
Thread Local Storage.
Process and Thread Priority and Scheduling.
Thread States.
Pitfalls and Common Mistakes.
Timed Waits.
Fibers.
Summary.
Exercises.
9. Thread Synchronization.
Thread Synchronization Objects.
The CRITICAL_SECTION Object.
A CRITICAL_SECTION for Protecting Shared Variables.
Example: A Simple Producer/Consumer System.
Mutexes.
Semaphores.
Events.
Example: A Producer/Consumer System.
Example: Synchronization Performance Impact.
More Mutex and CRITICAL_SECTION Guidelines.
More Interlocked Functions.
Memory Management Performance Considerations.
Summary.
Exercises.
10. Advanced Thread Synchronization.
Example: A Threshold Barrier Object.
A Queue Object.
Example: Using Queues in a Multistage Pipeline.
Hints for Designing, Debugging, and Testing.
Summary.
Exercises.
11. Interprocess Communication.
Example: I/O Redirection Using an Anonymous Pipe.
Named Pipes.
Named Pipe Transaction Functions.
Example: A Client/Server Command Line Processor.
Comments on the Client/Server Command Line Processor.
Mailslots.
Pipe and Mailslot Creation, Connection, and Naming.
Example: A Server That Clients Can Locate.
Comments on Thread Models.
Summary.
Exercises.
12. Network Programming with Windows Sockets.
Socket Server Functions.
Socket Client Functions.
Comparing Named Pipes and Sockets.
Example: A Socket Message Receive Function.
Example: A Socket-Based Client.
Example: A Socket-Based Server with New Features.
In-Process Services.
Line-Oriented Messages, DLL Entry Points, and TLS.
Example: A Thread-Safe DLL for Socket Messages.
Example: An Alternative Thread-Safe DLL Strategy.
Datagrams.
Berkeley vs. Windows Sockets.
Overlapped I/O with Windows Sockets.
Windows Sockets 2.
Summary.
Exercises.
13. NT Services.
The Main Function.
The ServiceMain Functions.
The Service Control Handler.
Example: A Service "Wrapper".
Managing Windows NT Services.
Summary: Service Operation and Management.
Example: A Service Control Shell.
Sharing Kernel Objects with a Service.
Event Logging.
Notes on Debugging a Service.
Summary.
Exercises.
14. Asynchronous Input/Output and Completion Ports.
Overlapped I/O.
Example: Synchronizing on a File Handle.
Example: File Conversion with Overlapped I/O and Multiple Buffers.
Extended I/O with Completion Routines.
Example: File Conversion with Extended I/O.
Asynchronous I/O with Threads.
Waitable Timers.
Example: Using a Waitable Timer.
I/O Completion Ports.
Example: A Server Using I/O Completion Ports.
Summary.
Exercises.
15. Remote Procedure Calls and COM Overview.
Basic RPC Architecture.
RPC Interface Definitions.
Example: An Interface Definition.
Example: An RPC Client.
Example: An RPC Server.
A Brief COM and DCOM Overview.
Summary.
Exercises.
16. Win64 Programming.
The Win64 Programming Model.
The Data Types.
The Three Win64 Programming Models.
Legacy Code Migration.
Appendix A: Using the Sample Programs.
Include File Listings.
Additional Utility Programs.
Appendix B: Win32, UNIX, and C Library Comparisons.
Chapter 4: Structured Exception Handling.
Chapter 5: Securing Win32 Objects.
Chapter 6: Memory Management, Memory-Mapped Files, and DLLs.
Chapter 7: Process Management.
Chapter 8: Threads and Scheduling.
Chapters 9 and 10: Thread Synchronization.
Chapter 11: Interprocess Communication.
Chapter 14: Asynchronous I/O.
Appendix C: Performance Results.
Performance Measurements.
Running the Tests.
Bibliography.
Index. 0201703106T04062001

商品描述(中文翻譯)
描述
專家指南,針對「嚴肅」的 Win32 伺服器端和系統程式設計——現在已完全更新至 Windows 2000。
- 包含最新的 Win64 遷移資訊。
- 針對將 UNIX/Linux 應用程式移植至 Win32 的具體技術。
- 不浪費時間在經驗豐富的系統程式設計師已經了解或不在乎的主題上!
《Win32 系統程式設計(第二版)》專注於非 GUI 的 Windows 系統程式設計,幫助經驗豐富的系統程式設計師充分利用 Win32 的「快速」——無論是遷移 UNIX 應用程式、構建新的伺服器端軟體,還是解決其他困難的技術挑戰。這一新版已全面更新,以反映 Windows 2000,並新增了有關網路程式設計、執行緒、同步、即將到來的 Win64 遷移以及其他對高端企業開發至關重要的問題的寶貴內容。每一章結尾都有詳細的範例,展示其技術在實際系統中的應用,以及實作練習。專家系統程式設計師 Johnson Hart 假設開發者已經熟悉「通用概念」,而專注於他們在最大化高端 Win32 伺服器和系統應用程式的性能和可靠性時所面臨的具體問題。適合所有需要快速開發可靠、高效能 Win32 應用程式的開發者——特別是那些熟悉 UNIX、VMS、MVS 或其他高端作業系統的開發者。
前一版 0-201-63465-1
Johnson Hart 是一位專注於分散式計算和軟體工程的顧問。他也是 Peritus Software Services 的技術研究員。Hart 是《技術專業人員的客戶/伺服器計算:概念與解決方案》(Addison-Wesley)的共同作者。
適合的課程
Windows 程式設計。
目錄
- 前言。
- 1. 開始使用 Win32 和 Win64。
- 作業系統基本知識。
- Win32 和 Windows 2000、NT、9x 和 CE。
- Win32、標準和開放系統。
- Win32 原則。
- 為 Win64 做準備。
- 標準 C 函式庫:何時使用它進行檔案處理。
- 使用本書所需的內容。
- 範例:簡單的順序檔案複製。
- 總結。
- 練習。
- 2. 使用 Win32 檔案系統和字元 I/O。
- Win32 檔案系統。
- 檔案命名。
- 開啟、讀取、寫入和關閉檔案。
- 插曲:Unicode 和通用字元。
- Unicode 策略。
- 標準設備和控制台 I/O。
- 範例:列印和提示。
- 範例:錯誤處理。
- 範例:將多個檔案複製到標準輸出。
- 範例:ASCII 到 Unicode 轉換。
- 檔案和目錄管理。
- 範例:列印當前目錄。
- 總結。
- 練習。
- 3. 進階檔案和目錄處理,以及登錄檔。
- 64 位元檔案系統。
- 檔案指標。
- 獲取檔案大小。
- 範例:查看檔案尾部。
- 檔案屬性和目錄處理。
- 範例:列出檔案屬性。
- 範例:設定檔案時間。
- 檔案處理策略。
- 檔案鎖定。
- 登錄檔。
- 登錄檔管理。
- 範例:列出登錄鍵和內容。
- 總結。
- 練習。
- 4. 結構化例外處理。
- 例外和其處理器。
- 浮點例外。
- 錯誤和例外。
- 範例:將錯誤視為例外。
- 終止處理器。
- 範例:使用終止處理器改善程式質量。
- 範例:使用過濾函式。
- 控制台控制處理器。
- 範例:控制台控制處理器。
- 總結。
- 練習。
- 5. 保護 Win32 物件。
- 安全屬性。
- 安全概述:安全描述符。
- 安全識別碼。
- 管理 ACL。
- 範例:NTFS 檔案的 UNIX 風格權限。
- 範例:初始化安全屬性。
- 讀取和更改安全描述符。
- 範例:讀取檔案權限。
- 範例:更改檔案權限。
- 附加安全功能概述。
- 總結。
- 練習。
- 6. 記憶體管理、記憶體映射檔案和 DLL。
- Win32 記憶體管理架構。
- 堆積。
- 管理堆積記憶體。
- 範例:使用二元搜尋樹排序檔案。
- 記憶體映射檔案。
- 範例:使用映射檔案進行順序檔案處理。
- 範例:排序記憶體映射檔案。
- 範例:使用基於指標。
- 動態連結函式庫。
- 範例:顯式連結檔案轉換函式。
- DLL 入口點。
- 總結。
- 練習。
- 7. 程式管理。
- Windows 程式和執行緒。
- 程式創建。
- 程式身份。
- 複製句柄。
- 退出和終止程式。
- 等待程式終止。
- 環境區塊和字串。
- 範例:平行模式搜尋。
- 程式執行時間。
- 範例:程式執行時間。
- 生成控制台控制事件。
- 範例:簡單的工作管理。
- 工作物件。
- 總結。
- 練習。
- 8. 執行緒和排程。
- 執行緒概述。
- 執行緒基礎。
- 執行緒管理。
- 在執行緒中使用 C 函式庫。
- 範例:多執行緒模式搜尋。
- 老闆/工作者和其他執行緒模型。
- 範例:合併排序——分而治之以利用 SMP。
- 執行緒本地儲存。
- 程式和執行緒優先權及排程。
- 執行緒狀態。
- 陷阱和常見錯誤。
- 定時等待。
- 纖維。
- 總結。
- 練習。
- 9. 執行緒同步。
- 執行緒同步的必要性。
- 執行緒同步物件。
- CRITICAL_SECTION 物件。
- 用於保護共享變數的 CRITICAL_SECTION。
- 範例:簡單的生產者/消費者系統。
- 互斥鎖。
- 信號量。
- 事件。
- 範例:生產者/消費者系統。
- 範例:同步性能影響。
- 更多互斥鎖和 CRITICAL_SECTION 指導方針。
- 更多互鎖函式。
- 記憶體管理性能考量。
- 總結。
- 練習。
- 10. 進階執行緒同步。
- 互斥鎖、事件和條件變數模型。
- 範例:閾值障礙物件。
- 隊列物件。
- 範例:在多階段管道中使用隊列。
- 設計、除錯和測試的提示。
- 總結。
- 練習。
- 11. 進程間通信。
- 匿名管道。
- 範例:使用匿名管道進行 I/O 重定向。
- 命名管道。
- 命名管道事務函式。
- 範例:客戶端/伺服器命令行處理器。
- 對客戶端/伺服器命令行處理器的評論。
- 郵件插槽。
- 管道和郵件插槽的創建、連接和命名。
- 範例:客戶端可以定位的伺服器。
- 對執行緒模型的評論。
- 總結。
- 練習。
- 12. 使用 Windows Sockets 進行網路程式設計。
- Windows Sockets。
- 套接字伺服器函式。
- 套接字客戶端函式。
- 比較命名管道和套接字。
- 範例:套接字消息接收函式。
- 範例:基於套接字的客戶端。
- 範例:具有新功能的基於套接字的伺服器。
- 進程內服務。
- 行導向消息、DLL 入口點和 TLS。
- 範例:用於套接字消息的執行緒安全 DLL。
- 範例:替代的執行緒安全 DLL 策略。
- 數據報。
- Berkeley 與 Windows Sockets。
- 使用 Windows Sockets 的重疊 I/O。
- Windows Sockets 2。
- 總結。
- 練習。
- 13. NT 服務。
- 編寫 NT 服務——概述。
- 主函式。
- ServiceMain 函式。
- 服務控制處理器。
- 範例:服務「包裝器」。
- 管理 Windows NT 服務。
- 總結:服務操作和管理。
- 範例:服務控制外殼。
- 與服務共享內核物件。
- 事件日誌。
- 除錯服務的注意事項。
- 總結。
- 練習。
- 14. 非同步輸入/輸出和完成埠。
- Win32 非同步 I/O 概述。
- 重疊 I/O。
- 範例:在檔案句柄上同步。
- 範例:使用重疊 I/O 和多個緩衝區進行檔案轉換。
- 使用完成例程的擴展 I/O。
- 範例:使用擴展 I/O 進行檔案轉換。
- 使用執行緒的非同步 I/O。
- 可等待計時器。
- 範例:使用可等待計時器。
- I/O 完成埠。
- 範例:使用 I/O 完成埠的伺服器。
- 總結。
- 練習。
- 15. 遠程過程調用和 COM 概述。
- 遠程過程調用。
- 基本 RPC 架構。
- RPC 介面定義。
- 範例:介面定義。
- 範例:RPC 客戶端。
- 範例:RPC 伺服器。
- 簡要的 COM 和 DCOM 概述。
- 總結。
- 練習。
- 16. Win64 程式設計。
- 64 位元架構概述。
- Win64 程式設計模型。
- 數據類型。
- 三種 Win64 程式設計模型。
- 遺留代碼遷移。
附錄 A:使用範例程式。
- 磁碟組織。
- 包含檔案列表。
- 其他實用程式。
附錄 B:Win32、UNIX 和 C 函式庫比較。
- 第 2 章和第 3 章:檔案和目錄管理。
- 第 4 章:結構化例外處理。
- 第 5 章:保護 Win32 物件。
- 第 6 章:記憶體管理、記憶體映射檔案和 DLL。
- 第 7 章:程式管理。
- 第 8 章:執行緒和排程。
- 第 9 章和第 10 章:執行緒同步。
- 第 11 章:進程間通信。
- 第 14 章:非同步 I/O。
附錄 C:性能結果。
- 測試配置。
- 性能測量。
- 執行測試。
參考書目。
索引。 0201703106T04062001