WDF_USB_DEVICE_CREATE_CONFIG
WDF_USB_DEVICE_CREATE_CONFIG_INIT
WdfUsbTargetDeviceCreateIsochUrb method
WdfUsbTargetDeviceCreateUrb method
WdfUsbTargetDeviceCreateWithParameters method
WdfUsbTargetDeviceQueryUsbCapability method
展開 最小化

WdfUsbInterfaceGetConfiguredPipe メソッド

The WdfUsbInterfaceGetConfiguredPipe method returns a handle to the framework pipe object that is associated with a specified USB device interface and pipe index. Optionally, the method also returns information about the pipe.

構文

WDFUSBPIPE WdfUsbInterfaceGetConfiguredPipe(
  [in]             WDFUSBINTERFACE UsbInterface,
  [in]             UCHAR PipeIndex,
  [out, optional]  PWDF_USB_PIPE_INFORMATION PipeInfo
);

パラメーター

UsbInterface [in]

A handle to a USB interface object that was obtained by calling WdfUsbTargetDeviceGetInterface.

PipeIndex [in]

A zero-based index into the set of framework pipe objects that are associated with the specified interface object.

PipeInfo [out, optional]

A pointer to a caller-allocated WDF_USB_PIPE_INFORMATION structure that the framework fills in. This parameter is optional and can be NULL.

戻り値

If the operation succeeds, WdfUsbInterfaceGetConfiguredPipe returns a handle to the framework pipe object that is associated with the specified interface object and pipe index. The method returns NULL if the WDF_USB_PIPE_INFORMATION structure's size is incorrect or if the pipe index value is too large.

A bug check occurs if the driver supplies an invalid object handle.

解説

Your driver can call WdfUsbInterfaceGetConfiguredPipe after it has called WdfUsbTargetDeviceSelectConfig.

For more information about the WdfUsbInterfaceGetConfiguredPipe method and USB I/O targets, see USB I/O Targets.

The following code example sends a USB abort request to each configured pipe of a specified USB interface.

BYTE  count, i;
NTSTATUS  status;

count = WdfUsbInterfaceGetNumConfiguredPipes(UsbInterface);

for (i = 0; i < count; i++) {
    WDFUSBPIPE pipe;
    pipe = WdfUsbInterfaceGetConfiguredPipe(
                                            UsbInterface,
                                            i,
                                            NULL
                                            );
    status = WdfUsbTargetPipeAbortSynchronously(
                                            pipe,
                                            WDF_NO_HANDLE,
                                            NULL
                                            );

    if (!NT_SUCCESS(status)) {
        break;
    }
}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfusb.h (includeWdfusb.h)

ライブラリ

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<=DISPATCH_LEVEL

参照

WDF_USB_PIPE_INFORMATION
WdfUsbInterfaceGetNumConfiguredPipes
WdfUsbTargetDeviceGetInterface
WdfUsbTargetDeviceSelectConfig

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft