---
title: "MIDIThruConnectionCreate(_:_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midithruconnectioncreate(_:_:_:)"
---

# MIDIThruConnectionCreate(_:_:_:)

Creates a MIDI thru connection.

## Declaration

```swift
func MIDIThruConnectionCreate(_ inPersistentOwnerID: CFString?, _ inConnectionParams: CFData, _ outConnection: UnsafeMutablePointer<MIDIThruConnectionRef>) -> OSStatus
```

## Parameters

- `inPersistentOwnerID`: A unique identifier of the owning object, such as com.mycompany.MyApp. If you pass NULL, the client owns the connection and it’s automatically disposed with the client.
- `inConnectionParams`: A doc://com.apple.coremidi/documentation/CoreMIDI/MIDIThruConnectionParams object that’s contained in a doc://com.apple.documentation/documentation/CoreFoundation/CFData.
- `outConnection`: On successful return, a reference to the newly created connection.

## Return Value

Return Value An OSStatus result code.

## See Also

### Managing Connections

- [MIDIThruConnectionDispose(_:)](coremidi/midithruconnectiondispose(_:).md)
- [MIDIThruConnectionRef](coremidi/midithruconnectionref.md)
- [MIDIThruConnectionEndpoint](coremidi/midithruconnectionendpoint.md)
- [Endpoint Configuration](coremidi/endpoint-configuration.md)
