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

IWDFUsbTargetDevice::SetPowerPolicy 方法

The SetPowerPolicy method sets the WinUsb power policy.

语法

HRESULT SetPowerPolicy(
  [in]  ULONG PolicyType,
  [in]  ULONG ValueLength,
  [in]  PVOID Value
);

参数

PolicyType [in]

The type of WinUsb power policy that the UMDF driver sets.

ValueLength [in]

The size, in bytes, of the buffer that SetPowerPolicy supplies in Value.

Value [in]

A pointer to the buffer that contains the WinUsb power policy.

返回值

SetPowerPolicy returns one of the following values:

返回代码说明
S_OK

SetPowerPolicy successfully set the WinUsb power policy.

E_OUTOFMEMORY

SetPowerPolicy encountered an allocation failure.

An error code that is defined in Winerror.h

This value corresponds to the error code that the WinUsb API returned.

 

评论

Power policy controls the power management that WinUsb for the device performs.

For information about valid policy types and values that a UMDF driver can pass for the PolicyType and Value parameters, see the WinUsb_SetPowerPolicy function.

The SetPowerPolicy method generates a UMDF request and synchronously sends the request to the I/O target.

要求

标头

Wudfusb.h (包括Wudfusb.h)

另请参见

WinUsb_SetPowerPolicy
IWDFUsbTargetDevice::RetrievePowerPolicy

 

 

社区附加资源

显示:
© 2014 Microsoft