IWDFUsbTargetDevice::RetrieveUsbInterface method
The RetrieveUsbInterface method retrieves the specified USB interface for a USB device.
Syntax
HRESULT RetrieveUsbInterface(
[in] UCHAR InterfaceIndex,
[out] IWDFUsbInterface **ppUsbInterface
);
Parameters
- InterfaceIndex [in]
-
The index of the interface to retrieve.
- ppUsbInterface [out]
-
A pointer to a variable that receives a pointer to the specified IWDFUsbInterface interface for the USB device.
Return value
RetrieveUsbInterface returns one of the following values:
Return code | Description |
---|---|
|
RetrieveUsbInterface successfully retrieved the specified USB interface for the USB device. |
|
RetrieveUsbInterface encountered an allocation failure. |
|
This value corresponds to the error code that the WinUsb API returned. |
Remarks
The driver can call the IWDFUsbTargetDevice::GetNumInterfaces method to retrieve the total number of USB interfaces that are available.
The driver can use the interface pointer that RetrieveUsbInterface retrieves, to call the methods that the IWDFUsbInterface interface provides. For more information about using these methods, see Working with USB Interfaces in UMDF.
Examples
For a code example of how to use the RetrieveUsbInterface method, see IWDFUsbTargetFactory::CreateUsbTargetDevice.
Requirements
End of support | Unavailable in UMDF 2.0 and later. |
---|---|
Minimum UMDF version | 1.5 |
Header |
|
DLL |
|
See also
- IWDFUsbTargetDevice
- IWDFUsbInterface
- IWDFUsbTargetDevice::GetNumInterfaces
- USBD_INTERFACE_INFORMATION