WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS - NtDoc

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

VOID WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS(
  [out] PWDF_USB_CONTROL_SETUP_PACKET Packet,
  [in]  WDF_USB_BMREQUEST_RECIPIENT   BmRequestRecipient,
  [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_get_status)

WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS function

Description

[Applies to KMDF and UMDF]

The WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS function initializes a WDF_USB_CONTROL_SETUP_PACKET structure for a USB control transfer that obtains device status.

Parameters

Packet [out]

A pointer to a WDF_USB_CONTROL_SETUP_PACKET structure.

BmRequestRecipient [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.

Index [in]

A status 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_GET_STATUS function does the following:

  1. Zeros the WDF_USB_CONTROL_SETUP_PACKET structure.
  2. Sets the Packet.bm.Request.Type member to BmRequestStandard.
  3. Sets the Packet.bm.Request.Dir member to BmRequestDeviceToHost.
  4. Sets the Packet.bRequest member to a "get status" request value.
  5. Sets the Packet.wValue.Value member to zero.
  6. Sets the Packet->Packet.wIndex.Value member to the Index argument.

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

Examples

The following code example initializes a WDF_USB_CONTROL_SETUP_PACKET structure.

WDF_USB_CONTROL_SETUP_PACKET  packet;

WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS(
                                             &packet,
                                             BmRequestToDevice,
                                             0
                                             );

See also

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_VENDOR