{"record":{"id":"347f34588e8a855b","repo":"Orbmu2k/nvidiaProfileInspector","slug":"nvapi-setting-not-found","errorCode":"NVAPI_SETTING_NOT_FOUND","errorMessage":"DRS_GetSetting","messagePattern":"DRS_GetSetting","errorType":"error_code","errorClass":"NvapiException","httpStatus":null,"severity":"error","filePath":"nvidiaProfileInspector/Common/DrsSettingsService.cs","lineNumber":371,"sourceCode":"            });\r\n\r\n            removeFromModified = tmpRemoveFromModified;\r\n        }\r\n\r\n        public uint GetDwordValueFromProfile(string profileName, uint settingId, bool returnDefaultValue = false, bool forceDedicatedScope = false)\r\n        {\r\n            return DrsSession((hSession) =>\r\n            {\r\n                var hProfile = GetProfileHandle(hSession, profileName);\r\n\r\n                var dwordValue = ReadDwordValue(hSession, hProfile, settingId);\r\n\r\n                if (dwordValue != null)\r\n                    return dwordValue.Value;\r\n                else if (returnDefaultValue)\r\n                    return meta.GetSettingMeta(settingId).DefaultDwordValue;\r\n\r\n                throw new NvapiException(\"DRS_GetSetting\", NvAPI_Status.NVAPI_SETTING_NOT_FOUND);\r\n            });\r\n        }\r\n\r\n        public void SetDwordValueToProfile(string profileName, uint settingId, uint dwordValue)\r\n        {\r\n            DrsSession((hSession) =>\r\n            {\r\n                var hProfile = GetProfileHandle(hSession, profileName);\r\n                StoreDwordValue(hSession, hProfile, settingId, dwordValue);\r\n                SaveSettings(hSession);\r\n            });\r\n        }\r\n\r\n        public int StoreSettingsToProfile(string profileName, List<KeyValuePair<uint, string>> settings)\r\n        {\r\n            DrsSession((hSession) =>\r\n            {\r\n                var hProfile = GetProfileHandle(hSession, profileName);\r","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/Orbmu2k/nvidiaProfileInspector/blob/2f50c388b3a4d661cade66b32746bec096d1eee1/nvidiaProfileInspector/Common/DrsSettingsService.cs#L353-L389","documentation":"NvapiException wrapping a non-NVAPI_OK status from DRS_GetSetting. It is raised by GetDwordValueFromProfile: inside a DRS session the profile handle is obtained and the value is read via ReadDwordValue, which calls DRS_GetSetting to query the DWORD value of settingId on that profile; a failure status from the driver query is wrapped and thrown, so no value can be returned for the requested setting.","triggerScenarios":"Thrown at nvidiaProfileInspector/Common/DrsSettingsService.cs:371 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Catch NvapiException and fall back to returnDefaultValue=true semantics (use the driver default).","Confirm the settingId exists on the profile; querying an unset setting id can error on some driver versions.","Retry in a fresh DRS session if the shared global session is stale.","Validate the profile name resolves to a handle before attempting the read."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f50c388b3a4d661cade66b32746bec096d1eee1","analyzedAt":"2026-09-15T05:23:52.218Z","contentChangedAt":"2026-09-15T05:23:52.218Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}