---
title: IOUSBGetNextDescriptor
framework: usbdriverkit
role: symbol
role_heading: Function
path: usbdriverkit/iousbgetnextdescriptor
---

# IOUSBGetNextDescriptor

Gets the next descriptor in a configuration descriptor.

## Declaration

```occ
const IOUSBDescriptorHeader *IOUSBGetNextDescriptor(const IOUSBConfigurationDescriptor *configurationDescriptor, const IOUSBDescriptorHeader *currentDescriptor);
```

## Parameters

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

## Return Value

Return Value The descriptor pointer, or NULL if no descriptor can be returned.

## Discussion

Discussion This method advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of the configuration descriptor. Passing NULL for the currentDescriptor argument returns the first descriptor after the configuration descriptor.

## See Also

### Configuration Descriptors

- [IOUSBGetNextDescriptorWithType](usbdriverkit/iousbgetnextdescriptorwithtype.md)
- [IOUSBGetNextAssociatedDescriptor](usbdriverkit/iousbgetnextassociateddescriptor.md)
- [IOUSBGetNextAssociatedDescriptorWithType](usbdriverkit/iousbgetnextassociateddescriptorwithtype.md)
- [IOUSBGetConfigurationMaxPowerMilliAmps](usbdriverkit/iousbgetconfigurationmaxpowermilliamps.md)
