---
title: CopyDevice
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostinterface/copydevice
---

# CopyDevice

Returns the host device object that contains this interface.

## Declaration

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

## Parameters

- `device`: A variable in which to store the doc://com.apple.usbdriverkit/documentation/USBDriverKit/IOUSBHostDevice object. It’s your responsibility to release this object when you finish using it.

## Return Value

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