---
title: "MIDIEndpointGetEntity(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midiendpointgetentity(_:_:)"
---

# MIDIEndpointGetEntity(_:_:)

Returns an endpoint’s entity.

## Declaration

```swift
func MIDIEndpointGetEntity(_ inEndpoint: MIDIEndpointRef, _ outEntity: UnsafeMutablePointer<MIDIEntityRef>?) -> OSStatus
```

## Parameters

- `inEndpoint`: The endpoint to query.
- `outEntity`: On exit, the endpoint’s owning entity, or NULL if none.

## Return Value

Return Value An OSStatus result code.

## Discussion

Discussion Virtual sources and destinations don’t have entities.

## See Also

### Endpoint management

- [MIDIEndpointDispose(_:)](coremidi/midiendpointdispose(_:).md)
- [MIDIEndpointGetRefCons(_:_:_:)](coremidi/midiendpointgetrefcons(_:_:_:).md)
- [MIDIEndpointSetRefCons(_:_:_:)](coremidi/midiendpointsetrefcons(_:_:_:).md)
- [MIDISourceCreateWithProtocol(_:_:_:_:)](coremidi/midisourcecreatewithprotocol(_:_:_:_:).md)
- [MIDIGetSource(_:)](coremidi/midigetsource(_:).md)
- [MIDIGetNumberOfSources()](coremidi/midigetnumberofsources().md)
- [MIDIDestinationCreateWithProtocol(_:_:_:_:_:)](coremidi/mididestinationcreatewithprotocol(_:_:_:_:_:).md)
- [MIDIGetDestination(_:)](coremidi/midigetdestination(_:).md)
- [MIDIGetNumberOfDestinations()](coremidi/midigetnumberofdestinations().md)
- [MIDIEndpointRef](coremidi/midiendpointref.md)
