Skip to content

Latest commit

 

History

History
51 lines (43 loc) · 3.27 KB

kmdf-cleanup4ctldeviceregistered.md

File metadata and controls

51 lines (43 loc) · 3.27 KB
title description ms.date keywords topic_type ms.topic api_name api_type
Cleanup4CtlDeviceRegistered Rule (KMDF)
The Cleanup4CtlDeviceRegistered rule specifies that if a Plug and Play (PnP) driver calls WdfDeviceCreate for the control device object, the driver must register one of the required event callback functions.
05/21/2018
Cleanup4CtlDeviceRegistered rule (kmdf)
apiref
reference
Cleanup4CtlDeviceRegistered
NA

Cleanup4CtlDeviceRegistered rule (kmdf)

The Cleanup4CtlDeviceRegistered rule specifies that if a Plug and Play (PnP) driver calls WdfDeviceCreate for the control device object, the driver must register one of the required event callback functions.

The event callback function can be one of the following:

EvtCleanupCallback or EvtDestroyCallback in the WDF_OBJECT_ATTRIBUTES structure for the control device -or- EvtDeviceSelfManagedIoCleanup in the WDF_PNPPOWER_EVENT_CALLBACKS structure

Driver model: KMDF

How to test

At compile time

Run Static Driver Verifier and specify the Cleanup4CtlDeviceRegistered 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.