---
title: CreateInterfaceIterator
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostdevice/createinterfaceiterator
---

# CreateInterfaceIterator

Creates an iterator to get the list of interfaces from the device.

## Declaration

```occ
virtual kern_return_t CreateInterfaceIterator(uintptr_t *ref);
```

## Parameters

- `ref`: A pointer to a variable. On return, this variable contains an opaque iterator reference.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

Discussion Use this method to create an iterator for the IOUSBHostInterface children belonging to this device. Pass the value you receive in the ref parameter to the CopyInterface method when fetching the interfaces.

## See Also

### Iterating Over the Device Interfaces

- [CopyInterface](usbdriverkit/iousbhostdevice/copyinterface.md)
- [DestroyInterfaceIterator](usbdriverkit/iousbhostdevice/destroyinterfaceiterator.md)
