---
title: CopyPipe
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostinterface/copypipe
---

# CopyPipe

Returns the pipe for the specified endpoint address.

## Declaration

```occ
virtual kern_return_t CopyPipe(uint8_t address, IOUSBHostPipe **pipe);
```

## Parameters

- `address`: The address of the pipe you want. Get the address for a specific pipe from the doc://com.apple.usbdriverkit/documentation/USBDriverKit/IOUSBEndpointDescriptor/bEndpointAddress field of the appropriate doc://com.apple.usbdriverkit/documentation/USBDriverKit/IOUSBEndpointDescriptor structure.
- `pipe`: A variable in which to store the doc://com.apple.usbdriverkit/documentation/USBDriverKit/IOUSBHostPipe 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.

## Discussion

Discussion If the specified pipe doesn’t exist yet, but is part of the interface, this method creates the pipe before returning it.
