<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBGetNextCapabilityDescriptor(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetNextCapabilityDescriptor"
  },
  "title" : "IOUSBGetNextCapabilityDescriptor(_:_:)"
}
-->

# IOUSBGetNextCapabilityDescriptor(_:_:)

Obtains the next device capability descriptor in a BOS descriptor.

```
func IOUSBGetNextCapabilityDescriptor(_ bosDescriptor: UnsafePointer<IOUSBBOSDescriptor>!, _ currentDescriptor: UnsafePointer<IOUSBDeviceCapabilityDescriptorHeader>!) -> UnsafePointer<IOUSBDeviceCapabilityDescriptorHeader>!
```

## Parameters

`bosDescriptor`

A BOS descriptor that contains the descriptors to iterate through.

`currentDescriptor`

A descriptor pointer within the bounds of `configurationDescriptor`, or `nil`.

## Return Value

A device capability descriptor pointer, or `nil` if no descriptor returns.

## Discussion

This method advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of `bosDescriptor`. Use `nil` for `currentDescriptor` to return the first descriptor after the BOS descriptor.

---

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)