---
title: IOUSBGetNextAssociatedDescriptorWithType
framework: usbdriverkit
role: symbol
role_heading: Function
path: usbdriverkit/iousbgetnextassociateddescriptorwithtype
---

# IOUSBGetNextAssociatedDescriptorWithType

Finds the next descriptor matching a specific type within a configuration descriptor that belongs to another container descriptor.

## Declaration

```occ
const IOUSBDescriptorHeader *IOUSBGetNextAssociatedDescriptorWithType(const IOUSBConfigurationDescriptor *configurationDescriptor, const IOUSBDescriptorHeader *parentDescriptor, const IOUSBDescriptorHeader *currentDescriptor, const uint8_t type);
```

## Parameters

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

## Return Value

Return Value A descriptor pointer, or NULL if no matching descriptor is found.

## Discussion

Discussion This method uses getNextAssociatedDescriptor, and further validates that the returned descriptor’s type field matches the type parameter passed to this method.

## See Also

### Configuration Descriptors

- [IOUSBGetNextDescriptor](usbdriverkit/iousbgetnextdescriptor.md)
- [IOUSBGetNextDescriptorWithType](usbdriverkit/iousbgetnextdescriptorwithtype.md)
- [IOUSBGetNextAssociatedDescriptor](usbdriverkit/iousbgetnextassociateddescriptor.md)
- [IOUSBGetConfigurationMaxPowerMilliAmps](usbdriverkit/iousbgetconfigurationmaxpowermilliamps.md)
