Muutke küpsiste eelistusi

Professional Cplusplus 4th edition [Pehme köide]

  • Formaat: Paperback / softback, 1184 pages, kõrgus x laius x paksus: 234x188x69 mm, kaal: 1610 g
  • Ilmumisaeg: 05-Jun-2018
  • Kirjastus: Wrox Press
  • ISBN-10: 1119421306
  • ISBN-13: 9781119421306
  • Pehme köide
  • Hind: 77,50 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Raamatukogudele
  • Formaat: Paperback / softback, 1184 pages, kõrgus x laius x paksus: 234x188x69 mm, kaal: 1610 g
  • Ilmumisaeg: 05-Jun-2018
  • Kirjastus: Wrox Press
  • ISBN-10: 1119421306
  • ISBN-13: 9781119421306
Get up to date quickly on the big changes coming with C++17

Professional C++ is the advanced manual for C++ programming. Designed to help experienced developers get more out of the latest release, this book skims over the basics and dives right in to exploiting the full capabilities of C++17. Each feature is explained by example, each including actual code snippets that you can plug into your own applications. Case studies include extensive, working code that has been tested on Windows, Linux, and Solaris, and the author's expert tips, tricks, and workarounds can dramatically enhance your workflow. Even many experienced developers have never fully explored the boundaries of the language's capabilities; this book reveals the advanced features you never knew about, and drills down to show you how to turn these features into real-world solutions.

The C++17 release includes changes that impact the way you work with C++; this new fourth edition covers them all, including nested namespaces, structured bindings, string_view, template argument deduction for constructors, math functions, parallel algorithms, generalized sum algorithms, Boyer-Moore string searching, string conversion primitives, a filesystem API, clamping values, optional values, the variant type, the any type, and more. Clear explanations and professional-level depth make this book an invaluable resource for any professional needing to get up to date quickly.

  • Maximize C++ capabilities with effective design solutions
  • Master little-known elements and learn what to avoid
  • Adopt new workarounds and testing/debugging best practices
  • Utilize real-world program segments in your own applications

C++ is notoriously complex, and whether you use it for gaming or business, maximizing its functionality means keeping up to date with the latest changes. This time, those changes are extensive—and whether they enhance your work or make it harder depends on how well-versed you are in the newest C++ features. Professional C++ gets you up to date quickly, and provides the answers you need for everyday solutions.

Introduction xlvii
Part I: Introduction To Professional C++
Chapter 1 A Crash Course In C++ And The Standard Library
3(54)
The Basics of C++
4(24)
The Obligatory Hello, World
4(4)
Comments
4(1)
Preprocessor Directives
5(1)
The main() Function
6(1)
I/O Streams
7(1)
Namespaces
8(2)
Literals
10(1)
Variables
10(3)
Operators
13(2)
Types
15(2)
Enumerated Types
15(1)
Structs
16(1)
Conditional Statements
17(3)
if/else Statements
17(1)
switch Statements
18(2)
The Conditional Operator
20(1)
Logical Evaluation Operators
20(1)
Functions
21(2)
Function Return Type Deduction
22(1)
Current Function's Name
23(1)
C-Style Arrays
23(2)
std::array
25(1)
std::vector
25(1)
Structured Bindings
26(1)
Loops
26(2)
The while Loop
26(1)
The do/while Loop
27(1)
The for Loop
27(1)
The Range-Based for Loop
27(1)
Initializer Lists
28(1)
Those Are the Basics
28(1)
Diving Deeper into C++
28(12)
Strings in C++
29(1)
Pointers and Dynamic Memory
29(6)
The Stack and the Heap
29(1)
Working with Pointers
30(1)
Dynamically Allocated Arrays
31(1)
Null Pointer Constant
32(1)
Smart Pointers
33(2)
The Many Uses of const
35(1)
const Constants
35(1)
const to Protect Parameters
35(1)
References
35(2)
Pass By Reference
36(1)
Pass By const Reference
37(1)
Exceptions
37(1)
Type Inference
38(2)
The auto Keyword
39(1)
The decltype Keyword
40(1)
C++ as an Object-Oriented Language
40(3)
Defining Classes
40(3)
Using Classes
43(1)
Uniform Initialization
43(3)
Direct List Initialization versus Copy List Initialization
45(1)
The Standard Library
46(1)
Your First Useful C++ Program
46(10)
An Employee Records System
46(1)
The Employee Class
47(3)
Employee.h
47(1)
Employee.cpp
48(2)
EmployeeTest.cpp
50(1)
The Database Class
50(3)
Database.h
50(1)
Database.cpp
51(1)
DatabaseTest.cpp
52(1)
The User Interface
53(2)
Evaluating the Program
55(1)
Summary
56(1)
Chapter 2 Working With Strings And String Views
57(14)
Dynamic Strings
58(11)
C-Style Strings
58(2)
String Literals
60(2)
Raw String Literals
60(2)
The C++ std::string Class
62(5)
What Is Wrong with C-Style Strings?
62(1)
Using the string Class
62(2)
std::string Literals
64(1)
High-Level Numeric Conversions
64(1)
Low-Level Numeric Conversions
65(2)
The std::string_view Class
67(2)
std::string_view Literals
69(1)
Nonstandard Strings
69(1)
Summary
69(2)
Chapter 3 Coding With Style
71(24)
The Importance of Looking Good
71(1)
Thinking Ahead
72(1)
Elements of Good Style
72(1)
Documenting Your Code
72(9)
Reasons to Write Comments
72(5)
Commenting to Explain Usage
72(2)
Commenting to Explain Complicated Code
74(1)
Commenting to Convey Meta-information
75(2)
Commenting Styles
77(4)
Commenting Every Line
77(1)
Prefix Comments
78(1)
Fixed-Format Comments
79(1)
Ad Hoc Comments
80(1)
Self-Documenting Code
81(1)
Decomposition
81(2)
Decomposition through Refactoring
82(1)
Decomposition by Design
83(1)
Decomposition in This Book
83(1)
Naming
83(3)
Choosing a Good Name
83(1)
Naming Conventions
84(2)
Counters
84(1)
Prefixes
84(1)
Hungarian Notation
85(1)
Getters and Setters
86(1)
Capitalization
86(1)
Namespaced Constants
86(1)
Using Language Features with Style
86(2)
Use Constants
87(1)
Use References Instead of Pointers
87(1)
Use Custom Exceptions
88(1)
Formatting
88(2)
The Curly Brace Alignment Debate
88(1)
Coming to Blows over Spaces and Parentheses
89(1)
Spaces and Tabs
90(1)
Stylistic Challenges
90(1)
Summary
91(4)
Part II: Professional C++ Software Design
Chapter 4 Designing Professional C++ Programs
95(28)
What Is Programming Design?
96(1)
The Importance of Programming Design
97(2)
Designing for C++
99(1)
Two Rules for C++ Design
100(3)
Abstraction
100(1)
Benefiting from Abstraction
100(1)
Incorporating Abstraction in Your Design
101(1)
Reuse
101(2)
Writing Reusable Code
102(1)
Reusing Designs
103(1)
Reusing Existing Code
103(11)
A Note on Terminology
104(1)
Deciding Whether or Not to Reuse Code
105(2)
Advantages to Reusing Code
105(1)
Disadvantages to Reusing Code
105(1)
Putting It Together to Make a Decision
106(1)
Strategies for Reusing Code
107(5)
Understand the Capabilities and Limitations
107(1)
Understand the Performance
108(2)
Understand Platform Limitations
110(1)
Understand Licensing and Support
110(1)
Know Where to Find Help
111(1)
Prototype
111(1)
Bundling Third-Party Applications
112(1)
Open-Source Libraries
112(2)
The Open-Source Movements
112(1)
Finding and Using Open-Source Libraries
113(1)
Guidelines for Using Open-Source Code
113(1)
The C++ Standard Library
114(1)
C Standard Library
114(1)
Deciding Whether or Not to Use the Standard Library
114(1)
Designing a Chess Program
114(7)
Requirements
115(1)
Design Steps
115(9)
Divide the Program into Subsystems
115(2)
Choose Threading Models
117(1)
Specify Class Hierarchies for Each Subsystem
118(1)
Specify Classes, Data Structures, Algorithms, and Patterns for Each Subsystem
118(2)
Specify Error Handling for Each Subsystem
120(1)
Summary
121(2)
Chapter 5 Designing With Objects
123(20)
Am I Thinking Procedurally?
124(1)
The Object-Oriented Philosophy
124(3)
Classes
124(1)
Components
125(1)
Properties
125(1)
Behaviors
126(1)
Bringing It All Together
126(1)
Living in a World of Objects
127(2)
Over-Objectification
127(1)
Overly General Objects
128(1)
Object Relationships
129(9)
The Has-A Relationship
129(1)
The Is-A Relationship (Inheritance)
130(2)
Inheritance Techniques
130(1)
Polymorphism versus Code Reuse
131(1)
The Fine Line between Has-A and Is-A
132(3)
The Not-A Relationship
135(1)
Hierarchies
136(1)
Multiple Inheritance
137(1)
Mixin Classes
138(1)
Abstraction
138(4)
Interface versus Implementation
138(1)
Deciding on an Exposed Interface
139(2)
Consider the Audience
139(1)
Consider the Purpose
139(2)
Consider the Future
141(1)
Designing a Successful Abstraction
141(1)
Summary
142(1)
Chapter 6 Designing For Reuse
143(20)
The Reuse Philosophy
144(1)
How to Design Reusable Code
144(15)
Use Abstraction
145(1)
Structure Your Code for Optimal Reuse
146(7)
Avoid Combining Unrelated or Logically Separate Concepts
146(2)
Use Templates for Generic Data Structures and Algorithms
148(2)
Provide Appropriate Checks and Safeguards
150(1)
Design for Extensibility
151(2)
Design Usable Interfaces
153(5)
Design Interfaces That Are Easy to Use
153(4)
Design General-Purpose Interfaces
157(1)
Reconciling Generality and Ease of Use
157(1)
The SOLID Principles
158(1)
Summary
159(4)
Part III: C++ Coding The Professional Way
Chapter 7 Memory Management
163(36)
Working with Dynamic Memory
164(13)
How to Picture Memory
164(2)
Allocation and Deallocation
166(2)
Using new and delete
166(1)
What about My Good Friend malloc?
167(1)
When Memory Allocation Fails
167(1)
Arrays
168(7)
Arrays of Basic Types
168(2)
Arrays of Objects
170(1)
Deleting Arrays
171(1)
Multi-dimensional Arrays
172(3)
Working with Pointers
175(2)
A Mental Model for Pointers
175(1)
Casting with Pointers
176(1)
Array-Pointer Duality
177(2)
Arrays Are Pointers!
177(2)
Not All Pointers Are Arrays!
179(1)
Low-Level Memory Operations
179(3)
Pointer Arithmetic
179(1)
Custom Memory Management
180(1)
Garbage Collection
181(1)
Object Pools
182(1)
Smart Pointers
182(10)
unique_ptr
183(3)
Creating unique_ptrs
183(2)
Using unique_ptrs
185(1)
unique_ptr and C-Style Arrays
186(1)
Custom Deleters
186(1)
shared_ptr
186(3)
Casting a shared_ptr
187(1)
The Need for Reference Counting
188(1)
Aliasing
189(1)
weak_ptr
189(1)
Move Semantics
190(1)
enable_shared_from_this
191(1)
The Old Deprecated/Removed auto_ptr
192(1)
Common Memory Pitfalls
192(5)
Underallocating Strings
192(1)
Accessing Out-of-Bounds Memory
193(1)
Memory Leaks
194(3)
Finding and Fixing Memory Leaks in Windows with Visual C++
195(1)
Finding and Fixing Memory Leaks in Linux with Valgrind
196(1)
Double-Deleting and Invalid Pointers
197(1)
Summary
197(2)
Chapter 8 Gaining Proficiency With Classes And Objects
199(32)
Introducing the Spreadsheet Example
200(1)
Writing Classes
200(8)
Class Definitions
200(3)
Class Members
201(1)
Access Control
201(2)
Order of Declarations
203(1)
In-Class Member Initializers
203(1)
Defining Methods
203(4)
Accessing Data Members
204(1)
Calling Other Methods
204(2)
The this Pointer
206(1)
Using Objects
207(1)
Objects on the Stack
207(1)
Objects on the Heap
207(1)
Object Life Cycles
208(22)
Object Creation
208(16)
Writing Constructors
209(1)
Using Constructors
210(1)
Providing Multiple Constructors
211(1)
Default Constructors
212(3)
Constructor Initializers
215(3)
Copy Constructors
218(2)
Initializer-List Constructors
220(2)
Delegating Constructors
222(1)
Summary of Compiler-Generated Constructors
222(2)
Object Destruction
224(1)
Assigning to Objects
225(3)
Declaring an Assignment Operator
225(1)
Defining an Assignment Operator
226(1)
Explicitly Defaulted and Deleted Assignment Operator
227(1)
Compiler-Generated Copy Constructor and Copy Assignment Operator
228(1)
Distinguishing Copying from Assignment
228(5)
Objects as Return Values
228(1)
Copy Constructors and Object Members
229(1)
Summary
230(1)
Chapter 9 Mastering Classes And Objects
231(46)
Friends
232(1)
Dynamic Memory Allocation in Objects
233(18)
The Spreadsheet Class
233(2)
Freeing Memory with Destructors
235(1)
Handling Copying and Assignment
236(7)
The Spreadsheet Copy Constructor
239(1)
The Spreadsheet Assignment Operator
240(2)
Disallowing Assignment and Pass-By-Value
242(1)
Handling Moving with Move Semantics
243(7)
Rvalue References
243(2)
Implementing Move Semantics
245(3)
Testing the Spreadsheet Move Operations
248(2)
Implementing a Swap Function with Move Semantics
250(1)
Rule of Zero
250(1)
More about Methods
251(7)
static Methods
251(1)
const Methods
251(2)
mutable Data Members
253(1)
Method Overloading
253(2)
Overloading Based on const
254(1)
Explicitly Deleting Overloads
255(1)
Inline Methods
255(2)
Default Arguments
257(1)
Different Kinds of Data Members
258(5)
static Data Members
258(2)
Inline Variables
259(1)
Accessing static Data Members within Class Methods
259(1)
Accessing static Data Members Outside Methods
260(1)
const static Data Members
260(1)
Reference Data Members
261(1)
const Reference Data Members
262(1)
Nested Classes
263(1)
Enumerated Types inside Classes
264(1)
Operator Overloading
265(7)
Example: Implementing Addition for SpreadsheetCells
265(4)
First Attempt: The add Method
265(1)
Second Attempt: Overloaded operator+ as a Method
266(2)
Third Attempt: Global operator+
268(1)
Overloading Arithmetic Operators
269(1)
Overloading the Arithmetic Shorthand Operators
269(1)
Overloading Comparison Operators
270(1)
Building Types with Operator Overloading
271(1)
Building Stable Interfaces
272(3)
Using Interface and Implementation Classes
272(3)
Summary
275(2)
Chapter 10 Discovering Inheritance Techniques
277(56)
Building Classes with Inheritance
278(13)
Extending Classes
278(3)
A Client's View of Inheritance
279(1)
A Derived Class' View of Inheritance
280(1)
Preventing Inheritance
281(1)
Overriding Methods
281(10)
How I Learned to Stop Worrying and Make Everything virtual
281(1)
Syntax for Overriding a Method
282(1)
A Client's View of Overridden Methods
283(1)
The override Keyword
284(2)
The Truth about virtual
286(4)
Preventing Overriding
290(1)
Inheritance for Reuse
291(3)
The WeatherPrediction Class
291(1)
Adding Functionality in a Derived Class
292(1)
Replacing Functionality in a Derived Class
293(1)
Respect Your Parents
294(7)
Parent Constructors
294(2)
Parent Destructors
296(1)
Referring to Parent Names
297(2)
Casting Up and Down
299(2)
Inheritance for Polymorphism
301(7)
Return of the Spreadsheet
301(1)
Designing the Polymorphic Spreadsheet Cell
301(1)
The SpreadsheetCell Base Class
302(2)
A First Attempt
302(1)
Pure Virtual Methods and Abstract Base Classes
303(1)
The Individual Derived Classes
304(2)
StringSpreadsheetCell Class Definition
304(1)
StringSpreadsheetCell Implementation
304(1)
DoubleSpreadsheetCell Class Definition and Implementation
305(1)
Leveraging Polymorphism
306(1)
Future Considerations
306(2)
Multiple Inheritance
308(4)
Inheriting from Multiple Classes
308(1)
Naming Collisions and Ambiguous Base Classes
309(3)
Name Ambiguity
309(2)
Ambiguous Base Classes
311(1)
Uses for Multiple Inheritance
312(1)
Interesting and Obscure Inheritance Issues
312(20)
Changing the Overridden Method's Characteristics
313(3)
Changing the Method Return Type
313(2)
Changing the Method Parameters
315(1)
Inherited Constructors
316(4)
Special Cases in Overriding Methods
320(7)
The Base Class Method Is static
320(1)
The Base Class Method Is Overloaded
321(1)
The Base Class Method Is private or protected
322(2)
The Base Class Method Has Default Arguments
324(1)
The Base Class Method Has a Different Access Level
325(2)
Copy Constructors and Assignment Operators in Derived Classes
327(2)
Run-Time Type Facilities
329(2)
Non-public Inheritance
331(1)
Virtual Base Classes
331(1)
Summary
332(1)
Chapter 11 C++ Quirks, Oddities, And Incidentals
333(40)
References
334(9)
Reference Variables
334(2)
Modifying References
335(1)
References to Pointers and Pointers to References
336(1)
Reference Data Members
336(1)
Reference Parameters
336(2)
References from Pointers
337(1)
Pass-by-Reference versus Pass-by-Value
337(1)
Reference Return Values
338(1)
Rvalue References
338(1)
Deciding between References and Pointers
339(4)
Keyword Confusion
343(8)
The const Keyword
343(4)
const Variables and Parameters
343(2)
const Methods
345(1)
The constexpr Keyword
346(1)
The static Keyword
347(4)
static Data Members and Methods
347(1)
static Linkage
347(3)
static Variables in Functions
350(1)
Order of Initialization of Nonlocal Variables
351(1)
Order of Destruction of Nonlocal Variables
351(1)
Types and Casts
351(11)
Type Aliases
352(1)
Type Aliases for Function Pointers
353(2)
Type Aliases for Pointers to Methods and Data Members
355(1)
typedefs
356(1)
Casts
357(6)
const_cast()
357(1)
static_cast()
358(1)
reinterpret_ cast()
359(1)
dynamic_cast()
360(1)
Summary of Casts
361(1)
Scope Resolution
362(1)
Attributes
363(2)
[ [ noreturn]]
363(1)
[ [ deprecated]]
364(1)
[ [ fallthrough]]
364(1)
[ [ nodiscard]]
364(1)
[ [ maybe_unused]]
365(1)
Vendor-Specific Attributes
365(1)
User-Defined Literals
365(2)
Standard User-Defined Literals
367(1)
Header Files
367(2)
C Utilities
369(3)
Variable-Length Argument Lists
369(2)
Accessing the Arguments
370(1)
Why You Shouldn't Use C-Style Variable-Length Argument Lists
371(1)
Preprocessor Macros
371(1)
Summary
372(1)
Chapter 12 Writing Generic Code With Templates
373(36)
Overview of Templates
374(1)
Class Templates
375(25)
Writing a Class Template
375(8)
Coding without Templates
375(3)
A Template Grid Class
378(4)
Using the Grid Template
382(1)
Angle Brackets
383(1)
How the Compiler Processes Templates
383(1)
Selective Instantiation
384(1)
Template Requirements on Types
384(1)
Distributing Template Code between Files
384(2)
Template Definitions in Header Files
384(1)
Template Definitions in Source Files
385(1)
Template Parameters
386(5)
Non-type Template Parameters
387(2)
Default Values for Type Parameters
389(1)
Template Parameter Deduction for Constructors
389(2)
Method Templates
391(4)
Method Templates with Non-type Parameters
393(2)
Class Template Specialization
395(2)
Deriving from Class Templates
397(2)
Inheritance versus Specialization
399(1)
Alias Templates
399(1)
Function Templates
400(7)
Function Template Specialization
401(1)
Function Template Overloading
402(1)
Function Template Overloading and Specialization Together
403(1)
Friend Function Templates of Class Templates
403(1)
More on Template Parameter Deduction
404(1)
Return Type of Function Templates
405(2)
Variable Templates
407(1)
Summary
407(2)
Chapter 13 Demystifying C++ I/O
409(24)
Using Streams
410(15)
What Is a Stream, Anyway?
410(1)
Stream Sources and Destinations
411(1)
Output with Streams
411(6)
Output Basics
412(1)
Methods of Output Streams
412(2)
Handling Output Errors
414(1)
Output Manipulators
415(2)
Input with Streams
417(6)
Input Basics
417(1)
Handling Input Errors
418(1)
Input Methods
419(4)
Input Manipulators
423(1)
Input and Output with Objects
423(2)
String Streams
425(1)
File Streams
426(5)
Text Mode versus Binary Mode
427(1)
Jumping around with seek() and tell()
428(2)
Linking Streams Together
430(1)
Bidirectional I/O
431(1)
Summary
432(1)
Chapter 14 Handling Errors
433(40)
Errors and Exceptions
434(2)
What Are Exceptions, Anyway?
434(1)
Why Exceptions in C++ Are a Good Thing
434(2)
Recommendation
436(1)
Exception Mechanics
436(10)
Throwing and Catching Exceptions
437(2)
Exception Types
439(1)
Catching Exception Objects by const Reference
440(1)
Throwing and Catching Multiple Exceptions
441(3)
Matching and const
443(1)
Matching Any Exception
443(1)
Uncaught Exceptions
444(1)
noexcept
445(1)
Throw Lists (Deprecated/Removed)
446(1)
Exceptions and Polymorphism
446(8)
The Standard Exception Hierarchy
446(2)
Catching Exceptions in a Class Hierarchy
448(1)
Writing Your Own Exception Classes
449(3)
Nested Exceptions
452(2)
Rethrowing Exceptions
454(2)
Stack Unwinding and Cleanup
456(3)
Use Smart Pointers
457(1)
Catch, Cleanup, and Rethrow
458(1)
Common Error-Handling Issues
459(9)
Memory Allocation Errors
459(3)
Non-throwing new
460(1)
Customizing Memory Allocation Failure Behavior
460(2)
Errors in Constructors
462(2)
Function-Try-Blocks for Constructors
464(3)
Errors in Destructors
467(1)
Putting It All Together
468(4)
Summary
472(1)
Chapter 15 Overloading C++ Operators
473(34)
Overview of Operator Overloading
474(9)
Why Overload Operators?
474(1)
Limitations to Operator Overloading
474(1)
Choices in Operator Overloading
475(2)
Method or Global Function
475(1)
Choosing Argument Types
476(1)
Choosing Return Types
477(1)
Choosing Behavior
477(1)
Operators You Shouldn't Overload
477(1)
Summary of Overloadable Operators
478(3)
Rvalue References
481(1)
Relational Operators
482(1)
Overloading the Arithmetic Operators
483(1)
Overloading Unary Minus and Unary Plus
483(1)
Overloading Increment and Decrement
483(1)
Overloading the Bitwise and Binary Logical Operators
484(1)
Overloading the Insertion and Extraction Operators
485(1)
Overloading the Subscripting Operator
486(5)
Providing Read-Only Access with operator[ ]
489(1)
Non-integral Array Indices
490(1)
Overloading the Function Call Operator
491(1)
Overloading the Dereferencing Operators
492(4)
Implementing operator*
494(1)
Implementing operator->
494(1)
What in the World Are operator.* and operator->*?
495(1)
Writing Conversion Operators
496(4)
Solving Ambiguity Problems with Explicit Conversion Operators
497(1)
Conversions for Boolean Expressions
498(2)
Overloading the Memory Allocation and Deallocation Operators
500(6)
How new and delete Really Work
500(1)
The New-Expression and operator new
501(1)
The Delete-Expression and operator delete
501(1)
Overloading operator new and operator delete
501(3)
Explicitly Deleting/Defaulting operator new and operator delete
504 (1)
Overloading operator new and operator delete with Extra Parameters
504(1)
Overloading operator delete with Size of Memory as Parameter
505(1)
Summary
506(1)
Chapter 16 Overview Of The C++ Standard Library
507(28)
Coding Principles
508(1)
Use of Templates
508(1)
Use of Operator Overloading
509(1)
Overview of the C++ Standard Library
509(24)
Strings
509(1)
Regular Expressions
510(1)
I/O Streams
510(1)
Smart Pointers
510(1)
Exceptions
510(1)
Mathematical Utilities
511(1)
Time Utilities
512(1)
Random Numbers
512(1)
Initializer Lists
512(1)
Pair and Tuple
512(1)
optional, variant, and any
512(1)
Function Objects
513(1)
Filesystem
513(1)
Multithreading
513(1)
Type Traits
513(1)
Standard Integer Types
514(1)
Containers
514(8)
vector
514(1)
list
515(1)
forward_list
515(1)
deque
516(1)
array
516(1)
queue
516(1)
priority_queue
516(1)
stack
517(1)
set and multiset
517(1)
map and multimap
518(1)
Unordered Associative Containers/Hash Tables
518(1)
bitset
519(1)
Summary of Standard Library Containers
519(3)
Algorithms
522(10)
Non-modifying Sequence Algorithms
523(2)
Modifying Sequence Algorithms
525(2)
Operational Algorithms
527(1)
Swap and Exchange Algorithms
527(1)
Partition Algorithms
527(1)
Sorting Algorithms
528(1)
Binary Search Algorithms
529(1)
Set Algorithms
529(1)
Heap Algorithms
529(1)
Minimum/Maximum Algorithms
530(1)
Numerical Processing Algorithms
530(2)
Permutation Algorithms
532(1)
Choosing an Algorithm
532(1)
What's Missing from the Standard Library
532(1)
Summary
533(2)
Chapter 17 Understanding Containers And Iterators
535(72)
Containers Overview
536(6)
Requirements on Elements
537(2)
Exceptions and Error Checking
539(1)
Iterators
539(3)
Sequential Containers
542(27)
vector
542(19)
vector Overview
542(2)
vector Details
544(12)
vector Example: A Round-Robin Class
556(5)
The vector<bool> Specialization
561(1)
deque
562(1)
list
562(4)
Accessing Elements
562(1)
Iterators
562(1)
Adding and Removing Elements
563(1)
list Size
563(1)
Special list Operations
563(2)
list Example: Determining Enrollment
565(1)
forward_list
566(2)
array
568(1)
Container Adaptors
569(7)
queue
570(2)
queue Operations
570(1)
queue Example: A Network Packet Buffer
570(2)
priority_queue
572(3)
priority_queue Operations
573(1)
priority_queue Example: An Error Correlator
573(2)
stack
575(1)
stack Operations
575(1)
stack Example: Revised Error Correlator
575(1)
Ordered Associative Containers
576(15)
The pair Utility Class
576(1)
map
577(8)
Constructing maps
577(1)
Inserting Elements
578(2)
map Iterators
580(1)
Looking Up Elements
581(1)
Removing Elements
582(1)
Nodes
582(1)
map Example: Bank Account
583(2)
multimap
585(4)
multimap Example: Buddy Lists
586(3)
set
589(1)
set Example: Access Control List
589(1)
multiset
590(1)
Unordered Associative Containers or Hash Tables
591(7)
Hash Functions
591(2)
unordered_map
593(4)
unordered_map Example: Phone Book
596(1)
unordered_multimap
597(1)
unordered_set/unordered_multiset
598(1)
Other Containers
598(7)
Standard C-Style Arrays
598(1)
Strings
599(1)
Streams
600(1)
bitset
600(8)
bitset Basics
600(1)
Bitwise Operators
601(1)
bitset Example: Representing Cable Channels
601(4)
Summary
605(2)
Chapter 18 Mastering Standard Library Algorithms
607(56)
Overview of Algorithms
608(4)
The find and find_if Algorithms
608(3)
The accumulate Algorithm
611(1)
Move Semantics with Algorithms
612(1)
std::function
612(2)
Lambda Expressions
614(6)
Syntax
614(3)
Generic Lambda Expressions
617(1)
Lambda Capture Expressions
618(1)
Lambda Expressions as Return Type
618(1)
Lambda Expressions as Parameters
619(1)
Examples with Standard Library Algorithms
619(1)
count_if
619(1)
generate
620(1)
Function Objects
620(10)
Arithmetic Function Objects
621(1)
Transparent Operator Functors
622(1)
Comparison Function Objects
622(1)
Logical Function Objects
623(1)
Bitwise Function Objects
624(1)
Adaptor Function Objects
624(5)
Binders
624(2)
Negators
626(2)
Calling Member Functions
628(1)
Invokers
629(1)
Writing Your Own Function Objects
629(1)
Algorithm Details
630(27)
Iterators
631(1)
Non-modifying Sequence Algorithms
631(5)
Search Algorithms
631(2)
Specialized Searchers
633(1)
Comparison Algorithms
634(2)
Counting Algorithms
636(1)
Modifying Sequence Algorithms
636(8)
transform
637(1)
copy
638(2)
move
640(1)
replace
641(1)
remove
641(2)
unique
643(1)
sample
643(1)
reverse
644(1)
shuffle
644(1)
Operational Algorithms
644(2)
for_each
644(2)
for_each_n
646(1)
Swap and Exchange Algorithms
646(1)
swap
646(1)
exchange
647(1)
Partition Algorithms
647(2)
Sorting Algorithms
649(1)
Binary Search Algorithms
649(1)
Set Algorithms
650(3)
Minimum/Maximum Algorithms
653(2)
Parallel Algorithms
655(1)
Numerical Processing Algorithms
655(2)
inner_product
656(1)
iota
656(1)
gcd and lcm
656(1)
reduce
656(1)
transform_reduce
657(1)
Scan Algorithms
657(1)
Algorithms Example: Auditing Voter Registrations
657(4)
The Voter Registration Audit Problem Statement
658(1)
The auditVoterRolls Function
658(1)
The getDuplicates Function
659(1)
Testing the auditVoterRolls Function
660(1)
Summary
661(2)
Chapter 19 String Localization And Regular Expressions
663(28)
Localization
663(8)
Localizing String Literals
664(1)
Wide Characters
664(1)
Non-Western Character Sets
665(2)
Conversions
667(1)
Locales and Facets
668(3)
Using Locales
668(1)
Character Classification
669(1)
Character Conversion
670(1)
Using Facets
670(1)
Regular Expressions
671(19)
ECMAScript Syntax
672(6)
Anchors
673(1)
Wildcards
673(1)
Alternation
673(1)
Grouping
673(1)
Repetition
673(1)
Precedence
674(1)
Character Set Matches
674(2)
Word Boundaries
676(1)
Back References
677(1)
Lookahead
677(1)
Regular Expressions and Raw String Literals
677(1)
The regex Library
678(1)
regex_match()
679(3)
regex_match() Example
680(2)
regex_search()
682(1)
regex_search() Example
683(1)
regex_iterator
683(2)
regex_iterator Example
684(1)
regex_token_iterator
685(2)
regex_token_iterator Examples
685(2)
regex_replace()
687(7)
regex_replace() Examples
688(2)
Summary
690(1)
Chapter 20 Additional Library Utilities
691(36)
Ratios
691(3)
The Chrono Library
694(8)
Duration
694(4)
Clock
698(2)
Time Point
700(2)
Random Number Generation
702(9)
Random Number Engines
703(2)
Random Number Engine Adaptors
705(1)
Predefined Engines and Engine Adaptors
705(1)
Generating Random Numbers
706(2)
Random Number Distributions
708(3)
optional
711(1)
variant
712(1)
any
713(1)
Tuples
714(6)
Decompose Tuples
717(1)
Structured Bindings
717(1)
tie
717(1)
Concatenation
718(1)
Comparisons
718(1)
make_from_tuple
719(1)
apply
719(1)
Filesystem Support Library
720(3)
Path
720(1)
Directory Entry
721(1)
Helper Functions
721(1)
Directory Iteration
722(1)
Summary
723(4)
Part IV: Mastering Advanced Features Of C++
Chapter 21 Customizing And Extending The Standard Library
727(48)
Allocators
728(1)
Stream Iterators
729(1)
Output Stream Iterator
729(1)
Input Stream Iterator
730(1)
Iterator Adaptors
730(5)
Reverse Iterators
730(1)
Insert Iterators
731(2)
Move Iterators
733(2)
Extending the Standard Library
735(38)
Why Extend the Standard Library?
735(1)
Writing a Standard Library Algorithm
735(2)
find_a110
735(2)
Iterator Traits
737(1)
Writing a Standard Library Container
737(39)
A Basic Hash Map
738(9)
Making hash_map a Standard Library Container
747(13)
Note on Allocators
760(1)
Note on Reversible Containers
760(1)
Making hash_map an Unordered Associative Container
760(13)
Note on Sequential Containers
773(1)
Summary
773(2)
Chapter 22 Advanced Templates
775(38)
More about Template Parameters
776(6)
More about Template Type Parameters
776(2)
Introducing Template Template Parameters
778(2)
More about Non-type Template Parameters
780(2)
Class Template Partial Specialization
782(4)
Emulating Function Partial Specialization with Overloading
786(1)
Template Recursion
787(5)
An N-Dimensional Grid: First Attempt
788(1)
A Real N-Dimensional Grid
789(3)
Variadic Templates
792(5)
Type-Safe Variable-Length Argument Lists
792(3)
Variable Number of Mixin Classes
795(1)
Folding Expressions
796(1)
Metaprogramming
797(15)
Factorial at Compile Time
798(1)
Loop Unrolling
799(1)
Printing Tuples
800(3)
constexpr if
802(1)
Using a Compile-Time Integer Sequence with Folding
803(1)
Type Traits
803(8)
Using Type Categories
805(2)
Using Type Relations
807(1)
Using enable_if
808(2)
Using constexpr if to Simplify enable_if Constructs
810(1)
Logical Operator Traits
811(1)
Metaprogramming Conclusion
811(1)
Summary
812(1)
Chapter 23 Multithreaded Programming With C++
813(46)
Introduction
814(5)
Race Conditions
815(2)
Tearing
817(1)
Deadlocks
817(1)
False-Sharing
818(1)
Threads
819(8)
Thread with Function Pointer
819(1)
Thread with Function Object
820(2)
Thread with Lambda
822(1)
Thread with Member Function
823(1)
Thread Local Storage
823(1)
Cancelling Threads
824(1)
Retrieving Results from Threads
824(1)
Copying and Rethrowing Exceptions
824(3)
Atomic Operations Library
827(4)
Atomic Type Example
828(2)
Atomic Operations
830(1)
Mutual Exclusion
831(9)
Mutex Classes
831(2)
Non-timed Mutex Classes
832(1)
Timed Mutex Classes
832(1)
Locks
833(3)
lock_guard
833(1)
unique_lock
834(1)
shared_lock
835(1)
Acquiring Multiple Locks at Once
835(1)
scoped_lock
835(1)
std::call_once
836(1)
Examples Using Mutual Exclusion Objects
837(3)
Thread-Safe Writing to Streams
837(1)
Using Timed Locks
838(1)
Double-Checked Locking
839(1)
Condition Variables
840(3)
Spurious Wake-Ups
841(1)
Using Condition Variables
841(2)
Futures
843(5)
std::promise and std::future
843(1)
std::packaged_task
844(1)
std::async
845(1)
Exception Handling
846(1)
std::shared future
847(1)
Example: Multithreaded Logger Class
848(5)
Thread Pools
853(1)
Threading Design and Best Practices
853(2)
Summary
855(4)
Part V: C++ Software Engineering
Chapter 24 Maximizing Software Engineering Methods
859(22)
The Need for Process
860(1)
Software Life Cycle Models
861(6)
The Waterfall Model
861(2)
Benefits of the Waterfall Model
862(1)
Drawbacks of the Waterfall Model
862(1)
Sashimi Model
863(1)
Spiral-Like Models
863(3)
Benefits of a Spiral-Like Model
864(2)
Drawbacks of a Spiral-Like Model
866(1)
Agile
866(1)
Software Engineering Methodologies
867(10)
The Unified Process
867(1)
The Rational Unified Process
868(1)
RUP as a Product
868(1)
RUP as a Process
869(1)
RUP in Practice
869(1)
Scrum
869(3)
Roles
870(1)
The Process
870(1)
Benefits of Scrum
871(1)
Drawbacks of Scrum
872(1)
Extreme Programming
872(4)
XP in Theory
872(4)
XP in Practice
876(1)
Software Triage
876(1)
Building Your Own Process and Methodology
877(1)
Be Open to New Ideas
877(1)
Bring New Ideas to the Table
877(1)
Recognize What Works and What Doesn't Work
877(1)
Don't Be a Renegade
878(1)
Source Code Control
878(2)
Summary
880(1)
Chapter 25 Writing Efficient C++
881(28)
Overview of Performance and Efficiency
882(1)
Two Approaches to Efficiency
882(1)
Two Kinds of Programs
882(1)
Is C++ an Inefficient Language?
882(1)
Language-Level Efficiency
883(6)
Handle Objects Efficiently
884(4)
Pass-by-Reference
884(2)
Return-by-Reference
886(1)
Catch Exceptions by Reference
886(1)
Use Move Semantics
886(1)
Avoid Creating Temporary Objects
886(1)
The Return-Value Optimization
887(1)
Pre-allocate Memory
888(1)
Use Inline Methods and Functions
888(1)
Design-Level Efficiency
889(5)
Cache Where Necessary
889(1)
Use Object Pools
890(4)
An Object Pool Implementation
891(2)
Using the Object Pool
893(1)
Profiling
894(13)
Profiling Example with gprof
895(7)
First Design Attempt
895(3)
Profiling the First Design Attempt
898(2)
Second Design Attempt
900(1)
Profiling the Second Design Attempt
901(1)
Profiling Example with Visual C++ 2017
902(5)
Summary
907(2)
Chapter 26 Becoming Adept At Testing
909(24)
Quality Control
910(3)
Whose Responsibility Is Testing?
910(1)
The Life Cycle of a Bug
910(2)
Bug-Tracking Tools
912(1)
Unit Testing
913(14)
Approaches to Unit Testing
914(1)
The Unit Testing Process
915(4)
Define the Granularity of Your Tests
915(2)
Brainstorm the Individual Tests
917(1)
Create Sample Data and Results
918(1)
Write the Tests
918(1)
Run the Tests
919(1)
Unit Testing in Action
919(8)
Introducing the Microsoft Visual C++ Testing Framework
920(1)
Writing the First Test
921(1)
Building and Running Tests
922(1)
Negative Tests
923(1)
Adding the Real Tests
923(4)
Debugging Tests
927(1)
Basking in the Glorious Light of Unit Test Results
927(1)
Higher-Level Testing
927(3)
Integration Tests
928(1)
Sample Integration Tests
928(1)
Methods of Integration Testing
929(1)
System Tests
929(1)
Regression Tests
930(1)
Tips for Successful Testing
930(1)
Summary
931(2)
Chapter 27 Conquering Debugging
933(38)
The Fundamental Law of Debugging
934(1)
Bug Taxonomies
934(1)
Avoiding Bugs
934(1)
Planning for Bugs
935(12)
Error Logging
935(2)
Debug Traces
937(8)
Debug Mode
937(5)
Ring Buffers
942(3)
Assertions
945(1)
Crash Dumps
946(1)
Static Assertions
947(1)
Debugging Techniques
948(21)
Reproducing Bugs
948(1)
Debugging Reproducible Bugs
949(1)
Debugging Nonreproducible Bugs
950(1)
Debugging Regressions
951(1)
Debugging Memory Problems
951(5)
Categories of Memory Errors
952(2)
Tips for Debugging Memory Errors
954(2)
Debugging Multithreaded Programs
956(1)
Debugging Example: Article Citations
957(12)
Buggy Implementation of an ArticleCitations Class
957(3)
Testing the ArticleCitations class
960(9)
Lessons from the ArticleCitations Example
969(1)
Summary
969(2)
Chapter 28 Incorporating Design Techniques And Frameworks
971(20)
"I Can Never Remember How to..."
972(7)
...Write a Class
972(2)
...Derive from an Existing Class
974(1)
...Use the Copy-and-Swap Idiom
975(1)
...Throw and Catch Exceptions
976(1)
...Read from a File
976(1)
...Write to a File
977(1)
...Write a Template Class
977(2)
There Must Be a Better Way
979(9)
Resource Acquisition Is Initialization
979(2)
Double Dispatch
981(4)
Attempt #1: Brute Force
982(1)
Attempt #2: Single Polymorphism with Overloading
983(1)
Attempt #3: Double Dispatch
984(1)
Mixin Classes
985(3)
Designing a Mixin Class
986(1)
Implementing a Mixin Class
987(1)
Using a Mixin Class
988(1)
Object-Oriented Frameworks
988(2)
Working with Frameworks
988(1)
The Model-View-Controller Paradigm
989(1)
Summary
990(1)
Chapter 29 Applying Design Patterns
991(26)
The Iterator Pattern
992(1)
The Singleton Pattern
993(4)
Example: A Logging Mechanism
993(1)
Implementation of a Singleton
994(3)
Using a Singleton
997(1)
The Abstract Factory Pattern
997(7)
Example: A Car Factory Simulation
998(1)
Implementation of a Factory
999(3)
Using a Factory
1002(1)
Other Uses of Factories
1003(1)
The Proxy Pattern
1004(2)
Example: Hiding Network Connectivity Issues
1004(1)
Implementation of a Proxy
1004(1)
Using a Proxy
1005(1)
The Adaptor Pattern
1006(2)
Example: Adapting a Logger Class
1006(1)
Implementation of an Adaptor
1007(1)
Using an Adaptor
1008(1)
The Decorator Pattern
1008(2)
Example: Defining Styles in Web Pages
1008(1)
Implementation of a Decorator
1009(1)
Using a Decorator
1010(1)
The Chain of Responsibility Pattern
1010(4)
Example: Event Handling
1011(1)
Implementation of a Chain of Responsibility
1011(1)
Chain of Responsibility without Hierarchy
1012(2)
The Observer Pattern
1014(2)
Implementation of an Observer
1014(1)
Implementation of an Observable
1015(1)
Using an Observer
1016(1)
Summary
1016(1)
Chapter 30 Developing Cross-Platform And Cross-Language Applications
1017
Cross-Platform Development
1018(6)
Architecture Issues
1018(3)
Size of Integers
1018(1)
Binary Compatibility
1019(1)
Address Sizes
1020(1)
Byte Order
1020(1)
Implementation Issues
1021(1)
Compiler Quirks and Extensions
1021(1)
Library Implementations
1022(1)
Platform Specific Features
1022(2)
Cross-Language Development
1024(14)
Mixing C and C++
1024(1)
Shifting Paradigms
1024(4)
Linking with C Code
1028(2)
Calling C++ Code from C#
1030(1)
Calling C++ Code from Java with JNI
1031(2)
Calling Scripts from C++ Code
1033(1)
Calling C++ Code from Scripts
1034(2)
A Practical Example: Encrypting Passwords
1034(2)
Calling Assembly Code from C++
1036(2)
Summary
1038(1)
Appendix A: C++ Interviews 1039(24)
Appendix B: Annotated Bibliography 1063(12)
Appendix C: Standard Library Header Files 1075(8)
Appendix D: Introduction To UML 1083(4)
Index 1087
9781119390640
Introduction xxix
Part I: Introduction to Windows Security Monitoring 1(10)
Chapter 1 Windows Security Logging and Monitoring Policy
3(8)
Security Logging
3(4)
Security Logs
4(3)
System Requirements
5(1)
PII and PHI
5(1)
Availability and Protection
5(1)
Configuration Changes
6(1)
Secure Storage
6(1)
Centralized Collection
6(1)
Backup and Retention
7(1)
Periodic Review
7(1)
Security Monitoring
7(6)
Communications
8(1)
Audit Tool and Technologies
8(1)
Network Intrusion Detection Systems
8(1)
Host-based Intrusion Detection Systems
8(1)
System Reviews
9(1)
Reporting
9(2)
Part II: Windows Auditing Subsystem 11(70)
Chapter 2 Auditing Subsystem Architecture
13(34)
Legacy Auditing Settings
13(9)
Advanced Auditing Settings
16(2)
Set Advanced Audit Settings via Local Group Policy
18(1)
Set Advanced Audit Settings via Domain Group Policy
19(1)
Set Advanced Audit Settings in the Local Security Authority (LSA) Policy Database
19(1)
Read Current LSA Policy Database Advanced Audit Policy Settings
20(1)
Advanced Audit Policies Enforcement and Legacy Policies Rollback
20(2)
Switch from Advanced Audit Settings to Legacy Settings
21(1)
Switch from Legacy Audit Settings to Advanced Settings
22(1)
Windows Auditing Group Policy Settings
22(11)
Manage Auditing and Security Log
22(1)
Generate Security Audits
23(1)
Security Auditing Policy Security Descriptor
23(1)
Group Policy: "Audit: Shut Down System Immediately If Unable to Log Security Audits"
24(1)
Group Policy: Protected Event Logging
25(1)
Group Policy: "Audit: Audit the Use of Backup and Restore Privilege"
25(1)
Group Policy: "Audit: Audit the Access of Global System Objects"
26(1)
Audit the Access of Global System Container Objects
26(1)
Windows Event Log Service: Security Event Log Settings
27(6)
Changing the Maximum Security Event Log File Size
28(1)
Group Policy: Control Event Log Behavior When the Log File Reaches Its Maximum Size
29(1)
Group Policy: Back Up Log Automatically When Full
29(1)
Group Policy: Control the Location of the Log File
30(1)
Security Event Log Security Descriptor
31(2)
Guest and Anonymous Access to the Security Event Log
33(1)
Windows Auditing Architecture
33(5)
Windows Auditing Policy Flow
34(2)
LsaSetlnformationPolicy and LsaQuerylnformationPolicy Functions Route
35(1)
Windows Auditing Event Flow
36(11)
LSASS.EXE Security Event Flow
37(1)
NTOSKRNL.EXE Security Event Flow
37(1)
Security Event Structure
38(9)
Chapter 3 Auditing Subcategories and Recommendations
47(34)
Account Logon
47(7)
Audit Credential Validation
47(3)
Audit Kerberos Authentication Service
50(3)
Audit Kerberos Service Ticket Operations
53(1)
Audit Other Account Logon Events
54(1)
Account Management
54(4)
Audit Application Group Management
54(1)
Audit Computer Account Management
54(1)
Audit Distribution Group Management
55(1)
Audit Other Account Management Events
56(1)
Audit Security Group Management
57(1)
Audit User Account Management
57(1)
Detailed Tracking
58(2)
Audit DPAPI Activity
58(1)
Audit PNP Activity
58(1)
Audit Process Creation
58(1)
Audit Process Termination
59(1)
Audit RPC Events
59(1)
DS Access
60(1)
Audit Detailed Directory Service Replication
60(1)
Audit Directory Service Access
60(1)
Audit Directory Service Changes
61(1)
Audit Directory Service Replication
61(1)
Logon and Logoff
61(5)
Audit Account Lockout
61(1)
Audit User/Device Claims
62(1)
Audit Group Membership
62(1)
Audit IPsec Extended Mode/Audit IPsec Main Mode/Audit IPsec Quick Mode
63(1)
Audit Logoff
63(1)
Audit Logon
64(1)
Audit Network Policy Server
65(1)
Audit Other Logon/Logoff Events
65(1)
Audit Special Logon
66(1)
Object Access
66(7)
Audit Application Generated
67(1)
Audit Certification Services
67(1)
Audit Detailed File Share
67(1)
Audit File Share
67(1)
Audit File System
68(1)
Audit Filtering Platform Connection
68(1)
Audit Filtering Platform Packet Drop
69(1)
Audit Handle Manipulation
69(1)
Audit Kernel Object
70(1)
Audit Other Object Access Events
71(1)
Audit Registry
71(1)
Audit Removable Storage
72(1)
Audit SAM
72(1)
Audit Central Policy Staging
73(1)
Policy Change
73(3)
Audit Policy Change
73(1)
Audit Authentication Policy Change
74(1)
Audit Authorization Policy Change
74(1)
Audit Filtering Platform Policy Change
75(1)
Audit MPSSVC Rule-Level Policy Change
75(1)
Audit Other Policy Change Events
75(1)
Privilege Use
76(1)
Audit Non Sensitive Privilege Use
76(1)
Audit Other Privilege Use Events
77(1)
Audit Sensitive Privilege Use
77(1)
System
77(6)
Audit IPsec Driver
78(1)
Audit Other System Events
78(1)
Audit Security State Change
78(1)
Audit Security System Extension
79(1)
Audit System Integrity
79(2)
Part III: Security Monitoring Scenarios 81(504)
Chapter 4 Account Logon
83(58)
Interactive Logon
85(27)
Successful Local User Account Interactive Logon
85(21)
Step 1: Winlogon Process Initialization
85(2)
Step 1: LSASS Initialization
87(1)
Step 2: Local System Account Logon
88(4)
Step 3: ALPC Communications between Winlogon
and LSASS
92(1)
Step 4: Secure Desktop and SAS
92(1)
Step 5: Authentication Data Gathering
92(2)
Step 6: Send Credentials from Winlogon to LSASS
94(1)
Step 7: LSA Server Credentials Flow
95(1)
Step 8: Local User Scenario
96(3)
Step 9: Local User Logon: MSV1_0 Answer
99(5)
Step 10: User Logon Rights Verification
104(1)
Step 11: Security Token Generation
105(1)
Step 12: SSPI Call
105(1)
Step 13: LSASS Replies to Winlogon
105(1)
Step 14: Userinit and Explorer.exe
105(1)
Unsuccessful Local User Account Interactive Logon
106(6)
Successful Domain User Account Interactive Logon
110(1)
Steps 1-7: User Logon Process
110(1)
Step 8: Authentication Package Negotiation
110(1)
Step 9: LSA Cache
111(1)
Step 10: Credentials Validation on the Domain Controller
112(1)
Steps 11-16: Logon Process
112(1)
Unsuccessful Domain User Account Interactive Logon
112(1)
RemoteInteractive Logon
112(6)
Successful User Account RemoteInteractive Logon
112(2)
Successful User Account RemoteInteractive Logon Using Cached Credentials
114(1)
Unsuccessful User Account RemoteInteractive Logon-NLA Enabled
115(2)
Unsuccessful User Account RemoteInteractive Logon-NLA Disabled
117(1)
Network Logon
118(5)
Successful User Account Network Logon
118(2)
Unsuccessful User Account Network Logon
120(3)
Unsuccessful User Account Network Logon-NTLM
121(1)
Unsuccessful User Account Network Logon-Kerberos
122(1)
Batch and Service Logon
123(4)
Successful Service/Batch Logon
123(2)
Unsuccessful Service/Batch Logon
125(2)
NetworkCleartext Logon
127(2)
Successful User Account NetworkCleartext Logon -IIS Basic Authentication
127(2)
Unsuccessful User Account NetworkCleartext Logon -IIS Basic Authentication
129(1)
NewCredentials Logon
129(4)
Interactive and RemoteInteractive Session Lock Operations and Unlock Logon Type
132(1)
Account Logoff and Session Disconnect
133(2)
Terminal Session Disconnect
134(1)
Special Groups
135(1)
Anonymous Logon
136(5)
Default ANONYMOUS LOGON Logon Session
136(2)
Explicit Use of Anonymous Credentials
138(1)
Use of Account That Has No Network Credentials
139(1)
Computer Account Activity from Non-Domain-Joined Machine
139(1)
Allow Local System to Use Computer Identity for NTLM
140(1)
Chapter 5 Local User Accounts
141(60)
Built-in Local User Accounts
142(4)
Administrator
142(2)
Guest
144(1)
Custom User Account
145(1)
HomeGroupUser$
145(1)
DefaultAccount
146(1)
Built-in Local User Accounts Monitoring Scenarios
146(55)
New Local User Account Creation
146(22)
Successful Local User Account Creation
147(17)
Unsuccessful Local User Account Creation: Access Denied
164(1)
Unsuccessful Local User Account Creation: Other
165(1)
Monitoring Scenarios: Local User Account Creation
166(2)
Local User Account Deletion
168(9)
Successful Local User Account Deletion
169(4)
Unsuccessful Local User Account Deletion-Access Denied
173(2)
Unsuccessful Local User Account Deletion-Other
175(1)
Monitoring Scenarios: Local User Account Deletion
176(1)
Local User Account Password Modification
177(7)
Successful Local User Account Password Reset
178(1)
Unsuccessful Local User Account Password Reset-Access Denied
179(1)
Unsuccessful Local User Account Password Reset-Other
180(1)
Monitoring Scenarios: Password Reset
181(1)
Successful Local User Account Password Change
182(1)
Unsuccessful Local User Account Password Change
183(1)
Monitoring Scenarios: Password Change
184(1)
Local User Account Enabled/Disabled
184(3)
Local User Account Was Enabled
184(2)
Local User Account Was Disabled
186(1)
Monitoring Scenarios: Account Enabled/Disabled
186(1)
Local User Account Lockout Events
187(4)
Local User Account Lockout
188(1)
Local User Account Unlock
190(1)
Monitoring Scenarios: Account Enabled/Disabled
191(1)
Local User Account Change Events
191(12)
Local User Account Change Event
192(4)
Local User Account Name Change Event
196(2)
Monitoring Scenarios: Account Changes
198(1)
Blank Password Existence Validation
199(2)
Chapter 6 Local Security Groups
201(36)
Built-in Local Security Groups
203(8)
Access Control Assistance Operators
205(1)
Administrators
205(1)
Backup Operators
205(1)
Certificate Service DCOM Access
205(1)
Cryptographic Operators
205(1)
Distributed COM Users
206(1)
Event Log Readers
207(1)
Guests
207(1)
Hyper-V Administrators
207(1)
IIS JUSRS
208(1)
Network Configuration Operators
208(1)
Performance Log Users
209(1)
Performance Monitor Users
209(1)
Power Users
209(1)
Print Operators
209(1)
Remote Desktop Users
209(1)
Remote Management Users
210(1)
Replicator
210(1)
Storage Replica Administrators
210(1)
System Managed Accounts Group
210(1)
Users
210(1)
WinRMRemoteWMIUsers
211(1)
Built-in Local Security Groups Monitoring Scenarios
211(26)
Local Security Group Creation
212(6)
Successful Local Security Group Creation
212(5)
Unsuccessful Local Security Group Creation-Access Denied
217(1)
Monitoring Scenarios: Local Security Group Creation
218(1)
Local Security Group Deletion
218(5)
Successful Local Security Group Deletion
219(2)
Unsuccessful Local Security Group Deletion-Access Denied
221(1)
Unsuccessful Local Security Group Deletion-Other
222(1)
Monitoring Scenarios: Local Security Group Deletion
223(1)
Local Security Group Change
223(4)
Successful Local Security Group Change
224(2)
Unsuccessful Local Security Group Change-Access Denied
226(1)
Monitoring Scenarios: Local Security Group Change
227(1)
Local Security Group Membership Operations
227(7)
Successful New Local Group Member Add Operation
228(3)
Successful Local Group Member Remove Operation
231(1)
Unsuccessful Local Group Member Remove/Add Operation-Access Denied
232(1)
Monitoring Scenarios: Local Security Group Members Changes
233(1)
Local Security Group Membership Enumeration
234(3)
Monitoring Scenarios: Local Security Group Membership Enumeration
235(2)
Chapter 7 Microsoft Active Directory
237(48)
Active Directory Built-in Security Groups
237(6)
Administrators
238(1)
Account Operators
238(1)
Incoming Forest Trust Builders
238(1)
Pre-Windows 2000 Compatible Access
238(1)
Server Operators
239(1)
Terminal Serves License Servers
239(1)
Windows Authorization Access
239(1)
Allowed RODC Password Replication Group
240(1)
Denied RODC Password Replication Group
240(1)
Cert Publishers
240(1)
DnsAdmins
240(1)
RAS and IAS Servers
241(1)
Cloneable Domain Controllers
241(1)
DnsUpdateProxy
241(1)
Domain Admins
241(1)
Domain Computers
241(1)
Domain Controllers
242(1)
Domain Users
242(1)
Group Policy Creator Owners
242(1)
Protected Users
242(1)
Read-Only Domain Controllers
242(1)
Enterprise Read-Only Domain Controllers
242(1)
Enterprise Admins
243(1)
Schema Admins
243(1)
Built-in Active Directory Accounts
243(2)
Administrator
243(1)
Krbtgt
244(1)
Directory Services Restore Mode (DSRM) Account
244(1)
Active Directory Accounts Operations
245(14)
Active Directory User Accounts Operations
245(8)
Successful Active Directory User Creation
245(5)
Unsuccessful Active Directory User Creation
250(1)
Successful Active Directory User Deletion
251(1)
Unsuccessful Active Directory User Deletion
252(1)
Other Active Directory User Account Operations
252(1)
Successful Active Directory User SID History Addition
252(1)
Active Directory Computer Account Operations
253(6)
Successful Computer Account Creation-Joining a Domain
253(2)
Successful Computer Account Creation-Manual Creation
255(1)
Unsuccessful Computer Account Creation
256(1)
Successful Computer Account Deletion
257(1)
Unsuccessful Computer Account Deletion
257(1)
Successful Computer Account Modification
257(2)
Unsuccessful Computer Account Modification
259(1)
Active Directory Group Operations
259(8)
Active Directory Group Creation
260(1)
Active Directory Group Deletion
261(1)
Active Directory Group Modification
262(1)
Active Directory Group New Member Added
263(2)
Active Directory Group Member Removed
265(1)
Group Type and Scope Type Changes
266(1)
Active Directory Trust Operations
267(12)
Active Directory Trust Creation Operations
267(5)
Active Directory Trust Modification Operations
272(1)
Active Directory Trust Deletion Operations
273(1)
Operations with Forest Trust Records
274(5)
Active Directory Forest Trust Record Creation Operations
274(3)
Active Directory Forest Trust Record Modification Operations
277(1)
Active Directory Forest Trust Record Remove Operations
278(1)
Domain Policy Changes
279(3)
Password and Account Lockout Policies
279(1)
Kerberos Policy
280(2)
Account Password Migration
282(3)
Chapter 8 Active Directory Objects
285(38)
Active Directory Object SACL
286(18)
Child Object Creation and Deletion Permissions
291(1)
Extended Rights
292(2)
Validated Writes
294(1)
Properties
295(1)
Default SACLs
296(8)
Active Directory Object Change Auditing
304(9)
Active Directory Object Creation
305(1)
Active Directory Object Deletion
306(1)
Active Directory Object Undeletion
307(2)
Active Directory Object Movement
309(1)
Active Directory Object Modification
310(3)
Add Value Operation
310(3)
Delete Value Operation
313(1)
Active Directory Object Operation Attempts
313(7)
Successful Active Directory Object Operation Attempts
313(5)
Unsuccessful Active Directory Object Operation Attempts
318(2)
Active Directory Objects Auditing Examples
320(3)
Organizational Unit Creation/Deletion
320(1)
Organizational Unit Child Object Creation/Deletion
320(1)
adminCount Attribute Modification for User Accounts
320(1)
Group Policy Link/Unlink Operations
321(2)
Chapter 9 Authentication Protocols
323(44)
NTLM-family Protocols
323(25)
Challenge-Response Basics
323(2)
LAN Manager
325(4)
LM Hash
325(2)
LM Challenge-Response Mechanism
327(2)
NT LAN Manager
329(1)
NTLM Hash
329(1)
NTLM Challenge-Response Mechanism
330(1)
NT LAN Manager V2
330(3)
NTLMv2 Challenge-Response Mechanism
330(3)
NTLMSSP and Anonymous Authentication
333(2)
NTLMv1 Session Security and NTLMv2 Session Security
333(1)
NTLMv2 Session Response
334(1)
Anonymous Authentication
335(1)
NTLM-family Protocols Monitoring
335(13)
Network Security: Restrict NTLM Security Group Policy Settings
335(1)
Local Account Authentication
336(8)
Domain Account Authentication
344(3)
Cross-Domain Challenge-Response
347(1)
Kerberos
348(10)
Ticket-Granting Ticket (TGT)
348(4)
Successful AS_REQ Message
352(2)
Unsuccessful AS_REQ Message-Password Expired, Wrong Password, Smart Card Logon Issues
354(2)
Unsuccessful AS_REQ Message-Other Scenarios
356(1)
TGT Renewal
357(1)
Ticket-Granting Service (TGS) Ticket
358(9)
Successful TGS_REQ Message
362(2)
Unsuccessful TGS_REQ and AP REQ Messages
364(3)
Chapter 10 Operating System Events
367(52)
System Startup/Shutdown
368(4)
Successful Normal System Shutdown
368(2)
Unsuccessful Normal System Shutdown-Access Denied
370(1)
Successful System Startup
371(1)
Monitoring Scenarios: System Startup/Shutdown
371(1)
System Time Changes
372(4)
Successful System Time Zone Change
373(1)
Unsuccessful System Time Zone Change
374(1)
Successful System Clock Settings Change
374(2)
Unsuccessful System Clock Settings Change
376(1)
Monitoring Scenarios: System Time Changes
376(1)
System Services Operations
376(10)
Successful Service Installation-Prior to Windows 10/2016
377(2)
Successful Service Installation-Windows 10/2016
379(1)
Unsuccessful Service Installation-Access Denied
380(2)
System Service State Changes
382(1)
Unsuccessful Service Stop Operation-Access Denied
383(1)
Monitoring Scenarios: System Services Operations
384(2)
Security Event Log Operations
386(2)
Successful Security Event Log Erase Operation
386(1)
Unsuccessful Security Event Log Erase Operation
387(1)
Successful Security Event Log Service Shutdown
387(1)
Unsuccessful Security Event Log Service Shutdown
388(1)
Monitoring Scenarios: Security Event Log Operations
388(1)
Changes in Auditing Subsystem Settings
388(13)
Successful Auditing Subsystem Security Descriptor Change
388(6)
Unsuccessful Auditing Subsystem Security Descriptor Change
394(1)
Successful System Audit Policy Changes
395(5)
Unsuccessful System Audit Policy Changes
400(1)
Monitoring Scenarios: Changes in Auditing Subsystem Settings
400(1)
Per-User Auditing Operations
401(4)
Successful Per-User Auditing Policy Changes
402(2)
Unsuccessful Per-User Auditing Policy Changes
404(1)
Per-User Auditing Database Initialization
404(1)
Monitoring Scenarios: Per-User Auditing Operations
404(1)
Scheduled Tasks
405(8)
Successful Scheduled Task Creation
406(2)
Unsuccessful Scheduled Task Creation-Access Denied
408(2)
Successful Scheduled Task Deletion
410(1)
Unsuccessful Scheduled Task Deletion
410(1)
Successful Scheduled Task Change
410(1)
Unsuccessful Scheduled Task Change
411(1)
Successful Scheduled Task Enable/Disable Operations
411(2)
Monitoring Scenarios: Scheduled Tasks
413(1)
Boot Configuration Data Changes
413(6)
Monitoring Scenarios: Boot Configuration Data
417(2)
Chapter 11 Logon Rights and User Privileges
419(18)
Logon Rights
419(3)
Logon Rights Policy Modification
420(2)
Logon Rights Policy Settings-Member Added
421(1)
Logon Rights Policy Settings-Member Removed
421(1)
Unsuccessful Logons Due to Lack of Logon Rights
422(1)
User Privileges
422(5)
User Privileges Policy Modification
427(2)
User Privileges Policy Settings-Member Added
427(1)
User Privileges Policy Settings-Member Removed
428(1)
Special User Privileges Assigned at Logon Time
429(1)
Logon Session User Privileges Operations
430(5)
Privilege Use
431(6)
Successful Call of a Privileged Service
431(1)
Unsuccessful Call of a Privileged Service
432(1)
Successful Operation with a Privileged Object
433(2)
Unsuccessful Operation with a Privileged Object
435(1)
Backup and Restore Privilege Use Auditing
435(2)
Chapter 12 Windows Applications
437(48)
New Application Installation
437(16)
Application Installation Using Windows Installer
440(3)
Application Removal Using Windows Installer
443(1)
Application Installation Using Other Methods
444(4)
Application Installation-Process Creation
444(1)
Application Installation-Software Registry Keys
445(3)
Application Installation-New Folders in Program Files and Program Files (x86) Folders
448(1)
Application Removal Using Other Methods
448(5)
Application Removal-Process Creation
448(1)
Application Removal-Software Registry Keys
449(2)
Application Removal-Folder Removal in the Program Files and Program Files (x86) Folders
451(2)
Application Execution and Termination
453(11)
Successful Process Creation
455(6)
Successful Process Creation-CreateProcessWithLogonW initiated
460(1)
Unsuccessful Process Creation
461(2)
Process Termination
463(1)
Application Crash Monitoring
464(7)
Windows Error Reporting
467(4)
WER Report
471(1)
Windows AppLocker Auditing
471(9)
AppLocker Policy
471(1)
AppLocker Monitoring
472(8)
EXE and DLL
474(5)
MSI and Script
479(1)
Packaged app-Execution and Packaged app-Deployment
480(1)
Process Permissions and LSASS.exe Access Auditing
480(5)
LSASS's Process Default SACL
482(3)
Chapter 13 Filesystem and Removable Storage
485(38)
Windows Filesystem
486(9)
NTFS Security Descriptors
487(8)
Inheritance
493(1)
SACL
494(1)
File and Folder Operations
495(20)
File/Folder Creation
495(8)
Successful File Creation
495(3)
Unsuccessful File Creation
498(3)
Successful Folder Creation
501(1)
Unsuccessful Folder Creation
502(1)
File/Folder Deletion
503(2)
Successful File Deletion
503(1)
Unsuccessful File Deletion
504(1)
Successful Folder Deletion
504(1)
Unsuccessful Folder Deletion
505(1)
File Content Modification
505(1)
Successful File Content Modification
505(1)
Unsuccessful File Content Modification
506(1)
File Read Data
506(1)
Successful File Read Data Operations
506(1)
Unsuccessful File Read Data Operations
507(1)
File/Folder Attribute Changes
507(1)
Successful File/Folder Attribute Changes
507(1)
Unsuccessful File/Folder Attribute Changes
508(1)
File/Folder Owner Change
508(2)
Successful File/Folder Owner Change
508(1)
Unsuccessful File/Folder Owner Change
509(1)
File/Folder Access Permissions Change
510(1)
Successful Access Permissions Changes
510(1)
Unsuccessful Access Permissions Changes
511(1)
File/Folder SACL Changes
511(6)
Successful Auditing Settings (SACL) Change
511(3)
Unsuccessful Auditing Settings Change
514(1)
Removable Storage
515(1)
Global Object Access Auditing: Filesystem
516(1)
File System Object Integrity Levels
517(3)
File System Object Integrity Level Modification
518(2)
File System Object Access Attempt-Access Denied by Integrity Policy Check
520(1)
Monitoring Recommendations
520(3)
Monitoring Scenarios
521(2)
Chapter 14 Windows Registry
523(36)
Windows Registry Basics
523(5)
Registry Key Permissions
526(2)
Registry Operations Auditing
528(25)
Registry Key Creation
528(4)
Successful Registry Key Creation
528(3)
Unsuccessful Registry Key Creation
531(1)
Registry Key Deletion
532(1)
Successful Registry Key Deletion
532(1)
Unsuccessful Registry Key Deletion
533(1)
Operations with Registry Key Values
533(6)
Successful Registry Value Creation
534(1)
Unsuccessful Registry Key Value Creation
535(1)
Successful Registry Key Value Deletion
536(2)
Unsuccessful Registry Key Value Deletion
538(1)
Successful Registry Key Value Modification
538(1)
Unsuccessful Registry Value Modification
539(1)
Registry Key Read and Enumerate Operations
539(6)
Successful Registry Key Read Operation
539(1)
Unsuccessful Registry Key Read Operation
540(1)
Successful Registry Key Subkeys Enumeration
541(1)
Unsuccessful Registry Key Subkeys Enumeration
542(1)
Successful Registry Key Access Permissions Read
542(1)
Unsuccessful Registry Key Access Permissions Read
543(1)
Successful Registry Key Audit Permissions Read
543(2)
Unsuccessful Registry Key Audit Permissions Read
545(1)
DACL, SACL, and Ownership Change Operations
545(9)
Successful Registry Key Access Permissions Change
546(1)
Unsuccessful Registry Key Access Permissions Change
547(1)
Successful Registry Key Audit Permissions Change
548(3)
Unsuccessful Registry Key Audit Permissions Change
551(1)
Successful Registry Key Owner Change
551(2)
Global Object Access Auditing: Registry
553(1)
Registry Key Integrity Levels
554(2)
Registry Key Integrity Level Modification
554(2)
Monitoring Recommendations
556(3)
Monitoring Scenarios
557(2)
Chapter 15 Network File Shares and Named Pipes
559(26)
Network File Shares
559(18)
Network File Share Access Permissions
563(1)
File Share Creation
564(2)
Successful File Share Creation
564(1)
Monitoring Recommendations
565(1)
File Share Deletion
566(1)
Successful File Share Deletion
566(1)
Unsuccessful File Share Deletion
567(1)
Monitoring Recommendations
567(1)
File Share Modification
567(3)
Successful File Share Modification
568(2)
Unsuccessful File Share Deletion
570(1)
Monitoring Recommendations
570(1)
File Share Access
570(7)
Successful File Share Session Creation
570(2)
Successful File Share File/Folder Operations
572(2)
Unsuccessful Admin File Share Session Creation
574(1)
Unsuccessful File Share Access-File Share Permissions
574(1)
Unsuccessful File Share Access-File System Permissions
575(1)
Monitoring Recommendations
576(1)
Named Pipes
577(8)
Successful Named Pipe Auditing Settings Changes
578(2)
Unsuccessful Named Pipe Auditing Settings Changes
580(1)
Successful Named Pipe Access Permissions Changes
581(1)
Named Pipe Access Attempts
582(1)
IPC$ Share Access Attempts
582(2)
Monitoring Recommendations
584(1)
Appendix A: Kerberos AS_REQ, TGS_REQ, and AP REQ Messages Ticket Options 585(4)
Appendix B: Kerberos AS_REQ, TGS_REQ, and AP REQ Messages Result Codes 589(8)
Appendix C: SDDL Access Rights 597(1)
Object-Specific Access Rights 598(5)
Index 603
About the author

Marc Gregoire is a Microsoft Visual C++ MVP, software engineer and developer, and the founder of the Belgian C++ user group. Having previously completed critical 2G and 3G telecom software for Siemens and Nokia Siemens Networks, he currently works on 3-D laser scanning software for Nikon Metrology. Marc is the author of Profesional C++ second and third editions and technical editor for numerous published works.

Visit us at wrox.com where you have access to free code samples.