<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 10.1.0 - 10.6.0",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDISetSerialPortOwner",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@F@MIDISetSerialPortOwner"
  },
  "title" : "MIDISetSerialPortOwner"
}
-->

# MIDISetSerialPortOwner

Specifies the MIDI driver that owns a serial port.

```
extern OSStatus MIDISetSerialPortOwner(CFStringRef portName, CFStringRef driverName);
```

## Parameters

`portName`

The name of a serial port.

`driverName`

The name of the driver that owns the serial port, or NULL to specify that no driver owns it.

## Return Value

An OSStatus result code.

## Discussion

Use this to assign ownership of a serial port to one of the MIDI drivers installed in the system.

New for CoreMIDI 1.1.

---

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)