Developing Drivers with WDF:勘误表更新日期:2007 年 8 月 9 日 注意:
第 1 章 WDF 简介
本页最后一个条目容易使人混淆。第二个项目符号中的文本以 "and" 结束,以表明它将前一个和后一个项目符号结合时可以建立一个完整的句子。但是为了使条理清晰,这个条目应该改写为如下形式:
第 7 章 即插即用和电源管理
在 "State Changes and the Callback Sequence" 中,第三个句子意义不明确。应该改写为如下形式: More typically, the system transitions to an Sx state when the user closes the lid of a laptop or the driver for a network card powers down its devicetransitions its device to a Dx state when the cable is unplugged.
页面顶端的第一段引用了 IWDFInitialize::SetPowerPolicyOwnership。该方法的正确名称应该是 IWDFDeviceInitialize::SetPowerPolicyOwnership。 第 9 章 I/O 目标
在 "Device and Configuration Descriptors" 中,第二个项目符号下方的文本缺少了一个单词。正确信息如下所示:
在页面中部,表下方的第一个项目符号在 IPnpCallbackHardware 接口的名称上错误地应用了大写字母。只有第一个 "p" 应该大写。 第 16 章 硬件资源和中断
页面顶部标注为 "Important" 的文本对 MSI 共享的描述不正确。正确的文本应该如下所示: IMPORTANT If your device generates line-based interrupts, your driver's interrupt service callback must be written so that it can share interrupt vectors or MSIs with another device.The function must not assume that it is called only for interrupts that its device generated.It should return TRUE only if its device actually did generate the interrupt.Returning TRUE under any other conditions can crash the system. If your device generates MSIs, your driver can safely assume that its interrupt service callback runs only if your device generated the interrupt.MSIs are rarely shared, so in most cases, the interrupt service callback is not required to verify that the MSI belongs to it.Instead, it can simply queue a DPC and return TRUE.The in-memory data that is the result of the DMA operation is guaranteed to be coherent by the time the interrupt service callback is invoked.However, in the rare stack in which your driver shares an MSI - typically because another driver in the stack has also registered for one of the device's MSIs - the interrupt service callback must ensure that the MSI belongs to it before it queues the DPC and returns. 第 17 章 直接内存访问
本页最后一段中的第三个句子容易使人混淆。应该写为: The allocated common-buffer area is not necessarily physically contiguous contiguous in the device-bus logical address space, although not necessarily contiguous in the physical address space. 第 23 章 PREfast for Drivers
在句子 "You can use the __drv_strictTypeMatch(mode) and __drv_strictType(typename, mode) annotations to ensure that PREfast checks whether a function is called with exactly the right type." 之后。第一个项目符号应该为:
KeEnterCriticalRegion has no parameters and no result value--it simply blocks until it succeeds.
第二段中的第二个句子应该写为: This annotation specifies that the Target parameter must always be accessed by using an interlocked operation.
在 Listing 23-24, "Example of annotation test cases for a function" 中,第三行代码应该写为: … __drv_when(mode < 0 || mode > 2) … 此例子显示当 mode==0 时,所有参数都不应为空。 |
