---
title: IOUSBGetNextCapabilityDescriptorWithType
framework: usbdriverkit
role: symbol
role_heading: Function
path: usbdriverkit/iousbgetnextcapabilitydescriptorwithtype
---

# IOUSBGetNextCapabilityDescriptorWithType

Finds the next descriptor matching a given type within a BOS descriptor.

## Declaration

```occ
const IOUSBDeviceCapabilityDescriptorHeader *IOUSBGetNextCapabilityDescriptorWithType(const IOUSBBOSDescriptor *bosDescriptor, const IOUSBDeviceCapabilityDescriptorHeader *currentDescriptor, const uint8_t type);
```

## Parameters

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

## Return Value

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

## Discussion

Discussion This method uses getNextCapabilityDescriptor, and further validates that the returned descriptor’s bDevCapabilityType field matches the type parameter.

## See Also

### BOS Descriptors

- [IOUSBGetNextCapabilityDescriptor](usbdriverkit/iousbgetnextcapabilitydescriptor.md)
- [IOUSBGetSuperSpeedDeviceCapabilityDescriptor](usbdriverkit/iousbgetsuperspeeddevicecapabilitydescriptor.md)
- [IOUSBGetSuperSpeedPlusDeviceCapabilityDescriptor](usbdriverkit/iousbgetsuperspeedplusdevicecapabilitydescriptor.md)
- [IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor](usbdriverkit/iousbgetusb20extensiondevicecapabilitydescriptor.md)
- [IOUSBGetContainerIDDescriptor](usbdriverkit/iousbgetcontaineriddescriptor.md)
- [IOUSBGetPlatformCapabilityDescriptor](usbdriverkit/iousbgetplatformcapabilitydescriptor.md)
- [IOUSBGetBillboardDescriptor](usbdriverkit/iousbgetbillboarddescriptor.md)
