/// <summary> /// This API creates an empty profile. /// </summary> /// <param name="sessionHandle">Input to the session handle.</param> /// <param name="profile">Input to the <see cref="DRSProfileV1" /> instance.</param> /// <returns>The newly created profile handle.</returns> public static DRSProfileHandle CreateProfile(DRSSessionHandle sessionHandle, DRSProfileV1 profile) { using (var profileReference = ValueTypeReference.FromValueType(profile)) { var status = DelegateFactory.GetDelegate <Delegates.DRS.NvAPI_DRS_CreateProfile>()( sessionHandle, profileReference, out var profileHandle ); if (status != Status.Ok) { throw new NVIDIAApiException(status); } return(profileHandle); } }
/// <summary> /// Specifies flags for a given profile. Currently only the GPUSupport is /// used to update the profile. Neither the name, number of settings or applications /// or other profile information can be changed with this function. /// </summary> /// <param name="sessionHandle">Input to the session handle.</param> /// <param name="profileHandle">Input profile handle.</param> /// <param name="profile">Input the new profile info.</param> public static void SetProfileInfo( DRSSessionHandle sessionHandle, DRSProfileHandle profileHandle, DRSProfileV1 profile) { using (var profileReference = ValueTypeReference.FromValueType(profile)) { var status = DelegateFactory.GetDelegate <Delegates.DRS.NvAPI_DRS_SetProfileInfo>()( sessionHandle, profileHandle, profileReference ); if (status != Status.Ok) { throw new NVIDIAApiException(status); } } }