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

# CopyDevice

Returns the host device object that contains this interface.

```
virtual kern_return_t CopyDevice(IOUSBHostDevice **device);
```

## Parameters

`device`

A variable in which to store the [`IOUSBHostDevice`](/documentation/USBDriverKit/IOUSBHostDevice) object. It’s your responsibility to release this object when you finish using it.

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

---

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)