Windows核心编程

Windows核心编程 pdf epub mobi txt 电子书 下载 2026

出版者:人民邮电出版社
作者:Jeffrey Richter
出品人:
页数:820
译者:
出版时间:2008-8
价格:128.00元
装帧:
isbn号码:9787115182128
丛书系列:图灵程序设计丛书·微软技术系列
图书标签:
  • windows
  • 核心编程
  • 计算机
  • 编程
  • windows编程
  • programming
  • 程序设计
  • C++
  • Windows编程
  • Windows内核
  • 驱动开发
  • 系统编程
  • C++编程
  • API
  • Win32
  • 底层原理
  • 调试
  • 安全编程
想要找书就要到 图书目录大全
立刻按 ctrl+D收藏本页
你会得到大惊喜!!

具体描述

【内容简介】

本书是Windows 程序设计领域的名著,涵盖了Windows 的最新版本Vista 以及Windows XP 的最新内容。书中全面深入地介绍了Windows 的各种基本要素,如进程、线程池、虚拟内存、DLL、设备I/O 和SEH 等,并列举了大量应用程序,精辟地分析了要素的使用方法。.

本书适于各层次Windows 编程人员阅读。 ...

【目录信息】

Acknowledgments . xxi

Introduction xxiii

64-Bit Windows xxiii

What’s New in the Fifth Edition xxiv

Code Samples and System Requirements xxvi

Support for This Book xxvi

Questions and Comments xxvi

Part I Required Reading

1 Error Handling 3

Defining Your Own Error Codes 7

The ErrorShow Sample Application 7

2 Working with Characters and Strings 11

Character Encodings 12

ANSI and Unicode Character and String Data Types 13

Unicode and ANSI Functions in Windows 15

Unicode and ANSI Functions in the C Run-Time Library 17

Secure String Functions in the C Run-Time Library 18

Introducing the New Secure String Functions 19

How to Get More Control When Performing String Operations 22

<< 查看详细目录

作者简介

Jeffrey Richter全球享有盛誉的微软技术专家,著名技术咨询和培训公司Wintellect创始人之一,MSDN Magazine杂志特邀编辑。多年来,他担任微软各开发团队顾问,参与了微软的许多关键产品包括各版本Windows、Visual Studio、Microsoft Offce和.NET框架的设计和编程。他撰写了一系列著作,包括本书和《深入理解.NET》(第2版·英文版,人民邮电出版社。2008),都堪称技术图书的典范,影响了一代Windows程序员,并因此荣获微软公司杜区最高技术荣誉“微软软件传奇人物”(Software Legend)称号。

目录信息

Part I Required Reading
1 Error Handling
Defining Your Own Error Codes
The ErrorShow Sample Application
2 Working with Characters and Strings
Character Encodings
ANSI and Unicode Character and String Data Types
Unicode and ANSI Functions in Windows
Unicode and ANSI Functions in the C Run-Time Library
Secure String Functions in the C Run-Time Library
Introducing the New Secure String Functions
How to Get More Control When Performing String Operations
Windows String Functions
Why You Should Use Unicode
How We Recommend Working with Characters and Strings
Translating Strings Between Unicode and ANSI
Exporting ANSI and Unicode DLL Functions
Determining If Text Is ANSI or Unicode
3 Kernel Objects
What Is a Kernel Object?
Usage Counting
Security
A Process’ Kernel Object Handle Table
Creating a Kernel Object
Closing a Kernel Object
Sharing Kernel Objects Across Process Boundaries
Using Object Handle Inheritance
Naming Objects
Duplicating Object Handles
Part II Getting Work Done
4 Processes
Writing Your First Windows Application
A Process Instance Handle
The CreateProcess Function
pszApplicationName and pszCommandLine
Terminating a Process
The Primary Thread’s Entry-Point Function Returns
The ExitProcess Function
The TerminateProcess Function
When All the Threads in the Process Die
When a Process Terminates
Child Processes
Running Detached Child Processes
When Administrator Runs as a Standard User
Elevating a Process Automatically
Elevating a Process by Hand
What Is the Current Privileges Context?
Enumerating the Processes Running in the System
5 Jobs
Placing Restrictions on a Job’s Processes
Placing a Process in a Job
Terminating All Processes in a Job Querying Job Statistics
Job Notifications
The Job Lab Sample Application
6 Thread Basics
When to Create a Thread
When Not to Create a Thread
Writing Your First Thread Function
The CreateThread Function
psa
cbStackSize
pfnStartAddr and pvParam
dwCreateFlags
pdwThreadID
Terminating a Thread
The Thread Function Returns
The ExitThread Function
The TerminateThread Function
When a Process Terminates
When a Thread Terminates
Some Thread Internals
C/C++ Run-Time Library Considerations
Oops—I Called CreateThread Instead of _beginthreadex by Mistake
C/C++ Run-Time Library Functions That You Should Never Call
Gaining a Sense of One’s Own Identity
Converting a Pseudohandle to a Real Handle
7 Thread Scheduling, Priorities, and Affinities
Suspending and Resuming a Thread
Suspending and Resuming a Process
Sleeping
Switching to Another Thread
Switching to Another Thread on a Hyper-Threaded CPU
A Thread’s Execution Times
Putting the CONTEXT in Context
Thread Priorities
An Abstract View of Priorities
Programming Priorities
Dynamically Boosting Thread Priority Levels
Tweaking the Scheduler for the Foreground Process
Scheduling I/O Request Priorities
The Scheduling Lab Sample Application
Affinities
8 Thread Synchronization in User Mode
Atomic Access: The Interlocked Family of Functions
Cache Lines
Advanced Thread Synchronization
A Technique to Avoid
Critical Sections
Critical Sections: The Fine Print
Critical Sections and Spinlocks
Critical Sections and Error Handling
Slim Reader-Writer Locks
Condition Variables
The Queue Sample Application
Useful Tips and Techniques
9 Thread Synchronization with Kernel Objects
Wait Functions
Successful Wait Side Effects
Event Kernel Objects
The Handshake Sample Application
Waitable Timer Kernel Objects
Having Waitable Timers Queue APC Entries
Timer Loose Ends
Semaphore Kernel Objects
Mutex Kernel Objects
Abandonment Issues
Mutexes vs  Critical Sections
The Queue Sample Application
A Handy Thread Synchronization Object Chart
Other Thread Synchronization Functions
Asynchronous Device I/O
WaitForInputIdle
MsgWaitForMultipleObjects(Ex)
WaitForDebugEvent
SignalObjectAndWait
Detecting Deadlocks with the Wait Chain Traversal API
10 Synchronous and Asynchronous Device I/O
Opening and Closing Devices
A Detailed Look at CreateFile
Working with File Devices
Getting a File’s Size
Positioning a File Pointer
Setting the End of a File
Performing Synchronous Device I/O
Flushing Data to the Device
Synchronous I/O Cancellation
Basics of Asynchronous Device I/O
The OVERLAPPED Structure
Asynchronous Device I/O Caveats
Canceling Queued Device I/O Requests
Receiving Completed I/O Request Notifications
Signaling a Device Kernel Object
Signaling an Event Kernel Object
Alertable I/O
I/O Completion Ports
11 The Windows Thread Pool
Scenario 1: Call a Function Asynchronously
Explicitly Controlling a Work Item
The Batch Sample Application
Scenario 2: Call a Function at a Timed Interval
The Timed Message Box Sample Application
Scenario 3: Call a Function When a Single Kernel Object Becomes Signaled
Scenario 4: Call a Function When Asynchronous I/O Requests Complete
Callback Termination Actions
Customized Thread Pools
Gracefully Destroying a Thread Pool: Cleanup Groups
12 Fibers
Working with Fibers
The Counter Sample Application
Part III Memory Management
13 Windows Memory Architecture
A Process’ Virtual Address Space
How a Virtual Address Space Is Partitioned
Null-Pointer Assignment Partition
User-Mode Partition
Kernel-Mode Partition
Regions in an Address Space
Committing Physical Storage Within a Region
Physical Storage and the Paging File
Physical Storage Not Maintained in the Paging File
Protection Attributes
Copy-on-Write Access
Special Access Protection Attribute Flags
Bringing It All Home
Inside the Regions
The Importance of Data Alignment
14 Exploring Virtual Memory
System Information
The System Information Sample Application
Virtual Memory Status
Memory Management on NUMA Machines
The Virtual Memory Status Sample Application
Determining the State of an Address Space
The VMQuery Function
The Virtual Memory Map Sample Application
15 Using Virtual Memory in Your Own Applications
Reserving a Region in an Address Space
Committing Storage in a Reserved Region
Reserving a Region and Committing Storage Simultaneously
When to Commit Physical Storage
Decommitting Physical Storage and Releasing a Region
When to Decommit Physical Storage
The Virtual Memory Allocation Sample Application
Changing Protection Attributes
Resetting the Contents of Physical Storage
The MemReset Sample Application
Address Windowing Extensions
The AWE Sample Application
16 A Thread’s Stack
The C/C++ Run-Time Library’s Stack-Checking Function
The Summation Sample Application
17 Memory-Mapped Files
Memory-Mapped Executables and DLLs
Static Data Is Not Shared by Multiple Instances of an Executable or a DLL
Memory-Mapped Data Files
Method 1: One File, One Buffer
Method 2: Two Files, One Buffer
Method 3: One File, Two Buffers
Method 4: One File, Zero Buffers
Using Memory-Mapped Files
Step 1: Creating or Opening a File Kernel Object
Step 2: Creating a File-Mapping Kernel Object
Step 3: Mapping the File’s Data into the Process’ Address Space
Step 4: Unmapping the File’s Data from the Process’ Address Space
Steps 5  and 6: Closing the File-Mapping Object and the File Object
The File Reverse Sample Application
Processing a Big File Using Memory-Mapped Files
Memory-Mapped Files and Coherence
Specifying the Base Address of a Memory-Mapped File
Implementation Details of Memory-Mapped Files
Using Memory-Mapped Files to Share Data Among Processes
Memory-Mapped Files Backed by the Paging File
The Memory-Mapped File Sharing Sample Application
Sparsely Committed Memory-Mapped Files
The Sparse Memory-Mapped File Sample Application
18 Heaps
A Process’ Default Heap
Reasons to Create Additional Heaps
Component Protection
More Efficient Memory Management
Local Access
Avoiding Thread Synchronization Overhead
Quick Free
How to Create an Additional Heap
Allocating a Block of Memory from a Heap
Changing the Size of a Block
Obtaining the Size of a Block
Freeing a Block
Destroying a Heap
Using Heaps with C++
Miscellaneous Heap Functions
Part IV Dynamic-Link Libraries
19 DLL Basics
DLLs and a Process’ Address Space
The Overall Picture
Building the DLL Module
Building the Executable Module
Running the Executable Module
20 DLL Advanced Techniques
Explicit DLL Module Loading and Symbol Linking
Explicitly Loading the DLL Module
Explicitly Unloading the DLL Module
Explicitly Linking to an Exported Symbol
The DLL’s Entry-Point Function
The DLL_PROCESS_ATTACH Notification
The DLL_PROCESS_DETACH Notification
The DLL_THREAD_ATTACH Notification
The DLL_THREAD_DETACH Notification
Serialized Calls to DllMain
DllMain and the C/C++ Run-Time Library
Delay-Loading a DLL
The DelayLoadApp Sample Application
Function Forwarders
Known DLLs
DLL Redirection
Rebasing Modules
Binding Modules
21 Thread-Local Storage
Dynamic TLS
Using Dynamic TLS
Static TLS
22 DLL Injection and API Hooking
DLL Injection: An Example
Injecting a DLL Using the Registry
Injecting a DLL Using Windows Hooks
The Desktop Item Position Saver (DIPS) Utility
Injecting a DLL Using Remote Threads
The Inject Library Sample Application
The Image Walk DLL
Injecting a DLL with a Trojan DLL
Injecting a DLL as a Debugger
Injecting Code with CreateProcess
API Hooking: An Example
API Hooking by Overwriting Code
API Hooking by Manipulating a Module’s Import Section
The Last MessageBox Info Sample Application
Part V Structured Exception Handling
23  Termination Handlers
Understanding Termination Handlers by Example
Funcenstein1
Funcenstein2
Funcenstein3
Funcfurter1
Pop Quiz Time: FuncaDoodleDoo
Funcenstein4
Funcarama1
Funcarama2
Funcarama3
Funcarama4: The Final Frontier
Notes About the finally Block
Funcfurter2
The SEH Termination Sample Application
24 Exception Handlers and Software Exceptions
Understanding Exception Filters and Exception Handlers by Example
Funcmeister1
Funcmeister2
EXCEPTION_EXECUTE_HANDLER
Some Useful Examples
Global Unwinds
Halting Global Unwinds
EXCEPTION_CONTINUE_EXECUTION
Use EXCEPTION_CONTINUE_EXECUTION with Caution
EXCEPTION_CONTINUE_SEARCH
GetExceptionCode
Memory-Related Exceptions
Exception-Related Exceptions
Debugging-Related Exceptions
Integer-Related Exceptions
Floating Point–Related Exceptions
GetExceptionInformation
Software Exceptions
25 Unhandled Exceptions, Vectored Exception Handling, and C++ Exceptions
Inside the UnhandledExceptionFilter Function
Action #1: Allowing Write Access to a Resource and Continuing Execution
Action #2: Notifying a Debugger of the Unhandled Exception
Action #3: Notifying Your Globally Set Filter Function
Action #4: Notifying a Debugger of the Unhandled Exception (Again)
Action #5: Silently Terminating the Process
UnhandledExceptionFilter and WER Interactions
Just-in-Time Debugging
The Spreadsheet Sample Application
Vectored Exception and Continue Handlers
C++ Exceptions vs  Structured Exceptions
Exceptions and the Debugger
26 Error Reporting and Application Recovery
The Windows Error Reporting Console
Programmatic Windows Error Reporting
Disabling Report Generation and Sending
Customizing All Problem Reports Within a Process
Creating and Customizing a Problem Report
Creating a Custom Problem Report: WerReportCreate
Setting Report Parameters: WerReportSetParameter
Adding a Minidump File to the Report: WerReportAddDump
Adding Arbitrary Files to the Report: WerReportAddFile
Modifying Dialog Box Strings: WerReportSetUIOption
Submitting a Problem Report: WerReportSubmit
Closing a Problem Report: WerReportCloseHandle
The Customized WER Sample Application
Automatic Application Restart and Recovery
Automatic Application Restart
Support for Application Recovery
Part VI Appendixes
A The Build Environment
The CmnHdr.h Header File
Microsoft Windows Version Build Option
Unicode Build Option
Windows Definitions and Warning Level 4
The pragma message Helper Macro
The chINRANGE Macro
The chBEGINTHREADEX Macro
DebugBreak Improvement for x86  Platforms
Creating Software Exception Codes
The chMB Macro
The chASSERT and chVERIFY Macros
The chHANDLE_DLGMSG Macro
The chSETDLGICONS Macro
Forcing the Linker to Look for a (w)WinMain Entry-Point Function
Support XP-Theming of the User Interface with pragma
B Message Crackers, Child Control Macros, and API Macros
Message Crackers
Child Control Macros
API Macros
Index
· · · · · · (收起)

读后感

评分

如果你去读原版书的话,会发现这些翻译的人完全糟蹋了经典的好书,前后章节的专业术语都翻译地不一样。 错误更是多的一塌糊涂  

评分

这本书并不适合初学者,初学者最好先把windows下各种东西先用一遍,碰到很多问题之后带着问题来阅读这本书才会发现这本书的优秀。 此书以精炼的文笔说明了windows下程序开发与操作系统打交道时的方方面面,如果你仅仅是算法工程师,那么你并不需要读这本书,而如果你是windows...  

评分

原著是好书,中文翻译出来成了鸡肋的计算机类书比比皆是。 在这个毁书不倦的出版界,能如此精确的将原书作者的愿意精确的表达,实在让人惊讶! 好书当赞。而对于英语仅过四级水准的读者来说,好的译本更应赞赏!  

评分

第一遍读过去肯定要忘,东西太多了。至少要读两遍。 btw,第4版有关于window messaging的一章,不知道为啥第5版里删掉了。  

评分

英文版怎么60多美金啊?要好几百块一本,难道只有中文版可以看吗?怎么购买啊?网上好象只有中文版的可以买的到。难道只能自己用电子版的打印一本吗? 0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd0xcd...  

用户评价

评分

我关注到书中对性能调优的章节处理得极为到位,它不像市面上许多书籍那样,只是罗列一些简单的优化技巧,而是深入到了性能瓶颈的根源。作者利用专业的性能分析工具(虽然书中没有直接展示工具界面,但其描述的方法论指向性极强)来定位问题,比如缓存未命中率、TLB失效等底层硬件交互细节,都有涉及。这种从硬件架构到操作系统实现再到应用层代码的“全景式”分析,让我对性能调优有了全新的认识。尤其是关于异步操作的资源回收和上下文切换开销的讨论,非常透彻。这本书的适用范围很广,对于编写驱动程序的工程师是基础,对于开发高性能服务器应用的开发者而言,更是不可多得的内功心法。它不是一本让你快速入门的书,而是一本助你登堂入室,直至精通的工具书。

评分

这本书最大的特点,或许在于它对Windows编程范式的深度重构。它不仅仅告诉你“怎么做”,更重要的是告诉你“为什么传统的方法不适应现代需求”,并引导你走向更健壮、更高效的编程思路。比如,在讨论GUI编程时,作者花了大量篇幅去阐述消息循环的本质,以及如何正确地处理线程间的UI元素访问限制,而不是简单地停留在如何使用控件上。这对于我这种过去习惯于使用高级框架进行快速开发的人来说,是一种强烈的思维冲击。它迫使你重新审视你过去习以为常的编程习惯,挑战那些被框架隐藏起来的底层细节。这种“颠覆性”的教学方法,虽然在初期增加了学习曲线的陡峭程度,但从长远来看,无疑是培养扎实内功的最佳途径。读完这本书,你会发现自己看其他Windows编程书籍的视角都变了。

评分

读完这本书的前半部分,我最大的感受是,作者对Windows API的理解已经达到了炉火纯青的地步。他没有满足于仅仅罗列API函数的用法,而是深入探讨了这些函数背后的设计哲学和历史演变。比如在讲解文件I/O模型时,作者不仅详细对比了同步和异步I/O的性能差异和适用场景,还追溯了APC(异步过程调用)机制的起源,这让整个知识体系一下子变得立体起来。这种对“为什么”的深究,远远超越了一般编程参考手册的范畴。我尤其欣赏作者处理复杂概念时的那种抽丝剥茧的能力,他总能找到一个最恰当的角度切入,把一个复杂的内核对象模型,拆解成读者可以理解的小模块。这本书读起来绝对不轻松,需要静下心来,带着笔和草稿纸去啃,但每啃下一块硬骨头,都会带来巨大的成就感,感觉自己对Windows这个庞大系统的“内脏”又多了解了一分。

评分

这本书的语言风格是那种极其沉稳、不苟言笑的学术派,完全没有时下流行的那种轻佻和快餐式表达。如果你期望从中找到“三分钟速成高并发”之类的速成秘籍,那这本书可能会让你失望。它要求的是一种近乎虔诚的学习态度。作者在论述安全模型和权限管理时,引用了大量的安全术语和标准定义,这使得内容极具权威性,但也意味着读者需要具备一定的计算机安全基础知识储备。我发现在阅读涉及到内核态和用户态切换的部分时,如果不结合我过去对操作系统原理的学习经验,理解起来会有些吃力。但正是这种毫不妥协的深度,让这本书成为了技术人员案头必备的“压舱石”。它更像是一份严谨的工程文档,而不是一本流行读物,适合那些真正想在系统软件层面有所建树的工程师。

评分

这本书的装帧设计着实让人眼前一亮,封面那种深沉的蓝色调,配上简洁的银色字体,透着一股专业和严谨的气息。我一开始拿到手的时候,就被那种厚重感所吸引,翻开扉页,扑面而来的是对操作系统底层机制的深入剖析,完全不是那种浮于表面的介绍。它对内存管理、进程间通信的讲解,简直是教科书级别的细致。特别是关于线程同步的那几个章节,作者用非常精妙的类比和图示,将那些原本枯燥乏味的概念变得生动起来,我记得我花了整整一个下午,才把那段关于死锁预防算法的论述彻底吃透。书中大量的代码示例,都是可以直接在最新的Windows环境下编译运行的,而且注释详尽到几乎不需要你再去查阅MSDN文档,这种“保姆式”的教学方式,对于初次接触系统级编程的读者来说,简直是福音。可以说,光是这本书的排版和代码质量,就值回票价了,它不仅仅是一本技术书籍,更像是一件精心打磨的艺术品,让人爱不释手。

评分

windows c/c++程序员必读

评分

写的真好。

评分

写的真好。

评分

windows程序员必看

评分

windows程序员必看

本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度google,bing,sogou

© 2026 book.wenda123.org All Rights Reserved. 图书目录大全 版权所有