---
title: IOUSBGetNextCapabilityDescriptor
framework: usbdriverkit
role: symbol
role_heading: Function
path: usbdriverkit/iousbgetnextcapabilitydescriptor
---

# IOUSBGetNextCapabilityDescriptor

Gets the next device capability descriptor in a BOS descriptor.

## Declaration

```occ
const IOUSBDeviceCapabilityDescriptorHeader *IOUSBGetNextCapabilityDescriptor(const IOUSBBOSDescriptor *bosDescriptor, const IOUSBDeviceCapabilityDescriptorHeader *currentDescriptor);
```

## 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.

## Return Value

Return Value The device capability descriptor pointer, or NULL if no descriptor is available.

## Discussion

Discussion This method advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of the BOS descriptor. Passing NULL for currentDescriptor returns the first descriptor after the BOS descriptor.

## See Also

### BOS Descriptors

- [IOUSBGetNextCapabilityDescriptorWithType](usbdriverkit/iousbgetnextcapabilitydescriptorwithtype.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)
