Funzione WdfUsbInterfaceGetEndpointInformation (wdfusb.h)

[Si applica a KMDF e UMDF]

Il metodo WdfUsbInterfaceGetEndpointInformation recupera informazioni su un endpoint dispositivo USB specificato e la relativa pipe associata.

Sintassi

void WdfUsbInterfaceGetEndpointInformation(
  [in]      WDFUSBINTERFACE           UsbInterface,
  [in]      UCHAR                     SettingIndex,
  [in]      UCHAR                     EndpointIndex,
  [in, out] PWDF_USB_PIPE_INFORMATION EndpointInfo
);

Parametri

[in] UsbInterface

Handle per un oggetto interfaccia USB ottenuto chiamando WdfUsbTargetDeviceGetInterface.

[in] SettingIndex

Valore di indice che identifica un'impostazione alternativa per l'interfaccia. Per altre informazioni sulle impostazioni alternative, vedere la specifica USB.

[in] EndpointIndex

Valore di indice che identifica un endpoint associato all'impostazione alternativa specificata dell'interfaccia specificata. Questo valore di indice non è l'indirizzo dell'endpoint.

[in, out] EndpointInfo

Puntatore a una struttura WDF_USB_PIPE_INFORMATION allocata dal chiamante che il framework inserisce.

Valore restituito

nessuno

Osservazioni

Se il driver fornisce un handle di oggetto non valido, si verifica un controllo di bug.

Per altre informazioni sul metodo WdfUsbInterfaceGetEndpointInformation e sulle destinazioni di I/O USB, vedi Destinazioni di I/O USB.

Esempio

L'esempio di codice seguente ottiene il numero di endpoint supportati da un'interfaccia USB e quindi chiama WdfUsbInterfaceGetEndpointInformation per ogni endpoint.

WDF_USB_PIPE_INFORMATION endPointInfo;
BYTE settingIndex, i;

settingIndex = 0;
numEndpoints = WdfUsbInterfaceGetNumEndpoints(
                                          UsbInterface,
                                          settingIndex
                                          );

for (i = 0; i < numEndpoints; i++){
    WDF_USB_PIPE_INFORMATION_INIT(&endPointInfo);
    WdfUsbInterfaceGetEndpointInformation(
                                          UsbInterface,
                                          settingIndex,
                                          i,
                                          &endPointInfo
                                          );

    //
    // Examine endpoint information here.
    //
...
}

Requisiti

Requisito Valore
Piattaforma di destinazione Universale
Versione KMDF minima 1.0
Versione UMDF minima 2,0
Intestazione wdfusb.h (include Wdfusb.h)
Libreria Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <=DISPATCH_LEVEL
Regole di conformità DDI DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf), UsbKmdfIrql(kmdf), UsbKmdfIrql2(kmdf), UsbKmdfIrqlExplicit(kmdf)

Vedi anche

WDF_USB_PIPE_INFORMATION

WdfUsbInterfaceGetNumEndpoints

WdfUsbTargetDeviceGetInterface