---
title: "CGDisplaySerialNumber(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgdisplayserialnumber(_:)"
---

# CGDisplaySerialNumber(_:)

Returns the serial number of a display monitor.

## Declaration

```swift
func CGDisplaySerialNumber(_ display: CGDirectDisplayID) -> UInt32
```

## Parameters

- `display`: The identifier of the display to be accessed.

## Return Value

Return Value A serial number for the monitor associated with the specified display, or a constant to indicate an exception—see the discussion below.

## Discussion

Discussion This function uses I/O Kit to identify the monitor associated with the specified display. If I/O Kit can identify the monitor: If the manufacturer has encoded a serial number for the monitor, the number is returned. If there is no encoded serial number,  0x00000000 is returned. If I/O Kit cannot identify the monitor: If a monitor is connected to the display, 0x00000000 is returned. If no monitor is connected to the display hardware, 0xFFFFFFFF is returned. Note that a serial number is meaningful only in conjunction with a specific vendor and product or model.

## See Also

### Functions

- [CGAcquireDisplayFadeReservation(_:_:)](coregraphics/cgacquiredisplayfadereservation(_:_:).md)
- [CGAssociateMouseAndMouseCursorPosition(_:)](coregraphics/cgassociatemouseandmousecursorposition(_:).md)
- [CGBeginDisplayConfiguration(_:)](coregraphics/cgbegindisplayconfiguration(_:).md)
- [CGCancelDisplayConfiguration(_:)](coregraphics/cgcanceldisplayconfiguration(_:).md)
- [CGCaptureAllDisplays()](coregraphics/cgcapturealldisplays().md)
- [CGCaptureAllDisplaysWithOptions(_:)](coregraphics/cgcapturealldisplayswithoptions(_:).md)
- [CGCompleteDisplayConfiguration(_:_:)](coregraphics/cgcompletedisplayconfiguration(_:_:).md)
- [CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)](coregraphics/cgconfiguredisplayfadeeffect(_:_:_:_:_:_:).md)
- [CGConfigureDisplayMirrorOfDisplay(_:_:_:)](coregraphics/cgconfiguredisplaymirrorofdisplay(_:_:_:).md)
- [CGConfigureDisplayMode(_:_:_:)](coregraphics/cgconfiguredisplaymode(_:_:_:).md)
- [CGConfigureDisplayOrigin(_:_:_:_:)](coregraphics/cgconfiguredisplayorigin(_:_:_:_:).md)
- [CGConfigureDisplayStereoOperation(_:_:_:_:)](coregraphics/cgconfiguredisplaystereooperation(_:_:_:_:).md)
- [CGConfigureDisplayWithDisplayMode(_:_:_:_:)](coregraphics/cgconfiguredisplaywithdisplaymode(_:_:_:_:).md)
- [CGCursorIsDrawnInFramebuffer()](coregraphics/cgcursorisdrawninframebuffer().md)
- [CGCursorIsVisible()](coregraphics/cgcursorisvisible().md)
