NVAPI Reference Documentation
Release 384: June 27
This section explains the following NVAPI concepts and principles:
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 Handles–SLI Mode
NvAPI Handles–Two GPUs Under Dualview
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:
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.