---
title: "IOUSBGetNextDescriptor(_:_:)"
framework: iousbhost
role: symbol
role_heading: Function
path: "iousbhost/iousbgetnextdescriptor(_:_:)"
---

# IOUSBGetNextDescriptor(_:_:)

Obtains the next descriptor in a configuration descriptor.

## Declaration

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

## Parameters

- `configurationDescriptor`: A configuration descriptor that contains the descriptors to iterate through.
- `currentDescriptor`: A description header 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 advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of configurationDescriptor. Use nil for currentDescriptor to return the first descriptor after the configuration descriptor.

## See Also

### Configuration Descriptor Parsing

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