WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR - NtDoc

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

VOID WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(
  [out] PWDF_USB_CONTROL_SETUP_PACKET Packet,
  [in]  WDF_USB_BMREQUEST_DIRECTION   Direction,
  [in]  WDF_USB_BMREQUEST_RECIPIENT   Recipient,
  [in]  BYTE                          Request,
  [in]  USHORT                        Value,
  [in]  USHORT                        Index
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR function

Description

[Applies to KMDF and UMDF]

The WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR function initializes a WDF_USB_CONTROL_SETUP_PACKET structure for a vendor-specific USB control transfer.

Parameters

Packet [out]

A pointer to a WDF_USB_CONTROL_SETUP_PACKET structure.

Direction [in]

A WDF_USB_BMREQUEST_DIRECTION-typed value that is stored in the Packet.bm.Request.Dir member of the WDF_USB_CONTROL_SETUP_PACKET structure.

Recipient [in]

A WDF_USB_BMREQUEST_RECIPIENT-typed value that is stored in the Packet.bm.Request.Recipient member of the WDF_USB_CONTROL_SETUP_PACKET structure.

Request [in]

A request type constant that is stored in the Packet.bRequest member of the WDF_USB_CONTROL_SETUP_PACKET structure.

Value [in]

A request-specific value that is stored in the Packet.wValue.Value member of the WDF_USB_CONTROL_SETUP_PACKET structure.

Index [in]

A request-specific index value that is stored in the Packet.wIndex.Value member of the WDF_USB_CONTROL_SETUP_PACKET structure.

Remarks

The WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR function does the following:

To initialize a WDF_USB_CONTROL_SETUP_PACKET structure, the driver should call one of the following functions:

The following code example initializes a WDF_USB_CONTROL_SETUP_PACKET structure.

WDF_USB_CONTROL_SETUP_PACKET  controlSetupPacket;

WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(
                                         &controlSetupPacket,
                                         BmRequestHostToDevice,
                                         BmRequestToDevice,
                                         USBFX2LK_REENUMERATE,
                                         0,
                                         0
                                         );

See also

WDF_USB_BMREQUEST_DIRECTION

WDF_USB_BMREQUEST_RECIPIENT

WDF_USB_CONTROL_SETUP_PACKET

WDF_USB_CONTROL_SETUP_PACKET_INIT

WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS

WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE

WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS