---
title: "CFMessagePortGetInvalidationCallBack(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfmessageportgetinvalidationcallback(_:)"
---

# CFMessagePortGetInvalidationCallBack(_:)

Returns the invalidation callback function for a CFMessagePort object.

## Declaration

```swift
func CFMessagePortGetInvalidationCallBack(_ ms: CFMessagePort!) -> CFMessagePortInvalidationCallBack!
```

## Parameters

- `ms`: The message port to examine.

## Return Value

Return Value The callback function invoked when ms is invalidated. NULL if no callback has been set with CFMessagePortSetInvalidationCallBack(_:_:).

## See Also

### Examining a Message Port

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