ChildDeviceInitApi rule (kmdf)

The ChildDeviceInitApi rule specifies that for a child device, the framework device object initialization methods must be called before the driver calls the WdfDeviceCreate method for the child device object.

Driver model KMDF

How to test

At compile time

Run Static Driver Verifier and specify the ChildDeviceInitApi rule.

Use the following steps to run an analysis of your code:
  1. Prepare your code (use role type declarations).
  2. Run Static Driver Verifier.
  3. View and analyze the results.

For more information, see Using Static Driver Verifier to Find Defects in Drivers.

Applies to

WdfDeviceCreate WdfDeviceInitAssignName WdfDeviceInitAssignSDDLString WdfDeviceInitAssignWdmIrpPreprocessCallback WdfDeviceInitRegisterPnpStateChangeCallback WdfDeviceInitRegisterPowerPolicyStateChangeCallback WdfDeviceInitRegisterPowerStateChangeCallback WdfDeviceInitSetCharacteristics WdfDeviceInitSetDeviceClass WdfDeviceInitSetDeviceType WdfDeviceInitSetExclusive WdfDeviceInitSetFileObjectConfig WdfDeviceInitSetIoInCallerContextCallback WdfDeviceInitSetIoType WdfDeviceInitSetPnpPowerEventCallbacks WdfDeviceInitSetPowerInrush WdfDeviceInitSetPowerNotPageable WdfDeviceInitSetPowerPageable WdfDeviceInitSetPowerPolicyEventCallbacks WdfDeviceInitSetPowerPolicyOwnership WdfDeviceInitSetRequestAttributes WdfPdoInitAddCompatibleID WdfPdoInitAddDeviceText WdfPdoInitAddHardwareID WdfPdoInitAssignDeviceID WdfPdoInitAssignInstanceID WdfPdoInitAssignRawDevice WdfPdoInitSetDefaultLocale WdfPdoInitSetEventCallbacks

Send comments about this topic to Microsoft