---
title: CGDataProviderGetBytePointerCallback
framework: coregraphics
role: symbol
role_heading: Type Alias
path: coregraphics/cgdataprovidergetbytepointercallback
---

# CGDataProviderGetBytePointerCallback

A callback function that returns a generic pointer to the provider data.

## Declaration

```swift
typealias CGDataProviderGetBytePointerCallback = (UnsafeMutableRawPointer?) -> UnsafeRawPointer?
```

## Parameters

- `info`: A generic pointer to private data shared among your callback functions. This is the same pointer you supplied to CGDataProviderCreateDirectAccess.

## Return Value

Return Value A generic pointer to your provider data. By suppling this pointer, you are giving Core Graphics read-only access to both the pointer and the underlying provider data. You must not move or modify the provider data until Core Graphics calls your CGDataProviderReleaseBytePointerCallback function.

## Discussion

Discussion When Core Graphics needs direct access to your provider data, this function is called. For information on how to associate your function with a direct-access data provider, see CGDataProviderCreateDirectAccess and CGDataProviderDirectAccessCallbacks.

## See Also

### Creating Direct-Access Data Providers

- [init(directInfo:size:callbacks:)](coregraphics/cgdataprovider/init(directinfo:size:callbacks:).md)
- [init(data:)](coregraphics/cgdataprovider/init(data:).md)
- [init(url:)](coregraphics/cgdataprovider/init(url:).md)
- [init(dataInfo:data:size:releaseData:)](coregraphics/cgdataprovider/init(datainfo:data:size:releasedata:).md)
- [init(filename:)](coregraphics/cgdataprovider/init(filename:).md)
- [CGDataProviderDirectCallbacks](coregraphics/cgdataproviderdirectcallbacks.md)
- [CGDataProviderGetBytesAtPositionCallback](coregraphics/cgdataprovidergetbytesatpositioncallback.md)
- [CGDataProviderReleaseBytePointerCallback](coregraphics/cgdataproviderreleasebytepointercallback.md)
- [CGDataProviderReleaseInfoCallback](coregraphics/cgdataproviderreleaseinfocallback.md)
- [CGDataProviderReleaseDataCallback](coregraphics/cgdataproviderreleasedatacallback.md)
