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 codeDescription
S_OK

RetrieveUsbInterface successfully retrieved the specified USB interface for the USB device.

E_OUTOFMEMORY

RetrieveUsbInterface 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.

 

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

Wudfusb.h (include Wudfusb.h)

DLL

WUDFx.dll

See also

IWDFUsbTargetDevice
IWDFUsbInterface
IWDFUsbTargetDevice::GetNumInterfaces
USBD_INTERFACE_INFORMATION

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.