C_DEFINES macro, 627, 632
C++ programming for UMDF drivers, 87
callbacks, 54, 75, 93–94
cleanup callbacks, 111, 117
context data and, 123–124
creating callback objects, 106–107
destroy callbacks, 118
I/O event callbacks, 271–291
automatic forwarding, 272–273
for create requests, 273–280, 280–281
file object creation, 271–272
I/O targets (KMDF), 320–321
for read/write and IOCTL requests, 282–291
self-managed, 298
KMDF drivers, 72–73
lifetime of callback objects, 113
per role type (SDV), 837–838
Plug and Play and power management, 171–173, 176–189. See also Plug and Play; power management
serialization, 385
requesting at intervals. See timer objects
serialization, synchronization scope and, 387–398
KMDF drivers, 391–398
UMDF drivers, 390–391
Skeleton sample driver, 481–486
UMDF drivers, 70, 585–586, 611–613
callback interfaces, 96–97
when to implement, 76
WMI instance events, 470–473
calling thread context, 510–511
cancel spin lock, annotations for, 795–796
canceled I/O requests, 56–57, 293–296, 351–352
adaptive time-outs (UMDF), 297
annotations for, 806
request-cancellation rules (KMDF), 850
synchronization of cancellation, 401–409
CancelIoEx function (Windows), 351
CancelSentRequest method (IWDFIoRequest), 351
CancelSentRequestsForFile method (IWDFIoTarget), 351
.cat files, 643, 653–654
categorizing trace messages, 419
CClassFactory class, 480
Channel 9 Web site, 22
checked builds of co-installers, 640
checked builds of drivers, 620, 700
checked builds of Windows, 47
obtaining, 17–18
testing drivers, 668
__checkReturn annotation, 761, 773–774
child devices
child devices, 143, 157–159
enumerating, 143, 157–159
startup and, 180–183
child list objects, 102, 114
creating, 157
deleting, 115, 121
child objects. See hierarchy of WDF objects
ChkINF utility, 671
circular references, 113–114
class factories, 603–606
class IDs (CLSIDs), 592
class relationships (COM), 586
classes on driver development, 22
[ClassInstall32] section, INF files, 644
cleaning up tracing, 429–431
cleanup callbacks, 111, 117
cleanup of objects, defined, 112
cleanup requests (I/O), 224–225, 242
automatic forwarding, 272–273
event callbacks for, 280–281
unbalanced with create requests, 273
Cleanup4CtlDeviceRegistered rule, 848
CLOCK_LEVEL IRQLs, 512
CLOCK2_LEVEL IRQLs, 512
close requests (I/O), 224–225, 242
automatic forwarding, 272–273
event callbacks for, 280–281
unbalanced with create requests, 273
Closed state (I/O targets), 319, 340
CloseHandle function, 224–225
CLSIDs (class IDs), 592
CM_PARTIAL_RESOURCE_DESCRIPTOR structure, 532
CmResourceXxx types, 533, 536
co-installer packages, 14, 640–642
incorrect version errors, 665
INF files and, 646–648
coding errors, detecting. See PREfast for Drivers
coding noise, reducing, 749–752, 815
collection objects, 102, 114, 455–459
deleting, 115
COM (Component Object Model), 583–613
as basis for UMDF, 69, 480–481
callback objects, implementing, 606–613
DLL infrastructure, implementing, 478–480, 600–606
overview of, 586–597
using UMDF COM objects, 597–600
Command window (WinDbg), 700–701
command window, opening with elevated privileges, 15
common-buffer DMA devices, 551, 553, 566
compatibility problems. See serviceability
Complete method (IWDFIoRequest), 292
completed I/O requests, 121
CompleteWithInformation method (IWDFIoRequest), 292, 343
completing I/O requests, 291–293. See also completion routines (I/O)
adaptive time-outs (UMDF), 297
parent objects and, 121
request completion information objects, 98
request completion parameters objects, 98–99
USB targets, 99
completion routines (I/O), 34, 47, 238–239. See also completing I/O requests
DMA drivers, 575–577
for I/O requests, 334–336
CompletionRoutine callback, 391
Comsup.cpp and Comsup.h files, 476
concurrency, 39–41
WDF object hierarchy, 55
conditional driver annotations, 779–783
conditions on trace messages, 418–419
conferences for driver developers, 22
configuration descriptors for USB devices, 356–357
configuration structures for KMDF objects, 107
Configure public helper method, 485
ConfigureRequestDispatching method, 263–264
connecting interrupts, 540
constants as parameters, checking, 788
context areas
for device objects (KMDF), 154
type declaration (KMDF), 127
context, object, 95, 122–128
KMDF drivers, 126–128
UMDF drivers, 122–125
CONTEXT structure (threads), 509
context, thread, 509–511. See also threads
ContextSizeOverride attribute, 108
ContextTypeInfo attribute, 108
contiguous data buffers, 560
continuous reader (USB devices), 375–376
control codes, 226–227
control device objects, 79, 140, 143–144
cleanup rules (KMDF), 848
control GUIDs, 425–427
control requests, 33, 48, 225–226, 242
control codes for, 226–227, 228
event callbacks for, 282–291
formatting for I/O targets, 331–333
internal, 228, 242, 322
formatting for I/O targets, 332–333
synchronous, 337
synchronous, 337
ControlDeviceDeleted rule, 848
ControlDeviceInitAPI rule, 848
converting time values, 461
CopyFromBuffer method (IWDFMemory), 246, 444
CopyFromMemory method (IWDFMemory), 444
CopyToBuffer method (IWDFMemory), 246, 444
core Windows system architecture, 25–27
CPU architecture, selecting, 620
INFs for, 645–646
crash, debugging, 710, 715–716
crash dump analysis, 698, 728
CrateWdfMemory method (IWDFDriver), 327
create requests (I/O), 224, 242
automatic forwarding, 272–273
event callbacks for, 273–280
unbalanced, with cleanup/close, 273
CreateDevice method (IWDFDriver), 149, 151
CreateDeviceInterface method (IWDFDevice), 152
CreateFile function, 224
CreateFileHandleTarget method, 353–354
CreateInstance method (IClassFactory), 132, 135–137, 480–481, 603, 604–605
CreateInstance public helper function, 481–482, 484
CreateIoQueue method (IWDFDevice), 197, 198, 261
CreateObject methods, 106
CreatePreallocatedWdfMemory method (IWDFDriver), 327, 329, 443–444
CreateRequest method (IWDFDevice), 322, 598–599
CreateUsbTargetDevice method (IWDFUsbTargetFactory), 359, 362
CreateWdfFile method (IWDFDevice), 312
CreateWdfMemory method (IWDFDriver), 443
CreateWdfObject method (IWDFDriver), 454
critical regions
annotations for, 795–796
PASSIVE_LEVEL IRQLs in, 514
.ctl files, generating, 434
CtlDeviceFinishInItDeviceAdd rule, 847
CtlDeviceFinishInItDrEntry rule, 847
CUnknown class, 480
current IRQL, finding, 522
current priority (threads), 508
custom installation applications, 658
custom trace message functions, 419. See also tracing