Hardware Dev Center

Warning rule set (WDM)

Use these rules to verify that your driver can correctly processes IRPs in various contexts and follows Microsoft recommended best practices.

In this section

TopicDescription

CheckDeviceObjectFlags

The CheckDeviceObjectFlags rule specifies that a bus driver must check that the device object flags for DO_POWER_PAGABLE and DO_POWER_INRUSH are set consistently for the FDO and the child PDOs. This rule only applies to bus drivers.

CompletionEventChecking

The CompletionEventChecking rule specifies that a driver does not call IoMarkIrpPending and KeSetEvent in a completion routine for the same IRP.

DeleteDevice

The DeleteDevice rule specifies that drivers should not rely on the I/O Manager or PnP Manager to keep the DeviceObject alive after a call to IoDeleteDevice.

MultRemoveLock

The MultRemoveLock rule verifies that IoAcquireRemoveLock is called with only one unique Remove Lock. This is a warning rule.

PagedCode

The PagedCode rule specifies that the driver calls the PAGED_CODE macro only when it is executing at IRQL <= APC_LEVEL.

PagedCodeAtPowerTrans

The PagedCodeAtPowerTrans rule specifies that a driver should not call PAGED_CODE while responding to a system IRP_MJ_POWER Irp (IRP_MN_SET_POWER) and to a device IRP_MJ_POWER Irp (IRP_MN_SET_POWER).

ReservedDDIs

The ReservedDDIs rule verifies that drivers do not call any reserved functions.

 

Hh987011.wedge(en-us,VS.85).gifTo select the Warning 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 Warning.

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

    
    msbuild /t:sdv /p:Inputs="/check:Warning.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).

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft