
Справочная документация находится здесь: Драйвер NVAPI. API настроек (DRS)
Источник
Вот что у меня есть на данный момент, в основном основываясь на примерах, которые я нашел в сети:
Код: Выделить всё
#include
#include
#include "nvapi.h"
#include "NvApiDriverSettings.h"
NvDRSSessionHandle _session;
NvDRSProfileHandle _profile;
int main()
{
if (NvAPI_Initialize() != NVAPI_OK)
throw std::runtime_error("NvAPI: NvAPI can't be initialized");
if (NvAPI_DRS_CreateSession(&_session) != NVAPI_OK)
throw std::runtime_error("NvAPI: Can't create NvAPI session");
if (NvAPI_DRS_LoadSettings(_session) != NVAPI_OK)
throw std::runtime_error("NvAPI: Can't load system settings");
if (NvAPI_DRS_GetCurrentGlobalProfile(_session, &_profile) != NVAPI_OK)
throw std::runtime_error("NvAPI: Can't get global profile");
NVDRS_PROFILE profileInformation = {0};
profileInformation.version = NVDRS_PROFILE_VER;
if (NvAPI_DRS_GetProfileInfo(_session, _profile, &profileInformation) != NVAPI_OK)
throw std::runtime_error("NvAPI: Can't get current global profile information");
if(profileInformation.numOfSettings> 0)
{
NVDRS_SETTING* setArray = new NVDRS_SETTING[profileInformation.numOfSettings];
NvU32 numSetRead = profileInformation.numOfSettings,i;
setArray[0].version = NVDRS_SETTING_VER;
if (NvAPI_DRS_EnumSettings(_session, _profile, 0, &numSetRead, setArray) != NVAPI_OK)
throw std::runtime_error("NvAPI: Can't get profile setting enum");
for(i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/43526033/problems-retrieving-the-global-profile-settings-shown-in-the-nvidia-control-pan[/url]