UsbBuildGetStatusRequest macro (usbdlib.h)

The UsbBuildGetStatusRequest macro formats an URB to obtain status from a device, interface, endpoint, or other device-defined target on a USB device.

Syntax

void UsbBuildGetStatusRequest(
  [in, out]       urb,
  [in]            op,
  [in]            index,
  [in, optional]  transferBuffer,
  [in, optional]  transferBufferMDL,
  [in]            link
);

Parameters

[in, out] urb

Pointer to an URB to be formatted as an status request.

[in] op

Specifies one of the following values:

URB_FUNCTION_GET_STATUS_FROM_DEVICE

Retrieves status from a USB device.

URB_FUNCTION_GET_STATUS_FROM_INTERFACE

Retrieves status from an interface on a USB device.

URB_FUNCTION_GET_STATUS_FROM_ENDPOINT

Retrieves status from an endpoint for an interface on a USB device.

URB_FUNCTION_GET_STATUS_FROM_OTHER

Retrieves status from a device-defined target on a USB device.

[in] index

Specifies the device-defined index, returned by a successful configuration request, if the request is for an endpoint or interface. Otherwise, Index must be zero.

[in, optional] transferBuffer

Pointer to a resident buffer to receive the status data or is NULL if an MDL is supplied in TransferBufferMDL.

[in, optional] transferBufferMDL

Pointer to an MDL that describes a resident buffer to receive the status data or is NULL if a buffer is supplied in TransferBuffer.

[in] link

Reserved. Must be set to NULL.

Return value

None

Requirements

Requirement Value
Target Platform Desktop
Header usbdlib.h (include Usbdlib.h)

See also

URB

USB device driver programming reference

_URB_CONTROL_GET_STATUS_REQUEST