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

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR 函数

The WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR function initializes a WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure so that a driver can select a USB interface by specifying an interface descriptor.

语法

VOID WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR(
  __out  PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS Params,
  __in   PUSB_INTERFACE_DESCRIPTOR Interface
);

参数

Params [out]

A pointer to a driver-allocated WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure.

Interface [in]

A pointer to a USB_INTERFACE_DESCRIPTOR structure.

返回值

None

评论

The WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR function zeros the WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure and sets its Size member to the size of the structure. It also sets the Type member to WdfUsbInterfaceSelectSettingTypeDescriptor and sets the Types.Descriptor.InterfaceDescriptor member to the value of the Interface pointer.

To initialize a WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure, your driver must call one of the following functions:

示例

The following code example initializes a USB_INTERFACE_DESCRIPTOR structure and then uses the structure as input to WdfUsbInterfaceSelectSetting.

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS  selectSettingParams;
USB_INTERFACE_DESCRIPTOR  interfaceDescriptor;
NTSTATUS  Status;

//
// Initialize the USB_INTERFACE_DESCRIPTOR structure here.
//
...

//
// Initialize the WDF_USB_INTERFACE_SELECT_SETTING_PARAMS 
// structure and call WdfUsbInterfaceSelectSetting.
//
WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR(
                                      &selectSettingParams,
                                      &interfaceDescriptor
                                      );

Status = WdfUsbInterfaceSelectSetting(
                                      UsbInterface,
                                      WDF_NO_OBJECT_ATTRIBUTES,
                                      &selectSettingParams
                                      );

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfusb.h (包括Wdfusb.h)

另请参见

USB_INTERFACE_DESCRIPTOR
WDF_USB_INTERFACE_SELECT_SETTING_PARAMS
WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_SETTING
WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB

 

 

社区附加资源

添加
显示:
© 2015 Microsoft