---
title: "CFMessagePortGetName(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfmessageportgetname(_:)"
---

# CFMessagePortGetName(_:)

Returns the name with which a CFMessagePort object is registered.

## Declaration

```swift
func CFMessagePortGetName(_ ms: CFMessagePort!) -> CFString!
```

## Parameters

- `ms`: The message port to examine.

## Return Value

Return Value The registered name of ms, NULL if unnamed. Ownership follows the The Get Rule.

## See Also

### Examining a Message Port

- [CFMessagePortGetContext(_:_:)](corefoundation/cfmessageportgetcontext(_:_:).md)
- [CFMessagePortGetInvalidationCallBack(_:)](corefoundation/cfmessageportgetinvalidationcallback(_:).md)
- [CFMessagePortIsRemote(_:)](corefoundation/cfmessageportisremote(_:).md)
- [CFMessagePortIsValid(_:)](corefoundation/cfmessageportisvalid(_:).md)
