SLI Zone
NVIDIA.com Developer Home

NVAPI Reference: group__dispcontrolfunctions

Display Control Functions
[Display Control Interface]


Functions

NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay (NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvDisplayHandle *pNvDisplay)
NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName (NvDisplayHandle NvDispHandle, NvAPI_ShortString szDisplayName)
NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName (NvUnAttachedDisplayHandle hNvUnAttachedDisp, NvAPI_ShortString szDisplayName)
NVAPI_INTERFACE NvAPI_EnableHWCursor (NvDisplayHandle hNvDisplay)
NVAPI_INTERFACE NvAPI_DisableHWCursor (NvDisplayHandle hNvDisplay)
NVAPI_INTERFACE NvAPI_GetVBlankCounter (NvDisplayHandle hNvDisplay, NvU32 *pCounter)
NVAPI_INTERFACE NvAPI_SetRefreshRateOverride (NvDisplayHandle hNvDisplay, NvU32 outputsMask, float refreshRate, NvU32 bSetDeferred)
NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId (NvDisplayHandle hNvDisplay, NvU32 *pOutputId)
NVAPI_INTERFACE NvAPI_GetDisplayPortInfo (NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_INFO *pInfo)
NVAPI_INTERFACE NvAPI_SetDisplayPort (NvDisplayHandle hNvDisplay, NvU32 outputId, NV_DISPLAY_PORT_CONFIG *pCfg)
NVAPI_INTERFACE NvAPI_GetHDMISupportInfo (NvDisplayHandle hNvDisplay, NvU32 outputId, NV_HDMI_SUPPORT_INFO *pInfo)
NVAPI_INTERFACE NvAPI_SetView (NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargetInfo, NV_TARGET_VIEW_MODE targetView)
NVAPI_INTERFACE NvAPI_GetView (NvDisplayHandle hNvDisplay, NV_VIEW_TARGET_INFO *pTargets, NvU32 *pTargetMaskCount, NV_TARGET_VIEW_MODE *pTargetView)
NVAPI_INTERFACE NvAPI_SetViewEx (NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NV_TARGET_VIEW_MODE displayView)
NVAPI_INTERFACE NvAPI_GetViewEx (NvDisplayHandle hNvDisplay, NV_DISPLAY_PATH_INFO *pPathInfo, NvU32 *pPathCount, NV_TARGET_VIEW_MODE *pTargetViewMode)
NVAPI_INTERFACE NvAPI_GetSupportedViews (NvDisplayHandle hNvDisplay, NV_TARGET_VIEW_MODE *pTargetViews, NvU32 *pViewCount)

Function Documentation

NVAPI_INTERFACE NvAPI_CreateDisplayFromUnAttachedDisplay ( NvUnAttachedDisplayHandle  hNvUnAttachedDisp,
NvDisplayHandle *  pNvDisplay 
)

This function converts the unattached display handle to an active attached display handle.

At least one GPU must be present in the system and running an NVIDIA display driver.

SUPPORTED OS: Mac OS X, Windows XP and higher
Since:
Version: 82.61
Return values:
NVAPI_INVALID_ARGUMENT hNvUnAttachedDisp is not valid or pNvDisplay is NULL.
NVAPI_OK One or more handles were returned
NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found

NVAPI_INTERFACE NvAPI_DisableHWCursor ( NvDisplayHandle  hNvDisplay  ) 

This function disables hardware cursor support

SUPPORTED OS: Windows XP and higher
Since:
Version: 82.61
Returns:
NVAPI_ERROR or NVAPI_OK

NVAPI_INTERFACE NvAPI_EnableHWCursor ( NvDisplayHandle  hNvDisplay  ) 

This function enables hardware cursor support

SUPPORTED OS: Windows XP
Since:
Version: 82.61
Returns:
NVAPI_ERROR or NVAPI_OK

NVAPI_INTERFACE NvAPI_GetAssociatedDisplayOutputId ( NvDisplayHandle  hNvDisplay,
NvU32 pOutputId 
)

This function gets the active outputId associated with the display handle.

SUPPORTED OS: Windows XP and higher
Since:
Version: 93.60
Parameters:
[in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[out] outputId The active display output ID associated with the selected display handle hNvDisplay. The outputid will have only one bit set. In the case of Clone or Span mode, this will indicate the display outputId of the primary display that the GPU is driving. See NvAPI Handles.
Return values:
NVAPI_OK Call successful.
NVAPI_NVIDIA_DEVICE_NOT_FOUND No NVIDIA GPU driving a display was found.
NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.

NVAPI_INTERFACE NvAPI_GetAssociatedNvidiaDisplayName ( NvDisplayHandle  NvDispHandle,
NvAPI_ShortString  szDisplayName 
)

For a given NVIDIA display handle, this function returns a string (such as "\\.\DISPLAY1") to identify the display.

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

NVAPI_INTERFACE NvAPI_GetDisplayPortInfo ( NvDisplayHandle  hNvDisplay,
NvU32  outputId,
NV_DISPLAY_PORT_INFO pInfo 
)

DESCRIPTION: This function returns the current DisplayPort-related information on the specified device (monitor).

SUPPORTED OS: Windows XP and higher
Since:
Version: 165.22
Parameters:
[in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[in] outputId The display output ID. If "0", then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See NvAPI Handles.
[out] pInfo The DisplayPort information
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.

NVAPI_INTERFACE NvAPI_GetHDMISupportInfo ( NvDisplayHandle  hNvDisplay,
NvU32  outputId,
NV_HDMI_SUPPORT_INFO pInfo 
)

This API returns the current infoframe data on the specified device(monitor).

SUPPORTED OS: Windows XP and higher
Since:
Version: 97.00
Parameters:
[in] hvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[in] outputId The display output id. If it's "0" then the default outputId from NvAPI_GetAssociatedDisplayOutputId() will be used. See NvAPI Handles.
[out] pInfo The monitor and GPU's HDMI support info
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.

NVAPI_INTERFACE NvAPI_GetSupportedViews ( NvDisplayHandle  hNvDisplay,
NV_TARGET_VIEW_MODE pTargetViews,
NvU32 pViewCount 
)

This API lets caller enumerate all the supported NVIDIA display views - nView and Dualview modes.

SUPPORTED OS: Windows Vista and higher
Since:
Version: 86.90
Parameters:
[in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[out] pTargetViews Array of supported views. Can be NULL to retrieve the pViewCount first.
[in,out] pViewCount Count of supported views.
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.

NVAPI_INTERFACE NvAPI_GetUnAttachedAssociatedDisplayName ( NvUnAttachedDisplayHandle  hNvUnAttachedDisp,
NvAPI_ShortString  szDisplayName 
)

This function returns the display name given, for example, "\\DISPLAY1", using the unattached NVIDIA display handle

SUPPORTED OS: Windows XP and higher
Since:
Version: 97.60, 100.06
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

NVAPI_INTERFACE NvAPI_GetVBlankCounter ( NvDisplayHandle  hNvDisplay,
NvU32 pCounter 
)

This function gets the V-blank counter

SUPPORTED OS: Windows XP and higher
Since:
Version: 82.61
Returns:
NVAPI_ERROR or NVAPI_OK

NVAPI_INTERFACE NvAPI_GetView ( NvDisplayHandle  hNvDisplay,
NV_VIEW_TARGET_INFO pTargets,
NvU32 pTargetMaskCount,
NV_TARGET_VIEW_MODE pTargetView 
)

This API lets caller retrieve the target display arrangement for selected source display handle.

SUPPORTED OS: Windows Vista and higher
Since:
Version: 86.90
Parameters:
[in] hNvDisplay NVIDIA Display selection. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[out] pTargetInfo User allocated storage to retrieve an array of NV_VIEW_TARGET_INFO. Can be NULL to retrieve the targetCount.
[in,out] targetMaskCount Count of target device mask specified in pTargetMask. [out] targetView Target view selected from NV_TARGET_VIEW_MODE.
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.

NVAPI_INTERFACE NvAPI_GetViewEx ( NvDisplayHandle  hNvDisplay,
NV_DISPLAY_PATH_INFO pPathInfo,
NvU32 pPathCount,
NV_TARGET_VIEW_MODE pTargetViewMode 
)

DESCRIPTION: This API lets caller retrieve the target display arrangement for selected source display handle.

SUPPORTED OS: Windows Vista and higher
Since:
Version: 165.02
Parameters:
[in] hNvDisplay NVIDIA Display selection. NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNvidiaDisplayHandle().
[in,out] pPathInfo Count field should be set to NVAPI_MAX_DISPLAY_PATH. Can be NULL to retrieve just the pathCount.
[in,out] pPathCount Number of elements in array pPathInfo->path.
[out] pTargetViewMode Display view selected from NV_TARGET_VIEW_MODE.
Return values:
NVAPI_OK Completed request
NVAPI_API_NOT_INTIALIZED NVAPI not initialized
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.
NVAPI_EXPECTED_DISPLAY_HANDLE hNvDisplay is not a valid display handle.

NVAPI_INTERFACE NvAPI_SetDisplayPort ( NvDisplayHandle  hNvDisplay,
NvU32  outputId,
NV_DISPLAY_PORT_CONFIG pCfg 
)

DESCRIPTION: This function sets up DisplayPort-related configurations.

SUPPORTED OS: Windows XP and higher
Since:
Version: 165.22
Parameters:
[in] hNvDisplay NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[in] outputId This display output ID, when it's "0" it means the default outputId generated from the return of NvAPI_GetAssociatedDisplayOutputId(). See NvAPI Handles.
[in] pCfg The display port config structure. If pCfg is NULL, it means to use the driver's default value to setup.
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter

NVAPI_INTERFACE NvAPI_SetRefreshRateOverride ( NvDisplayHandle  hNvDisplay,
NvU32  outputsMask,
float  refreshRate,
NvU32  bSetDeferred 
)

This function overrides the refresh rate on the given display/outputsMask. The new refresh rate can be applied right away in this API call or deferred to be applied with the next OS modeset. The override is good for only one modeset (regardless whether it's deferred or immediate).

SUPPORTED OS: Windows XP
Since:
Version: 82.61
Parameters:
[in] NvDisplay The NVIDIA display handle. It can be NVAPI_DEFAULT_HANDLE or a handle enumerated from NvAPI_EnumNvidiaDisplayHandle().
[in] outputsMask A set of bits that identify all target outputs which are associated with the NVIDIA display handle to apply the refresh rate override. When SLI is enabled, the outputsMask only applies to the GPU that is driving the display output.
[in] refreshRate The override value. "0.0" means cancel the override.
[in] bSetDeferred 
  • "0": Apply the refresh rate override immediately in this API call.
  • "1": Apply refresh rate at the next OS modeset.
Return values:
NVAPI_INVALID_ARGUMENT hNvDisplay or outputsMask is invalid
NVAPI_OK The refresh rate override is correct set
NVAPI_ERROR The operation failed

NVAPI_INTERFACE NvAPI_SetView ( NvDisplayHandle  hNvDisplay,
NV_VIEW_TARGET_INFO pTargetInfo,
NV_TARGET_VIEW_MODE  targetView 
)

This function lets the caller modify the target display arrangement of the selected source display handle in any nView mode. It can also modify or extend the source display in Dualview mode.

SUPPORTED OS: Windows Vista and higher
Since:
Version: 90.18
Parameters:
[in] hNvDisplay NVIDIA Display selection. NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNvidiaDisplayHandle().
[in] pTargetInfo Pointer to array of NV_VIEW_TARGET_INFO, specifying device properties in this view. The first device entry in the array is the physical primary. The device entry with the lowest source id is the desktop primary.
[in] targetCount Count of target devices specified in pTargetInfo.
[in] targetView Target view selected from NV_TARGET_VIEW_MODE.
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.

NVAPI_INTERFACE NvAPI_SetViewEx ( NvDisplayHandle  hNvDisplay,
NV_DISPLAY_PATH_INFO pPathInfo,
NV_TARGET_VIEW_MODE  displayView 
)

This function lets caller to modify the display arrangement for selected source display handle in any of the nview modes. It also allows to modify or extend the source display in dualview mode.

SUPPORTED OS: Windows Vista and higher
Since:
Version: 97.20
Parameters:
[in] hNvDisplay NVIDIA Display selection. NVAPI_DEFAULT_HANDLE is not allowed, it has to be a handle enumerated with NvAPI_EnumNvidiaDisplayHandle().
[in] pPathInfo Pointer to array of NV_VIEW_PATH_INFO, specifying device properties in this view. The first device entry in the array is the physical primary. The device entry with the lowest source id is the desktop primary.
[in] pathCount Count of paths specified in pPathInfo.
[in] displayView Display view selected from NV_TARGET_VIEW_MODE.
Return values:
NVAPI_OK Completed request
NVAPI_ERROR Miscellaneous error occurred
NVAPI_INVALID_ARGUMENT Invalid input parameter.


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