WdfRequestSendSyncAtDispatch 规则 (kmdf)

WdfRequestSendSyncAtDispatch 规则验证是否以正确的 IRQL 优先级发送 WdfRequestSend 函数。

如果驱动程序设置WDF_REQUEST_SEND_OPTION_SYNCHRONOUS标志,则必须在 IRQL = PASSIVE_LEVEL调用 WdfRequestSend 函数。 如果未设置此标志,驱动程序必须在 IRQL = DISPATCH_LEVEL调用 WdfRequestSend 函数。

注意

此规则测试的条件与 WdfRequestSendSyncAtDispatch2 规则相同,但它使用不同的工具测试不同的代码路径。

驱动程序模型:KMDF

如何测试

编译时

运行 静态驱动程序验证程序 并指定 WdfRequestSendSyncAtDispatch 规则。

使用以下步骤运行代码分析:
  1. 准备代码 (使用角色类型声明) 。
  2. 运行静态驱动程序验证程序。
  3. 查看和分析结果。

有关详细信息,请参阅 使用静态驱动程序验证程序查找驱动程序中的缺陷

适用于

WdfUsbInterfaceGetConfiguredPipeWdfUsbInterfaceGetConfiguredSettingIndexWdfUsbInterfaceGetDescriptorWdfUsbInterfaceGetEndpointInformationWdfUsbInterfaceGetInterfaceNumberWdfUsbInterfaceGetNumConfiguredPipesWdfUsbInterfaceGetNumEndpointsWdfUsbInterfaceGetNumSettingsWdfUsbInterfaceSelectSettingWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceCreateWdfUsbTargetDeviceCyclePortSynchronouslyWdfUsbTargetDeviceFormatRequestForControlTransferWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceGetDeviceDescriptorWdfUsbTargetDeviceGetInterfaceWdfUsbTargetDeviceGetNumInterfacesWdfUsbTargetDeviceIsConnectedSynchronousWdfUsbTargetDeviceQueryStringWdfUsbTargetDeviceResetPortSynchronouslyWdfUsbTargetDeviceRetrieveConfigDescriptorWdfUsbTargetDeviceRetrieveCurrentFrameNumberWdfUsbTargetDeviceRetrieveInformationWdfUsbTargetDeviceSelectConfigWdfUsbTargetDeviceSendControlTransferSynchronouslyWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceWdmGetConfigurationHandleWdfUsbTargetPipeAbortSynchronouslyWdfUsbTargetPipeConfigContinuousReaderWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeFormatRequestForReadWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForUrbWdfUsbTargetPipeFormatRequestForWriteWdfUsbTargetPipeGetInformationWdfUsbTargetPipeGetTypeWdfUsbTargetPipeIsInEndpointWdfUsbTargetPipeIsOutEndpointWdfUsbTargetPipeReadSynchronouslyWdfUsbTargetPipeResetSynchronouslyWdfUsbTargetPipeSendUrbSynchronouslyWdfUsbTargetPipeSetNoMaximumPacketSizeCheckWdfUsbTargetPipeWdmGetPipeHandleWdfUsbTargetPipeWriteSynchronously