---
title: "CVDisplayLinkCreateWithActiveCGDisplays(_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvdisplaylinkcreatewithactivecgdisplays(_:)"
---

# CVDisplayLinkCreateWithActiveCGDisplays(_:)

Creates a display link capable of being used with all active displays.

## Declaration

```swift
func CVDisplayLinkCreateWithActiveCGDisplays(_ displayLinkOut: UnsafeMutablePointer<CVDisplayLink?>) -> CVReturn
```

## Parameters

- `displayLinkOut`: On output, displayLinkOut points to the newly created display link.

## Return Value

Return Value A Core Video result code. See Core Video Constants for possible values.

## Discussion

Discussion CVDisplayLinkCreateWithActiveCGDisplays determines the displays actively used by the host computer and creates a display link compatible with all of them. For most applications, calling this function is the most convenient way to create a display link. After creation, you can assign the display link to any active display by calling the CVDisplayLinkSetCurrentCGDisplay(_:_:) function.

## See Also

### Creating Display Links

- [CVDisplayLinkCreateWithCGDisplay(_:_:)](corevideo/cvdisplaylinkcreatewithcgdisplay(_:_:).md)
- [CVDisplayLinkCreateWithCGDisplays(_:_:_:)](corevideo/cvdisplaylinkcreatewithcgdisplays(_:_:_:).md)
- [CVDisplayLinkCreateWithOpenGLDisplayMask(_:_:)](corevideo/cvdisplaylinkcreatewithopengldisplaymask(_:_:).md)
