NVAPI Reference Documentation
NVIDIA
Release 550
Wed Mar 20 2024

Functions
Display Handle Interface

Functions

NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle (NvU32 thisEnum, NvDisplayHandle *pNvDispHandle)
 
NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle (NvU32 thisEnum, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle)
 
NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle (const char *szDisplayName, NvDisplayHandle *pNvDispHandle)
 
NVAPI_INTERFACE NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle (const char *szDisplayName, NvUnAttachedDisplayHandle *pNvUnAttachedDispHandle)
 

Detailed Description

Function Documentation

◆ NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle()

NVAPI_INTERFACE NvAPI_DISP_GetAssociatedUnAttachedNvidiaDisplayHandle ( const char *  szDisplayName,
NvUnAttachedDisplayHandle *  pNvUnAttachedDispHandle 
)

DESCRIPTION: This function returns the handle of an unattached NVIDIA display that is associated with the given display name (such as "\\DISPLAY1").

SUPPORTED OS: Windows 10 and higher

Since
Release: 185
Return values
NVAPI_INVALID_ARGUMENTEither argument is NULL.
NVAPI_OK*pNvUnAttachedDispHandle is now valid.
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA device maps to that display name.

◆ NvAPI_EnumNvidiaDisplayHandle()

NVAPI_INTERFACE NvAPI_EnumNvidiaDisplayHandle ( NvU32  thisEnum,
NvDisplayHandle *  pNvDispHandle 
)

This function returns the handle of the NVIDIA display specified by the enum index (thisEnum). The client should keep enumerating until it returns error.

Note: Display handles can get invalidated on a modeset, so the calling applications need to renum the handles after every modeset.

SUPPORTED OS: Windows 10 and higher

Since
Release: 80
Parameters
[in]thisEnumThe index of the NVIDIA display.
[out]pNvDispHandlePointer to the NVIDIA display handle.
Return values
NVAPI_INVALID_ARGUMENTEither the handle pointer is NULL or enum index too big
NVAPI_OKReturn a valid NvDisplayHandle based on the enum index
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA device found in the system
NVAPI_END_ENUMERATIONNo more display device to enumerate

◆ NvAPI_EnumNvidiaUnAttachedDisplayHandle()

NVAPI_INTERFACE NvAPI_EnumNvidiaUnAttachedDisplayHandle ( NvU32  thisEnum,
NvUnAttachedDisplayHandle *  pNvUnAttachedDispHandle 
)

This function returns the handle of the NVIDIA unattached display specified by the enum index (thisEnum). The client should keep enumerating until it returns error. Note: Display handles can get invalidated on a modeset, so the calling applications need to renum the handles after every modeset.

SUPPORTED OS: Windows 10 and higher

Since
Release: 80
Parameters
[in]thisEnumThe index of the NVIDIA display.
[out]pNvUnAttachedDispHandlePointer to the NVIDIA display handle of the unattached display.
Return values
NVAPI_INVALID_ARGUMENTEither the handle pointer is NULL or enum index too big
NVAPI_OKReturn a valid NvDisplayHandle based on the enum index
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA device found in the system
NVAPI_END_ENUMERATIONNo more display device to enumerate.

◆ NvAPI_GetAssociatedNvidiaDisplayHandle()

NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayHandle ( const char *  szDisplayName,
NvDisplayHandle *  pNvDispHandle 
)

This function returns the handle of the NVIDIA display that is associated with the given display "name" (such as "\\.\DISPLAY1").

SUPPORTED OS: Windows 10 and higher

Since
Release: 80
Return values
NVAPI_INVALID_ARGUMENTEither argument is NULL
NVAPI_OK*pNvDispHandle is now valid
NVAPI_NVIDIA_DEVICE_NOT_FOUNDNo NVIDIA device maps to that display name

NVIDIA
Copyright (c) 2007–2024 NVIDIA Corporation. All rights reserved.

NVIDIA