NVAPI Reference Documentation
NVIDIA
Release 361: January 27
2016

Important NVAPI Concepts

This section explains the following NVAPI concepts and principles:

NvAPI Handles

NvAPI handles are retrieved from various calls and passed to other calls in NvAPI. These are meant to be opaque types, and do not necessarily correspond to specific indices, HDCs, or display indices.

Most handles remain valid until a display re-configuration such as a display mode set, or a GPU reconfiguration such as going into or out of SLI modes. If NvAPI returns NVAPI_HANDLE_INVALIDATED, the application should discard all handles and re-enumerate them.

The following is a description of key NvAPI handles and identifiers:

The following figures illustrate these four identifiers used by NvAPI under various GPU configurations.

NvAPI Handles–Dualview, Clone and Spanning Modes

NVAPI_Handles1.jpg

NvAPI Handles–SLI Mode

NVAPI_Handles2.jpg

NvAPI Handles–Two GPUs Under Dualview

NVAPI_Handles3.jpg

Structure Versions Must be Initialized

Each structure contains a version field which the caller must initialize so that the API library can track the version that is used by the calling application.

Each structure also has an associated NvAPI macro that you can use to initialize the version field. For example, the macro for structure NV_XXX is NV_XXX_VER. Initialize the version field as follows:

 NV_XXX.version = NV_XXX_VER; 

Use a Static Link with Applications

NvAPI cannot be dynamically linked to applications. You must create a static link to the library and then call NvAPI_Initialize(), which loads nvapi.dll dynamically.

If the NVIDIA drivers are not installed on the system or nvapi.dll is not present when the application calls NvAPI_Initialize(), the call just returns an error. The application will still load.



Copyright (c) 2007-2015 NVIDIA Corporation. All rights reserved.

NVIDIA