NVAPI Reference Documentation
NVIDIA
Release 550
Wed Apr 17 2024

Data Structures | Macros | Typedefs | Enumerations | Functions
Driver Settings (DRS) APIs

Data Structures

struct  _NVDRS_GPU_SUPPORT
 
struct  _NVDRS_BINARY_SETTING
 
struct  _NVDRS_SETTING_VALUES
 
struct  _NVDRS_SETTING_V1
 
struct  _NVDRS_APPLICATION_V1
 
struct  _NVDRS_APPLICATION_V2
 
struct  _NVDRS_APPLICATION_V3
 
struct  _NVDRS_APPLICATION_V4
 
struct  _NVDRS_PROFILE_V1
 

Macros

#define NVAPI_DRS_GLOBAL_PROFILE   ((NvDRSProfileHandle) -1)
 
#define NVAPI_SETTING_MAX_VALUES   100
 
#define NVDRS_SETTING_VALUES_VER   MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)
 
#define NVDRS_SETTING_VER1   MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1)
 
#define NVDRS_SETTING_VER   NVDRS_SETTING_VER1
 
#define NVDRS_APPLICATION_VER_V1   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V1,1)
 
#define NVDRS_APPLICATION_VER_V2   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V2,2)
 
#define NVDRS_APPLICATION_VER_V3   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V3,3)
 
#define NVDRS_APPLICATION_VER_V4   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V4,4)
 
#define NVDRS_APPLICATION_VER   NVDRS_APPLICATION_VER_V4
 
#define NVDRS_PROFILE_VER1   MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1)
 
#define NVDRS_PROFILE_VER   NVDRS_PROFILE_VER1
 

Typedefs

typedef enum _NVDRS_SETTING_TYPE NVDRS_SETTING_TYPE
 
typedef enum _NVDRS_SETTING_LOCATION NVDRS_SETTING_LOCATION
 
typedef struct _NVDRS_GPU_SUPPORT NVDRS_GPU_SUPPORT
 
typedef struct _NVDRS_BINARY_SETTING NVDRS_BINARY_SETTING
 
typedef struct _NVDRS_SETTING_VALUES NVDRS_SETTING_VALUES
 
typedef struct _NVDRS_SETTING_V1 NVDRS_SETTING_V1
 
typedef NVDRS_SETTING_V1 NVDRS_SETTING
 
typedef struct _NVDRS_APPLICATION_V1 NVDRS_APPLICATION_V1
 
typedef struct _NVDRS_APPLICATION_V2 NVDRS_APPLICATION_V2
 
typedef struct _NVDRS_APPLICATION_V3 NVDRS_APPLICATION_V3
 
typedef struct _NVDRS_APPLICATION_V4 NVDRS_APPLICATION_V4
 
typedef NVDRS_APPLICATION_V4 NVDRS_APPLICATION
 
typedef struct _NVDRS_PROFILE_V1 NVDRS_PROFILE_V1
 
typedef NVDRS_PROFILE_V1 NVDRS_PROFILE
 

Enumerations

enum  _NVDRS_SETTING_TYPE { NVDRS_DWORD_TYPE , NVDRS_BINARY_TYPE , NVDRS_STRING_TYPE , NVDRS_WSTRING_TYPE }
 
enum  _NVDRS_SETTING_LOCATION { NVDRS_CURRENT_PROFILE_LOCATION , NVDRS_GLOBAL_PROFILE_LOCATION , NVDRS_BASE_PROFILE_LOCATION , NVDRS_DEFAULT_PROFILE_LOCATION }
 

Functions

 NV_DECLARE_HANDLE (NvDRSSessionHandle)
 
 NV_DECLARE_HANDLE (NvDRSProfileHandle)
 
NVAPI_INTERFACE NvAPI_DRS_CreateSession (NvDRSSessionHandle *phSession)
 
NVAPI_INTERFACE NvAPI_DRS_DestroySession (NvDRSSessionHandle hSession)
 
NVAPI_INTERFACE NvAPI_DRS_LoadSettings (NvDRSSessionHandle hSession)
 
NVAPI_INTERFACE NvAPI_DRS_SaveSettings (NvDRSSessionHandle hSession)
 
NVAPI_INTERFACE NvAPI_DRS_LoadSettingsFromFile (NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName)
 
NVAPI_INTERFACE NvAPI_DRS_SaveSettingsToFile (NvDRSSessionHandle hSession, NvAPI_UnicodeString fileName)
 
NVAPI_INTERFACE NvAPI_DRS_CreateProfile (NvDRSSessionHandle hSession, NVDRS_PROFILE *pProfileInfo, NvDRSProfileHandle *phProfile)
 
NVAPI_INTERFACE NvAPI_DRS_DeleteProfile (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile)
 
NVAPI_INTERFACE NvAPI_DRS_SetCurrentGlobalProfile (NvDRSSessionHandle hSession, NvAPI_UnicodeString wszGlobalProfileName)
 
NVAPI_INTERFACE NvAPI_DRS_GetCurrentGlobalProfile (NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile)
 
NVAPI_INTERFACE NvAPI_DRS_GetProfileInfo (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo)
 
NVAPI_INTERFACE NvAPI_DRS_SetProfileInfo (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_PROFILE *pProfileInfo)
 
NVAPI_INTERFACE NvAPI_DRS_FindProfileByName (NvDRSSessionHandle hSession, NvAPI_UnicodeString profileName, NvDRSProfileHandle *phProfile)
 
NVAPI_INTERFACE NvAPI_DRS_EnumProfiles (NvDRSSessionHandle hSession, NvU32 index, NvDRSProfileHandle *phProfile)
 
NVAPI_INTERFACE NvAPI_DRS_GetNumProfiles (NvDRSSessionHandle hSession, NvU32 *numProfiles)
 
NVAPI_INTERFACE NvAPI_DRS_CreateApplication (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApplication)
 
NVAPI_INTERFACE NvAPI_DRS_DeleteApplicationEx (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_APPLICATION *pApp)
 
NVAPI_INTERFACE NvAPI_DRS_DeleteApplication (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName)
 
NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvAPI_UnicodeString appName, NVDRS_APPLICATION *pApplication)
 
NVAPI_INTERFACE NvAPI_DRS_EnumApplications (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *appCount, NVDRS_APPLICATION *pApplication)
 
NVAPI_INTERFACE NvAPI_DRS_FindApplicationByName (__in NvDRSSessionHandle hSession, __in NvAPI_UnicodeString appName, __out NvDRSProfileHandle *phProfile, __inout NVDRS_APPLICATION *pApplication)
 
NVAPI_INTERFACE NvAPI_DRS_SetSetting (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NVDRS_SETTING *pSetting)
 
NVAPI_INTERFACE NvAPI_DRS_GetSetting (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId, NVDRS_SETTING *pSetting)
 
NVAPI_INTERFACE NvAPI_DRS_EnumSettings (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 startIndex, NvU32 *settingsCount, NVDRS_SETTING *pSetting)
 
NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingIds (NvU32 *pSettingIds, NvU32 *pMaxCount)
 
NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingValues (NvU32 settingId, NvU32 *pMaxNumValues, NVDRS_SETTING_VALUES *pSettingValues)
 
NVAPI_INTERFACE NvAPI_DRS_GetSettingIdFromName (NvAPI_UnicodeString settingName, NvU32 *pSettingId)
 
NVAPI_INTERFACE NvAPI_DRS_GetSettingNameFromId (NvU32 settingId, NvAPI_UnicodeString *pSettingName)
 
NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId)
 
NVAPI_INTERFACE NvAPI_DRS_RestoreAllDefaults (NvDRSSessionHandle hSession)
 
NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefault (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile)
 
NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefaultSetting (NvDRSSessionHandle hSession, NvDRSProfileHandle hProfile, NvU32 settingId)
 
NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile (NvDRSSessionHandle hSession, NvDRSProfileHandle *phProfile)
 

Detailed Description

DRS, or DRiver Settings, is a new framework introduced in R256 that handles the storage, management, API layers, and related infrastructure of 3D settings, application profiles, and other settings.

Macro Definition Documentation

◆ NVAPI_DRS_GLOBAL_PROFILE

#define NVAPI_DRS_GLOBAL_PROFILE   ((NvDRSProfileHandle) -1)

◆ NVAPI_SETTING_MAX_VALUES

#define NVAPI_SETTING_MAX_VALUES   100

◆ NVDRS_APPLICATION_VER

#define NVDRS_APPLICATION_VER   NVDRS_APPLICATION_VER_V4

◆ NVDRS_APPLICATION_VER_V1

#define NVDRS_APPLICATION_VER_V1   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V1,1)

◆ NVDRS_APPLICATION_VER_V2

#define NVDRS_APPLICATION_VER_V2   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V2,2)

◆ NVDRS_APPLICATION_VER_V3

#define NVDRS_APPLICATION_VER_V3   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V3,3)

◆ NVDRS_APPLICATION_VER_V4

#define NVDRS_APPLICATION_VER_V4   MAKE_NVAPI_VERSION(NVDRS_APPLICATION_V4,4)

◆ NVDRS_PROFILE_VER

#define NVDRS_PROFILE_VER   NVDRS_PROFILE_VER1

◆ NVDRS_PROFILE_VER1

#define NVDRS_PROFILE_VER1   MAKE_NVAPI_VERSION(NVDRS_PROFILE_V1,1)

Macro for constructing the version field of NVDRS_PROFILE.

◆ NVDRS_SETTING_VALUES_VER

#define NVDRS_SETTING_VALUES_VER   MAKE_NVAPI_VERSION(NVDRS_SETTING_VALUES,1)

Macro for constructing the version field of _NVDRS_SETTING_VALUES.

◆ NVDRS_SETTING_VER

#define NVDRS_SETTING_VER   NVDRS_SETTING_VER1

◆ NVDRS_SETTING_VER1

#define NVDRS_SETTING_VER1   MAKE_NVAPI_VERSION(NVDRS_SETTING_V1, 1)

Macro for constructing the version field of ::_NVDRS_SETTING.

Typedef Documentation

◆ NVDRS_APPLICATION

◆ NVDRS_APPLICATION_V1

◆ NVDRS_APPLICATION_V2

◆ NVDRS_APPLICATION_V3

◆ NVDRS_APPLICATION_V4

◆ NVDRS_BINARY_SETTING

Enum to decide on the datatype of setting value.

◆ NVDRS_GPU_SUPPORT

◆ NVDRS_PROFILE

◆ NVDRS_PROFILE_V1

◆ NVDRS_SETTING

◆ NVDRS_SETTING_LOCATION

◆ NVDRS_SETTING_TYPE

◆ NVDRS_SETTING_V1

◆ NVDRS_SETTING_VALUES

Enumeration Type Documentation

◆ _NVDRS_SETTING_LOCATION

Enumerator
NVDRS_CURRENT_PROFILE_LOCATION 
NVDRS_GLOBAL_PROFILE_LOCATION 
NVDRS_BASE_PROFILE_LOCATION 
NVDRS_DEFAULT_PROFILE_LOCATION 

◆ _NVDRS_SETTING_TYPE

Enumerator
NVDRS_DWORD_TYPE 
NVDRS_BINARY_TYPE 
NVDRS_STRING_TYPE 
NVDRS_WSTRING_TYPE 

Function Documentation

◆ NV_DECLARE_HANDLE() [1/2]

NV_DECLARE_HANDLE ( NvDRSProfileHandle  )

◆ NV_DECLARE_HANDLE() [2/2]

NV_DECLARE_HANDLE ( NvDRSSessionHandle  )

◆ NvAPI_DRS_CreateApplication()

NVAPI_INTERFACE NvAPI_DRS_CreateApplication ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NVDRS_APPLICATION pApplication 
)

DESCRIPTION: This API adds an executable name to a profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]*pApplicationInput NVDRS_APPLICATION struct with the executable name to be added.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_CreateProfile()

NVAPI_INTERFACE NvAPI_DRS_CreateProfile ( NvDRSSessionHandle  hSession,
NVDRS_PROFILE pProfileInfo,
NvDRSProfileHandle *  phProfile 
)

DESCRIPTION: This API creates an empty profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]*pProfileInfoInput pointer to NVDRS_PROFILE.
[in]*phProfileReturns pointer to profile handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_CreateSession()

NVAPI_INTERFACE NvAPI_DRS_CreateSession ( NvDRSSessionHandle *  phSession)

DESCRIPTION: This API allocates memory and initializes the session.

SUPPORTED OS: Windows 10 and higher

Parameters
[out]*phSessionReturn pointer to the session handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_DeleteApplication()

NVAPI_INTERFACE NvAPI_DRS_DeleteApplication ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvAPI_UnicodeString  appName 
)

DESCRIPTION: This API removes an executable name from a profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionPARAMETERSInput to the session handle.
[in]hProfileInput profile handle.
[in]appNameInput the executable name to be removed.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.
NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUSIf the path provided could refer to two different executables, this error will be returned

◆ NvAPI_DRS_DeleteApplicationEx()

NVAPI_INTERFACE NvAPI_DRS_DeleteApplicationEx ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NVDRS_APPLICATION pApp 
)

DESCRIPTION: This API removes an executable from a profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSession- Input to the session handle.
[in]hProfile- Input profile handle.
[in]*pApp- Input all the information about the application to be removed.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.
NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUSIf the path provided could refer to two different executables, this error will be returned.

◆ NvAPI_DRS_DeleteProfile()

NVAPI_INTERFACE NvAPI_DRS_DeleteProfile ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile 
)

DESCRIPTION: This API deletes a profile or sets it back to a predefined value.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_DeleteProfileSetting()

NVAPI_INTERFACE NvAPI_DRS_DeleteProfileSetting ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvU32  settingId 
)

DESCRIPTION: This API deletes a setting or sets it back to predefined value.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]settingIdInput settingId to be deleted.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_DestroySession()

NVAPI_INTERFACE NvAPI_DRS_DestroySession ( NvDRSSessionHandle  hSession)

DESCRIPTION: This API frees the allocation: cleanup of NvDrsSession.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_EnumApplications()

NVAPI_INTERFACE NvAPI_DRS_EnumApplications ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvU32  startIndex,
NvU32 appCount,
NVDRS_APPLICATION pApplication 
)

DESCRIPTION: This API enumerates all the applications in a given profile from the starting index to the maximum length.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]startIndexIndicates starting index for enumeration.
[in,out]*appCountInput maximum length of the passed in arrays. Returns the actual length.
[out]*pApplicationReturns NVDRS_APPLICATION struct with all the attributes.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.
NVAPI_END_ENUMERATIONstartIndex exceeds the total appCount.

◆ NvAPI_DRS_EnumAvailableSettingIds()

NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingIds ( NvU32 pSettingIds,
NvU32 pMaxCount 
)

DESCRIPTION: This API enumerates all the Ids of all the settings recognized by NVAPI.

SUPPORTED OS: Windows 10 and higher

Parameters
[out]pSettingIdsUser-provided array of length *pMaxCount that NVAPI will fill with IDs.
[in,out]pMaxCountInput max length of the passed in array, Returns the actual length.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors. NVAPI_END_ENUMERATION: the provided pMaxCount is not enough to hold all settingIds.

◆ NvAPI_DRS_EnumAvailableSettingValues()

NVAPI_INTERFACE NvAPI_DRS_EnumAvailableSettingValues ( NvU32  settingId,
NvU32 pMaxNumValues,
NVDRS_SETTING_VALUES pSettingValues 
)

DESCRIPTION: This API enumerates all available setting values for a given setting.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]settingIdInput settingId.
[in,out]pMaxNumValuesInput max length of the passed in arrays, Returns the actual length.
[out]*pSettingValuesReturns all available setting values and its count.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_EnumProfiles()

NVAPI_INTERFACE NvAPI_DRS_EnumProfiles ( NvDRSSessionHandle  hSession,
NvU32  index,
NvDRSProfileHandle *  phProfile 
)

DESCRIPTION: This API enumerates through all the profiles in the session.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]indexInput the index for enumeration.
[out]*phProfileReturns profile handle.

RETURN STATUS: NVAPI_OK: SUCCESS if the profile is found NVAPI_ERROR: For miscellaneous errors. NVAPI_END_ENUMERATION: index exceeds the total number of available Profiles in DB.

◆ NvAPI_DRS_EnumSettings()

NVAPI_INTERFACE NvAPI_DRS_EnumSettings ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvU32  startIndex,
NvU32 settingsCount,
NVDRS_SETTING pSetting 
)

DESCRIPTION: This API enumerates all the settings of a given profile from startIndex to the maximum length.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]startIndexIndicates starting index for enumeration.
[in,out]*settingsCountInput max length of the passed in arrays, Returns the actual length.
[out]*pSettingReturns all the settings info.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.
NVAPI_END_ENUMERATIONstartIndex exceeds the total appCount.

◆ NvAPI_DRS_FindApplicationByName()

NVAPI_INTERFACE NvAPI_DRS_FindApplicationByName ( __in NvDRSSessionHandle  hSession,
__in NvAPI_UnicodeString  appName,
__out NvDRSProfileHandle *  phProfile,
__inout NVDRS_APPLICATION pApplication 
)

DESCRIPTION: This API searches the application and the associated profile for the given application name. If a fully qualified path is provided, this function will always return the profile the driver will apply upon running the application (on the path provided).

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the hSession handle
[in]appNameInput appName. For best results, provide a fully qualified path of the type c:/Folder1/Folder2/App.exe
[out]*phProfileReturns profile handle.
[in,out]*pApplicationReturns NVDRS_APPLICATION struct pointer.
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_APPLICATION_NOT_FOUNDIf App not found
NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUSIf the input appName was not fully qualified, this error might return in the case of multiple matches

◆ NvAPI_DRS_FindProfileByName()

NVAPI_INTERFACE NvAPI_DRS_FindProfileByName ( NvDRSSessionHandle  hSession,
NvAPI_UnicodeString  profileName,
NvDRSProfileHandle *  phProfile 
)

DESCRIPTION: This API finds a profile in the current session.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]profileNameInput profileName.
[out]phProfileInput profile handle.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_PROFILE_NOT_FOUNDif profile is not found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetApplicationInfo()

NVAPI_INTERFACE NvAPI_DRS_GetApplicationInfo ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvAPI_UnicodeString  appName,
NVDRS_APPLICATION pApplication 
)

DESCRIPTION: This API gets information about the given application. The input application name must match exactly what the Profile has stored for the application. This function is better used to retrieve application information from a previous enumeration.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]appNameInput application name.
[out]*pApplicationReturns NVDRS_APPLICATION struct with all the attributes.
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_EXECUTABLE_PATH_IS_AMBIGUOUSThe application name could not
NVAPI_EXECUTABLE_NOT_FOUNDNo application with that name is found on the profile.

◆ NvAPI_DRS_GetBaseProfile()

NVAPI_INTERFACE NvAPI_DRS_GetBaseProfile ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle *  phProfile 
)

DESCRIPTION: Returns the handle to the current global profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]*phProfileReturns Base profile handle.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetCurrentGlobalProfile()

NVAPI_INTERFACE NvAPI_DRS_GetCurrentGlobalProfile ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle *  phProfile 
)

DESCRIPTION: This API returns the handle to the current global profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[out]*phProfileReturns current Global profile handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetNumProfiles()

NVAPI_INTERFACE NvAPI_DRS_GetNumProfiles ( NvDRSSessionHandle  hSession,
NvU32 numProfiles 
)

DESCRIPTION: This API obtains the number of profiles in the current session object.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
out]*numProfiles Returns count of profiles in the current hSession.
Return values
NVAPI_OKSUCCESS
NVAPI_API_NOT_INTIALIZEDFailed to initialize.
NVAPI_INVALID_ARGUMENTInvalid Arguments.

◆ NvAPI_DRS_GetProfileInfo()

NVAPI_INTERFACE NvAPI_DRS_GetProfileInfo ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NVDRS_PROFILE pProfileInfo 
)

DESCRIPTION: This API gets information about the given profile. User needs to specify the name of the Profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[out]*pProfileInfoReturn the profile info.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetSetting()

NVAPI_INTERFACE NvAPI_DRS_GetSetting ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvU32  settingId,
NVDRS_SETTING pSetting 
)

DESCRIPTION: This API gets information about the given setting.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]settingIdInput settingId.
[out]*pSettingReturns all the setting info
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetSettingIdFromName()

NVAPI_INTERFACE NvAPI_DRS_GetSettingIdFromName ( NvAPI_UnicodeString  settingName,
NvU32 pSettingId 
)

DESCRIPTION: This API gets the binary ID of a setting given the setting name.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]settingNameInput Unicode settingName.
[out]*pSettingIdReturns corresponding settingId.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_PROFILE_NOT_FOUNDif profile is not found
NVAPI_SETTING_NOT_FOUNDif setting is not found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_GetSettingNameFromId()

NVAPI_INTERFACE NvAPI_DRS_GetSettingNameFromId ( NvU32  settingId,
NvAPI_UnicodeString pSettingName 
)

DESCRIPTION: This API gets the setting name given the binary ID.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]settingIdInput settingId.
[in]*pSettingNameReturns corresponding Unicode settingName.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_PROFILE_NOT_FOUNDif profile is not found
NVAPI_SETTING_NOT_FOUNDif setting is not found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_LoadSettings()

NVAPI_INTERFACE NvAPI_DRS_LoadSettings ( NvDRSSessionHandle  hSession)

DESCRIPTION: This API loads and parses the settings data.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_LoadSettingsFromFile()

NVAPI_INTERFACE NvAPI_DRS_LoadSettingsFromFile ( NvDRSSessionHandle  hSession,
NvAPI_UnicodeString  fileName 
)

DESCRIPTION: This API loads settings from the given file path.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle
[in]fileNameBinary File Name/Path
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_RestoreAllDefaults()

NVAPI_INTERFACE NvAPI_DRS_RestoreAllDefaults ( NvDRSSessionHandle  hSession)

DESCRIPTION: This API restores the whole system to predefined(default) values.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_RestoreProfileDefault()

NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefault ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile 
)

DESCRIPTION: This API restores the given profile to predefined(default) values. Any and all user specified modifications will be removed. If the whole profile was set by the user, the profile will be removed.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.
NVAPI_PROFILE_REMOVEDSUCCESS, and the hProfile is no longer valid.
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_RestoreProfileDefaultSetting()

NVAPI_INTERFACE NvAPI_DRS_RestoreProfileDefaultSetting ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NvU32  settingId 
)

DESCRIPTION: This API restores the given profile setting to predefined(default) values.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]settingIdInput settingId.
Return values
NVAPI_OKSUCCESS if the profile is found
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_SaveSettings()

NVAPI_INTERFACE NvAPI_DRS_SaveSettings ( NvDRSSessionHandle  hSession)

DESCRIPTION: This API saves the settings data to the system.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_SaveSettingsToFile()

NVAPI_INTERFACE NvAPI_DRS_SaveSettingsToFile ( NvDRSSessionHandle  hSession,
NvAPI_UnicodeString  fileName 
)

DESCRIPTION: This API saves settings to the given file path.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]fileNameBinary File Name/Path
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_SetCurrentGlobalProfile()

NVAPI_INTERFACE NvAPI_DRS_SetCurrentGlobalProfile ( NvDRSSessionHandle  hSession,
NvAPI_UnicodeString  wszGlobalProfileName 
)

DESCRIPTION: This API sets the current global profile in the driver.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]wszGlobalProfileNameInput current Global profile name.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_SetProfileInfo()

NVAPI_INTERFACE NvAPI_DRS_SetProfileInfo ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NVDRS_PROFILE pProfileInfo 
)

DESCRIPTION: Specifies flags for a given profile. Currently only the NVDRS_GPU_SUPPORT is used to update the profile. Neither the name, number of settings or applications or other profile information can be changed with this function.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]*pProfileInfoInput the new profile info.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.

◆ NvAPI_DRS_SetSetting()

NVAPI_INTERFACE NvAPI_DRS_SetSetting ( NvDRSSessionHandle  hSession,
NvDRSProfileHandle  hProfile,
NVDRS_SETTING pSetting 
)

DESCRIPTION: This API adds/modifies a setting to a profile.

SUPPORTED OS: Windows 10 and higher

Parameters
[in]hSessionInput to the session handle.
[in]hProfileInput profile handle.
[in]*pSettingInput NVDRS_SETTING struct pointer.
Return values
NVAPI_OKSUCCESS
NVAPI_ERRORFor miscellaneous errors.