IWDFUsbTargetPipe::RetrievePipePolicy method (wudfusb.h)
[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 RetrievePipePolicy method retrieves a WinUsb pipe policy.
Syntax
HRESULT RetrievePipePolicy(
[in] ULONG PolicyType,
[in, out] ULONG *ValueLength,
[out] PVOID Value
);
Parameters
[in] PolicyType
The type of WinUsb pipe policy that the UMDF driver requests.
[in, out] ValueLength
A pointer to a variable that, on input, contains the size, in bytes, of the buffer that RetrievePipePolicy supplies for Value. On output, this parameter contains the size that RetrievePipePolicy requires for Value.
[out] Value
A pointer that receives the buffer that contains the WinUsb pipe policy.
Return value
RetrievePipePolicy returns one of the following values:
Return code | Description |
---|---|
|
RetrievePipePolicy successfully retrieved the WinUsb pipe policy. |
|
RetrievePipePolicy encountered an allocation failure. |
|
This value corresponds to the error code that the WinUsb API returned. |
Remarks
Pipe policy controls the behavior of the USB pipe (for example, time-outs, handling short packets, and so on).
For more information about valid policy types that a UMDF driver can pass for the PolicyType parameter and values that the framework returns, see the WinUsb_GetPipePolicy function.
For information about the behavior of the pipe policies, see WinUSB Functions for Pipe Policy Modification.
The RetrievePipePolicy method generates a UMDF request and synchronously sends the request to the I/O target.
Requirements
Requirement | Value |
---|---|
End of support | Unavailable in UMDF 2.0 and later. |
Target Platform | Desktop |
Minimum UMDF version | 1.5 |
Header | wudfusb.h (include Wudfusb.h) |
DLL | WUDFx.dll |