/// <summary> /// This API adds/modifies a setting to a profile. /// </summary> /// <param name="sessionHandle">Input to the session handle.</param> /// <param name="profileHandle">Input profile handle.</param> /// <param name="setting"> /// An instance of <see cref="DRSSettingV1" /> containing the setting identification number and new /// value for the setting. /// </param> public static void SetSetting( DRSSessionHandle sessionHandle, DRSProfileHandle profileHandle, DRSSettingV1 setting) { using (var settingReference = ValueTypeReference.FromValueType(setting, setting.GetType())) { var status = DelegateFactory.GetDelegate <Delegates.DRS.NvAPI_DRS_SetSetting>()( sessionHandle, profileHandle, settingReference ); if (status == Status.IncompatibleStructureVersion) { throw new NVIDIANotSupportedException("This operation is not supported."); } if (status != Status.Ok) { throw new NVIDIAApiException(status); } } }
internal ProfileSetting(DRSSettingV1 setting) { _setting = setting; }