SLI Zone
NVIDIA.com Developer Home

NVAPI Reference: group__disphandlefunctions

Display Handle 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)

Function Documentation

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 NVAPI_END_ENUMERATION.

Sample Code

 NvAPI_Status nvapiStatus;
 NvDisplayHandle hDisplay_a[NVAPI_MAX_PHYSICAL_GPUS * 2] = {0};

 // Enumerate all display handles
 for(i=0,nvapiStatus=NVAPI_OK; nvapiStatus == NVAPI_OK; i++)
   {
    nvapiStatus = NvAPI_EnumNvidiaDisplayHandle(i, &hDisplay_a[i]);
    if (nvapiStatus == NVAPI_OK) nvDisplayCount++;
   }
 printf(" Displays: ");
 for(i=0; i<nvDisplayCount; i++)
   {
    Message(" %08x", hDisplay_a[i]);
   }
 printf("\n");

SUPPORTED OS: Windows XP and higher
Since:
Version: 82.61
Parameters:
[in] thisEnum The index of the NVIDIA display.
[out] pNvDispHandle Pointer to the NVIDIA display handle.
Return values:
NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
NVAPI_OK Return a valid NvDisplayHandle based on the enum index
NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
NVAPI_END_ENUMERATION No more display device to enumerate

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.

SUPPORTED OS: Mac OS X, Windows XP and higher
Since:
Version: 82.61
Parameters:
[in] thisEnum The index of the NVIDIA display.
[out] pNvUnAttachedDispHandle Pointer to the NVIDIA display handle of the unattached display.
Return values:
NVAPI_INVALID_ARGUMENT Either the handle pointer is NULL or enum index too big
NVAPI_OK Return a valid NvDisplayHandle based on the enum index
NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device found in the system
NVAPI_END_ENUMERATION No more display device to enumerate.

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

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

SUPPORTED OS: Windows XP and higher
Since:
Version: 82.61
Return values:
NVAPI_INVALID_ARGUMENT Either argument is NULL
NVAPI_OK *pNvDispHandle is now valid
NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA device maps to that display name


Copyright (c) 2007, 2008 NVIDIA Corporation. All rights reserved.