[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.] The IPnpCallback interface is a Plug and Play (PnP) and power management (PM) interface. ## Methods
The IPnpCallback interface has these methods.
|wudfddi.IPnpCallback.OnD0Entry||The OnD0Entry method notifies a driver when a device enters the D0 power state so that the driver can perform necessary operations, such as enabling the device.|
|wudfddi.IPnpCallback.OnD0Exit||The OnD0Exit method notifies a driver when a device exits the D0 power state so that the driver can perform necessary operations, such as disabling the device.|
|wudfddi.IPnpCallback.OnQueryRemove||The OnQueryRemove method notifies a driver before a device is removed from a computer.|
|wudfddi.IPnpCallback.OnQueryStop||The OnQueryStop method notifies a driver before a device is stopped.|
|wudfddi.IPnpCallback.OnSurpriseRemoval||The OnSurpriseRemoval method notifies a driver after a device is removed from a computer unexpectedly so that the driver can perform necessary operations.|
A driver registers the IPnpCallback interface when the driver calls the IWDFDriver::CreateDevice method to create a device object.
|Header||wudfddi.h (include Wudfddi.h)|