NVAPI Reference Documentation
NVIDIA
Release 435: August 22
2019

General NVAPI Functions

Functions

NVAPI_INTERFACE NvAPI_Initialize ()
 
NVAPI_INTERFACE NvAPI_Unload ()
 
NVAPI_INTERFACE NvAPI_GetErrorMessage (NvAPI_Status nr, NvAPI_ShortString szDesc)
 
NVAPI_INTERFACE NvAPI_GetInterfaceVersionString (NvAPI_ShortString szDesc)
 

Detailed Description

Function Documentation

NVAPI_INTERFACE NvAPI_GetErrorMessage ( NvAPI_Status  nr,
NvAPI_ShortString  szDesc 
)

This function converts an NvAPI error code into a null terminated string.

SUPPORTED OS: Windows 7 and higher

Since
Release: 80
Parameters
nrThe error code to convert
szDescThe string corresponding to the error code
Returns
NULL terminated string (always, never NULL)
NVAPI_INTERFACE NvAPI_GetInterfaceVersionString ( NvAPI_ShortString  szDesc)

This function returns a string describing the version of the NvAPI library. The contents of the string are human readable. Do not assume a fixed format.

SUPPORTED OS: Windows 7 and higher

Since
Release: 80
Parameters
szDescUser readable string giving NvAPI version information
Returns
See NvAPI Status Values for the list of possible return values.
NVAPI_INTERFACE NvAPI_Initialize ( )

This function initializes the NvAPI library (if not already initialized) but always increments the ref-counter. This must be called before calling other NvAPI_ functions. Note: It is now mandatory to call NvAPI_Initialize before calling any other NvAPI. NvAPI_Unload should be called to unload the NVAPI Library.

SUPPORTED OS: Windows 7 and higher

Since
Release: 80
Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_LIBRARY_NOT_FOUNDFailed to load the NVAPI support library
See also
NvAPI Status Values
NVAPI_INTERFACE NvAPI_Unload ( )

DESCRIPTION: Decrements the ref-counter and when it reaches ZERO, unloads NVAPI library. This must be called in pairs with NvAPI_Initialize.

SUPPORTED OS: Windows 7 and higher

   If the client wants unload functionality, it is recommended to always call NvAPI_Initialize and NvAPI_Unload in pairs.

Unloading NvAPI library is not supported when the library is in a resource locked state. Some functions in the NvAPI library initiates an operation or allocates certain resources and there are corresponding functions available, to complete the operation or free the allocated resources. All such function pairs are designed to prevent unloading NvAPI library.

For example, if NvAPI_Unload is called after NvAPI_XXX which locks a resource, it fails with NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources, before calling NvAPI_Unload again.

Returns
This API can return any of the error codes enumerated in NvAPI_Status. If there are return error codes with specific meaning for this API, they are listed below.
Return values
NVAPI_API_IN_USEAtleast an API is still being called hence cannot unload requested driver.


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

NVIDIA