---
title: "CFTreeGetContext(_:_:)"
framework: Core Foundation
role: symbol
role_heading: Function
path: "corefoundation/cftreegetcontext(_:_:)"
---

# CFTreeGetContext(_:_:)

Returns the context of the specified tree.

## Declaration

```swift
func CFTreeGetContext(_ tree: CFTree!, _ context: UnsafeMutablePointer<CFTreeContext>!)
```

## Parameters

- `tree`: The tree to examine.
- `context`: The doc://com.apple.corefoundation/documentation/CoreFoundation/CFTreeContext structure to be filled in with the context of the specified tree. This value must be a valid C pointer to a doc://com.apple.corefoundation/documentation/CoreFoundation/CFTreeContext structure-sized block of storage. If the version number of the storage is not a valid doc://com.apple.corefoundation/documentation/CoreFoundation/CFTreeContext structure version number, the result is undefined.

## See Also

### Examining a Tree

- [CFTreeFindRoot(_:)](corefoundation/cftreefindroot(_:).md)
- [CFTreeGetChildAtIndex(_:_:)](corefoundation/cftreegetchildatindex(_:_:).md)
- [CFTreeGetChildCount(_:)](corefoundation/cftreegetchildcount(_:).md)
- [CFTreeGetChildren(_:_:)](corefoundation/cftreegetchildren(_:_:).md)
- [CFTreeGetFirstChild(_:)](corefoundation/cftreegetfirstchild(_:).md)
- [CFTreeGetNextSibling(_:)](corefoundation/cftreegetnextsibling(_:).md)
- [CFTreeGetParent(_:)](corefoundation/cftreegetparent(_:).md)
