---
title: "MIDIEntityGetDestination(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midientitygetdestination(_:_:)"
---

# MIDIEntityGetDestination(_:_:)

Returns one of an entity’s destinations.

## Declaration

```swift
func MIDIEntityGetDestination(_ entity: MIDIEntityRef, _ destIndex0: Int) -> MIDIEndpointRef
```

## Parameters

- `entity`: The entity to query.
- `destIndex0`: The destination index.

## Return Value

Return Value A reference to a destination, or NULL if an error occurred.

## See Also

### Entity lookup

- [MIDIEntityGetDevice(_:_:)](coremidi/midientitygetdevice(_:_:).md)
- [MIDIEntityGetNumberOfSources(_:)](coremidi/midientitygetnumberofsources(_:).md)
- [MIDIEntityGetSource(_:_:)](coremidi/midientitygetsource(_:_:).md)
- [MIDIEntityGetNumberOfDestinations(_:)](coremidi/midientitygetnumberofdestinations(_:).md)
- [MIDIEntityRef](coremidi/midientityref.md)
