Share via


ConfigurationValue Property

The ConfigurationValue property returns the bConfigurationValue field of the configuration descriptor, as described in section 9.6.3 of the USB 2.0 specification. This property is read/write.

This property is read/write.

Syntax

HRESULT put_ConfigurationValue(
  [in]           BYTE bConfigValue
);

HRESULT get_ConfigurationValue(
  [out, retval]  BYTE *pbConfigValue
);

Property Value

The new configuration value to set.

Error Codes

ConfigurationValue returns an HRESULT value.

Remarks

The following C++ code example shows how to set ConfigurationValue.

HRESULT SetConfigurationValue(ISoftUSBConfiguration *piConfig)
{
    HRESULT hr             = S_OK;
    BYTE    bCurrentConfig = 0;
    BYTE    bSetConfig     = 1; 

 hr = piConfig->get_ConfigurationValue(&bCurrentConfig);
 if (SUCCEEDED(hr))
    {
 if (bCurrentConfig != bSetConfig)
        {
 hr = piConfig->put_ConfigurationValue(bSetConfig);
        }
 return hr;
    }
}

Requirements

Header

SoftUSBif.h

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010