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

WdfUsbTargetDeviceCyclePortSynchronously メソッド

The WdfUsbTargetDeviceCyclePortSynchronously method power-cycles the USB port to which a specified device is attached.

構文

NTSTATUS WdfUsbTargetDeviceCyclePortSynchronously(
  [in]  WDFUSBDEVICE UsbDevice
);

パラメーター

UsbDevice [in]

A handle to a USB device object that was obtained from a previous call to WdfUsbTargetDeviceCreate.

戻り値

WdfUsbTargetDeviceCyclePortSynchronously returns the I/O target's completion status value if the operation succeeds. Otherwise, this method might return one of the following values:

リターン コード説明
STATUS_INVALID_DEVICE_REQUEST

The caller's IRQL was invalid.

 

This method also might return other NTSTATUS values.

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

解説

Power-cycling a port causes the device to be surprise-removed and re-enumerated. A driver might request a power cycle after it has loaded firmware into a device.

Before the framework cycles the I/O target's USB port, it cancels all I/O requests that remain in the I/O target's queue. The driver must not send additional I/O requests to the I/O target until WdfUsbTargetDeviceCyclePortSynchronously returns.

The driver must call WdfIoTargetStop before it calls WdfUsbTargetDeviceCyclePortSynchronously.

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

The following code example power-cycles a specified device's USB port.

NTSTATUS status;

status = WdfUsbTargetDeviceCyclePortSynchronously(UsbDevice);

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfusb.h (includeWdfusb.h)

ライブラリ

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

IRQL

PASSIVE_LEVEL

参照

WdfUsbTargetDeviceCreate

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft