---
title: "IOSurfaceCopyValue(_:_:)"
framework: iosurface
role: symbol
role_heading: Function
path: "iosurface/iosurfacecopyvalue(_:_:)"
---

# IOSurfaceCopyValue(_:_:)

Retrieves a value from the dictionary associated with the buffer.

## Declaration

```swift
func IOSurfaceCopyValue(_ buffer: IOSurfaceRef, _ key: CFString) -> CFTypeRef?
```

## Discussion

Discussion This call lets you attach CF property list types to an IOSurface buffer. This call is expensive (it must essentially serialize the data into the kernel) and thus should be avoided whenever possible. note: This function cannot be used to change the underlying surface properties.

## See Also

### Functions

- [IOSurfaceAlignProperty(_:_:)](iosurface/iosurfacealignproperty(_:_:).md)
- [IOSurfaceAllowsPixelSizeCasting(_:)](iosurface/iosurfaceallowspixelsizecasting(_:).md)
- [IOSurfaceCopyAllValues(_:)](iosurface/iosurfacecopyallvalues(_:).md)
- [IOSurfaceCreate(_:)](iosurface/iosurfacecreate(_:).md)
- [IOSurfaceCreateMachPort(_:)](iosurface/iosurfacecreatemachport(_:).md)
- [IOSurfaceCreateXPCObject(_:)](iosurface/iosurfacecreatexpcobject(_:).md)
- [IOSurfaceDecrementUseCount(_:)](iosurface/iosurfacedecrementusecount(_:).md)
- [IOSurfaceGetAllocSize(_:)](iosurface/iosurfacegetallocsize(_:).md)
- [IOSurfaceGetBaseAddress(_:)](iosurface/iosurfacegetbaseaddress(_:).md)
- [IOSurfaceGetBaseAddressOfPlane(_:_:)](iosurface/iosurfacegetbaseaddressofplane(_:_:).md)
- [IOSurfaceGetBitDepthOfComponentOfPlane(_:_:_:)](iosurface/iosurfacegetbitdepthofcomponentofplane(_:_:_:).md)
- [IOSurfaceGetBitOffsetOfComponentOfPlane(_:_:_:)](iosurface/iosurfacegetbitoffsetofcomponentofplane(_:_:_:).md)
- [IOSurfaceGetBytesPerElement(_:)](iosurface/iosurfacegetbytesperelement(_:).md)
- [IOSurfaceGetBytesPerElementOfPlane(_:_:)](iosurface/iosurfacegetbytesperelementofplane(_:_:).md)
- [IOSurfaceGetBytesPerRow(_:)](iosurface/iosurfacegetbytesperrow(_:).md)
