---
title: "IOUSBGetNextAssociatedDescriptor(_:_:_:)"
framework: iousbhost
role: symbol
role_heading: Function
path: "iousbhost/iousbgetnextassociateddescriptor(_:_:_:)"
---

# IOUSBGetNextAssociatedDescriptor(_:_:_:)

Obtains the next associated descriptor in a configuration descriptor.

## Declaration

```swift
func IOUSBGetNextAssociatedDescriptor(_ configurationDescriptor: UnsafePointer<IOUSBConfigurationDescriptor>!, _ parentDescriptor: UnsafePointer<IOUSBDescriptorHeader>!, _ currentDescriptor: UnsafePointer<IOUSBDescriptorHeader>!) -> UnsafePointer<IOUSBDescriptorHeader>!
```

## Parameters

- `configurationDescriptor`: A configuration descriptor that contains the descriptors to iterate through.
- `parentDescriptor`: A descriptor pointer within the bounds of configurationDescriptor.
- `currentDescriptor`: A descriptor pointer within the bounds of configurationDescriptor, or nil.

## Return Value

Return Value A descriptor pointer, or nil if no matching descriptor returns.

## Discussion

Discussion This method uses IOUSBGetNextDescriptor(_:_:), but returns nil if it finds another descriptor with a bDescriptorType field that matches the value for parentDescriptor’s bDescriptorType. Use nil for currentDescriptor to return the first descriptor after parentDescriptor.

## See Also

### Configuration Descriptor Parsing

- [IOUSBGetNextDescriptor(_:_:)](iousbhost/iousbgetnextdescriptor(_:_:).md)
- [IOUSBGetNextDescriptorWithType(_:_:_:)](iousbhost/iousbgetnextdescriptorwithtype(_:_:_:).md)
- [IOUSBGetNextAssociatedDescriptorWithType(_:_:_:_:)](iousbhost/iousbgetnextassociateddescriptorwithtype(_:_:_:_:).md)
- [IOUSBGetNextInterfaceAssociationDescriptor(_:_:)](iousbhost/iousbgetnextinterfaceassociationdescriptor(_:_:).md)
- [IOUSBGetNextInterfaceDescriptor(_:_:)](iousbhost/iousbgetnextinterfacedescriptor(_:_:).md)
- [IOUSBGetConfigurationMaxPowerMilliAmps(_:_:)](iousbhost/iousbgetconfigurationmaxpowermilliamps(_:_:).md)
