IOUSBGetNextCapabilityDescriptor
Gets the next device capability descriptor in a BOS descriptor.
Declaration
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
The device capability descriptor pointer, or NULL if no descriptor is available.
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.