وبلاگ بلیان

Windows via C/C++ (softcover) (Developer Reference)

معرفی کتاب «Windows via C/C++ (softcover) (Developer Reference)» نوشتهٔ Jeffrey Richter, Christophe Nasarre، منتشرشده توسط نشر Microsoft Press در سال 2011. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Windows via C/C++ (softcover) (Developer Reference)» در دستهٔ بدون دسته‌بندی قرار دارد.

Master the intricacies of application development with unmanaged C++ code—straight from the experts. Jeffrey Richter’s classic book is now fully revised for Windows XP, Windows Vista, and Windows Server 2008. You get in-depth, comprehensive guidance, advanced techniques, and extensive code samples to help you program Windows–based applications. Discover how to: Architect and implement your applications for both 32-bit and 64-bit Windows Create and manipulate processes and jobs Schedule, manage, synchronize and destroy threads Perform asynchronous and synchronous device I/O operations with the I/O completion port Allocate memory using various techniques including virtual memory, memory-mapped files, and heaps Manipulate the default committed physical storage of thread stacks Build DLLs for delay-loading, API hooking, and process injection Using structured exception handling, Windows Error Recovery, and Application Restart services Windows via C/C++, Fifth Edition......Page 7 List of Figures......Page 10 List of Tables......Page 12 Overview......Page 14 64-Bit Windows......Page 15 What's New in the Fifth Edition......Page 16 Support for This Book......Page 17 Part I: Required Reading......Page 18 Overview......Page 19 Defining Your Own Error Codes......Page 23 The ErrorShow Sample Application......Page 24 Overview......Page 26 Character Encodings......Page 27 ANSI and Unicode Character and String Data Types......Page 29 Unicode and ANSI Functions in Windows......Page 31 Unicode and ANSI Functions in the C Run-Time Library......Page 33 Secure String Functions in the C Run-Time Library......Page 34 How We Recommend Working with Characters and Strings......Page 42 Translating Strings Between Unicode and ANSI......Page 43 Overview......Page 49 What Is a Kernel Object?......Page 50 A Process' Kernel Object Handle Table......Page 54 Sharing Kernel Objects Across Process Boundaries......Page 59 Part II: Getting Work Done......Page 79 Overview......Page 80 Writing Your First Windows Application......Page 81 The CreateProcess Function......Page 99 Terminating a Process......Page 114 Child Processes......Page 117 When Administrator Runs as a Standard User......Page 120 Overview......Page 134 Placing Restrictions on a Job's Processes......Page 138 Placing a Process in a Job......Page 145 Terminating All Processes in a Job......Page 146 Job Notifications......Page 149 The Job Lab Sample Application......Page 152 Overview......Page 154 When to Create a Thread......Page 155 When Not to Create a Thread......Page 158 Writing Your First Thread Function......Page 159 The CreateThread Function......Page 160 Terminating a Thread......Page 163 Some Thread Internals......Page 165 C/C++ Run-Time Library Considerations......Page 168 Gaining a Sense of One's Own Identity......Page 177 Overview......Page 180 Suspending and Resuming a Thread......Page 181 Suspending and Resuming a Process......Page 183 Sleeping......Page 184 Switching to Another Thread on a Hyper-Threaded CPU......Page 185 A Thread's Execution Times......Page 186 Putting the CONTEXT in Context......Page 190 Thread Priorities......Page 194 An Abstract View of Priorities......Page 195 Programming Priorities......Page 198 Affinities......Page 210 Overview......Page 214 Atomic Access: The Interlocked Family of Functions......Page 215 Cache Lines......Page 220 Advanced Thread Synchronization......Page 222 Critical Sections......Page 224 Slim Reader-Writer Locks......Page 230 Condition Variables......Page 233 Overview......Page 246 Wait Functions......Page 248 Successful Wait Side Effects......Page 250 Event Kernel Objects......Page 252 Waitable Timer Kernel Objects......Page 260 Semaphore Kernel Objects......Page 266 Mutex Kernel Objects......Page 268 A Handy Thread Synchronization Object Chart......Page 278 Other Thread Synchronization Functions......Page 280 Overview......Page 290 Opening and Closing Devices......Page 291 Working with File Devices......Page 300 Performing Synchronous Device I/O......Page 303 Basics of Asynchronous Device I/O......Page 306 Receiving Completed I/O Request Notifications......Page 310 Overview......Page 336 Scenario 1: Call a Function Asynchronously......Page 337 Scenario 2: Call a Function at a Timed Interval......Page 343 Scenario 3: Call a Function When a Single Kernel Object Becomes Signaled......Page 348 Scenario 4: Call a Function When Asynchronous I/O Requests Complete......Page 351 Callback Termination Actions......Page 352 Overview......Page 358 Working with Fibers......Page 359 Part III: Memory Management......Page 365 Overview......Page 366 How a Virtual Address Space Is Partitioned......Page 367 Regions in an Address Space......Page 371 Committing Physical Storage Within a Region......Page 372 Physical Storage and the Paging File......Page 374 Protection Attributes......Page 377 Bringing It All Home......Page 380 The Importance of Data Alignment......Page 389 Chapter 14: Exploring Virtual Memory......Page 393 Virtual Memory Status......Page 402 Memory Management on NUMA Machines......Page 403 Determining the State of an Address Space......Page 406 Overview......Page 415 Reserving a Region in an Address Space......Page 416 Committing Storage in a Reserved Region......Page 418 Reserving a Region and Committing Storage Simultaneously......Page 419 When to Commit Physical Storage......Page 420 Decommitting Physical Storage and Releasing a Region......Page 422 Changing Protection Attributes......Page 430 Resetting the Contents of Physical Storage......Page 431 Overview......Page 444 The C/C++ Run-Time Library's Stack-Checking Function......Page 448 The Summation Sample Application......Page 450 Overview......Page 455 Memory-Mapped Executables and DLLs......Page 456 Memory-Mapped Data Files......Page 466 Using Memory-Mapped Files......Page 468 Processing a Big File Using Memory-Mapped Files......Page 483 Memory-Mapped Files and Coherence......Page 484 Specifying the Base Address of a Memory-Mapped File......Page 485 Implementation Details of Memory-Mapped Files......Page 486 Using Memory-Mapped Files to Share Data Among Processes......Page 487 Memory-Mapped Files Backed by the Paging File......Page 489 Sparsely Committed Memory-Mapped Files......Page 493 Overview......Page 506 A Process' Default Heap......Page 507 Reasons to Create Additional Heaps......Page 508 How to Create an Additional Heap......Page 511 Miscellaneous Heap Functions......Page 519 Part IV: Dynamic-Link Libraries......Page 522 Overview......Page 523 DLLs and a Process' Address Space......Page 524 The Overall Picture......Page 526 Chapter 20: DLL Advanced Techniques......Page 537 The DLL's Entry-Point Function......Page 544 Delay-Loading a DLL......Page 552 Function Forwarders......Page 562 Known DLLs......Page 564 DLL Redirection......Page 565 Rebasing Modules......Page 566 Binding Modules......Page 572 Overview......Page 575 Dynamic TLS......Page 576 Static TLS......Page 579 Overview......Page 581 DLL Injection: An Example......Page 582 Injecting a DLL Using the Registry......Page 584 Injecting a DLL Using Windows Hooks......Page 585 Injecting a DLL Using Remote Threads......Page 597 Injecting a DLL as a Debugger......Page 608 Injecting Code with CreateProcess......Page 609 API Hooking: An Example......Page 610 Part V: Structured Exception Handling......Page 630 Overview......Page 631 Understanding Termination Handlers by Example......Page 632 Overview......Page 648 Understanding Exception Filters and Exception Handlers by Example......Page 649 EXCEPTION_EXECUTE_HANDLER......Page 651 EXCEPTION_CONTINUE_EXECUTION......Page 658 EXCEPTION_CONTINUE_SEARCH......Page 660 GetExceptionCode......Page 662 GetExceptionInformation......Page 666 Software Exceptions......Page 669 Overview......Page 673 Inside the UnhandledExceptionFilter Function......Page 675 Just-in-Time Debugging......Page 680 The Spreadsheet Sample Application......Page 683 Vectored Exception and Continue Handlers......Page 692 C++ Exceptions vs. Structured Exceptions......Page 694 Exceptions and the Debugger......Page 695 Chapter 26: Error Reporting and Application Recovery......Page 698 Programmatic Windows Error Reporting......Page 701 Customizing All Problem Reports Within a Process......Page 703 Creating and Customizing a Problem Report......Page 705 Automatic Application Restart and Recovery......Page 719 Part VI: Appendixes......Page 722 Overview......Page 723 The CmnHdr.h Header File......Page 724 Overview......Page 734 Message Crackers......Page 735 Child Control Macros......Page 737 API Macros......Page 738 "Master the intricacies of application development with unmanaged C++ code - with advice straight from the experts. Jeffrey Richter's book is now fully revised for Windows XP, Windows Vista, and Windows Server 2008. You get in-depth, comprehensive guidance, advanced techniques, and extensive code samples to help you program Windows-based applications." "You'll discover how to: architect and implement your applications for both 32-bit and 64-bit Windows; create and manipulate processes and jobs; schedule, manage, synchronize, and destroy threads; perform asynchronous and synchronous device I/O operations with the I/O completion port; allocate memory using various techniques including virtual memory, memory-mapped files, and heaps; manipulate the default committed physical storage of thread stacks; build DLLs for delay-loading, API hooking, and process injection; and use structured exception handling, Windows Error Recovery, and Application Restart."--Jacket
دانلود کتاب Windows via C/C++ (softcover) (Developer Reference)