WdfDeviceInitSetPowerNotPageable function (wdfdevice.h)

[Applies to KMDF only]

The WdfDeviceInitSetPowerNotPageable method informs the power manager that the driver will not access pageable data while the system is transitioning between a sleeping state and the working (S0) state.


void WdfDeviceInitSetPowerNotPageable(



[in] A caller-supplied pointer to a WDFDEVICE_INIT structure.

Return value



If your function driver or bus driver calls WdfDeviceInitSetPowerNotPageable, the system paging file's device might not be in its working (D0) state when your driver's device enters a low-power state or returns to its working state. Therefore, during your device's power transitions, your driver must not perform any operations that might cause the operating system to access the paging file. Such operations include accessing files, the registry, or paged pool.

By default, the framework enables access to pageable data for function drivers. The framework uses the parent device's setting for each child device that a bus driver enumerates, unless the bus driver calls either WdfDeviceInitSetPowerPageable or WdfDeviceInitSetPowerNotPageable for the child device. If you write a bus driver that calls WdfDeviceInitSetPowerPageable for a child device, no drivers in the child device's stack can call WdfDeviceInitSetPowerNotPageable.

Calling WdfDeviceInitSetPowerPageable or WdfDeviceInitSetPowerNotPageable from a filter driver has no effect. The framework uses the setting that the next-lower driver specifies.

Most drivers do not need to call WdfDeviceInitSetPowerPageable or WdfDeviceInitSetPowerNotPageable. Instead, you should let the framework use the default setting that is appropriate for your driver. However, your driver should call WdfDeviceInitSetPowerNotPageable if the driver is part of a driver stack that must not access pageable data during power transitions (such as the storage stack or the video stack), or if the driver is a bus driver that enumerates devices that might be storage or video devices.

If your driver calls WdfDeviceInitSetPowerNotPageable, it must do so before it calls WdfDeviceCreate.

For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.


The following code example informs the power manager that a driver will not access pageable data while the system is transitioning between a sleeping state and the working (S0) state.



Target Platform Universal
Minimum KMDF version 1.0
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (see Framework Library Versioning.)
DDI compliance rules ChildDeviceInitAPI, DeviceInitAPI, DriverCreate, KmdfIrql, KmdfIrql2, PdoDeviceInitAPI

See also