次の方法で共有


WdfRequestSendSyncAtDispatch2 ルール (kmdf)

WdfRequestSendSyncAtDispatch2 ルールは、WdfRequestSend 関数が正しい IRQL の優先度レベルで送信されるかを検証します。

ドライバーが WDF_REQUEST_Standard Edition ND_OPTION_SYNCHRONOUS フラグを設定する場合は、IRQL = PASSIVE_LEVEL で WdfRequestSend 関数を呼び出す必要があります。 このフラグが設定されていない場合、ドライバーは IRQL = DISPATCH_LEVEL で WdfRequestSend 関数を呼び出す必要があります。

Note

このルールは WdfRequestSendSyncAtDispatch ルールと同じ条件をテストしますが、別のハーネスを使用して異なるコード パスをテストします。

ドライバー モデル: KMDF

テスト方法

コンパイル時

静的ドライバー検証ツール を実行し、 WdfRequestSendSyncAtDispatch2 規則を指定します。

コードの分析を実行するには、次の手順に従います。
  1. コードを準備します (ロール型宣言を使用します)。
  2. 静的ドライバー検証ツールを実行します。
  3. 結果を表示および分析します。

詳細については、「静的ドライバー検証ツールを使用したドライバーの欠陥の検出」を参照してください。

適用対象

WdfUsbInterfaceGetConfiguredPipeWdfUsbInterfaceGetConfiguredSettingIndexWdfUsbInterfaceGetDescriptorWdfUsbInterfaceGetEndpointInformationWdfUsbInterfaceGetInterfaceNumberWdfUsbInterfaceGetNumConfiguredPipesWdfUsbInterfaceGetNumEndpointsWdfUsbInterfaceGetNumSettingsWdfUsbInterfaceSelectSettingWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceCreateWdfUsbTargetDeviceCyclePortSynchronouslyWdfUsbTargetDeviceFormatRequestForControlTransferWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceGetDeviceDescriptorWdfUsbTargetDeviceGetInterfaceWdfUsbTargetDeviceGetNumInterfacesWdfUsbTargetDeviceIsConnectedSynchronousWdfUsbTargetDeviceQueryStringWdfUsbTargetDeviceResetPortSynchronouslyWdfUsbTargetDeviceRetrieveConfigDescriptorWdfUsbTargetDeviceRetrieveCurrentFrameNumberWdfUsbTargetDeviceRetrieveInformationWdfUsbTargetDeviceSelectConfigWdfUsbTargetDeviceSendControlTransferSynchronouslyWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceWdmGetConfigurationHandleWdfUsbTargetPipeAbortSynchronouslyWdfUsbTargetPipeConfigContinuousReaderWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeFormatRequestForReadWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForUrbWdfUsbTargetPipeFormatRequestForWriteWdfUsbTargetPipeGetInformationWdfUsbTargetPipeGetTypeWdfUsbTargetPipeIsInEndpointWdfUsbTargetPipeIsOutEndpointWdfUsbTargetPipeReadSynchronouslyWdfUsbTargetPipeResetSynchronouslyWdfUsbTargetPipeSendUrbSynchronouslyWdfUsbTargetPipeSetNoMaximumPacketSizeCheckWdfUsbTargetPipeWdmGetPipeHandleWdfUsbTargetPipeWriteSynchronously