Share via


Manufacturer Property

The Manufacturer property gets or sets the value of the iManufacturer field of the device descriptor, as defined in section 9.6.1 of the USB 2.0 specification.

This property is read/write.

Syntax

HRESULT put_Manufacturer(
  [in]           BYTE bManufacturer
);

HRESULT get_Manufacturer(
  [out, retval]  BYTE *pbManufacturer
);

Property Value

The new index to the manufacturer string.

Error Codes

Manufacturer returns S_OK if the operation succeeds or E_POINTER if the pbManufacturer parameter is not a valid pointer.

Remarks

The following C++ code example how to set and get the Manufacturer property.

HRESULT CLoopBackDevice::UpdateManufacturer(ISoftUSBDevice *piDevice)
{
HRESULT hr = S_OK;
BYTE        bManufacturer = 0;
BYTE        bNewManufacturer = STRING_IDX_MANUFACTURER;

 if(NULL == piDevice)
{
 hr = E_INVALIDARG;
 goto Exit;
}

 hr = piDevice->get_Manufacturer(&bManufacturer);
 if(FAILED(hr))
 goto Exit;

 if (bNewManufacturer != bManufacturer)
{
 hr = piDevice->put_Manufacturer(bNewManufacturer);
 if(FAILED(hr))
 goto Exit;
}
Exit:
 return hr;
}

Requirements

Header

Headers:SoftUSBif.h

See Also

ISoftUSBDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010