<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBGetNextCapabilityDescriptorWithType",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetNextCapabilityDescriptorWithType"
  },
  "title" : "IOUSBGetNextCapabilityDescriptorWithType"
}
-->

# IOUSBGetNextCapabilityDescriptorWithType

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

```
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

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

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)