Leanpub Header

Skip to main content

Windows 10 System Programming, Part 2

Minimum price

$24.50

$36.95

You pay

$36.95

Author earns

$29.56
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
WEB
578
Readers
552
Pages
About

About

About the Book

Share this book

Author

About the Author

Pavel Yosifovich

Pavel Yosifovich is a renowned author, developer, and expert in Windows Internals, system programming, and software development. With extensive experience in low-level programming, he has authored several highly regarded books, including Windows Internals, Part 1 (7th Edition) and Windows 10 System Programming. His works provide deep insights into Windows architecture, kernel-mode development, and debugging techniques, making them essential resources for developers, security researchers, and IT professionals.

Beyond his books, Pavel is also known for his contributions to the developer community through training, blog posts, tools, and technical talks. He offers in-depth courses on TrainSec, where students can learn Windows Internals, debugging, and system programming directly from his expertise. His writing style balances technical depth with clarity, making complex topics accessible to both beginners and experienced programmers. Pavel’s books and courses serve as authoritative guides for those looking to master Windows and programming.

Leanpub Podcast

Episode 257

An Interview with Pavel Yosifovich

Contents

Table of Contents

Introduction

  1. Who Should Read This Book
  2. What You Should Know to Use This Book
  3. Sample Code

Chapter 13: Working With Memory

  1. Memory APIs
  2. The VirtualAlloc* Functions
  3. A VirtualAlloc Bug
  4. Decommitting / Releasing Memory
  5. Reserving and Committing Memory
  6. Committed Memory and RAM
  7. The Micro Excel Application
  8. Working Sets
  9. The Working Sets Application
  10. Heaps
  11. Private Heaps
  12. Heap Types
  13. Heap Debugging Features
  14. The C/C++ Runtime
  15. The Local/Global APIs
  16. Other Heap Functions
  17. Other Virtual Functions
  18. Memory Protection
  19. Locking Memory
  20. Memory Block Information
  21. Memory Hint Functions
  22. Writing and Reading to/from Other Processes
  23. Large Pages
  24. Huge Pages
  25. Address Windowing Extensions
  26. NUMA
  27. The VirtualAlloc2 Function
  28. Summary

Chapter 14: Memory Mapped Files

  1. Introduction
  2. Mapping Files
  3. The filehist Application
  4. Sharing Memory
  5. Sharing Memory with File Backing
  6. The Micro Excel 2 Application
  7. Other Memory Mapping Functions
  8. Data Coherence
  9. Summary

Chapter 15: Dynamic Link Libraries

  1. Introduction
  2. Building a DLL
  3. Implicit and Explicit Linking
  4. Implicit Linking
  5. Explicit Linking
  6. Calling Conventions
  7. DLL Search and Redirection
  8. The DllMain Function
  9. DLL Injection
  10. Injection with Remote Thread
  11. Windows Hooks
  12. DLL Injecting and Hooking with SetWindowsHookEx
  13. API Hooking
  14. IAT Hooking
  15. “Detours” Style Hooking
  16. DLL Base Address
  17. Delay-Load DLLs
  18. The LoadLibraryEx Function
  19. Miscellaneous Functions
  20. Summary

Chapter 16: Security

  1. Introduction
  2. WinLogon
  3. LogonUI
  4. LSASS
  5. LsaIso
  6. Security Reference Monitor
  7. Event Logger
  8. SIDs
  9. Groups and Aliases
  10. Tokens
  11. The Secondary Logon Service
  12. Impersonation
  13. Impersonation in Client/Server
  14. Privileges
  15. Super Privileges
  16. Access Masks
  17. Security Descriptors
  18. The Default Security Descriptor
  19. Building Security Descriptors
  20. User Access Control
  21. Elevation
  22. Running As Admin Required
  23. UAC Virtualization
  24. Integrity Levels
  25. UIPI
  26. Specialized Security Mechanisms
  27. Control Flow Guard
  28. Process Mitigations
  29. Summary

Chapter 17: The Registry

  1. The Hives
  2. HKEY_LOCAL_MACHINE
  3. HKEY_USERS
  4. HKEY_CURRENT_USER (HKCU)
  5. HKEY_CLASSES_ROOT (HKCR)
  6. HKEY_CURRENT_CONFIG (HKCC)
  7. HKEY_PERFORMANCE_DATA
  8. 32-bit Specific Hives
  9. Working with Keys and Values
  10. Reading Values
  11. Writing Values
  12. Deleting Keys and Values
  13. Creating Registry Links
  14. Enumerating Keys and Values
  15. Registry Notifications
  16. Transactional Registry
  17. Registry and Impersonation
  18. Remote Registry
  19. Miscellaneous Registry Functions
  20. Summary

Chapter 18: Pipes and Mailslots

  1. Mailslots
  2. Mailslot Clients
  3. Multi-Mailslot Communication
  4. Anonymous Pipes
  5. The Command Redirect Application
  6. Named Pipes
  7. Pipe Client
  8. The Pipe Calculator Application
  9. Other Pipe Functions
  10. Summary

Chapter 19: Services

  1. Services Overview
  2. Service Process Architecture
  3. A Simple Service
  4. Installing the Service
  5. A Service Client
  6. Controlling Services
  7. Installing a Service
  8. Starting a Service
  9. Stopping a Service
  10. Uninstalling the Service
  11. Service Status and Enumeration
  12. The enumsvc Application
  13. Service Configuration
  14. Service Description
  15. Failure Actions
  16. Pre-Shutdown Information
  17. Delayed Auto-Start
  18. Trigger Information
  19. Preferred NUMA Node
  20. Launch as PPL
  21. Debugging Services
  22. Interactive Services
  23. Service Security
  24. Service SID
  25. Service Security Descriptor
  26. Per-User Services
  27. Miscellaenous Functions
  28. Summary

Chapter 20: Debugging and Diagnostics

  1. Debugger Output
  2. The DebugPrint Application
  3. Performance Counters
  4. Working with Counters
  5. The QSlice Application
  6. Process Snapshots
  7. Querying a Snapshot
  8. The snapproc Application
  9. Exercises
  10. Event Tracing for Windows
  11. Creating ETW Sessions
  12. Processing Traces
  13. Real-Time Event Processing
  14. The Kernel Provider
  15. More ETW
  16. Trace Logging
  17. Publishing Events with Trace Logging
  18. Debuggers
  19. A Simple Debugger
  20. More Debugging APIs
  21. Writing a Real Debugger
  22. Summary

Chapter 21: The Component Object Model

  1. What is COM?
  2. Interfaces and Implementations
  3. The IUnknown Interface
  4. HRESULTs
  5. COM Rules (pun intended)
  6. COM Clients
  7. Step 1: Initialize COM
  8. Step 2: Create the BITS Manager
  9. Step 3: Create a BITS Job
  10. Step 4: Add a Download
  11. Step 5: Initiate the Transfer
  12. Step 6: Wait for Transfer to Complete
  13. Step 7: Display Results
  14. Step 8: Clean Up
  15. COM Smart Pointers
  16. Querying for Interfaces
  17. CoCreateInstance Under the Hood
  18. CoGetClassObject
  19. Implementing COM Interfaces
  20. COM Servers
  21. Implementing the COM Class
  22. Implementing the Class Object (Factory)
  23. Implementing DllGetClassObject
  24. Implementing Self Registration
  25. Registering the Server
  26. Debugging Registration
  27. Testing the Server
  28. Testing with non C/C++ Client
  29. Proxies and Stubs
  30. IDL and Type Libraries
  31. Threads and Apartments
  32. The Free Threaded Marshalar (FTM)
  33. Odds and Ends
  34. Summary

Chapter 22: The Windows Runtime

  1. Introduction
  2. Working with WinRT
  3. The IInspectable interface
  4. Language Projections
  5. C++/WinRT
  6. Asynchronous Operations
  7. Other Projections
  8. Summary

Chapter 23: Structured Exception Handling

  1. Termination Handlers
  2. Replacing Termination Handlers with RAII
  3. Exception Handling
  4. Simple Exception Handling
  5. Using EXCEPTION_CONTINUE_EXECUTION
  6. Exception Information
  7. Unhandled Exceptions
  8. Just in Time Debugging
  9. Windows Error Reporting (WER)
  10. Vectored Exception Handling
  11. Software Exceptions
  12. High-Level Exceptions
  13. Visual Studio Exception Settings
  14. Summary
  15. Book Summary

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub