AttachDevice method of the CIM_ControllerConfigurationService class

This method associates a LogicalDevice subclass (specifically a StorageVolume or MediaAccessDevice subclass) to the referenced ProtocolController. The association is persisted as an instance of ProtocolControllerForUnit. The management instrumentation provider must verify that the logical unit numbers (defined using the DeviceNumber input parameter) are unique for the ProtocolController. When the Protocol Controller is actively masking a device (i.e. is part of an AuthorizedTarget association), the provider should update the access configuration in the underlying hardware as appropriate.


uint32 AttachDevice(
  [in]      CIM_ProtocolController REF ProtocolController,
  [in]      CIM_LogicalDevice      REF Device,
  [in, out] string                     DeviceNumber


ProtocolController [in]

The ProtocolController instance.

Device [in]

The LogicalDevice instance to attach.

DeviceNumber [in, out]

The number assigned to ProtocolControllerForUnit.DeviceNumber (if supported by the hardware). Hardware support is indicated by ProtocolControllerMaskingCapabilities.ClientSelectableDeviceNumbers). If the hardware does not support setting the number, but the DeviceNumber has not been established in an existing ProtocolControllerForDevice subclass, then this parameter's value will be used. If the DeviceNumber has been established, then the current number will be reused.

Return value

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

DMTF Reserved (6 4095)

Invalid LogicalDevice Instance (4096)

Device Number Conflict (4097)

DeviceNumber Parameter Must Be Provided (4098)

Hardware Implementation Requires Null DeviceNumber (4099)

Busy (4100)

Method Reserved (4101 32767)

Vendor Specific (32768 65535)


Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2

See also