<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBHostDevice/CopyInterface",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUSBHostDevice@F@CopyInterface#l#**$@S@IOUSBHostInterface#"
  },
  "title" : "CopyInterface"
}
-->

# CopyInterface

Gets the next host interface child associated with this device.

```
virtual kern_return_t CopyInterface(uintptr_t ref, IOUSBHostInterface **interface);
```

## Parameters

`ref`

The opaque iterator reference you received from the [`CreateInterfaceIterator`](/documentation/USBDriverKit/IOUSBHostDevice/CreateInterfaceIterator) method.

`interface`

A pointer to a variable. On output, this variable contains a pointer to the next [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) object. When there are no more iterfaces, this method assigns `NULL` to the variable.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. See <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

Keep calling this method until the value in the interface parameter is `NULL`.

---

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)