信息
您所需的主题如下所示。但此主题未包含在此库中。

WdfDeviceInitSetPowerInrush 方法

The WdfDeviceInitSetPowerInrush method informs the power manager that the specified device requires an inrush of current when it starts.

语法

VOID WdfDeviceInitSetPowerInrush(
  [in]  PWDFDEVICE_INIT DeviceInit
);

参数

DeviceInit [in]

A caller-supplied pointer to a WDFDEVICE_INIT structure.

返回值

None

评论

To avoid overloading the system's power supply, the system starts devices that require an inrush of current one at a time.

If your driver calls WdfDeviceInitSetPowerInrush, the framework makes it nonpageable during power state transitions and the driver must not call WdfDeviceInitSetPowerPageable.

Your driver must call WdfDeviceInitSetPowerInrush before it calls WdfDeviceCreate. For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.

Calling WdfDeviceInitSetPowerInrush from a filter driver has no effect. For filter drivers, the framework uses the setting that the next-lower driver in the driver stack specifies.

示例

The following code example informs the power manager that a device requires an inrush of current when it starts.

WdfDeviceInitSetPowerInrush(DeviceInit);

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<= DISPATCH_LEVEL

另请参见

EvtDriverDeviceAdd
WdfDeviceCreate

 

 

社区附加资源

显示:
© 2014 Microsoft