[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 RetrievePowerPolicy method retrieves a WinUsb power policy.
HRESULT RetrievePowerPolicy( ULONG PolicyType, ULONG *ValueLength, PVOID Value );
The type of WinUsb power policy that the UMDF driver requests.
A pointer to a variable that, on input, contains the size, in bytes, of the buffer that RetrievePowerPolicy supplies in Value. On output, this parameter contains the size that RetrievePowerPolicy requires for Value.
A pointer that receives the buffer that contains the WinUsb power policy.
RetrievePowerPolicy returns one of the following values:
||RetrievePowerPolicy successfully retrieved the WinUsb power policy.|
||RetrievePowerPolicy encountered an allocation failure.|
||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 that a UMDF driver can pass for the PolicyType parameter and values that the framework returns, see the WinUsb_GetPowerPolicy function.
For more information about the power behavior of WinUSB, see WinUSB Power Management.
The RetrievePowerPolicy method generates a UMDF request and synchronously sends the request to the I/O target.
|End of support||Unavailable in UMDF 2.0 and later.|
|Minimum UMDF version||1.5|
|Header||wudfusb.h (include Wudfusb.h)|