---
title: "IOUSBGetNextCapabilityDescriptorWithType(_:_:_:)"
framework: iousbhost
role: symbol
role_heading: Function
path: "iousbhost/iousbgetnextcapabilitydescriptorwithtype(_:_:_:)"
---

# IOUSBGetNextCapabilityDescriptorWithType(_:_:_:)

Obtains the next descriptor matching a specific type within a BOS descriptor.

## Declaration

```swift
func IOUSBGetNextCapabilityDescriptorWithType(_ bosDescriptor: UnsafePointer<IOUSBBOSDescriptor>!, _ currentDescriptor: UnsafePointer<IOUSBDeviceCapabilityDescriptorHeader>!, _ type: UInt8) -> 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.
- `type`: The descriptor type to find.

## Return Value

Return Value A device capability descriptor pointer, or nil if no matching descriptor returns.

## Discussion

Discussion This method uses IOUSBGetNextCapabilityDescriptor(_:_:), and further validates that the returned descriptor’s bDevCapabilityType field matches the type parameter.

## See Also

### BOS Descriptor Parsing

- [IOUSBGetUSB20ExtensionDeviceCapabilityDescriptor(_:)](iousbhost/iousbgetusb20extensiondevicecapabilitydescriptor(_:).md)
- [IOUSBGetNextCapabilityDescriptor(_:_:)](iousbhost/iousbgetnextcapabilitydescriptor(_:_:).md)
- [IOUSBGetSuperSpeedDeviceCapabilityDescriptor(_:)](iousbhost/iousbgetsuperspeeddevicecapabilitydescriptor(_:).md)
- [IOUSBGetContainerIDDescriptor(_:)](iousbhost/iousbgetcontaineriddescriptor(_:).md)
- [IOUSBGetBillboardDescriptor(_:)](iousbhost/iousbgetbillboarddescriptor(_:).md)
