WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfusb.h

VOID WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB(
  [out] PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS Params,
  [in]  PURB                                     Urb
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfusb-wdf_usb_interface_select_setting_params_init_urb)

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB function

Description

[Applies to KMDF and UMDF]

The WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB function initializes a WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure so that a driver can select a USB interface by specifying a URB.

Parameters

Params [out]

A pointer to a driver-allocated WDF_USB_INTERFACE_SELECT_SETTING_PARAMS structure.

Urb [in]

A pointer to a URB structure.

Remarks

The WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB 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 WdfUsbInterfaceSelectSettingTypeUrb and sets the Types.Urb.Urb member to the value that is specified by Urb pointer.

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

Examples

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

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS  selectSettingParams;
URB  urb;
NTSTATUS  Status;

//
// Initialize the URB structure here.
//
...

//
// Initialize the WDF_USB_INTERFACE_SELECT_SETTING_PARAMS
// structure and call WdfUsbInterfaceSelectSetting.
//
WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URB(
                                      &selectSettingParams,
                                      &urb
                                      );

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

See also

URB

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_DESCRIPTOR

WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_SETTING