IUsb::ControlIn

Description

Used to request arbitrary data from a USB device on the default control port. You must be aware of how to use each parameter based on the relevant USB base or class specification, or based on a vendor-specific request definition.

VB Prototype

value As SAFEARRAY(BYTE) = ControlIn(
  bmRequestType As Short,
  bRequest As Short,
  wValue As Short,
  wIndex As short,
  wLength As short
)

C++ Prototype

HRESULT ControlIn(
  short bmRequestType,
  short bRequest,
  short wValue,
  short wIndex,
  short wLength,
  SAFEARRAY(BYTE)* pBuf
);

Parameters

bmRequestType

Bitmap field for defining the USB control port request. The bitmap fields are as defined by the USB specification. The direction bit must be device-to-host.

bRequest

Request ID for this transfer. The meaning of this value depends on bmRequestType.

wValue

Request value for this transfer.

wIndex

Specifies the interface or endpoint index number, depending on bmRequestType.

wLength

Length of the data in bytes to send to the device during the Data stage. If this value is 0, then buffer is ignored.

pBuf

Actual data received from the device during the Data stage. If wLength is 0, then this parameter is ignored.

Return Value

Refer to the table of return codes.

See Also

ComponentVersion, SpecVersion, HardwareInterfaceName, HardwareInterfaceNumber, HardwareInterfaceType, LockState, OptionString, ProgID, ResourceName, SessionType, SoftwareManufacturerID, SoftwareManufacturerName, Timeout, LastStatus, ManufacturerID, ManufacturerName, ModelCode, ModelName, Is4882Compliant, UsbSerialNumber, UsbInterfaceNumber, UsbProtocol, MaximumInterruptSize, GetAttribute, SetAttribute, LockRsrc, UnlockRsrc, Init, Close, ControlREN, ControlOut, ControlIn, IUsb Overview