DDI usage rule set (Storport)

Use these rules to verify that your driver correctly uses Storport DDIs correctly.

In this section

Topic Description

HwStorPortProhibitedDDIs

This rule contains a list of WDM DDIs (excluding interlocked functions) that should not be called in physical StorPort miniport drivers.

NullCheck

The NullCheck rule verifies that a NULL value inside the driver code is not dereferenced later in the driver. This rule reports a defect if either of these conditions is true:

  • There is an assignment of NULL that is dereferenced later.
  • There is a global/parameter to a procedure in a driver that may be NULL that is dereferenced later, and there is an explicit check in the driver that suggests that the initial value of the pointer may be NULL.

With NullCheck rule violations, the most relevant code statements are highlighted in the trace tree pane. For more information about working with report output, see Static Driver Verifier Report and Understanding the Trace Viewer.

StorPortDDIsPortOnly

This rule contains a list of StorPort port-only DDIs (excluding interlocked functions) that should not be called in StorPort miniports.

StorPortDeprecated

This rule verifies that the driver does not call either of these deprecated routines: StorPortValidateRange or StorPortLogError.

To select the DDI usage rule set

  1. Select your driver project (.vcxProj) in Microsoft Visual Studio. From the Driver menu, click Launch Static Driver Verifier….

  2. Click the Rules tab. Under Rule Sets, select DDIUsage.

    To select the default rule set from a Visual Studio developer command prompt window, specify DDIUsage.sdv with the /check option. For example:

    msbuild /t:sdv /p:Inputs="/check:DDIUsage.sdv" mydriver.VcxProj /p:Configuration="Win8 Release" /p:Platform=Win32
    

    For more information, see Using Static Driver Verifier to Find Defects in Drivers and Static Driver Verifier commands (MSBuild).