PoFxUnregisterDevice function (wdm.h)
The PoFxUnregisterDevice routine removes the registration of a device from the power management framework (PoFx).
void PoFxUnregisterDevice( [in] POHANDLE Handle );
A handle that represents the registration of the device with PoFx. The device driver previously received this handle from the PoFxRegisterDevice routine.
The driver that owns the power policy for a device must unregister the device from PoFx when the device is removed. The Plug and Play (PnP) manager can remove the device stack from the PnP tree only after the device is unregistered.
To unregister the device, the driver calls PoFxUnregisterDevice during the handling of an IRP_MN_REMOVE_DEVICE or IRP_MN_SURPRISE_REMOVAL request, whichever is received first. This call should occur after the driver no longer requires access to the device's hardware.
A device driver that calls this routine must previously have called the PoFxRegisterDevice routine to register the device with PoFx.
|Minimum supported client||Available starting with Windows 8.|