CGDisplaySerialNumber(_:)
Returns the serial number of a display monitor.
Declaration
func CGDisplaySerialNumber(_ display: CGDirectDisplayID) -> UInt32Parameters
- display:
The identifier of the display to be accessed.
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
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,
0x00000000is returned.
If I/O Kit cannot identify the monitor:
If a monitor is connected to the display,
0x00000000is returned.If no monitor is connected to the display hardware,
0xFFFFFFFFis returned.
Note that a serial number is meaningful only in conjunction with a specific vendor and product or model.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()