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

# CopyPipe

Returns the pipe for the specified endpoint address.

```
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 [`bEndpointAddress`](/documentation/USBDriverKit/IOUSBEndpointDescriptor/bEndpointAddress) field of the appropriate [`IOUSBEndpointDescriptor`](/documentation/USBDriverKit/IOUSBEndpointDescriptor) structure.

`pipe`

A variable in which to store the [`IOUSBHostPipe`](/documentation/USBDriverKit/IOUSBHostPipe) 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>.

## Discussion

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

---

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)