IUsb::ControlOut

Description

Sends arbitrary data to 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.

Since the USBTMC specification does not currently define any standard control port requests in the direction of host-to-device, this function is intended for use with only vendor-defined requests. However, this function implementation should not check the bmRequestType parameter for this aspect.

VB Prototype

ControlOut(
  bmRequestType As Short,
  bRequest As Short,
  wValue As Short,
  wIndex As short,
  wLength As short,
  buffer As SAFEARRAY(BYTE)
)

C++ Prototype

HRESULT ControlOut(
  short bmRequestType,
  short bRequest,
  short wValue,
  short wIndex,
  short wLength,
  SAFEARRAY(BYTE)* buffer
);

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 host-to-device.

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.

buffer

Actual data to send to 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