This commit is contained in:
Orbmu2k
2016-03-26 20:13:14 +01:00
parent 6bb46b78a6
commit 5cb91fabe8
86 changed files with 14296 additions and 0 deletions

23
LICENSE.txt Normal file
View File

@@ -0,0 +1,23 @@
nvidiaProfileInspector is licensed under MIT license.
----------------
Copyright (c) 2016 Orbmu2k
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,40 @@
using System;
using System.Text;
namespace nspector.Common
{
internal class CachedSettingValue : IComparable<CachedSettingValue>
{
public int CompareTo(CachedSettingValue other)
{
if (IsStringValue)
return ValueStr.CompareTo(other.ValueStr);
else
return Value.CompareTo(other.Value);
}
internal CachedSettingValue() { }
internal CachedSettingValue(uint Value, string ProfileNames)
{
this.Value = Value;
this.ProfileNames = new StringBuilder(ProfileNames);
this.ValueProfileCount = 1;
}
internal CachedSettingValue(string ValueStr, string ProfileNames)
{
IsStringValue = true;
this.ValueStr = ValueStr;
this.ProfileNames = new StringBuilder(ProfileNames);
this.ValueProfileCount = 1;
}
internal readonly bool IsStringValue = false;
internal string ValueStr = "";
internal uint Value = 0;
internal StringBuilder ProfileNames;
internal uint ValueProfileCount;
}
}

View File

@@ -0,0 +1,56 @@
using nspector.Native.NVAPI2;
using System.Collections.Generic;
using System.Linq;
namespace nspector.Common
{
internal class CachedSettings
{
internal CachedSettings() { }
internal CachedSettings(uint settingId, NVDRS_SETTING_TYPE settingType)
{
SettingId = settingId;
SettingType = settingType;
}
internal uint SettingId;
internal List<CachedSettingValue> SettingValues = new List<CachedSettingValue>();
internal uint ProfileCount = 0;
internal NVDRS_SETTING_TYPE SettingType = NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
internal void AddDwordValue(uint valueDword, string Profile)
{
var setting = SettingValues.FirstOrDefault(s => s.Value == valueDword);
if (setting == null)
{
SettingValues.Add(new CachedSettingValue(valueDword, Profile));
}
else
{
setting.ProfileNames.Append(", " + Profile);
setting.ValueProfileCount++;
}
ProfileCount++;
}
internal void AddStringValue(string valueStr, string Profile)
{
var setting = SettingValues.FirstOrDefault(s => s.ValueStr == valueStr);
if (setting == null)
{
SettingValues.Add(new CachedSettingValue(valueStr, Profile));
}
else
{
setting.ProfileNames.Append(", " + Profile);
setting.ValueProfileCount++;
}
ProfileCount++;
}
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Xml.Serialization;
namespace nspector.Common.CustomSettings
{
[Serializable]
public class CustomSetting
{
public string UserfriendlyName { get; set; }
[XmlElement(ElementName = "HexSettingID")]
public string HexSettingId { get; set; }
public string Description { get; set; }
public string GroupName { get; set; }
public string OverrideDefault { get; set; }
public float MinRequiredDriverVersion { get; set; }
public List<CustomSettingValue> SettingValues { get; set; }
internal uint SettingId
{
get { return Convert.ToUInt32(HexSettingId.Trim(), 16); }
}
internal uint? DefaultValue
{
get { return string.IsNullOrEmpty(OverrideDefault) ? null : (uint?)Convert.ToUInt32(OverrideDefault.Trim(), 16); }
}
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Text;
using nspector.Common.Helper;
namespace nspector.Common.CustomSettings
{
[Serializable]
public class CustomSettingNames
{
public bool ShowCustomizedSettingNamesOnly = false;
public List<CustomSetting> Settings = new List<CustomSetting>();
public void StoreToFile(string filename)
{
XMLHelper<CustomSettingNames>.SerializeToXmlFile(this, filename, Encoding.Unicode, true);
}
public static CustomSettingNames FactoryLoadFromFile(string filename)
{
return XMLHelper<CustomSettingNames>.DeserializeFromXMLFile(filename);
}
public static CustomSettingNames FactoryLoadFromString(string xml)
{
return XMLHelper<CustomSettingNames>.DeserializeFromXmlString(xml);
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Globalization;
namespace nspector.Common.CustomSettings
{
[Serializable]
public class CustomSettingValue
{
internal uint SettingValue
{
get { return Convert.ToUInt32(HexValue.Trim(), 16); }
}
public string UserfriendlyName { get; set; }
public string HexValue { get; set; }
}
}

View File

@@ -0,0 +1,213 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using nspector.Common.Import;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
using nspector.Common.Helper;
namespace nspector.Common
{
internal class DrsImportService : DrsSettingsServiceBase
{
private readonly DrsSettingsService _SettingService;
public DrsImportService(DrsSettingsMetaService metaService, DrsSettingsService settingService, IntPtr? hSession = null)
: base(metaService, hSession)
{
_SettingService = settingService;
}
internal void ExportAllProfilesToNvidiaTextFile(string filename)
{
DrsSession((hSession) =>
{
SaveSettingsFileEx(hSession, filename);
});
}
internal void ImportAllProfilesFromNvidiaTextFile(string filename)
{
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, filename);
SaveSettings(hSession);
});
}
internal void ExportProfiles(List<string> profileNames, string filename, bool includePredefined)
{
var exports = new Profiles();
DrsSession((hSession) =>
{
foreach (var profileName in profileNames)
{
var profile = CreateProfileForExport(hSession, profileName, includePredefined);
exports.Add(profile);
}
});
XMLHelper<Profiles>.SerializeToXmlFile(exports, filename, Encoding.Unicode, true);
}
private Profile CreateProfileForExport(IntPtr hSession, string profileName, bool includePredefined)
{
var result = new Profile();
var hProfile = GetProfileHandle(hSession, profileName);
if (hProfile != IntPtr.Zero)
{
var settings = GetProfileSettings(hSession, hProfile);
if (settings.Count > 0)
{
result.ProfileName = profileName;
var apps = GetProfileApplications(hSession, hProfile);
foreach (var app in apps)
{
result.Executeables.Add(app.appName);
}
foreach (var setting in settings)
{
var isPredefined = setting.isCurrentPredefined == 1;
var isDwordSetting = setting.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
var isCurrentProfile = setting.settingLocation ==
NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION;
if (isDwordSetting && isCurrentProfile)
{
if (!isPredefined || includePredefined)
{
var profileSetting = new ProfileSetting()
{
SettingNameInfo = setting.settingName,
SettingId = setting.settingId,
SettingValue = setting.currentValue.dwordValue,
};
result.Settings.Add(profileSetting);
}
}
}
}
}
return result;
}
internal void ImportProfiles(string filename)
{
var profiles = XMLHelper<Profiles>.DeserializeFromXMLFile(filename);
DrsSession((hSession) =>
{
foreach (Profile profile in profiles)
{
var hProfile = GetProfileHandle(hSession, profile.ProfileName);
if (hProfile == IntPtr.Zero)
{
hProfile = CreateProfile(hSession, profile.ProfileName);
}
if (hProfile != IntPtr.Zero)
{
var modified = false;
_SettingService.ResetProfile(profile.ProfileName, out modified);
UpdateApplications(hSession, hProfile, profile);
UpdateSettings(hSession, hProfile, profile);
nvw.DRS_SaveSettings(hSession);
}
}
});
}
private bool ExistsImportApp(string appName, Profile importProfile)
{
return importProfile.Executeables.Any(x => x.Equals(appName));
}
private void UpdateApplications(IntPtr hSession, IntPtr hProfile, Profile importProfile)
{
var alreadySet = new HashSet<string>();
var apps = GetProfileApplications(hSession, hProfile);
foreach (var app in apps)
{
if (ExistsImportApp(app.appName, importProfile) && !alreadySet.Contains(app.appName))
alreadySet.Add(app.appName);
else
nvw.DRS_DeleteApplication(hSession, hProfile, new StringBuilder(app.appName));
}
foreach (string appName in importProfile.Executeables)
{
if (!alreadySet.Contains(appName))
{
AddApplication(hSession, hProfile, appName);
}
}
}
private uint GetImportValue(uint settingId, Profile importProfile)
{
var setting = importProfile.Settings
.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (setting != null)
return setting.SettingValue;
return 0;
}
private bool ExistsImportValue(uint settingId, Profile importProfile)
{
return importProfile.Settings
.Any(x => x.SettingId.Equals(settingId));
}
private void UpdateSettings(IntPtr hSession, IntPtr hProfile, Profile importProfile)
{
var alreadySet = new HashSet<uint>();
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
var isCurrentProfile = setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION;
var isDwordSetting = setting.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
var isPredefined = setting.isCurrentPredefined == 1;
if (isCurrentProfile && isDwordSetting)
{
bool exitsValue = ExistsImportValue(setting.settingId, importProfile);
uint importValue = GetImportValue(setting.settingId, importProfile);
if (isPredefined && exitsValue && importValue == setting.currentValue.dwordValue)
{
alreadySet.Add(setting.settingId);
}
else if (exitsValue)
{
StoreDwordValue(hSession, hProfile, setting.settingId, importValue);
alreadySet.Add(setting.settingId);
}
else
nvw.DRS_DeleteProfileSetting(hSession, hProfile, setting.settingId);
}
}
foreach (var setting in importProfile.Settings)
{
if (!alreadySet.Contains(setting.SettingId))
{
StoreDwordValue(hSession, hProfile, setting.SettingId, setting.SettingValue);
}
}
}
}
}

View File

@@ -0,0 +1,291 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using nspector.Common.Import;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
using nspector.Common.Helper;
namespace nspector.Common
{
internal delegate void SettingScanDoneEvent();
internal delegate void SettingScanProgressEvent(int percent);
internal class DrsScannerService : DrsSettingsServiceBase
{
public DrsScannerService(DrsSettingsMetaService metaService, IntPtr? hSession = null)
: base(metaService, hSession)
{ }
public event SettingScanDoneEvent OnModifiedProfilesScanDone;
public event SettingScanDoneEvent OnPredefinedSettingsScanDone;
public event SettingScanProgressEvent OnSettingScanProgress;
internal List<CachedSettings> CachedSettings = new List<CachedSettings>();
internal List<string> ModifiedProfiles = new List<string>();
// most common setting ids as start pattern for the heuristic scan
private readonly uint[] _commonSettingIds = new uint[] { 0x1095DEF8, 0x1033DCD2, 0x1033CEC1,
0x10930F46, 0x00A06946, 0x10ECDB82, 0x20EBD7B8, 0x0095DEF9, 0x00D55F7D,
0x1033DCD3, 0x1033CEC2, 0x2072F036, 0x00664339, 0x002C7F45, 0x209746C1,
0x0076E164, 0x20FF7493, 0x204CFF7B };
private bool CheckCommonSetting(IntPtr hSession, IntPtr hProfile, NVDRS_PROFILE profile,
ref int checkedSettingsCount, uint checkSettingId, bool addToScanResult,
ref List<uint> alreadyCheckedSettingIds)
{
if (checkedSettingsCount >= profile.numOfSettings)
return false;
var setting = new NVDRS_SETTING();
setting.version = nvw.NVDRS_SETTING_VER;
if (nvw.DRS_GetSetting(hSession, hProfile, checkSettingId, ref setting) != NvAPI_Status.NVAPI_OK)
return false;
if (setting.settingLocation != NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
return false;
if (!addToScanResult && setting.isCurrentPredefined == 1)
{
checkedSettingsCount++;
}
else if (addToScanResult)
{
checkedSettingsCount++;
AddScannedSettingToCache(profile, setting);
alreadyCheckedSettingIds.Add(setting.settingId);
return true;
}
else if (setting.isCurrentPredefined != 1)
{
return true;
}
return false;
}
private void ReportProgress(int current, int max)
{
int percent = (current > 0) ? (int)Math.Round((current * 100f) / max) : 0;
if (OnSettingScanProgress != null)
OnSettingScanProgress(percent);
}
private void ScanForModifiedProfiles()
{
ModifiedProfiles = new List<string>();
var knownPredefines = new List<uint>(_commonSettingIds);
DrsSession((hSession) =>
{
IntPtr hBaseProfile = GetProfileHandle(hSession, "");
var profileHandles = EnumProfileHandles(hSession);
var maxProfileCount = profileHandles.Count;
int curProfilePos = 0;
foreach (IntPtr hProfile in profileHandles)
{
ReportProgress(curProfilePos++, maxProfileCount);
var profile = GetProfileInfo(hSession, hProfile);
int checkedSettingsCount = 0;
bool foundModifiedProfile = false;
if (profile.isPredefined == 0)
{
ModifiedProfiles.Add(profile.profileName);
continue;
}
if ((hBaseProfile == hProfile || profile.numOfApps > 0) && profile.numOfSettings > 0)
{
var alreadyChecked = new List<uint>();
foreach (uint settingId in knownPredefines)
{
if (CheckCommonSetting(hSession, hProfile, profile,
ref checkedSettingsCount, settingId, false, ref alreadyChecked))
{
foundModifiedProfile = true;
ModifiedProfiles.Add(profile.profileName);
break;
}
}
// the detection if only applications has changed in a profile makes the scan process very slow, we leave it out!
//if (!foundModifiedProfile && profile.numOfApps > 0)
//{
// var apps = GetProfileApplications(hSession, hProfile);
// foreach (var app in apps)
// {
// if (app.isPredefined == 0)
// {
// foundModifiedProfile = true;
// ModifiedProfiles.Add(profile.profileName);
// break;
// }
// }
//}
if (foundModifiedProfile || checkedSettingsCount >= profile.numOfSettings)
continue;
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
if (knownPredefines.IndexOf(setting.settingId) < 0)
knownPredefines.Add(setting.settingId);
if (setting.isCurrentPredefined != 1)
{
ModifiedProfiles.Add(profile.profileName);
break;
}
}
}
}
});
if (OnModifiedProfilesScanDone != null)
OnModifiedProfilesScanDone();
}
private void ScanForPredefinedProfileSettings()
{
var knownPredefines = new List<uint>(_commonSettingIds);
DrsSession((hSession) =>
{
var profileHandles = EnumProfileHandles(hSession);
var maxProfileCount = profileHandles.Count;
int curProfilePos = 0;
foreach (IntPtr hProfile in profileHandles)
{
ReportProgress(curProfilePos++, maxProfileCount);
var profile = GetProfileInfo(hSession, hProfile);
int checkedSettingsCount = 0;
var alreadyChecked = new List<uint>();
foreach (uint kpd in knownPredefines)
{
CheckCommonSetting(hSession, hProfile, profile,
ref checkedSettingsCount, kpd, true, ref alreadyChecked);
}
if (checkedSettingsCount >= profile.numOfSettings)
continue;
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
if (knownPredefines.IndexOf(setting.settingId) < 0)
knownPredefines.Add(setting.settingId);
if (alreadyChecked.IndexOf(setting.settingId) < 0)
AddScannedSettingToCache(profile, setting);
}
}
});
if (OnPredefinedSettingsScanDone != null)
OnPredefinedSettingsScanDone();
}
public void StartScanForModifiedProfilesAsync()
{
var thread = new Thread(ScanForModifiedProfiles);
thread.Start();
}
public void StartScanForPredefinedSettingsAsync()
{
var thread = new Thread(ScanForPredefinedProfileSettings);
thread.Start();
}
private void AddScannedSettingToCache(NVDRS_PROFILE profile, NVDRS_SETTING setting)
{
// Skip 3D Vision string values here for improved scan performance
bool allowAddValue = setting.settingId < 0x70000000 || setting.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
//bool allowAddValue = true;
var cachedSetting = CachedSettings
.FirstOrDefault(x => x.SettingId.Equals(setting.settingId));
bool cacheEntryExists = true;
if (cachedSetting == null)
{
cacheEntryExists = false;
cachedSetting = new CachedSettings(setting.settingId, setting.settingType);
}
if (setting.isPredefinedValid == 1)
{
if (allowAddValue)
{
if (setting.settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE)
cachedSetting.AddStringValue(setting.currentValue.stringValue, profile.profileName);
else
cachedSetting.AddDwordValue(setting.currentValue.dwordValue, profile.profileName);
}
if (!cacheEntryExists)
CachedSettings.Add(cachedSetting);
}
}
public string FindProfilesUsingApplication(string applicationName)
{
string lowerApplicationName = applicationName.ToLower();
string tmpfile = Path.GetTempFileName();
var result = new StringBuilder();
DrsSession((hSession) =>
{
SaveSettingsFileEx(hSession, tmpfile);
});
if (File.Exists(tmpfile))
{
string content = File.ReadAllText(tmpfile);
string pattern = "\\sProfile\\s\\\"(?<profile>.*?)\\\"(?<scope>.*?Executable.*?)EndProfile";
foreach (Match m in Regex.Matches(content, pattern, RegexOptions.Singleline))
{
string scope = m.Result("${scope}");
foreach (Match ms in Regex.Matches(scope, "Executable\\s\\\"(?<app>.*?)\\\"", RegexOptions.Singleline))
{
if (ms.Result("${app}").ToLower() == lowerApplicationName)
{
result.Append(m.Result("${profile}") + ";");
}
}
}
}
if (File.Exists(tmpfile))
File.Delete(tmpfile);
return result.ToString();
}
}
}

View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using nspector.Common.CustomSettings;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common
{
internal class DrsServiceLocator
{
private static readonly CustomSettingNames CustomSettings;
public static readonly CustomSettingNames ReferenceSettings;
public static readonly DrsSettingsMetaService MetaService;
public static readonly DrsSettingsService SettingService;
public static readonly DrsImportService ImportService;
public static readonly DrsScannerService ScannerService;
private static IntPtr _Session;
static DrsServiceLocator()
{
CustomSettings = LoadCustomSettings();
ReferenceSettings = LoadReferenceSettings();
ReCreateSession();
MetaService = new DrsSettingsMetaService(CustomSettings, ReferenceSettings);
SettingService = new DrsSettingsService(MetaService, _Session);
ImportService = new DrsImportService(MetaService, SettingService, _Session);
ScannerService = new DrsScannerService(MetaService, _Session);
}
public static void ReCreateSession()
{
if (_Session != null && _Session != IntPtr.Zero)
{
nvw.DRS_DestroySession(_Session);
}
_Session = DrsSettingsServiceBase.CreateAndLoadSession();
}
private static CustomSettingNames LoadCustomSettings()
{
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CustomSettingNames.xml";
if (File.Exists(csnDefaultPath))
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
else
return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames);
}
private static CustomSettingNames LoadReferenceSettings()
{
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Reference.xml";
if (File.Exists(csnDefaultPath))
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
return null;
}
}
}

View File

@@ -0,0 +1,312 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using nspector.Common.Meta;
using nspector.Common.CustomSettings;
using nspector.Native.NVAPI2;
using nspector.Native.NvApi.DriverSettings;
namespace nspector.Common
{
internal class DrsSettingsMetaService
{
private ISettingMetaService ConstantMeta;
private ISettingMetaService CustomMeta;
public ISettingMetaService DriverMeta;
private ISettingMetaService ScannedMeta;
private ISettingMetaService ReferenceMeta;
private ISettingMetaService NvD3dUmxMeta;
private readonly CustomSettingNames _customSettings;
private readonly CustomSettingNames _referenceSettings;
private List<MetaServiceItem> MetaServices = new List<MetaServiceItem>();
private Dictionary<uint, SettingMeta> settingMetaCache = new Dictionary<uint, SettingMeta>();
public DrsSettingsMetaService(CustomSettingNames customSettings, CustomSettingNames referenceSettings = null)
{
_customSettings = customSettings;
_referenceSettings = referenceSettings;
ResetMetaCache(true);
}
public void ResetMetaCache(bool initOnly = false)
{
settingMetaCache = new Dictionary<uint, SettingMeta>();
MetaServices = new List<MetaServiceItem>();
CustomMeta = new CustomSettingMetaService(_customSettings);
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 1, Service = CustomMeta });
if (!initOnly)
{
DriverMeta = new DriverSettingMetaService();
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 5, Service = DriverMeta });
ConstantMeta = new ConstantSettingMetaService();
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 2, Service = ConstantMeta });
if (DrsServiceLocator.ScannerService != null)
{
ScannedMeta = new ScannedSettingMetaService(DrsServiceLocator.ScannerService.CachedSettings);
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 3, Service = ScannedMeta });
}
if (_referenceSettings != null)
{
ReferenceMeta = new CustomSettingMetaService(_referenceSettings, SettingMetaSource.ReferenceSettings);
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 4, Service = ReferenceMeta });
}
NvD3dUmxMeta = new NvD3dUmxSettingMetaService();
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 6, Service = NvD3dUmxMeta });
}
}
private NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
var settingValueType = service.Service.GetSettingValueType(settingId);
if (settingValueType != null)
return settingValueType.Value;
}
return NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
}
private string GetSettingName(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x=>x.Service.Source))
{
var settingName = service.Service.GetSettingName(settingId);
if (settingName != null)
return settingName;
}
return null;
}
private string GetGroupName(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
var groupName = service.Service.GetGroupName(settingId);
if (groupName != null)
return groupName;
}
return null;
}
private uint GetDwordDefaultValue(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
var settingDefault = service.Service.GetDwordDefaultValue(settingId);
if (settingDefault != null)
return settingDefault.Value;
}
return 0;
}
private string GetStringDefaultValue(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
var settingDefault = service.Service.GetStringDefaultValue(settingId);
if (settingDefault != null)
return settingDefault;
}
return null;
}
private List<SettingValue<T>> MergeSettingValues<T>(List<SettingValue<T>> a, List<SettingValue<T>> b)
{
if (b == null)
return a;
// force scanned settings to add instead of merge
if (b.Count > 0 && b.First().ValueSource == SettingMetaSource.ScannedSettings)
{
a.AddRange(b);
}
else
{
var newValues = b.Where(xb => !a.Select(xa => xa.Value).Contains(xb.Value)).ToList();
a.AddRange(newValues);
foreach (var settingValue in a)
{
var bVal = b.FirstOrDefault(x => x.Value.Equals(settingValue.Value) && x.ValueSource != SettingMetaSource.ScannedSettings);
if (bVal != null && bVal.ValueName != null)
{
settingValue.ValueName = bVal.ValueName;
settingValue.ValueSource = bVal.ValueSource;
settingValue.ValuePos = bVal.ValuePos;
}
}
}
return a.OrderBy(x=>x.Value).ToList();
}
private List<SettingValue<string>> GetStringValues(uint settingId)
{
var result = new List<SettingValue<string>>();
foreach (var service in MetaServices.OrderByDescending(x => x.ValueNamePrio))
{
result = MergeSettingValues(result, service.Service.GetStringValues(settingId));
}
return result;
}
private List<SettingValue<uint>> GetDwordValues(uint settingId)
{
var result = new List<SettingValue<uint>>();
foreach (var service in MetaServices.OrderByDescending(x => x.ValueNamePrio))
{
result = MergeSettingValues(result, service.Service.GetDwordValues(settingId));
}
if (result != null)
{
result = (from v in result.Where(x=> 1==1
&& !x.ValueName.EndsWith("_NUM")
&& !x.ValueName.EndsWith("_MASK")
&& (!x.ValueName.EndsWith("_MIN") || x.ValueName.Equals("PREFERRED_PSTATE_PREFER_MIN"))
&& (!x.ValueName.EndsWith("_MAX") || x.ValueName.Equals("PREFERRED_PSTATE_PREFER_MAX"))
)
group v by v.ValueName into g
select g.First(t => t.ValueName == g.Key))
.OrderBy(v => v.ValueSource)
.ThenBy(v => v.ValuePos)
.ThenBy(v => v.ValueName).ToList();
}
return result;
}
public List<uint> GetSettingIds(SettingViewMode viewMode)
{
var settingIds = new List<uint>();
var allowedSourcesForViewMode = GetAllowedMetaSourcesForViewMode(viewMode);
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
if (allowedSourcesForViewMode.Contains(service.Service.Source))
{
settingIds.AddRange(service.Service.GetSettingIds());
}
}
return settingIds.Distinct().ToList();
}
private SettingMetaSource[] GetAllowedMetaSourcesForViewMode(SettingViewMode viewMode)
{
switch (viewMode)
{
case SettingViewMode.CustomSettingsOnly:
return new [] {
SettingMetaSource.CustomSettings
};
case SettingViewMode.IncludeScannedSetttings:
return new [] {
SettingMetaSource.ConstantSettings,
SettingMetaSource.ScannedSettings,
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
};
default:
return new [] {
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
};
}
}
private SettingMeta CreateSettingMeta(uint settingId)
{
var settingType = GetSettingValueType(settingId);
var settingName = GetSettingName(settingId);
var groupName = GetGroupName(settingId);
if (groupName == null)
groupName = GetLegacyGroupName(settingId, settingName);
var result = new SettingMeta()
{
SettingType = settingType,
SettingName = settingName,
GroupName = groupName,
DefaultDwordValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
? GetDwordDefaultValue(settingId) : 0,
DefaultStringValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE
? GetStringDefaultValue(settingId) : null,
DwordValues =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
? GetDwordValues(settingId) : null,
StringValues =
settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE
? GetStringValues(settingId) : null,
};
return result;
}
private SettingMeta PostProcessMeta(uint settingId, SettingMeta settingMeta)
{
if (string.IsNullOrEmpty(settingMeta.SettingName))
settingMeta.SettingName = string.Format("0x{0:X8}", settingId);
return settingMeta;
}
public SettingMeta GetSettingMeta(uint settingId)
{
if (settingMetaCache.ContainsKey(settingId))
{
return PostProcessMeta(settingId, settingMetaCache[settingId]);
}
else
{
var settingMeta = CreateSettingMeta(settingId);
settingMetaCache.Add(settingId, settingMeta);
return PostProcessMeta(settingId, settingMeta);
}
}
private string GetLegacyGroupName(uint settingId, string settingName)
{
if (settingName == null)
return null;
if (settingName.ToUpper().Contains("SLI"))
return "6 - SLI";
else if (settingName.ToUpper().Contains("STEREO"))
return "7 - Stereo";
else if (settingName.StartsWith("0x"))
return "Unknown";
else
return "Other";
}
}
}

View File

@@ -0,0 +1,462 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using nspector.Common.Helper;
using nspector.Common.Meta;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common
{
internal class DrsSettingsService : DrsSettingsServiceBase
{
public DrsSettingsService(DrsSettingsMetaService metaService, IntPtr? hSession = null)
: base(metaService, hSession)
{
_baseProfileSettingIds = InitBaseProfileSettingIds();
}
private List<uint> InitBaseProfileSettingIds()
{
return DrsSession((hSession) =>
{
var hBaseProfile = GetProfileHandle(hSession, "");
var baseProfileSettings = GetProfileSettings(hSession, hBaseProfile);
return baseProfileSettings.Select(x => x.settingId).ToList();
});
}
private readonly List<uint> _baseProfileSettingIds;
private string GetDrsProgramPath()
{
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
@"NVIDIA Corporation\Drs");
}
private void RunDrsInitProcess()
{
var drsPath = GetDrsProgramPath();
var si = new ProcessStartInfo();
si.UseShellExecute = true;
si.WorkingDirectory = drsPath;
si.Arguments = "-init";
si.FileName = Path.Combine(drsPath, "dbInstaller.exe");
if (!AdminHelper.IsAdmin)
si.Verb = "runas";
var p = Process.Start(si);
p.WaitForExit();
}
public void DeleteAllProfilesHard()
{
var tmpFile = Path.GetTempFileName();
File.WriteAllText(tmpFile, "BaseProfile \"Base Profile\"\r\nProfile \"Base Profile\"\r\nShowOn All\r\nProfileType Global\r\nEndProfile\r\n");
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, tmpFile);
SaveSettings(hSession);
});
if (File.Exists(tmpFile))
File.Delete(tmpFile);
}
public void DeleteProfileHard(string profileName)
{
var tmpFileName = Path.GetTempFileName();
var tmpFileContent = "";
DrsSession((hSession) =>
{
SaveSettingsFileEx(hSession, tmpFileName);
tmpFileContent = File.ReadAllText(tmpFileName);
string pattern = "(?<rpl>\nProfile\\s\"" + Regex.Escape(profileName) + "\".*?EndProfile.*?\n)";
tmpFileContent = Regex.Replace(tmpFileContent, pattern, "", RegexOptions.Singleline);
File.WriteAllText(tmpFileName, tmpFileContent);
});
if (tmpFileContent != "")
{
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, tmpFileName);
SaveSettings(hSession);
});
}
if (File.Exists(tmpFileName))
File.Delete(tmpFileName);
}
public void DeleteProfile(string profileName)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
if (hProfile != IntPtr.Zero)
{
var nvRes = nvw.DRS_DeleteProfile(hSession, hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_DeleteProfile", nvRes);
SaveSettings(hSession);
}
});
}
public List<string> GetProfileNames(out string baseProfileName)
{
var lstResult = new List<string>();
var tmpBaseProfileName = "";
DrsSession((hSession) =>
{
var hBase = GetProfileHandle(hSession, null);
var baseProfile = GetProfileInfo(hSession, hBase);
tmpBaseProfileName = baseProfile.profileName;
lstResult.Add("_GLOBAL_DRIVER_PROFILE (" + tmpBaseProfileName + ")");
var profileHandles = EnumProfileHandles(hSession);
foreach (IntPtr hProfile in profileHandles)
{
var profile = GetProfileInfo(hSession, hProfile);
if (profile.isPredefined == 0 || profile.numOfApps > 0)
{
lstResult.Add(profile.profileName);
}
}
});
baseProfileName = tmpBaseProfileName;
return lstResult;
}
public void CreateProfile(string profileName, string applicationName = null)
{
DrsSession((hSession) =>
{
var hProfile = CreateProfile(hSession, profileName);
if (applicationName != null)
AddApplication(hSession, hProfile, applicationName);
});
}
public void ResetAllProfilesInternal()
{
RunDrsInitProcess();
DrsSession((hSession) =>
{
var nvRes = nvw.DRS_RestoreAllDefaults(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreAllDefaults", nvRes);
SaveSettings(hSession);
});
}
public void ResetProfile(string profileName, out bool removeFromModified)
{
bool tmpRemoveFromModified = false;
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var profile = GetProfileInfo(hSession, hProfile);
if (profile.isPredefined == 1)
{
var nvRes = nvw.DRS_RestoreProfileDefault(hSession, hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreProfileDefault", nvRes);
SaveSettings(hSession);
tmpRemoveFromModified = true;
}
else if (profile.numOfSettings > 0)
{
int dropCount = 0;
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
if (setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
{
if (nvw.DRS_DeleteProfileSetting(hSession, hProfile, setting.settingId) == NvAPI_Status.NVAPI_OK)
{
dropCount++;
}
}
}
if (dropCount > 0)
{
SaveSettings(hSession);
}
}
});
removeFromModified = tmpRemoveFromModified;
}
public void ResetValue(string profileName, uint settingId, out bool removeFromModified)
{
var tmpRemoveFromModified = false;
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
if (hProfile != IntPtr.Zero)
{
var nvRes = nvw.DRS_RestoreProfileDefaultSetting(hSession, hProfile, settingId);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreProfileDefaultSetting", nvRes);
SaveSettings(hSession);
var modifyCount = 0;
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
if (setting.isCurrentPredefined == 0 && setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
{
modifyCount++;
}
}
tmpRemoveFromModified = (modifyCount == 0);
}
});
removeFromModified = tmpRemoveFromModified;
}
public uint GetDwordValueFromProfile(string profileName, uint settingId, bool returnDefaultValue = false)
{
return DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var dwordValue = ReadDwordValue(hSession, hProfile, settingId);
if (dwordValue != null)
return dwordValue.Value;
else if (returnDefaultValue)
return meta.GetSettingMeta(settingId).DefaultDwordValue;
throw new NvapiException("DRS_GetSetting", NvAPI_Status.NVAPI_SETTING_NOT_FOUND);
});
}
public void SetDwordValueToProfile(string profileName, uint settingId, uint dwordValue)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
StoreDwordValue(hSession, hProfile, settingId, dwordValue);
SaveSettings(hSession);
});
}
public int StoreSettingsToProfile(string profileName, List<KeyValuePair<uint,string>> settings)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
foreach (var setting in settings)
{
var settingMeta = meta.GetSettingMeta(setting.Key);
var settingType = settingMeta.SettingType;
if (settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE)
{
var dword = DrsUtil.ParseDwordSettingValue(settingMeta, setting.Value);
StoreDwordValue(hSession, hProfile, setting.Key, dword);
}
else if (settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE)
{
var str = DrsUtil.ParseStringSettingValue(settingMeta, setting.Value);
StoreStringValue(hSession, hProfile, setting.Key, str);
}
}
SaveSettings(hSession);
});
return 0;
}
private SettingItem CreateSettingItem(NVDRS_SETTING setting, bool useDefault = false)
{
var settingMeta = meta.GetSettingMeta(setting.settingId);
//settingMeta.SettingType = setting.settingType;
if (settingMeta.DwordValues == null)
settingMeta.DwordValues = new List<SettingValue<uint>>();
if (settingMeta.StringValues == null)
settingMeta.StringValues = new List<SettingValue<string>>();
var settingState = SettingState.NotAssiged;
string valueRaw = DrsUtil.StringValueRaw;
string valueText = "";
if (settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE)
{
if (useDefault)
{
valueRaw = DrsUtil.GetDwordString(settingMeta.DefaultDwordValue);
valueText = DrsUtil.GetDwordSettingValueName(settingMeta, settingMeta.DefaultDwordValue);
}
else if (setting.isCurrentPredefined == 1 && setting.isPredefinedValid == 1)
{
valueRaw = DrsUtil.GetDwordString(setting.predefinedValue.dwordValue);
valueText = DrsUtil.GetDwordSettingValueName(settingMeta, setting.predefinedValue.dwordValue);
if (setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
settingState = SettingState.NvidiaSetting;
else
settingState = SettingState.GlobalSetting;
}
else
{
valueRaw = DrsUtil.GetDwordString(setting.currentValue.dwordValue);
valueText = DrsUtil.GetDwordSettingValueName(settingMeta, setting.currentValue.dwordValue);
if (setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
settingState = SettingState.UserdefinedSetting;
else
settingState = SettingState.GlobalSetting;
}
}
if (settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE)
{
if (useDefault)
{
valueRaw = settingMeta.DefaultStringValue;
valueText = DrsUtil.GetStringSettingValueName(settingMeta, settingMeta.DefaultStringValue);
}
else if (setting.isCurrentPredefined == 1 && setting.isPredefinedValid == 1)
{
valueRaw = setting.predefinedValue.stringValue;
valueText = DrsUtil.GetStringSettingValueName(settingMeta, setting.predefinedValue.stringValue);
settingState = SettingState.NvidiaSetting;
}
else
{
valueRaw = setting.currentValue.stringValue;
valueText = DrsUtil.GetStringSettingValueName(settingMeta, setting.currentValue.stringValue);
if (setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
settingState = SettingState.UserdefinedSetting;
else
settingState = SettingState.GlobalSetting;
}
}
return new SettingItem()
{
SettingId = setting.settingId,
SettingText = settingMeta.SettingName,
GroupName = settingMeta.GroupName,
ValueRaw = valueRaw,
ValueText = valueText,
State = settingState,
IsStringValue = settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE,
};
}
public List<SettingItem> GetSettingsForProfile(string profileName, SettingViewMode viewMode, ref List<string> applications)
{
var result = new List<SettingItem>();
var settingIds = meta.GetSettingIds(viewMode);
settingIds.AddRange(_baseProfileSettingIds);
settingIds = settingIds.Distinct().ToList();
applications = DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var profileSettings = GetProfileSettings(hSession, hProfile);
foreach (var profileSetting in profileSettings)
{
result.Add(CreateSettingItem(profileSetting));
if (settingIds.Contains(profileSetting.settingId))
settingIds.Remove(profileSetting.settingId);
}
foreach (var settingId in settingIds)
{
var setting = ReadSetting(hSession, hProfile, settingId);
if (setting != null)
result.Add(CreateSettingItem(setting.Value));
else
{
var dummySetting = new NVDRS_SETTING() { settingId = settingId };
result.Add(CreateSettingItem(dummySetting, true));
}
}
return GetProfileApplications(hSession, hProfile)
.Select(x => x.appName).ToList(); ;
});
return result.OrderBy(x=>x.SettingText).ThenBy(x=>x.GroupName).ToList();
}
public void AddApplication(string profileName, string applicationName)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
AddApplication(hSession, hProfile, applicationName);
SaveSettings(hSession);
});
}
public void DeleteApplication(string profileName, string applicationName)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
DeleteApplication(hSession, hProfile, applicationName);
SaveSettings(hSession);
});
}
public List<string> GetApplications(string profileName)
{
return DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var applications = GetProfileApplications(hSession, hProfile);
return applications.Select(x => x.appName).ToList();
});
}
}
}

View File

@@ -0,0 +1,324 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using nspector.Common.Helper;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common
{
internal abstract class DrsSettingsServiceBase
{
protected DrsSettingsMetaService meta;
private readonly IntPtr holdSession;
public DrsSettingsServiceBase(DrsSettingsMetaService metaService, IntPtr? hSession = null)
{
meta = metaService;
if (hSession.HasValue)
holdSession = hSession.Value;
DriverVersion = GetDriverVersionInternal();
}
public readonly float DriverVersion;
private float GetDriverVersionInternal()
{
float result = 0f;
uint sysDrvVersion = 0;
var sysDrvBranch = new StringBuilder((int)NvapiDrsWrapper.NVAPI_SHORT_STRING_MAX);
if (nvw.SYS_GetDriverAndBranchVersion(ref sysDrvVersion, sysDrvBranch) == NvAPI_Status.NVAPI_OK)
{
try { result = (float)(sysDrvVersion / 100f); }
catch { }
}
return result;
}
protected void DrsSession(Action<IntPtr> action)
{
DrsSession<bool>((hSession) =>
{
action(hSession);
return true;
});
}
protected T DrsSession<T>(Func<IntPtr,T> action)
{
if (holdSession != null && holdSession != IntPtr.Zero)
{
return action(holdSession);
}
IntPtr hSession = IntPtr.Zero;
var csRes = nvw.DRS_CreateSession(ref hSession);
if (csRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_CreateSession", csRes);
try
{
var nvRes = nvw.DRS_LoadSettings(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
return action(hSession);
}
finally
{
var nvRes = nvw.DRS_DestroySession(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_DestroySession", nvRes);
}
}
public static IntPtr CreateAndLoadSession()
{
IntPtr hSession = IntPtr.Zero;
var csRes = nvw.DRS_CreateSession(ref hSession);
if (csRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_CreateSession", csRes);
var nvRes = nvw.DRS_LoadSettings(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
return hSession;
}
protected IntPtr GetProfileHandle(IntPtr hSession, string profileName)
{
var hProfile = IntPtr.Zero;
if (string.IsNullOrEmpty(profileName))
{
var nvRes = nvw.DRS_GetCurrentGlobalProfile(hSession, ref hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_GetCurrentGlobalProfile", nvRes);
}
else
{
var nvRes = nvw.DRS_FindProfileByName(hSession, new StringBuilder(profileName), ref hProfile);
if (nvRes == NvAPI_Status.NVAPI_PROFILE_NOT_FOUND)
return IntPtr.Zero;
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_FindProfileByName", nvRes);
}
return hProfile;
}
protected IntPtr CreateProfile(IntPtr hSession, string profileName)
{
if (string.IsNullOrEmpty(profileName))
throw new ArgumentNullException("profileName");
var hProfile = IntPtr.Zero;
var newProfile = new NVDRS_PROFILE()
{
version = nvw.NVDRS_PROFILE_VER,
profileName = profileName,
};
var nvRes = nvw.DRS_CreateProfile(hSession, ref newProfile, ref hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_CreateProfile", nvRes);
return hProfile;
}
protected NVDRS_PROFILE GetProfileInfo(IntPtr hSession, IntPtr hProfile)
{
var tmpProfile = new NVDRS_PROFILE();
tmpProfile.version = nvw.NVDRS_PROFILE_VER;
var gpRes = nvw.DRS_GetProfileInfo(hSession, hProfile, ref tmpProfile);
if (gpRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_GetProfileInfo", gpRes);
return tmpProfile;
}
protected void StoreDwordValue(IntPtr hSession, IntPtr hProfile, uint settingId, uint dwordValue)
{
var newSetting = new NVDRS_SETTING()
{
version = nvw.NVDRS_SETTING_VER,
settingId = settingId,
settingType = NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE,
settingLocation = NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION,
currentValue = new NVDRS_SETTING_UNION()
{
dwordValue = dwordValue,
},
};
var ssRes = nvw.DRS_SetSetting(hSession, hProfile, ref newSetting);
if (ssRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_SetSetting", ssRes);
}
protected void StoreStringValue(IntPtr hSession, IntPtr hProfile, uint settingId, string stringValue)
{
var newSetting = new NVDRS_SETTING()
{
version = nvw.NVDRS_SETTING_VER,
settingId = settingId,
settingType = NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE,
settingLocation = NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION,
currentValue = new NVDRS_SETTING_UNION()
{
stringValue = stringValue,
},
};
var ssRes = nvw.DRS_SetSetting(hSession, hProfile, ref newSetting);
if (ssRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_SetSetting", ssRes);
}
protected NVDRS_SETTING? ReadSetting(IntPtr hSession, IntPtr hProfile, uint settingId)
{
var newSetting = new NVDRS_SETTING()
{
version = nvw.NVDRS_SETTING_VER,
};
var ssRes = nvw.DRS_GetSetting(hSession, hProfile, settingId, ref newSetting);
if (ssRes == NvAPI_Status.NVAPI_SETTING_NOT_FOUND)
return null;
if (ssRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_GetSetting", ssRes);
return newSetting;
}
protected uint? ReadDwordValue(IntPtr hSession, IntPtr hProfile, uint settingId)
{
var newSetting = ReadSetting(hSession, hProfile, settingId);
if (newSetting == null)
return null;
return newSetting.Value.currentValue.dwordValue;
}
protected void AddApplication(IntPtr hSession, IntPtr hProfile, string applicationName)
{
var newApp = new NVDRS_APPLICATION_V3()
{
version = nvw.NVDRS_APPLICATION_VER_V3,
appName = applicationName,
};
var caRes = nvw.DRS_CreateApplication(hSession, hProfile, ref newApp);
if (caRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_CreateApplication", caRes);
}
protected void DeleteApplication(IntPtr hSession, IntPtr hProfile, string applicationName)
{
var caRes = nvw.DRS_DeleteApplication(hSession, hProfile, new StringBuilder(applicationName));
if (caRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_DeleteApplication", caRes);
}
protected List<IntPtr> EnumProfileHandles(IntPtr hSession)
{
var profileHandles = new List<IntPtr>();
var hProfile = IntPtr.Zero;
uint index = 0;
NvAPI_Status nvRes;
do
{
nvRes = nvw.DRS_EnumProfiles(hSession, index, ref hProfile);
if (nvRes == NvAPI_Status.NVAPI_OK)
{
profileHandles.Add(hProfile);
}
index++;
}
while (nvRes == NvAPI_Status.NVAPI_OK);
if (nvRes != NvAPI_Status.NVAPI_END_ENUMERATION)
throw new NvapiException("DRS_EnumProfiles", nvRes);
return profileHandles;
}
protected List<NVDRS_SETTING> GetProfileSettings(IntPtr hSession, IntPtr hProfile)
{
uint settingCount = 512;
var settings = new NVDRS_SETTING[512];
settings[0].version = NvapiDrsWrapper.NVDRS_SETTING_VER;
var esRes = NvapiDrsWrapper.DRS_EnumSettings(hSession, hProfile, 0, ref settingCount, ref settings);
if (esRes == NvAPI_Status.NVAPI_END_ENUMERATION)
return new List<NVDRS_SETTING>();
if (esRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumSettings", esRes);
return settings.ToList();
}
protected List<NVDRS_APPLICATION_V3> GetProfileApplications(IntPtr hSession, IntPtr hProfile)
{
uint appCount = 512;
var apps = new NVDRS_APPLICATION_V3[512];
apps[0].version = NvapiDrsWrapper.NVDRS_APPLICATION_VER_V3;
var esRes = NvapiDrsWrapper.DRS_EnumApplications(hSession, hProfile, 0, ref appCount, ref apps);
if (esRes == NvAPI_Status.NVAPI_END_ENUMERATION)
return new List<NVDRS_APPLICATION_V3>();
if (esRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumApplications", esRes);
return apps.ToList();
}
protected void SaveSettings(IntPtr hSession)
{
var nvRes = nvw.DRS_SaveSettings(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_SaveSettings", nvRes);
}
protected void LoadSettingsFileEx(IntPtr hSession, string filename)
{
var nvRes = nvw.DRS_LoadSettingsFromFileEx(hSession, new StringBuilder(filename));
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettingsFromFileEx", nvRes);
}
protected void SaveSettingsFileEx(IntPtr hSession, string filename)
{
var nvRes = nvw.DRS_SaveSettingsToFileEx(hSession, new StringBuilder(filename));
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_SaveSettingsToFileEx", nvRes);
}
}
}

View File

@@ -0,0 +1,74 @@
using nspector.Common.Meta;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace nspector.Common
{
public static class DrsUtil
{
public static string StringValueRaw = "Text";
public static string GetDwordString(uint dword)
{
return string.Format("0x{0:X8}", dword);
}
public static uint ParseDwordByInputSafe(string input)
{
uint result = 0;
if (input.ToLower().StartsWith("0x"))
{
try
{
int blankPos = input.IndexOf(' ');
int parseLen = blankPos > 2 ? blankPos - 2 : input.Length - 2;
result = uint.Parse(input.Substring(2, parseLen), NumberStyles.AllowHexSpecifier);
}
catch { }
}
else
try { result = uint.Parse(input); }
catch { }
return result;
}
internal static uint ParseDwordSettingValue(SettingMeta meta, string text)
{
var valueByName = meta.DwordValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text));
if (valueByName != null)
return valueByName.Value;
return ParseDwordByInputSafe(text);
}
internal static string GetDwordSettingValueName(SettingMeta meta, uint dwordValue)
{
var settingValue = meta.DwordValues
.FirstOrDefault(x => x.Value.Equals(dwordValue));
return settingValue == null ? GetDwordString(dwordValue): settingValue.ValueName;
}
internal static string ParseStringSettingValue(SettingMeta meta, string text)
{
var valueByName = meta.StringValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text));
if (valueByName != null)
return valueByName.Value;
return text;
}
internal static string GetStringSettingValueName(SettingMeta meta, string stringValue)
{
var settingValue = meta.StringValues
.FirstOrDefault(x => x.Value.Equals(stringValue));
return settingValue == null ? stringValue : settingValue.ValueName;
}
}
}

View File

@@ -0,0 +1,20 @@
using System.Security.Principal;
namespace nspector.Common.Helper
{
public static class AdminHelper
{
private static bool isAdmin = false;
static AdminHelper()
{
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);
}
public static bool IsAdmin
{
get { return isAdmin; }
}
}
}

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace nspector.Common.Helper
{
internal class InputBox
{
internal static DialogResult Show(string title, string promptText, ref string value, List<string> invalidInputs, string mandatoryFormatRegExPattern, int maxLength)
{
var form = new Form();
var label = new Label();
var textBox = new TextBox();
var buttonOk = new Button();
var buttonCancel = new Button();
var imageBox = new PictureBox();
EventHandler textchanged = delegate(object sender, EventArgs e)
{
bool mandatory_success = Regex.IsMatch(textBox.Text, mandatoryFormatRegExPattern);
if (textBox.Text == "" || textBox.Text.Length > maxLength || !mandatory_success)
{
imageBox.Image = nspector.Properties.Resources.ieframe_1_18212;
buttonOk.Enabled = false;
return;
}
foreach (string invStr in invalidInputs)
{
if (textBox.Text.ToUpper() == invStr.ToUpper())
{
imageBox.Image = Properties.Resources.ieframe_1_18212;
buttonOk.Enabled = false;
return;
}
}
imageBox.Image = Properties.Resources.ieframe_1_31073_002;
buttonOk.Enabled = true;
};
textBox.TextChanged += textchanged;
form.Text = title;
label.Text = promptText;
textBox.Text = value;
textBox.MaxLength = maxLength;
imageBox.Image = Properties.Resources.ieframe_1_18212;
buttonOk.Text = "OK";
buttonCancel.Text = "Cancel";
buttonOk.DialogResult = DialogResult.OK;
buttonCancel.DialogResult = DialogResult.Cancel;
buttonOk.Enabled = false;
label.SetBounds(9, 20, 372, 13);
textBox.SetBounds(12, 36, 352, 20);
buttonOk.SetBounds(228, 72, 75, 23);
buttonCancel.SetBounds(309, 72, 75, 23);
imageBox.SetBounds(368, 36, 16, 16);
label.AutoSize = true;
imageBox.Anchor = AnchorStyles.Top | AnchorStyles.Right;
textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
form.ClientSize = new Size(396, 107);
form.Controls.AddRange(new Control[] { label, textBox, imageBox, buttonOk, buttonCancel });
form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
form.FormBorderStyle = FormBorderStyle.FixedDialog;
form.StartPosition = FormStartPosition.CenterParent;
form.MinimizeBox = false;
form.MaximizeBox = false;
form.AcceptButton = buttonOk;
form.CancelButton = buttonCancel;
textchanged(form, new EventArgs());
DialogResult dialogResult = form.ShowDialog();
value = textBox.Text;
return dialogResult;
}
}
}

View File

@@ -0,0 +1,19 @@
using System.Collections;
namespace nspector.Common.Helper
{
internal class ListSort : IComparer
{
public int Compare(object x, object y)
{
try
{
return System.String.CompareOrdinal(x.ToString(), y.ToString());
}
catch
{
return 0;
}
}
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace nspector.Common.Helper
{
public class ListViewGroupHeaderSorter : IComparer<ListViewGroup>
{
private bool _ascending = true;
public ListViewGroupHeaderSorter(bool ascending)
{
_ascending = ascending;
}
#region IComparer<ListViewGroup> Members
public int Compare(ListViewGroup x, ListViewGroup y)
{
if (_ascending)
return string.Compare(((ListViewGroup)x).Header, ((ListViewGroup)y).Header);
else
return string.Compare(((ListViewGroup)y).Header, ((ListViewGroup)x).Header);
}
#endregion
}
public class ListViewGroupSorter
{
internal ListView _listview;
public static bool operator ==(ListView listview, ListViewGroupSorter sorter)
{
return listview == sorter._listview;
}
public static bool operator !=(ListView listview, ListViewGroupSorter sorter)
{
return listview != sorter._listview;
}
public static implicit operator ListView(ListViewGroupSorter sorter)
{
return sorter._listview;
}
public static implicit operator ListViewGroupSorter(ListView listview)
{
return new ListViewGroupSorter(listview);
}
internal ListViewGroupSorter(ListView listview)
{
_listview = listview;
}
public void SortGroups(bool ascending)
{
_listview.BeginUpdate();
List<ListViewGroup> lvgs = new List<ListViewGroup>();
foreach (ListViewGroup lvg in _listview.Groups)
lvgs.Add(lvg);
_listview.Groups.Clear();
lvgs.Sort(new ListViewGroupHeaderSorter(ascending));
_listview.Groups.AddRange(lvgs.ToArray());
_listview.EndUpdate();
}
#region overridden methods
public override bool Equals(object obj)
{
return _listview.Equals(obj);
}
public override int GetHashCode()
{
return _listview.GetHashCode();
}
public override string ToString()
{
return _listview.ToString();
}
#endregion
}
}

View File

@@ -0,0 +1,11 @@
using System.Windows.Forms;
namespace nspector.Common.Helper
{
internal class NoBorderRenderer : ToolStripProfessionalRenderer
{
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) {}
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {}
}
}

View File

@@ -0,0 +1,55 @@
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
namespace nspector.Common.Helper
{
internal static class XMLHelper<T> where T : new()
{
static XmlSerializer xmlSerializer;
static XMLHelper()
{
//TODO: Fix It!
//xmlSerializer = new XmlSerializer(typeof(T));
xmlSerializer = XmlSerializer.FromTypes(new[]{typeof(T)})[0];
}
internal static string SerializeToXmlString(T xmlObject, Encoding encoding, bool removeNamespace)
{
var memoryStream = new MemoryStream();
var xmlWriter = new XmlTextWriter(memoryStream, encoding) { Formatting = Formatting.Indented };
if (removeNamespace)
{
var xs = new XmlSerializerNamespaces();
xs.Add("", "");
xmlSerializer.Serialize(xmlWriter, xmlObject, xs);
}
else
xmlSerializer.Serialize(xmlWriter, xmlObject);
return encoding.GetString(memoryStream.ToArray());
}
internal static void SerializeToXmlFile(T xmlObject, string filename, Encoding encoding, bool removeNamespace)
{
File.WriteAllText(filename, SerializeToXmlString(xmlObject, encoding, removeNamespace));
}
internal static T DeserializeFromXmlString(string xml)
{
var reader = new StringReader(xml);
var xmlObject = (T)xmlSerializer.Deserialize(reader);
return xmlObject;
}
internal static T DeserializeFromXMLFile(string filename)
{
return DeserializeFromXmlString(File.ReadAllText(filename));
}
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace nspector.Common.Import
{
[Serializable]
public class Profile
{
public string ProfileName = "";
public List<string> Executeables = new List<string>();
public List<ProfileSetting> Settings = new List<ProfileSetting>();
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Xml.Serialization;
namespace nspector.Common.Import
{
[Serializable]
public class ProfileSetting
{
public string SettingNameInfo = "";
[XmlElement(ElementName = "SettingID")]
public uint SettingId = 0;
public uint SettingValue = 0;
}
}

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
namespace nspector.Common.Import
{
[Serializable]
public class Profiles : List<Profile>
{
}
}

View File

@@ -0,0 +1,166 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
namespace nspector.Common.Meta
{
internal class ConstantSettingMetaService : ISettingMetaService
{
public ConstantSettingMetaService()
{
settingEnumTypeCache = CreateSettingEnumTypeCache();
GetSettingIds();
}
private readonly Dictionary<ESetting, Type> settingEnumTypeCache;
private string[] ignoreSettingNames = new[] { "TOTAL_DWORD_SETTING_NUM", "TOTAL_WSTRING_SETTING_NUM",
"TOTAL_SETTING_NUM", "INVALID_SETTING_ID" };
private Dictionary<ESetting, Type> CreateSettingEnumTypeCache()
{
var result = new Dictionary<ESetting, Type>();
var drsEnumTypes = Assembly.GetExecutingAssembly().GetTypes()
.Where(t => t.Namespace == "nspector.Native.NvApi.DriverSettings"
&& t.IsEnum && t.Name.StartsWith("EValues_")).ToList();
var settingIdNames = Enum.GetNames(typeof(ESetting)).Distinct().ToList();
foreach (var settingIdName in settingIdNames)
{
if (ignoreSettingNames.Contains(settingIdName))
continue;
var enumType = drsEnumTypes
.FirstOrDefault(x => settingIdName
.Substring(0, settingIdName.Length - 3)
.Equals(x.Name.Substring(8))
);
if (enumType != null)
{
var settingIdVal = (ESetting)Enum.Parse(typeof(ESetting), settingIdName);
result.Add(settingIdVal, enumType);
}
}
return result;
}
public Type GetSettingEnumType(uint settingId)
{
if (settingEnumTypeCache.ContainsKey((ESetting)settingId))
return settingEnumTypeCache[(ESetting)settingId];
return null;
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
return null;
}
public string GetSettingName(uint settingId)
{
if (settingIds.Contains(settingId))
return ((ESetting)settingId).ToString();
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
if (settingEnumTypeCache.ContainsKey((ESetting)settingId))
{
var enumType = settingEnumTypeCache[(ESetting)settingId];
var defaultName = Enum.GetNames(enumType).FirstOrDefault(x => x.EndsWith("_DEFAULT"));
if (defaultName != null)
return (uint)Enum.Parse(enumType, defaultName);
}
return null;
}
public string GetStringDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
return null;
}
private uint ParseEnumValue(Type enumType, string enumText)
{
try
{
return (uint)Enum.Parse(enumType, enumText);
}
catch (InvalidCastException)
{
var intValue = (int)Enum.Parse(enumType, enumText);
var bytes = BitConverter.GetBytes(intValue);
return BitConverter.ToUInt32(bytes, 0);
}
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
if (settingEnumTypeCache.ContainsKey((ESetting)settingId))
{
var enumType = settingEnumTypeCache[(ESetting)settingId];
var validNames = Enum.GetNames(enumType)
.Where(x => 1 == 1
&& !x.EndsWith("_DEFAULT")
&& !x.EndsWith("_NUM_VALUES")
//&& !x.EndsWith("_NUM")
//&& !x.EndsWith("_MASK")
//&& (!x.EndsWith("_MIN") || x.Equals("PREFERRED_PSTATE_PREFER_MIN"))
//&& (!x.EndsWith("_MAX") || x.Equals("PREFERRED_PSTATE_PREFER_MAX"))
).ToList();
return validNames.Select(x => new SettingValue<uint>(Source)
{
Value = ParseEnumValue(enumType, x),
ValueName = DrsUtil.GetDwordString(ParseEnumValue(enumType, x)) + " " + x
}).ToList();
}
return null;
}
private HashSet<uint> settingIds;
public List<uint> GetSettingIds()
{
if (settingIds == null)
settingIds = new HashSet<uint>(
Enum.GetValues(typeof(ESetting))
.Cast<ESetting>()
.Where(x => !ignoreSettingNames.Contains(x.ToString()))
.Cast<uint>()
.Distinct()
.ToList());
return settingIds.ToList();
}
public string GetGroupName(uint settingId)
{
return null;
}
public SettingMetaSource Source
{
get { return SettingMetaSource.ConstantSettings; }
}
}
}

View File

@@ -0,0 +1,101 @@
using nspector.Common.CustomSettings;
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
internal class CustomSettingMetaService : ISettingMetaService
{
private readonly CustomSettingNames customSettings;
private readonly SettingMetaSource _source;
public CustomSettingMetaService(CustomSettingNames customSettings, SettingMetaSource sourceOverride = SettingMetaSource.CustomSettings)
{
this.customSettings = customSettings;
_source = sourceOverride;
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
return null;
}
public string GetSettingName(uint settingId)
{
var setting = customSettings.Settings
.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (setting != null)
return setting.UserfriendlyName;
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
var setting = customSettings.Settings
.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (setting != null)
return setting.DefaultValue;
return null;
}
public string GetStringDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
return null;
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
var setting = customSettings.Settings
.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (setting != null)
{
var i = 0;
return setting.SettingValues.Select(x => new SettingValue<uint>(Source)
{
ValuePos = i++,
Value = x.SettingValue,
ValueName = _source == SettingMetaSource.CustomSettings ? x.UserfriendlyName : DrsUtil.GetDwordString(x.SettingValue) + " " + x.UserfriendlyName,
}).ToList();
}
return null;
}
public List<uint> GetSettingIds()
{
return customSettings.Settings
.Select(x => x.SettingId).ToList();
}
public string GetGroupName(uint settingId)
{
var setting = customSettings.Settings
.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (setting != null && !string.IsNullOrWhiteSpace(setting.GroupName))
return setting.GroupName;
return null;
}
public SettingMetaSource Source
{
get { return _source; }
}
}
}

View File

@@ -0,0 +1,189 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using nspector.Common.CustomSettings;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common.Meta
{
internal class DriverSettingMetaService : ISettingMetaService
{
private readonly Dictionary<uint, SettingMeta> _settingMetaCache = new Dictionary<uint, SettingMeta>();
private readonly List<uint> _settingIds;
public DriverSettingMetaService()
{
_settingIds = InitSettingIds();
}
private List<uint> InitSettingIds()
{
var settingIds = new List<uint>();
var nvRes = nvw.DRS_EnumAvailableSettingIds(out settingIds, 512);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumAvailableSettingIds", nvRes);
return settingIds;
}
private SettingMeta GetDriverSettingMetaInternal(uint settingId)
{
var values = new NVDRS_SETTING_VALUES();
values.version = nvw.NVDRS_SETTING_VALUES_VER;
uint valueCount = 255;
var nvRes = nvw.DRS_EnumAvailableSettingValues(settingId, ref valueCount, ref values);
if (nvRes == NvAPI_Status.NVAPI_SETTING_NOT_FOUND)
return null;
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumAvailableSettingValues", nvRes);
var sbSettingName = new StringBuilder((int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX);
nvRes = nvw.DRS_GetSettingNameFromId(settingId, sbSettingName);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_GetSettingNameFromId", nvRes);
var settingName = sbSettingName.ToString();
if (string.IsNullOrWhiteSpace(settingName))
settingName = DrsUtil.GetDwordString(settingId);
var result = new SettingMeta {
SettingType = values.settingType,
SettingName = settingName,
};
if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE)
{
result.DefaultDwordValue = values.defaultValue.dwordValue;
result.DwordValues = new List<SettingValue<uint>>();
for (int i = 0; i < values.numSettingValues; i++)
{
result.DwordValues.Add(
new SettingValue<uint> (Source) {
Value = values.settingValues[i].dwordValue,
ValueName = DrsUtil.GetDwordString(values.settingValues[i].dwordValue),
});
}
}
if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE)
{
result.DefaultStringValue = values.defaultValue.stringValue;
result.StringValues = new List<SettingValue<string>>();
for (int i = 0; i < values.numSettingValues; i++)
{
var strValue = values.settingValues[i].stringValue;
if (strValue != null)
{
result.StringValues.Add(
new SettingValue<string>(Source)
{
Value = strValue,
ValueName = strValue,
});
}
}
}
return result;
}
private SettingMeta GetSettingsMeta(uint settingId)
{
if (_settingMetaCache.ContainsKey(settingId))
return _settingMetaCache[settingId];
else
{
var settingMeta = GetDriverSettingMetaInternal(settingId);
if (settingMeta != null)
{
_settingMetaCache.Add(settingId, settingMeta);
return settingMeta;
}
return null;
}
}
public string GetSettingName(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.SettingName;
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.DefaultDwordValue;
return null;
}
public string GetStringDefaultValue(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.DefaultStringValue;
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.StringValues;
return null;
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.DwordValues;
return null;
}
public List<uint> GetSettingIds()
{
return _settingIds;
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.SettingType;
return null;
}
public string GetGroupName(uint settingId)
{
return null;
}
public SettingMetaSource Source
{
get { return SettingMetaSource.DriverSettings; }
}
}
}

View File

@@ -0,0 +1,29 @@
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
internal interface ISettingMetaService
{
SettingMetaSource Source {get; }
NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId);
string GetSettingName(uint settingId);
string GetGroupName(uint settingId);
uint? GetDwordDefaultValue(uint settingId);
string GetStringDefaultValue(uint settingId);
List<SettingValue<string>> GetStringValues(uint settingId);
List<SettingValue<uint>> GetDwordValues(uint settingId);
List<uint> GetSettingIds();
}
}

View File

@@ -0,0 +1,8 @@
namespace nspector.Common.Meta
{
internal class MetaServiceItem
{
public ISettingMetaService Service { get; set; }
public uint ValueNamePrio { get; set; }
}
}

View File

@@ -0,0 +1,179 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
namespace nspector.Common.Meta
{
internal class NvD3dUmxSettingMetaService : ISettingMetaService
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
struct NvD3dUmxName
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string settingName;
public uint settingId;
public uint unknown;
}
[StructLayout(LayoutKind.Sequential)]
struct NvD3dUmxNameList
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)]
public NvD3dUmxName[] settingNames;
}
private static int FindOffset(byte[] bytes, byte[] pattern, int offset = 0, byte? wildcard = null)
{
for (int i = offset; i < bytes.Length; i++)
{
if (pattern[0] == bytes[i] && bytes.Length - i >= pattern.Length)
{
bool ismatch = true;
for (int j = 1; j < pattern.Length && ismatch == true; j++)
{
if (bytes[i + j] != pattern[j] && ((wildcard.HasValue && wildcard != pattern[j]) || !wildcard.HasValue))
{
ismatch = false;
break;
}
}
if (ismatch)
return i;
}
}
return -1;
}
private static List<NvD3dUmxName> ParseNvD3dUmxNames(string filename)
{
var bytes = File.ReadAllBytes(filename);
var runtimeNameOffset = FindOffset(bytes, new byte[] { 0x52, 0x75, 0x6E, 0x54, 0x69, 0x6D, 0x65, 0x4E, 0x61, 0x6D, 0x65 });
if (runtimeNameOffset > -1)
{
var _2ddNotesOffset = FindOffset(bytes, new byte[] { 0x32, 0x44, 0x44, 0x5F, 0x4E, 0x6F, 0x74, 0x65, 0x73 });
if (_2ddNotesOffset > -1)
{
var itemSize = Marshal.SizeOf(typeof(NvD3dUmxName));
var startOffset = runtimeNameOffset - itemSize;
var endOffset = _2ddNotesOffset + itemSize;
var tableLength = endOffset - startOffset;
var bufferSize = Marshal.SizeOf(typeof(NvD3dUmxNameList));
if (tableLength > bufferSize)
{
tableLength = bufferSize;
}
var itemCount = tableLength / itemSize;
var buffer = new byte[bufferSize];
Buffer.BlockCopy(bytes, startOffset, buffer, 0, tableLength);
var poBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned);
try
{
var nvD3dUmxNames = (NvD3dUmxNameList)Marshal.PtrToStructure(
poBuffer.AddrOfPinnedObject(),
typeof(NvD3dUmxNameList));
var result = new List<NvD3dUmxName>();
for (int i = 0; i < itemCount; i++)
{
result.Add(nvD3dUmxNames.settingNames[i]);
}
return result;
}
finally
{
poBuffer.Free();
}
}
}
return null;
}
private readonly List<NvD3dUmxName> _SettingNames;
public NvD3dUmxSettingMetaService()
{
var systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System);
var nvD3dUmxPath = Path.Combine(systemPath, "nvd3dumx.dll");
_SettingNames = ParseNvD3dUmxNames(nvD3dUmxPath);
}
public Type GetSettingEnumType(uint settingId)
{
return null;
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
return null;
}
public string GetSettingName(uint settingId)
{
if (_SettingNames != null)
{
var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId);
return setting.settingId != 0 ? setting.settingName : null;
}
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
return null;
}
public string GetStringDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
return null;
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
return null;
}
public List<uint> GetSettingIds()
{
if (_SettingNames != null)
{
return _SettingNames.Select(s => s.settingId).ToList();
}
return null;
}
public string GetGroupName(uint settingId)
{
if (_SettingNames != null)
{
var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId);
return setting.settingId != 0 ? "7 - Stereo" : null;
}
return null;
}
public SettingMetaSource Source
{
get { return SettingMetaSource.NvD3dUmxSettings; }
}
}
}

View File

@@ -0,0 +1,89 @@
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
internal class ScannedSettingMetaService : ISettingMetaService
{
private readonly List<CachedSettings> CachedSettings;
public ScannedSettingMetaService(List<CachedSettings> cachedSettings)
{
CachedSettings = cachedSettings;
}
public SettingMetaSource Source
{
get { return SettingMetaSource.ScannedSettings; }
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (cached != null)
return cached.SettingType;
return null;
}
public string GetSettingName(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId));
if (cached != null)
return string.Format("0x{0:X8} ({1} Profiles)", settingId, cached.ProfileCount);
return null;
}
public string GetGroupName(uint settingId)
{
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
return null;
}
public string GetStringDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (cached != null)
return cached.SettingValues.Select(s => new SettingValue<string>(Source)
{
Value = s.ValueStr,
ValueName = string.Format("'{0}' ({1})", s.ValueStr.Trim(), s.ProfileNames),
}).ToList();
return null;
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId));
if (cached != null)
return cached.SettingValues.Select(s => new SettingValue<uint>(Source)
{
Value = s.Value,
ValueName = string.Format("0x{0:X8} ({1})", s.Value, s.ProfileNames),
}).ToList();
return null;
}
public List<uint> GetSettingIds()
{
return CachedSettings.Select(c => c.SettingId).ToList();
}
}
}

View File

@@ -0,0 +1,25 @@
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
internal class SettingMeta
{
public NVDRS_SETTING_TYPE? SettingType { get; set; }
public string GroupName { get; set; }
public string SettingName { get; set; }
public string DefaultStringValue { get; set; }
public uint DefaultDwordValue { get; set; }
public List<SettingValue<string>> StringValues { get; set; }
public List<SettingValue<uint>> DwordValues { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
public enum SettingMetaSource
{
CustomSettings = 10,
DriverSettings = 20,
ConstantSettings = 30,
ReferenceSettings = 40,
NvD3dUmxSettings = 50,
ScannedSettings = 60,
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
internal class SettingValue<T>
{
public SettingMetaSource ValueSource;
public SettingValue(SettingMetaSource source)
{
ValueSource = source;
}
public int ValuePos { get; set; }
public string ValueName { get; set; }
public T Value { get; set; }
public override string ToString()
{
if (typeof(T) == typeof(uint))
return string.Format("Value=0x{0:X8}; ValueName={1};", Value, ValueName);
return string.Format("Value={0}; ValueName={1};", Value, ValueName);
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nspector.Native.NVAPI2;
namespace nspector.Common
{
public class NvapiException : Exception
{
public readonly NvAPI_Status Status;
public NvapiException(string function, NvAPI_Status status)
: base(function + " failed: " + status)
{
Status = status;
}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common
{
internal enum SettingState
{
NotAssiged,
GlobalSetting,
UserdefinedSetting,
NvidiaSetting,
}
internal class SettingItem
{
public uint SettingId { get; set; }
public string SettingText { get; set; }
public string ValueText { get; set; }
public string ValueRaw { get; set; }
public string GroupName { get; set; }
public SettingState State { get; set; }
public bool IsStringValue { get; set; }
public override string ToString()
{
return string.Format("{0}; 0x{1:X8}; {2}; {3}; {4};", State, SettingId, SettingText, ValueText, ValueRaw);
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common
{
public enum SettingViewMode
{
Normal,
IncludeScannedSetttings,
CustomSettingsOnly,
}
}

View File

File diff suppressed because it is too large Load Diff

BIN
nspector/Images/0_gear2.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
nspector/Images/apply.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

BIN
nspector/Images/export1.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
nspector/Images/home_sm.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

BIN
nspector/Images/import1.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

BIN
nspector/Images/n1-016.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

BIN
nspector/Images/nv_btn.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

BIN
nspector/Images/shield.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

275
nspector/ListViewEx.cs Normal file
View File

@@ -0,0 +1,275 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace nspector
{
internal delegate void DropFilesNativeHandler(string[] files);
internal class ListViewEx : ListView
{
public event DropFilesNativeHandler OnDropFilesNative;
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wPar, IntPtr lPar);
private const int LVM_FIRST = 0x1000;
private const int LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59);
private const int WM_PAINT = 0x000F;
private struct EmbeddedControl
{
internal Control Control;
internal int Column;
internal int Row;
internal DockStyle Dock;
internal ListViewItem Item;
}
private ArrayList _embeddedControls = new ArrayList();
public ListViewEx()
{
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
}
protected override void OnNotifyMessage(Message m)
{
if (m.Msg != 0x14)
{
base.OnNotifyMessage(m);
}
}
protected int[] GetColumnOrder()
{
IntPtr lPar = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)) * Columns.Count);
IntPtr res = SendMessage(Handle, LVM_GETCOLUMNORDERARRAY, new IntPtr(Columns.Count), lPar);
if (res.ToInt32() == 0)
{
Marshal.FreeHGlobal(lPar);
return null;
}
int [] order = new int[Columns.Count];
Marshal.Copy(lPar, order, 0, Columns.Count);
Marshal.FreeHGlobal(lPar);
return order;
}
protected Rectangle GetSubItemBounds(ListViewItem Item, int SubItem)
{
Rectangle subItemRect = Rectangle.Empty;
if (Item == null)
throw new ArgumentNullException("Item");
int[] order = GetColumnOrder();
if (order == null) // No Columns
return subItemRect;
if (SubItem >= order.Length)
throw new IndexOutOfRangeException("SubItem "+SubItem+" out of range");
Rectangle lviBounds = Item.GetBounds(ItemBoundsPortion.Entire);
int subItemX = lviBounds.Left;
ColumnHeader col;
int i;
for (i=0; i<order.Length; i++)
{
col = this.Columns[order[i]];
if (col.Index == SubItem)
break;
subItemX += col.Width;
}
subItemRect = new Rectangle(subItemX, lviBounds.Top-1, this.Columns[order[i]].Width, lviBounds.Height);
return subItemRect;
}
internal void AddEmbeddedControl(Control c, int col, int row)
{
AddEmbeddedControl(c,col,row,DockStyle.Fill);
}
internal void AddEmbeddedControl(Control c, int col, int row, DockStyle dock)
{
if (c==null)
throw new ArgumentNullException();
if (col>=Columns.Count || row>=Items.Count)
throw new ArgumentOutOfRangeException();
EmbeddedControl ec;
ec.Control = c;
ec.Column = col;
ec.Row = row;
ec.Dock = dock;
ec.Item = Items[row];
_embeddedControls.Add(ec);
c.Click += new EventHandler(_embeddedControl_Click);
this.Controls.Add(c);
}
internal void RemoveEmbeddedControl(Control c)
{
if (c == null)
throw new ArgumentNullException();
for (int i=0; i<_embeddedControls.Count; i++)
{
EmbeddedControl ec = (EmbeddedControl)_embeddedControls[i];
if (ec.Control == c)
{
c.Click -= new EventHandler(_embeddedControl_Click);
this.Controls.Remove(c);
_embeddedControls.RemoveAt(i);
return;
}
}
}
internal Control GetEmbeddedControl(int col, int row)
{
foreach (EmbeddedControl ec in _embeddedControls)
if (ec.Row == row && ec.Column == col)
return ec.Control;
return null;
}
[DefaultValue(View.LargeIcon)]
internal new View View
{
get
{
return base.View;
}
set
{
foreach (EmbeddedControl ec in _embeddedControls)
ec.Control.Visible = (value == View.Details);
base.View = value;
}
}
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
public static extern int DragQueryFile(IntPtr hDrop, uint iFile, [Out] StringBuilder lpszFile, int cch);
private const int WM_DROPFILES = 0x233;
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_PAINT:
if (View != View.Details)
break;
foreach (EmbeddedControl ec in _embeddedControls)
{
Rectangle rc = this.GetSubItemBounds(ec.Item, ec.Column);
if ((this.HeaderStyle != ColumnHeaderStyle.None) &&
(rc.Top<this.Font.Height))
{
ec.Control.Visible = false;
continue;
}
else
{
ec.Control.Visible = true;
}
switch (ec.Dock)
{
case DockStyle.Fill:
break;
case DockStyle.Top:
rc.Height = ec.Control.Height;
break;
case DockStyle.Left:
rc.Width = ec.Control.Width;
break;
case DockStyle.Bottom:
rc.Offset(0, rc.Height-ec.Control.Height);
rc.Height = ec.Control.Height;
break;
case DockStyle.Right:
rc.Offset(rc.Width-ec.Control.Width, 0);
rc.Width = ec.Control.Width;
break;
case DockStyle.None:
rc.Size = ec.Control.Size;
break;
}
rc.X = rc.X + ec.Control.Margin.Left;
rc.Y = rc.Y + ec.Control.Margin.Top;
rc.Width = rc.Width - ec.Control.Margin.Right;
rc.Height = rc.Height - ec.Control.Margin.Bottom;
ec.Control.Bounds = rc;
}
break;
case WM_DROPFILES:
if (OnDropFilesNative != null)
{
var dropped = DragQueryFile(m.WParam, 0xFFFFFFFF, null, 0);
if (dropped > 0)
{
var files = new List<string>();
for (uint i = 0; i < dropped; i++)
{
var size = DragQueryFile(m.WParam, i, null, 0);
if (size > 0)
{
var sb = new StringBuilder(size + 1);
var result = DragQueryFile(m.WParam, i, sb, size + 1);
files.Add(sb.ToString());
}
}
OnDropFilesNative(files.ToArray());
}
}
base.WndProc(ref m);
break;
}
base.WndProc (ref m);
}
private void _embeddedControl_Click(object sender, EventArgs e)
{
foreach (EmbeddedControl ec in _embeddedControls)
{
if (ec.Control == (Control)sender)
{
this.SelectedItems.Clear();
ec.Item.Selected = true;
}
}
}
}
}

View File

@@ -0,0 +1,937 @@
namespace nspector.Native.NvApi.DriverSettings
{
public enum ESetting : uint {
OGL_AA_LINE_GAMMA_ID = 0x2089BF6C,
OGL_DEEP_COLOR_SCANOUT_ID = 0x2097C2F6,
OGL_DEFAULT_SWAP_INTERVAL_ID = 0x206A6582,
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ID = 0x206C4581,
OGL_DEFAULT_SWAP_INTERVAL_SIGN_ID = 0x20655CFA,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_ID = 0x209DF23E,
OGL_EXTENSION_STRING_VERSION_ID = 0x20FF7493,
OGL_FORCE_BLIT_ID = 0x201F619F,
OGL_FORCE_STEREO_ID = 0x204D9A0C,
OGL_IMPLICIT_GPU_AFFINITY_ID = 0x20D0F3E6,
OGL_MAX_FRAMES_ALLOWED_ID = 0x208E55E3,
OGL_MULTIMON_ID = 0x200AEBFC,
OGL_OVERLAY_PIXEL_TYPE_ID = 0x209AE66F,
OGL_OVERLAY_SUPPORT_ID = 0x206C28C4,
OGL_QUALITY_ENHANCEMENTS_ID = 0x20797D6C,
OGL_SINGLE_BACKDEPTH_BUFFER_ID = 0x20A29055,
OGL_THREAD_CONTROL_ID = 0x20C1221E,
OGL_TRIPLE_BUFFER_ID = 0x20FDD1F9,
OGL_VIDEO_EDITING_MODE_ID = 0x20EE02B4,
AA_BEHAVIOR_FLAGS_ID = 0x10ECDB82,
AA_MODE_ALPHATOCOVERAGE_ID = 0x10FC2D9C,
AA_MODE_GAMMACORRECTION_ID = 0x107D639D,
AA_MODE_METHOD_ID = 0x10D773D2,
AA_MODE_REPLAY_ID = 0x10D48A85,
AA_MODE_SELECTOR_ID = 0x107EFC5B,
AA_MODE_SELECTOR_SLIAA_ID = 0x107AFC5B,
ANISO_MODE_LEVEL_ID = 0x101E61A9,
ANISO_MODE_SELECTOR_ID = 0x10D2BB16,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID = 0x104554B6,
APPLICATION_STEAM_ID_ID = 0x107CDDBC,
CPL_HIDDEN_PROFILE_ID = 0x106D5CFF,
CUDA_EXCLUDED_GPUS_ID = 0x10354FF8,
D3DOGL_GPU_MAX_POWER_ID = 0x10D1EF29,
EXPORT_PERF_COUNTERS_ID = 0x108F0841,
FXAA_ALLOW_ID = 0x1034CB89,
FXAA_ENABLE_ID = 0x1074C972,
FXAA_INDICATOR_ENABLE_ID = 0x1068FB9C,
MCSFRSHOWSPLIT_ID = 0x10287051,
NV_QUALITY_UPSCALING_ID = 0x10444444,
OPTIMUS_MAXAA_ID = 0x10F9DC83,
PHYSXINDICATOR_ID = 0x1094F16F,
PREFERRED_PSTATE_ID = 0x1057EB71,
PREVENT_UI_AF_OVERRIDE_ID = 0x103BCCB5,
PS_FRAMERATE_LIMITER_ID = 0x10834FEE,
PS_FRAMERATE_LIMITER_GPS_CTRL_ID = 0x10834F01,
PS_FRAMERATE_MONITOR_CTRL_ID = 0x10834F05,
SHIM_MAXRES_ID = 0x10F9DC82,
SHIM_MCCOMPAT_ID = 0x10F9DC80,
SHIM_RENDERING_MODE_ID = 0x10F9DC81,
SHIM_RENDERING_OPTIONS_ID = 0x10F9DC84,
SLI_GPU_COUNT_ID = 0x1033DCD1,
SLI_PREDEFINED_GPU_COUNT_ID = 0x1033DCD2,
SLI_PREDEFINED_GPU_COUNT_DX10_ID = 0x1033DCD3,
SLI_PREDEFINED_MODE_ID = 0x1033CEC1,
SLI_PREDEFINED_MODE_DX10_ID = 0x1033CEC2,
SLI_RENDERING_MODE_ID = 0x1033CED1,
VRPRERENDERLIMIT_ID = 0x10111133,
VRRFEATUREINDICATOR_ID = 0x1094F157,
VRROVERLAYINDICATOR_ID = 0x1095F16F,
VRRREQUESTSTATE_ID = 0x1094F1F7,
VRR_APP_OVERRIDE_ID = 0x10A879CF,
VRR_APP_OVERRIDE_REQUEST_STATE_ID = 0x10A879AC,
VRR_MODE_ID = 0x1194F158,
VSYNCSMOOTHAFR_ID = 0x101AE763,
VSYNCVRRCONTROL_ID = 0x10A879CE,
VSYNC_BEHAVIOR_FLAGS_ID = 0x10FDEC23,
WKS_API_STEREO_EYES_EXCHANGE_ID = 0x11AE435C,
WKS_API_STEREO_MODE_ID = 0x11E91A61,
WKS_MEMORY_ALLOCATION_POLICY_ID = 0x11112233,
WKS_STEREO_DONGLE_SUPPORT_ID = 0x112493BD,
WKS_STEREO_SUPPORT_ID = 0x11AA9E99,
WKS_STEREO_SWAP_MODE_ID = 0x11333333,
AO_MODE_ID = 0x00667329,
AO_MODE_ACTIVE_ID = 0x00664339,
AUTO_LODBIASADJUST_ID = 0x00638E8F,
ICAFE_LOGO_CONFIG_ID = 0x00DB1337,
LODBIASADJUST_ID = 0x00738E8F,
MAXWELL_B_SAMPLE_INTERLEAVE_ID = 0x0098C1AC,
PRERENDERLIMIT_ID = 0x007BA09E,
PS_SHADERDISKCACHE_ID = 0x00198FFF,
PS_TEXFILTER_ANISO_OPTS2_ID = 0x00E73211,
PS_TEXFILTER_BILINEAR_IN_ANISO_ID = 0x0084CD70,
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ID = 0x002ECAF2,
PS_TEXFILTER_NO_NEG_LODBIAS_ID = 0x0019BB68,
QUALITY_ENHANCEMENTS_ID = 0x00CE2691,
REFRESH_RATE_OVERRIDE_ID = 0x0064B541,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ID = 0x00AE785C,
SET_VAB_DATA_ID = 0x00AB8687,
VSYNCMODE_ID = 0x00A879CF,
VSYNCTEARCONTROL_ID = 0x005A375C,
TOTAL_DWORD_SETTING_NUM = 86,
TOTAL_WSTRING_SETTING_NUM = 4,
TOTAL_SETTING_NUM = 90,
INVALID_SETTING_ID = 0xFFFFFFFF
}
public enum EValues_OGL_AA_LINE_GAMMA : uint {
OGL_AA_LINE_GAMMA_DISABLED = 0x10,
OGL_AA_LINE_GAMMA_ENABLED = 0x23,
OGL_AA_LINE_GAMMA_MIN = 1,
OGL_AA_LINE_GAMMA_MAX = 100,
OGL_AA_LINE_GAMMA_NUM_VALUES = 4,
OGL_AA_LINE_GAMMA_DEFAULT = OGL_AA_LINE_GAMMA_DISABLED
}
public enum EValues_OGL_DEEP_COLOR_SCANOUT : uint {
OGL_DEEP_COLOR_SCANOUT_DISABLE = 0,
OGL_DEEP_COLOR_SCANOUT_ENABLE = 1,
OGL_DEEP_COLOR_SCANOUT_NUM_VALUES = 2,
OGL_DEEP_COLOR_SCANOUT_DEFAULT = OGL_DEEP_COLOR_SCANOUT_ENABLE
}
public enum EValues_OGL_DEFAULT_SWAP_INTERVAL : uint {
OGL_DEFAULT_SWAP_INTERVAL_TEAR = 0,
OGL_DEFAULT_SWAP_INTERVAL_VSYNC_ONE = 1,
OGL_DEFAULT_SWAP_INTERVAL_VSYNC = 1,
OGL_DEFAULT_SWAP_INTERVAL_VALUE_MASK = 0x0000FFFF,
OGL_DEFAULT_SWAP_INTERVAL_FORCE_MASK = 0xF0000000,
OGL_DEFAULT_SWAP_INTERVAL_FORCE_OFF = 0xF0000000,
OGL_DEFAULT_SWAP_INTERVAL_FORCE_ON = 0x10000000,
OGL_DEFAULT_SWAP_INTERVAL_APP_CONTROLLED = 0x00000000,
OGL_DEFAULT_SWAP_INTERVAL_DISABLE = 0xffffffff,
OGL_DEFAULT_SWAP_INTERVAL_NUM_VALUES = 9,
OGL_DEFAULT_SWAP_INTERVAL_DEFAULT = OGL_DEFAULT_SWAP_INTERVAL_VSYNC_ONE
}
public enum EValues_OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL : uint {
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ZERO_SCANLINES = 0,
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ONE_FULL_FRAME_OF_SCANLINES = 100,
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_NUM_VALUES = 2,
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_DEFAULT = 0
}
public enum EValues_OGL_DEFAULT_SWAP_INTERVAL_SIGN : uint {
OGL_DEFAULT_SWAP_INTERVAL_SIGN_POSITIVE = 0,
OGL_DEFAULT_SWAP_INTERVAL_SIGN_NEGATIVE = 1,
OGL_DEFAULT_SWAP_INTERVAL_SIGN_NUM_VALUES = 2,
OGL_DEFAULT_SWAP_INTERVAL_SIGN_DEFAULT = OGL_DEFAULT_SWAP_INTERVAL_SIGN_POSITIVE
}
public enum EValues_OGL_EVENT_LOG_SEVERITY_THRESHOLD : uint {
OGL_EVENT_LOG_SEVERITY_THRESHOLD_DISABLE = 0,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_CRITICAL = 1,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_WARNING = 2,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_INFORMATION = 3,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_ALL = 4,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_NUM_VALUES = 5,
OGL_EVENT_LOG_SEVERITY_THRESHOLD_DEFAULT = OGL_EVENT_LOG_SEVERITY_THRESHOLD_CRITICAL
}
public enum EValues_OGL_FORCE_BLIT : uint {
OGL_FORCE_BLIT_ON = 1,
OGL_FORCE_BLIT_OFF = 0,
OGL_FORCE_BLIT_NUM_VALUES = 2,
OGL_FORCE_BLIT_DEFAULT = OGL_FORCE_BLIT_OFF
}
public enum EValues_OGL_FORCE_STEREO : uint {
OGL_FORCE_STEREO_OFF = 0,
OGL_FORCE_STEREO_ON = 1,
OGL_FORCE_STEREO_NUM_VALUES = 2,
OGL_FORCE_STEREO_DEFAULT = OGL_FORCE_STEREO_OFF
}
public enum EValues_OGL_MULTIMON : uint {
OGL_MULTIMON_SINGLE_MONITOR = 0,
OGL_MULTIMON_COMPATIBILITY_LCD = 1,
OGL_MULTIMON_COMPATIBILITY_GCD = 2,
OGL_MULTIMON_PERFORMANCE_LCD = 3,
OGL_MULTIMON_PERFORMANCE_GCD = 4,
OGL_MULTIMON_EXTENDED_SINGLE_MONITOR = 5,
OGL_MULTIMON_PERFORMANCE_QUADRO = 6,
OGL_MULTIMON_MULTIMON_BUFFER = 7,
OGL_MULTIMON_NUM_VALUES = 8,
OGL_MULTIMON_DEFAULT = OGL_MULTIMON_PERFORMANCE_LCD
}
public enum EValues_OGL_OVERLAY_PIXEL_TYPE : uint {
OGL_OVERLAY_PIXEL_TYPE_NONE = 0x0,
OGL_OVERLAY_PIXEL_TYPE_CI = 0x1,
OGL_OVERLAY_PIXEL_TYPE_RGBA = 0x2,
OGL_OVERLAY_PIXEL_TYPE_CI_AND_RGBA = 0x3,
OGL_OVERLAY_PIXEL_TYPE_NUM_VALUES = 4,
OGL_OVERLAY_PIXEL_TYPE_DEFAULT = OGL_OVERLAY_PIXEL_TYPE_CI
}
public enum EValues_OGL_OVERLAY_SUPPORT : uint {
OGL_OVERLAY_SUPPORT_OFF = 0,
OGL_OVERLAY_SUPPORT_ON = 1,
OGL_OVERLAY_SUPPORT_FORCE_SW = 2,
OGL_OVERLAY_SUPPORT_NUM_VALUES = 3,
OGL_OVERLAY_SUPPORT_DEFAULT = OGL_OVERLAY_SUPPORT_OFF
}
public enum EValues_OGL_QUALITY_ENHANCEMENTS : int {
OGL_QUALITY_ENHANCEMENTS_HQUAL = -10,
OGL_QUALITY_ENHANCEMENTS_QUAL = 0,
OGL_QUALITY_ENHANCEMENTS_PERF = 10,
OGL_QUALITY_ENHANCEMENTS_HPERF = 20,
OGL_QUALITY_ENHANCEMENTS_NUM_VALUES = 4,
OGL_QUALITY_ENHANCEMENTS_DEFAULT = OGL_QUALITY_ENHANCEMENTS_QUAL
}
public enum EValues_OGL_SINGLE_BACKDEPTH_BUFFER : uint {
OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE = 0x0,
OGL_SINGLE_BACKDEPTH_BUFFER_ENABLE = 0x1,
OGL_SINGLE_BACKDEPTH_BUFFER_USE_HW_DEFAULT = 0xffffffff,
OGL_SINGLE_BACKDEPTH_BUFFER_NUM_VALUES = 3,
OGL_SINGLE_BACKDEPTH_BUFFER_DEFAULT = OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE
}
public enum EValues_OGL_THREAD_CONTROL : uint {
OGL_THREAD_CONTROL_ENABLE = 0x00000001,
OGL_THREAD_CONTROL_DISABLE = 0x00000002,
OGL_THREAD_CONTROL_NUM_VALUES = 2,
OGL_THREAD_CONTROL_DEFAULT = 0
}
public enum EValues_OGL_TRIPLE_BUFFER : uint {
OGL_TRIPLE_BUFFER_DISABLED = 0x00000000,
OGL_TRIPLE_BUFFER_ENABLED = 0x00000001,
OGL_TRIPLE_BUFFER_NUM_VALUES = 2,
OGL_TRIPLE_BUFFER_DEFAULT = OGL_TRIPLE_BUFFER_DISABLED
}
public enum EValues_OGL_VIDEO_EDITING_MODE : uint {
OGL_VIDEO_EDITING_MODE_DISABLE = 0x00000000,
OGL_VIDEO_EDITING_MODE_ENABLE = 0x00000001,
OGL_VIDEO_EDITING_MODE_NUM_VALUES = 2,
OGL_VIDEO_EDITING_MODE_DEFAULT = OGL_VIDEO_EDITING_MODE_DISABLE
}
public enum EValues_AA_BEHAVIOR_FLAGS : uint {
AA_BEHAVIOR_FLAGS_NONE = 0x00000000,
AA_BEHAVIOR_FLAGS_TREAT_OVERRIDE_AS_APP_CONTROLLED = 0x00000001,
AA_BEHAVIOR_FLAGS_TREAT_OVERRIDE_AS_ENHANCE = 0x00000002,
AA_BEHAVIOR_FLAGS_DISABLE_OVERRIDE = 0x00000003,
AA_BEHAVIOR_FLAGS_TREAT_ENHANCE_AS_APP_CONTROLLED = 0x00000004,
AA_BEHAVIOR_FLAGS_TREAT_ENHANCE_AS_OVERRIDE = 0x00000008,
AA_BEHAVIOR_FLAGS_DISABLE_ENHANCE = 0x0000000c,
AA_BEHAVIOR_FLAGS_MAP_VCAA_TO_MULTISAMPLING = 0x00010000,
AA_BEHAVIOR_FLAGS_SLI_DISABLE_TRANSPARENCY_SUPERSAMPLING = 0x00020000,
AA_BEHAVIOR_FLAGS_DISABLE_CPLAA = 0x00040000,
AA_BEHAVIOR_FLAGS_SKIP_RT_DIM_CHECK_FOR_ENHANCE = 0x00080000,
AA_BEHAVIOR_FLAGS_DISABLE_SLIAA = 0x00100000,
AA_BEHAVIOR_FLAGS_DEFAULT = 0x00000000,
AA_BEHAVIOR_FLAGS_AA_RT_BPP_DIV_4 = 0xf0000000,
AA_BEHAVIOR_FLAGS_AA_RT_BPP_DIV_4_SHIFT = 28,
AA_BEHAVIOR_FLAGS_NON_AA_RT_BPP_DIV_4 = 0x0f000000,
AA_BEHAVIOR_FLAGS_NON_AA_RT_BPP_DIV_4_SHIFT = 24,
AA_BEHAVIOR_FLAGS_MASK = 0xff1f000f,
AA_BEHAVIOR_FLAGS_NUM_VALUES = 18,
}
public enum EValues_AA_MODE_ALPHATOCOVERAGE : uint {
AA_MODE_ALPHATOCOVERAGE_MODE_MASK = 0x00000004,
AA_MODE_ALPHATOCOVERAGE_MODE_OFF = 0x00000000,
AA_MODE_ALPHATOCOVERAGE_MODE_ON = 0x00000004,
AA_MODE_ALPHATOCOVERAGE_MODE_MAX = 0x00000004,
AA_MODE_ALPHATOCOVERAGE_NUM_VALUES = 4,
AA_MODE_ALPHATOCOVERAGE_DEFAULT = 0x00000000
}
public enum EValues_AA_MODE_GAMMACORRECTION : uint {
AA_MODE_GAMMACORRECTION_MASK = 0x00000003,
AA_MODE_GAMMACORRECTION_OFF = 0x00000000,
AA_MODE_GAMMACORRECTION_ON_IF_FOS = 0x00000001,
AA_MODE_GAMMACORRECTION_ON_ALWAYS = 0x00000002,
AA_MODE_GAMMACORRECTION_MAX = 0x00000002,
AA_MODE_GAMMACORRECTION_DEFAULT = 0x00000000,
AA_MODE_GAMMACORRECTION_DEFAULT_TESLA = 0x00000002,
AA_MODE_GAMMACORRECTION_DEFAULT_FERMI = 0x00000002,
AA_MODE_GAMMACORRECTION_NUM_VALUES = 8,
}
public enum EValues_AA_MODE_METHOD : uint {
AA_MODE_METHOD_NONE = 0x0,
AA_MODE_METHOD_SUPERSAMPLE_2X_H = 0x1,
AA_MODE_METHOD_SUPERSAMPLE_2X_V = 0x2,
AA_MODE_METHOD_SUPERSAMPLE_1_5X1_5 = 0x2,
AA_MODE_METHOD_FREE_0x03 = 0x3,
AA_MODE_METHOD_FREE_0x04 = 0x4,
AA_MODE_METHOD_SUPERSAMPLE_4X = 0x5,
AA_MODE_METHOD_SUPERSAMPLE_4X_BIAS = 0x6,
AA_MODE_METHOD_SUPERSAMPLE_4X_GAUSSIAN = 0x7,
AA_MODE_METHOD_FREE_0x08 = 0x8,
AA_MODE_METHOD_FREE_0x09 = 0x9,
AA_MODE_METHOD_SUPERSAMPLE_9X = 0xA,
AA_MODE_METHOD_SUPERSAMPLE_9X_BIAS = 0xB,
AA_MODE_METHOD_SUPERSAMPLE_16X = 0xC,
AA_MODE_METHOD_SUPERSAMPLE_16X_BIAS = 0xD,
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL = 0xE,
AA_MODE_METHOD_MULTISAMPLE_2X_QUINCUNX = 0xF,
AA_MODE_METHOD_MULTISAMPLE_4X = 0x10,
AA_MODE_METHOD_FREE_0x11 = 0x11,
AA_MODE_METHOD_MULTISAMPLE_4X_GAUSSIAN = 0x12,
AA_MODE_METHOD_MIXEDSAMPLE_4X_SKEWED_4TAP = 0x13,
AA_MODE_METHOD_FREE_0x14 = 0x14,
AA_MODE_METHOD_FREE_0x15 = 0x15,
AA_MODE_METHOD_MIXEDSAMPLE_6X = 0x16,
AA_MODE_METHOD_MIXEDSAMPLE_6X_SKEWED_6TAP = 0x17,
AA_MODE_METHOD_MIXEDSAMPLE_8X = 0x18,
AA_MODE_METHOD_MIXEDSAMPLE_8X_SKEWED_8TAP = 0x19,
AA_MODE_METHOD_MIXEDSAMPLE_16X = 0x1a,
AA_MODE_METHOD_MULTISAMPLE_4X_GAMMA = 0x1b,
AA_MODE_METHOD_MULTISAMPLE_16X = 0x1c,
AA_MODE_METHOD_VCAA_32X_8v24 = 0x1d,
AA_MODE_METHOD_CORRUPTION_CHECK = 0x1e,
AA_MODE_METHOD_6X_CT = 0x1f,
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL_GAMMA = 0x20,
AA_MODE_METHOD_SUPERSAMPLE_4X_GAMMA = 0x21,
AA_MODE_METHOD_MULTISAMPLE_4X_FOSGAMMA = 0x22,
AA_MODE_METHOD_MULTISAMPLE_2X_DIAGONAL_FOSGAMMA = 0x23,
AA_MODE_METHOD_SUPERSAMPLE_4X_FOSGAMMA = 0x24,
AA_MODE_METHOD_MULTISAMPLE_8X = 0x25,
AA_MODE_METHOD_VCAA_8X_4v4 = 0x26,
AA_MODE_METHOD_VCAA_16X_4v12 = 0x27,
AA_MODE_METHOD_VCAA_16X_8v8 = 0x28,
AA_MODE_METHOD_MIXEDSAMPLE_32X = 0x29,
AA_MODE_METHOD_SUPERVCAA_64X_4v12 = 0x2a,
AA_MODE_METHOD_SUPERVCAA_64X_8v8 = 0x2b,
AA_MODE_METHOD_MIXEDSAMPLE_64X = 0x2c,
AA_MODE_METHOD_MIXEDSAMPLE_128X = 0x2d,
AA_MODE_METHOD_COUNT = 0x2e,
AA_MODE_METHOD_METHOD_MASK = 0x0000ffff,
AA_MODE_METHOD_METHOD_MAX = 0xf1c57815,
AA_MODE_METHOD_NUM_VALUES = 50,
AA_MODE_METHOD_DEFAULT = AA_MODE_METHOD_NONE
}
public enum EValues_AA_MODE_REPLAY : uint {
AA_MODE_REPLAY_SAMPLES_MASK = 0x00000070,
AA_MODE_REPLAY_SAMPLES_ONE = 0x00000000,
AA_MODE_REPLAY_SAMPLES_TWO = 0x00000010,
AA_MODE_REPLAY_SAMPLES_FOUR = 0x00000020,
AA_MODE_REPLAY_SAMPLES_EIGHT = 0x00000030,
AA_MODE_REPLAY_SAMPLES_MAX = 0x00000030,
AA_MODE_REPLAY_MODE_MASK = 0x0000000f,
AA_MODE_REPLAY_MODE_OFF = 0x00000000,
AA_MODE_REPLAY_MODE_ALPHA_TEST = 0x00000001,
AA_MODE_REPLAY_MODE_PIXEL_KILL = 0x00000002,
AA_MODE_REPLAY_MODE_DYN_BRANCH = 0x00000004,
AA_MODE_REPLAY_MODE_OPTIMAL = 0x00000004,
AA_MODE_REPLAY_MODE_ALL = 0x00000008,
AA_MODE_REPLAY_MODE_MAX = 0x0000000f,
AA_MODE_REPLAY_TRANSPARENCY = 0x00000023,
AA_MODE_REPLAY_DISALLOW_TRAA = 0x00000100,
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT = 0x00000000,
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT_TESLA = 0x00000000,
AA_MODE_REPLAY_TRANSPARENCY_DEFAULT_FERMI = 0x00000000,
AA_MODE_REPLAY_MASK = 0x0000017f,
AA_MODE_REPLAY_NUM_VALUES = 20,
AA_MODE_REPLAY_DEFAULT = 0x00000000
}
public enum EValues_AA_MODE_SELECTOR : uint {
AA_MODE_SELECTOR_MASK = 0x00000003,
AA_MODE_SELECTOR_APP_CONTROL = 0x00000000,
AA_MODE_SELECTOR_OVERRIDE = 0x00000001,
AA_MODE_SELECTOR_ENHANCE = 0x00000002,
AA_MODE_SELECTOR_MAX = 0x00000002,
AA_MODE_SELECTOR_NUM_VALUES = 5,
AA_MODE_SELECTOR_DEFAULT = AA_MODE_SELECTOR_APP_CONTROL
}
public enum EValues_AA_MODE_SELECTOR_SLIAA : uint {
AA_MODE_SELECTOR_SLIAA_DISABLED = 0,
AA_MODE_SELECTOR_SLIAA_ENABLED = 1,
AA_MODE_SELECTOR_SLIAA_NUM_VALUES = 2,
AA_MODE_SELECTOR_SLIAA_DEFAULT = AA_MODE_SELECTOR_SLIAA_DISABLED
}
public enum EValues_ANISO_MODE_LEVEL : uint {
ANISO_MODE_LEVEL_MASK = 0x0000ffff,
ANISO_MODE_LEVEL_NONE_POINT = 0x00000000,
ANISO_MODE_LEVEL_NONE_LINEAR = 0x00000001,
ANISO_MODE_LEVEL_MAX = 0x00000010,
ANISO_MODE_LEVEL_DEFAULT = 0x00000001,
ANISO_MODE_LEVEL_NUM_VALUES = 5,
}
public enum EValues_ANISO_MODE_SELECTOR : uint {
ANISO_MODE_SELECTOR_MASK = 0x0000000f,
ANISO_MODE_SELECTOR_APP = 0x00000000,
ANISO_MODE_SELECTOR_USER = 0x00000001,
ANISO_MODE_SELECTOR_COND = 0x00000002,
ANISO_MODE_SELECTOR_MAX = 0x00000002,
ANISO_MODE_SELECTOR_DEFAULT = 0x00000000,
ANISO_MODE_SELECTOR_NUM_VALUES = 6,
}
public enum EValues_APPLICATION_PROFILE_NOTIFICATION_TIMEOUT : uint {
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED = 0,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_NINE_SECONDS = 9,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_FIFTEEN_SECONDS = 15,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_THIRTY_SECONDS = 30,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ONE_MINUTE = 60,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_TWO_MINUTES = 120,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_NUM_VALUES = 6,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DEFAULT = APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED
}
public enum EValues_CPL_HIDDEN_PROFILE : uint {
CPL_HIDDEN_PROFILE_DISABLED = 0,
CPL_HIDDEN_PROFILE_ENABLED = 1,
CPL_HIDDEN_PROFILE_NUM_VALUES = 2,
CPL_HIDDEN_PROFILE_DEFAULT = CPL_HIDDEN_PROFILE_DISABLED
}
public enum EValues_EXPORT_PERF_COUNTERS : uint {
EXPORT_PERF_COUNTERS_OFF = 0x00000000,
EXPORT_PERF_COUNTERS_ON = 0x00000001,
EXPORT_PERF_COUNTERS_NUM_VALUES = 2,
EXPORT_PERF_COUNTERS_DEFAULT = EXPORT_PERF_COUNTERS_OFF
}
public enum EValues_FXAA_ALLOW : uint {
FXAA_ALLOW_DISALLOWED = 0,
FXAA_ALLOW_ALLOWED = 1,
FXAA_ALLOW_NUM_VALUES = 2,
FXAA_ALLOW_DEFAULT = FXAA_ALLOW_ALLOWED
}
public enum EValues_FXAA_ENABLE : uint {
FXAA_ENABLE_OFF = 0,
FXAA_ENABLE_ON = 1,
FXAA_ENABLE_NUM_VALUES = 2,
FXAA_ENABLE_DEFAULT = FXAA_ENABLE_OFF
}
public enum EValues_FXAA_INDICATOR_ENABLE : uint {
FXAA_INDICATOR_ENABLE_OFF = 0,
FXAA_INDICATOR_ENABLE_ON = 1,
FXAA_INDICATOR_ENABLE_NUM_VALUES = 2,
FXAA_INDICATOR_ENABLE_DEFAULT = FXAA_INDICATOR_ENABLE_OFF
}
public enum EValues_MCSFRSHOWSPLIT : uint {
MCSFRSHOWSPLIT_DISABLED = 0x34534064,
MCSFRSHOWSPLIT_ENABLED = 0x24545582,
MCSFRSHOWSPLIT_NUM_VALUES = 2,
MCSFRSHOWSPLIT_DEFAULT = MCSFRSHOWSPLIT_DISABLED
}
public enum EValues_NV_QUALITY_UPSCALING : uint {
NV_QUALITY_UPSCALING_OFF = 0,
NV_QUALITY_UPSCALING_ON = 1,
NV_QUALITY_UPSCALING_NUM_VALUES = 2,
NV_QUALITY_UPSCALING_DEFAULT = NV_QUALITY_UPSCALING_OFF
}
public enum EValues_OPTIMUS_MAXAA : uint {
OPTIMUS_MAXAA_MIN = 0,
OPTIMUS_MAXAA_MAX = 16,
OPTIMUS_MAXAA_NUM_VALUES = 2,
OPTIMUS_MAXAA_DEFAULT = 0
}
public enum EValues_PHYSXINDICATOR : uint {
PHYSXINDICATOR_DISABLED = 0x34534064,
PHYSXINDICATOR_ENABLED = 0x24545582,
PHYSXINDICATOR_NUM_VALUES = 2,
PHYSXINDICATOR_DEFAULT = PHYSXINDICATOR_DISABLED
}
public enum EValues_PREFERRED_PSTATE : uint {
PREFERRED_PSTATE_ADAPTIVE = 0x00000000,
PREFERRED_PSTATE_PREFER_MAX = 0x00000001,
PREFERRED_PSTATE_DRIVER_CONTROLLED = 0x00000002,
PREFERRED_PSTATE_PREFER_CONSISTENT_PERFORMANCE = 0x00000003,
PREFERRED_PSTATE_PREFER_MIN = 0x00000004,
PREFERRED_PSTATE_MIN = 0x00000000,
PREFERRED_PSTATE_MAX = 0x00000004,
PREFERRED_PSTATE_NUM_VALUES = 7,
PREFERRED_PSTATE_DEFAULT = PREFERRED_PSTATE_ADAPTIVE
}
public enum EValues_PREVENT_UI_AF_OVERRIDE : uint {
PREVENT_UI_AF_OVERRIDE_OFF = 0,
PREVENT_UI_AF_OVERRIDE_ON = 1,
PREVENT_UI_AF_OVERRIDE_NUM_VALUES = 2,
PREVENT_UI_AF_OVERRIDE_DEFAULT = PREVENT_UI_AF_OVERRIDE_OFF
}
public enum EValues_PS_FRAMERATE_LIMITER : uint {
PS_FRAMERATE_LIMITER_DISABLED = 0x00000000,
PS_FRAMERATE_LIMITER_FPS_20 = 0x00000014,
PS_FRAMERATE_LIMITER_FPS_30 = 0x0000001e,
PS_FRAMERATE_LIMITER_FPS_40 = 0x00000028,
PS_FRAMERATE_LIMITER_FPSMASK = 0x000000ff,
PS_FRAMERATE_LIMITER_FORCE_VSYNC_OFF = 0x00040000,
PS_FRAMERATE_LIMITER_GPS_WEB = 0x00080000,
PS_FRAMERATE_LIMITER_FORCE_OPTIMUS_POLICY = 0x00100000,
PS_FRAMERATE_LIMITER_DISALLOWED = 0x00200000,
PS_FRAMERATE_LIMITER_USE_CPU_WAIT = 0x00400000,
PS_FRAMERATE_LIMITER_THRESHOLD = 0x00000000,
PS_FRAMERATE_LIMITER_TEMPERATURE = 0x02000000,
PS_FRAMERATE_LIMITER_POWER = 0x04000000,
PS_FRAMERATE_LIMITER_MODEMASK = 0x0f000000,
PS_FRAMERATE_LIMITER_ACCURATE = 0x10000000,
PS_FRAMERATE_LIMITER_ALLOW_WINDOWED = 0x20000000,
PS_FRAMERATE_LIMITER_FORCEON = 0x40000000,
PS_FRAMERATE_LIMITER_ENABLED = 0x80000000,
PS_FRAMERATE_LIMITER_OPENGL_REMOTE_DESKTOP = 0xe010003c,
PS_FRAMERATE_LIMITER_MASK = 0xff7C00ff,
PS_FRAMERATE_LIMITER_NUM_VALUES = 20,
PS_FRAMERATE_LIMITER_DEFAULT = PS_FRAMERATE_LIMITER_DISABLED
}
public enum EValues_PS_FRAMERATE_LIMITER_GPS_CTRL : uint {
PS_FRAMERATE_LIMITER_GPS_CTRL_DISABLED = 0x00000000,
PS_FRAMERATE_LIMITER_GPS_CTRL_DECREASE_FILTER_MASK = 0x000001FF,
PS_FRAMERATE_LIMITER_GPS_CTRL_PAUSE_TIME_MASK = 0x0000FE00,
PS_FRAMERATE_LIMITER_GPS_CTRL_PAUSE_TIME_SHIFT = 9,
PS_FRAMERATE_LIMITER_GPS_CTRL_TARGET_RENDER_TIME_MASK = 0x00FF0000,
PS_FRAMERATE_LIMITER_GPS_CTRL_TARGET_RENDER_TIME_SHIFT = 16,
PS_FRAMERATE_LIMITER_GPS_CTRL_PERF_STEP_SIZE_MASK = 0x1F000000,
PS_FRAMERATE_LIMITER_GPS_CTRL_PERF_STEP_SIZE_SHIFT = 24,
PS_FRAMERATE_LIMITER_GPS_CTRL_INCREASE_FILTER_MASK = 0xE0000000,
PS_FRAMERATE_LIMITER_GPS_CTRL_INCREASE_FILTER_SHIFT = 29,
PS_FRAMERATE_LIMITER_GPS_CTRL_OPTIMAL_SETTING = 0x4A5A3219,
PS_FRAMERATE_LIMITER_GPS_CTRL_NUM_VALUES = 11,
PS_FRAMERATE_LIMITER_GPS_CTRL_DEFAULT = PS_FRAMERATE_LIMITER_GPS_CTRL_DISABLED
}
public enum EValues_PS_FRAMERATE_MONITOR_CTRL : uint {
PS_FRAMERATE_MONITOR_CTRL_DISABLED = 0x00000000,
PS_FRAMERATE_MONITOR_CTRL_THRESHOLD_PCT_MASK = 0x000000FF,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_MASK = 0x00000F00,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_SHIFT = 8,
PS_FRAMERATE_MONITOR_CTRL_OPTIMAL_SETTING = 0x00000364,
PS_FRAMERATE_MONITOR_CTRL_NUM_VALUES = 5,
PS_FRAMERATE_MONITOR_CTRL_DEFAULT = PS_FRAMERATE_MONITOR_CTRL_DISABLED
}
public enum EValues_SHIM_MCCOMPAT : uint {
SHIM_MCCOMPAT_INTEGRATED = 0x00000000,
SHIM_MCCOMPAT_ENABLE = 0x00000001,
SHIM_MCCOMPAT_USER_EDITABLE = 0x00000002,
SHIM_MCCOMPAT_MASK = 0x00000003,
SHIM_MCCOMPAT_VIDEO_MASK = 0x00000004,
SHIM_MCCOMPAT_VARYING_BIT = 0x00000008,
SHIM_MCCOMPAT_AUTO_SELECT = 0x00000010,
SHIM_MCCOMPAT_OVERRIDE_BIT = 0x80000000,
SHIM_MCCOMPAT_NUM_VALUES = 8,
SHIM_MCCOMPAT_DEFAULT = SHIM_MCCOMPAT_AUTO_SELECT
}
public enum EValues_SHIM_RENDERING_MODE : uint {
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000,
SHIM_RENDERING_MODE_ENABLE = 0x00000001,
SHIM_RENDERING_MODE_USER_EDITABLE = 0x00000002,
SHIM_RENDERING_MODE_MASK = 0x00000003,
SHIM_RENDERING_MODE_VIDEO_MASK = 0x00000004,
SHIM_RENDERING_MODE_VARYING_BIT = 0x00000008,
SHIM_RENDERING_MODE_AUTO_SELECT = 0x00000010,
SHIM_RENDERING_MODE_OVERRIDE_BIT = 0x80000000,
SHIM_RENDERING_MODE_NUM_VALUES = 8,
SHIM_RENDERING_MODE_DEFAULT = SHIM_RENDERING_MODE_AUTO_SELECT
}
public enum EValues_SHIM_RENDERING_OPTIONS : uint {
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE = 0x00000000,
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT = 0x00000001,
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT = 0x00000002,
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT = 0x00000004,
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT = 0x00000008,
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES = 0x00000010,
SHIM_RENDERING_OPTIONS_CHILDPROCESS_DETECT = 0x00000020,
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT = 0x00000040,
SHIM_RENDERING_OPTIONS_PARENTPROCESS_DETECT = 0x00000080,
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE = 0x00000100,
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS = 0x00000200,
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS = 0x00000400,
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS = 0x00000800,
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT = 0x00001000,
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING = 0x00002000,
SHIM_RENDERING_OPTIONS_DISABLE_CUDA = 0x00004000,
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO = 0x00008000,
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS = 0x00010000,
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT = 0x00020000,
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO = 0x00040000,
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID = 0x00080000,
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD = 0x00100000,
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT = 0x00200000,
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG = 0x00400000,
SHIM_RENDERING_OPTIONS_NUM_VALUES = 24,
SHIM_RENDERING_OPTIONS_DEFAULT = SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE
}
public enum EValues_SLI_GPU_COUNT : uint {
SLI_GPU_COUNT_AUTOSELECT = 0x00000000,
SLI_GPU_COUNT_ONE = 0x00000001,
SLI_GPU_COUNT_TWO = 0x00000002,
SLI_GPU_COUNT_THREE = 0x00000003,
SLI_GPU_COUNT_FOUR = 0x00000004,
SLI_GPU_COUNT_NUM_VALUES = 5,
SLI_GPU_COUNT_DEFAULT = SLI_GPU_COUNT_AUTOSELECT
}
public enum EValues_SLI_PREDEFINED_GPU_COUNT : uint {
SLI_PREDEFINED_GPU_COUNT_AUTOSELECT = 0x00000000,
SLI_PREDEFINED_GPU_COUNT_ONE = 0x00000001,
SLI_PREDEFINED_GPU_COUNT_TWO = 0x00000002,
SLI_PREDEFINED_GPU_COUNT_THREE = 0x00000003,
SLI_PREDEFINED_GPU_COUNT_FOUR = 0x00000004,
SLI_PREDEFINED_GPU_COUNT_NUM_VALUES = 5,
SLI_PREDEFINED_GPU_COUNT_DEFAULT = SLI_PREDEFINED_GPU_COUNT_AUTOSELECT
}
public enum EValues_SLI_PREDEFINED_GPU_COUNT_DX10 : uint {
SLI_PREDEFINED_GPU_COUNT_DX10_AUTOSELECT = 0x00000000,
SLI_PREDEFINED_GPU_COUNT_DX10_ONE = 0x00000001,
SLI_PREDEFINED_GPU_COUNT_DX10_TWO = 0x00000002,
SLI_PREDEFINED_GPU_COUNT_DX10_THREE = 0x00000003,
SLI_PREDEFINED_GPU_COUNT_DX10_FOUR = 0x00000004,
SLI_PREDEFINED_GPU_COUNT_DX10_NUM_VALUES = 5,
SLI_PREDEFINED_GPU_COUNT_DX10_DEFAULT = SLI_PREDEFINED_GPU_COUNT_DX10_AUTOSELECT
}
public enum EValues_SLI_PREDEFINED_MODE : uint {
SLI_PREDEFINED_MODE_AUTOSELECT = 0x00000000,
SLI_PREDEFINED_MODE_FORCE_SINGLE = 0x00000001,
SLI_PREDEFINED_MODE_FORCE_AFR = 0x00000002,
SLI_PREDEFINED_MODE_FORCE_AFR2 = 0x00000003,
SLI_PREDEFINED_MODE_FORCE_SFR = 0x00000004,
SLI_PREDEFINED_MODE_FORCE_AFR_OF_SFR__FALLBACK_3AFR = 0x00000005,
SLI_PREDEFINED_MODE_NUM_VALUES = 6,
SLI_PREDEFINED_MODE_DEFAULT = SLI_PREDEFINED_MODE_AUTOSELECT
}
public enum EValues_SLI_PREDEFINED_MODE_DX10 : uint {
SLI_PREDEFINED_MODE_DX10_AUTOSELECT = 0x00000000,
SLI_PREDEFINED_MODE_DX10_FORCE_SINGLE = 0x00000001,
SLI_PREDEFINED_MODE_DX10_FORCE_AFR = 0x00000002,
SLI_PREDEFINED_MODE_DX10_FORCE_AFR2 = 0x00000003,
SLI_PREDEFINED_MODE_DX10_FORCE_SFR = 0x00000004,
SLI_PREDEFINED_MODE_DX10_FORCE_AFR_OF_SFR__FALLBACK_3AFR = 0x00000005,
SLI_PREDEFINED_MODE_DX10_NUM_VALUES = 6,
SLI_PREDEFINED_MODE_DX10_DEFAULT = SLI_PREDEFINED_MODE_DX10_AUTOSELECT
}
public enum EValues_SLI_RENDERING_MODE : uint {
SLI_RENDERING_MODE_AUTOSELECT = 0x00000000,
SLI_RENDERING_MODE_FORCE_SINGLE = 0x00000001,
SLI_RENDERING_MODE_FORCE_AFR = 0x00000002,
SLI_RENDERING_MODE_FORCE_AFR2 = 0x00000003,
SLI_RENDERING_MODE_FORCE_SFR = 0x00000004,
SLI_RENDERING_MODE_FORCE_AFR_OF_SFR__FALLBACK_3AFR = 0x00000005,
SLI_RENDERING_MODE_NUM_VALUES = 6,
SLI_RENDERING_MODE_DEFAULT = SLI_RENDERING_MODE_AUTOSELECT
}
public enum EValues_VRPRERENDERLIMIT : uint {
VRPRERENDERLIMIT_MIN = 0x00,
VRPRERENDERLIMIT_MAX = 0xff,
VRPRERENDERLIMIT_APP_CONTROLLED = 0x00,
VRPRERENDERLIMIT_DEFAULT = 0x01,
VRPRERENDERLIMIT_NUM_VALUES = 4,
}
public enum EValues_VRRFEATUREINDICATOR : uint {
VRRFEATUREINDICATOR_DISABLED = 0x0,
VRRFEATUREINDICATOR_ENABLED = 0x1,
VRRFEATUREINDICATOR_NUM_VALUES = 2,
VRRFEATUREINDICATOR_DEFAULT = VRRFEATUREINDICATOR_ENABLED
}
public enum EValues_VRROVERLAYINDICATOR : uint {
VRROVERLAYINDICATOR_DISABLED = 0x0,
VRROVERLAYINDICATOR_ENABLED = 0x1,
VRROVERLAYINDICATOR_NUM_VALUES = 2,
VRROVERLAYINDICATOR_DEFAULT = VRROVERLAYINDICATOR_ENABLED
}
public enum EValues_VRRREQUESTSTATE : uint {
VRRREQUESTSTATE_DISABLED = 0x0,
VRRREQUESTSTATE_FULLSCREEN_ONLY = 0x1,
VRRREQUESTSTATE_FULLSCREEN_AND_WINDOWED = 0x2,
VRRREQUESTSTATE_NUM_VALUES = 3,
VRRREQUESTSTATE_DEFAULT = VRRREQUESTSTATE_FULLSCREEN_ONLY
}
public enum EValues_VRR_APP_OVERRIDE : uint {
VRR_APP_OVERRIDE_ALLOW = 0,
VRR_APP_OVERRIDE_FORCE_OFF = 1,
VRR_APP_OVERRIDE_DISALLOW = 2,
VRR_APP_OVERRIDE_ULMB = 3,
VRR_APP_OVERRIDE_FIXED_REFRESH = 4,
VRR_APP_OVERRIDE_NUM_VALUES = 5,
VRR_APP_OVERRIDE_DEFAULT = VRR_APP_OVERRIDE_ALLOW
}
public enum EValues_VRR_APP_OVERRIDE_REQUEST_STATE : uint {
VRR_APP_OVERRIDE_REQUEST_STATE_ALLOW = 0,
VRR_APP_OVERRIDE_REQUEST_STATE_FORCE_OFF = 1,
VRR_APP_OVERRIDE_REQUEST_STATE_DISALLOW = 2,
VRR_APP_OVERRIDE_REQUEST_STATE_ULMB = 3,
VRR_APP_OVERRIDE_REQUEST_STATE_FIXED_REFRESH = 4,
VRR_APP_OVERRIDE_REQUEST_STATE_NUM_VALUES = 5,
VRR_APP_OVERRIDE_REQUEST_STATE_DEFAULT = VRR_APP_OVERRIDE_REQUEST_STATE_ALLOW
}
public enum EValues_VRR_MODE : uint {
VRR_MODE_DISABLED = 0x0,
VRR_MODE_FULLSCREEN_ONLY = 0x1,
VRR_MODE_FULLSCREEN_AND_WINDOWED = 0x2,
VRR_MODE_NUM_VALUES = 3,
VRR_MODE_DEFAULT = VRR_MODE_FULLSCREEN_ONLY
}
public enum EValues_VSYNCSMOOTHAFR : uint {
VSYNCSMOOTHAFR_OFF = 0x00000000,
VSYNCSMOOTHAFR_ON = 0x00000001,
VSYNCSMOOTHAFR_NUM_VALUES = 2,
VSYNCSMOOTHAFR_DEFAULT = VSYNCSMOOTHAFR_OFF
}
public enum EValues_VSYNCVRRCONTROL : uint {
VSYNCVRRCONTROL_DISABLE = 0x00000000,
VSYNCVRRCONTROL_ENABLE = 0x00000001,
VSYNCVRRCONTROL_NOTSUPPORTED = 0x9f95128e,
VSYNCVRRCONTROL_NUM_VALUES = 3,
VSYNCVRRCONTROL_DEFAULT = VSYNCVRRCONTROL_ENABLE
}
public enum EValues_VSYNC_BEHAVIOR_FLAGS : uint {
VSYNC_BEHAVIOR_FLAGS_NONE = 0x00000000,
VSYNC_BEHAVIOR_FLAGS_DEFAULT = 0x00000000,
VSYNC_BEHAVIOR_FLAGS_IGNORE_FLIPINTERVAL_MULTIPLE = 0x00000001,
VSYNC_BEHAVIOR_FLAGS_NUM_VALUES = 3,
}
public enum EValues_WKS_API_STEREO_EYES_EXCHANGE : uint {
WKS_API_STEREO_EYES_EXCHANGE_OFF = 0,
WKS_API_STEREO_EYES_EXCHANGE_ON = 1,
WKS_API_STEREO_EYES_EXCHANGE_NUM_VALUES = 2,
WKS_API_STEREO_EYES_EXCHANGE_DEFAULT = WKS_API_STEREO_EYES_EXCHANGE_OFF
}
public enum EValues_WKS_API_STEREO_MODE : uint {
WKS_API_STEREO_MODE_SHUTTER_GLASSES = 0,
WKS_API_STEREO_MODE_VERTICAL_INTERLACED = 1,
WKS_API_STEREO_MODE_TWINVIEW = 2,
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_AUTO = 3,
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_DAC0 = 4,
WKS_API_STEREO_MODE_NV17_SHUTTER_GLASSES_DAC1 = 5,
WKS_API_STEREO_MODE_COLOR_LINE = 6,
WKS_API_STEREO_MODE_COLOR_INTERLEAVED = 7,
WKS_API_STEREO_MODE_ANAGLYPH = 8,
WKS_API_STEREO_MODE_HORIZONTAL_INTERLACED = 9,
WKS_API_STEREO_MODE_SIDE_FIELD = 10,
WKS_API_STEREO_MODE_SUB_FIELD = 11,
WKS_API_STEREO_MODE_CHECKERBOARD = 12,
WKS_API_STEREO_MODE_INVERSE_CHECKERBOARD = 13,
WKS_API_STEREO_MODE_TRIDELITY_SL = 14,
WKS_API_STEREO_MODE_TRIDELITY_MV = 15,
WKS_API_STEREO_MODE_SEEFRONT = 16,
WKS_API_STEREO_MODE_STEREO_MIRROR = 17,
WKS_API_STEREO_MODE_FRAME_SEQUENTIAL = 18,
WKS_API_STEREO_MODE_AUTODETECT_PASSIVE_MODE = 19,
WKS_API_STEREO_MODE_AEGIS_DT_FRAME_SEQUENTIAL = 20,
WKS_API_STEREO_MODE_OEM_EMITTER_FRAME_SEQUENTIAL = 21,
WKS_API_STEREO_MODE_USE_HW_DEFAULT = 0xffffffff,
WKS_API_STEREO_MODE_DEFAULT_GL = 3,
WKS_API_STEREO_MODE_NUM_VALUES = 24,
WKS_API_STEREO_MODE_DEFAULT = WKS_API_STEREO_MODE_SHUTTER_GLASSES
}
public enum EValues_WKS_MEMORY_ALLOCATION_POLICY : uint {
WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED = 0x0,
WKS_MEMORY_ALLOCATION_POLICY_MODERATE_PRE_ALLOCATION = 0x1,
WKS_MEMORY_ALLOCATION_POLICY_AGGRESSIVE_PRE_ALLOCATION = 0x2,
WKS_MEMORY_ALLOCATION_POLICY_NUM_VALUES = 3,
WKS_MEMORY_ALLOCATION_POLICY_DEFAULT = WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED
}
public enum EValues_WKS_STEREO_DONGLE_SUPPORT : uint {
WKS_STEREO_DONGLE_SUPPORT_OFF = 0,
WKS_STEREO_DONGLE_SUPPORT_DAC = 1,
WKS_STEREO_DONGLE_SUPPORT_DLP = 2,
WKS_STEREO_DONGLE_SUPPORT_NUM_VALUES = 3,
WKS_STEREO_DONGLE_SUPPORT_DEFAULT = WKS_STEREO_DONGLE_SUPPORT_OFF
}
public enum EValues_WKS_STEREO_SUPPORT : uint {
WKS_STEREO_SUPPORT_OFF = 0,
WKS_STEREO_SUPPORT_ON = 1,
WKS_STEREO_SUPPORT_NUM_VALUES = 2,
WKS_STEREO_SUPPORT_DEFAULT = WKS_STEREO_SUPPORT_OFF
}
public enum EValues_WKS_STEREO_SWAP_MODE : uint {
WKS_STEREO_SWAP_MODE_APPLICATION_CONTROL = 0x0,
WKS_STEREO_SWAP_MODE_PER_EYE = 0x1,
WKS_STEREO_SWAP_MODE_PER_EYE_PAIR = 0x2,
WKS_STEREO_SWAP_MODE_LEGACY_BEHAVIOR = 0x3,
WKS_STEREO_SWAP_MODE_NUM_VALUES = 4,
WKS_STEREO_SWAP_MODE_DEFAULT = WKS_STEREO_SWAP_MODE_APPLICATION_CONTROL
}
public enum EValues_AO_MODE : uint {
AO_MODE_OFF = 0,
AO_MODE_LOW = 1,
AO_MODE_MEDIUM = 2,
AO_MODE_HIGH = 3,
AO_MODE_NUM_VALUES = 4,
AO_MODE_DEFAULT = AO_MODE_OFF
}
public enum EValues_AO_MODE_ACTIVE : uint {
AO_MODE_ACTIVE_DISABLED = 0,
AO_MODE_ACTIVE_ENABLED = 1,
AO_MODE_ACTIVE_NUM_VALUES = 2,
AO_MODE_ACTIVE_DEFAULT = AO_MODE_ACTIVE_DISABLED
}
public enum EValues_AUTO_LODBIASADJUST : uint {
AUTO_LODBIASADJUST_OFF = 0x00000000,
AUTO_LODBIASADJUST_ON = 0x00000001,
AUTO_LODBIASADJUST_NUM_VALUES = 2,
AUTO_LODBIASADJUST_DEFAULT = AUTO_LODBIASADJUST_ON
}
public enum EValues_LODBIASADJUST : uint {
LODBIASADJUST_MIN = 0xffffff80,
LODBIASADJUST_MAX = 128,
LODBIASADJUST_NUM_VALUES = 2,
LODBIASADJUST_DEFAULT = 0
}
public enum EValues_MAXWELL_B_SAMPLE_INTERLEAVE : uint {
MAXWELL_B_SAMPLE_INTERLEAVE_OFF = 0,
MAXWELL_B_SAMPLE_INTERLEAVE_ON = 1,
MAXWELL_B_SAMPLE_INTERLEAVE_NUM_VALUES = 2,
MAXWELL_B_SAMPLE_INTERLEAVE_DEFAULT = MAXWELL_B_SAMPLE_INTERLEAVE_OFF
}
public enum EValues_PRERENDERLIMIT : uint {
PRERENDERLIMIT_MIN = 0x00,
PRERENDERLIMIT_MAX = 0xff,
PRERENDERLIMIT_APP_CONTROLLED = 0x00,
PRERENDERLIMIT_NUM_VALUES = 3,
PRERENDERLIMIT_DEFAULT = PRERENDERLIMIT_APP_CONTROLLED
}
public enum EValues_PS_SHADERDISKCACHE : uint {
PS_SHADERDISKCACHE_OFF = 0x00000000,
PS_SHADERDISKCACHE_ON = 0x00000001,
PS_SHADERDISKCACHE_NUM_VALUES = 2,
PS_SHADERDISKCACHE_DEFAULT = 0x1
}
public enum EValues_PS_TEXFILTER_ANISO_OPTS2 : uint {
PS_TEXFILTER_ANISO_OPTS2_OFF = 0x00000000,
PS_TEXFILTER_ANISO_OPTS2_ON = 0x00000001,
PS_TEXFILTER_ANISO_OPTS2_NUM_VALUES = 2,
PS_TEXFILTER_ANISO_OPTS2_DEFAULT = PS_TEXFILTER_ANISO_OPTS2_OFF
}
public enum EValues_PS_TEXFILTER_BILINEAR_IN_ANISO : uint {
PS_TEXFILTER_BILINEAR_IN_ANISO_OFF = 0x00000000,
PS_TEXFILTER_BILINEAR_IN_ANISO_ON = 0x00000001,
PS_TEXFILTER_BILINEAR_IN_ANISO_NUM_VALUES = 2,
PS_TEXFILTER_BILINEAR_IN_ANISO_DEFAULT = PS_TEXFILTER_BILINEAR_IN_ANISO_OFF
}
public enum EValues_PS_TEXFILTER_DISABLE_TRILIN_SLOPE : uint {
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_OFF = 0x00000000,
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ON = 0x00000001,
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_NUM_VALUES = 2,
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_DEFAULT = PS_TEXFILTER_DISABLE_TRILIN_SLOPE_OFF
}
public enum EValues_PS_TEXFILTER_NO_NEG_LODBIAS : uint {
PS_TEXFILTER_NO_NEG_LODBIAS_OFF = 0x00000000,
PS_TEXFILTER_NO_NEG_LODBIAS_ON = 0x00000001,
PS_TEXFILTER_NO_NEG_LODBIAS_NUM_VALUES = 2,
PS_TEXFILTER_NO_NEG_LODBIAS_DEFAULT = PS_TEXFILTER_NO_NEG_LODBIAS_OFF
}
public enum EValues_QUALITY_ENHANCEMENTS : uint {
QUALITY_ENHANCEMENTS_HIGHQUALITY = 0xfffffff6,
QUALITY_ENHANCEMENTS_QUALITY = 0x00000000,
QUALITY_ENHANCEMENTS_PERFORMANCE = 0x0000000a,
QUALITY_ENHANCEMENTS_HIGHPERFORMANCE = 0x00000014,
QUALITY_ENHANCEMENTS_NUM_VALUES = 4,
QUALITY_ENHANCEMENTS_DEFAULT = QUALITY_ENHANCEMENTS_QUALITY
}
public enum EValues_REFRESH_RATE_OVERRIDE : uint {
REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED = 0,
REFRESH_RATE_OVERRIDE_HIGHEST_AVAILABLE = 1,
REFRESH_RATE_OVERRIDE_NUM_VALUES = 2,
REFRESH_RATE_OVERRIDE_DEFAULT = REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED
}
public enum EValues_SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE : uint {
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_OFF = 0x00000000,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ON = 0x00000001,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_NUM_VALUES = 2,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_DEFAULT = SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_OFF
}
public enum EValues_SET_VAB_DATA : uint {
SET_VAB_DATA_ZERO = 0x00000000,
SET_VAB_DATA_UINT_ONE = 0x00000001,
SET_VAB_DATA_FLOAT_ONE = 0x3f800000,
SET_VAB_DATA_FLOAT_POS_INF = 0x7f800000,
SET_VAB_DATA_FLOAT_NAN = 0x7fc00000,
SET_VAB_DATA_USE_API_DEFAULTS = 0xffffffff,
SET_VAB_DATA_NUM_VALUES = 6,
SET_VAB_DATA_DEFAULT = SET_VAB_DATA_USE_API_DEFAULTS
}
public enum EValues_VSYNCMODE : uint {
VSYNCMODE_PASSIVE = 0x60925292,
VSYNCMODE_FORCEOFF = 0x08416747,
VSYNCMODE_FORCEON = 0x47814940,
VSYNCMODE_FLIPINTERVAL2 = 0x32610244,
VSYNCMODE_FLIPINTERVAL3 = 0x71271021,
VSYNCMODE_FLIPINTERVAL4 = 0x13245256,
VSYNCMODE_NUM_VALUES = 6,
VSYNCMODE_DEFAULT = VSYNCMODE_PASSIVE
}
public enum EValues_VSYNCTEARCONTROL : uint {
VSYNCTEARCONTROL_DISABLE = 0x96861077,
VSYNCTEARCONTROL_ENABLE = 0x99941284,
VSYNCTEARCONTROL_NUM_VALUES = 2,
VSYNCTEARCONTROL_DEFAULT = VSYNCTEARCONTROL_DISABLE
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#@ output extension=".cs" #>
namespace nspector.Native.NvApi.DriverSettings
{
<#
string absolutePath = Host.ResolvePath("NvApiDriverSettings.h");
string contents = File.ReadAllText(absolutePath);
string pattern = "enum\\s+(?<name>.*?)\\{(?<enums>.*?)\\}";
var rx = new Regex(pattern, RegexOptions.Singleline);
foreach (Match m in rx.Matches(contents))
{
PushIndent("\t");
string enumSrc = m.Result("${enums}").Trim();
string enumType = "";
if (Regex.IsMatch(enumSrc, "0x[A-Fa-f0-9]{8}L"))
enumType = " : ulong";
else if (Regex.IsMatch(enumSrc, @".*?=\s+-.*?"))
enumType = " : int";
else
enumType = " : uint";
WriteLine("public enum " + m.Result("${name}").Trim() + enumType + " {");
WriteLine("\t" + enumSrc);
WriteLine("}");
PopIndent();
WriteLine("");
}
#>
}

View File

@@ -0,0 +1,677 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace nspector.Native.NVAPI2
{
public enum NvAPI_Status : int
{
NVAPI_OK = 0,
NVAPI_ERROR = -1,
NVAPI_LIBRARY_NOT_FOUND = -2,
NVAPI_NO_IMPLEMENTATION = -3,
NVAPI_API_NOT_INITIALIZED = -4,
NVAPI_INVALID_ARGUMENT = -5,
NVAPI_NVIDIA_DEVICE_NOT_FOUND = -6,
NVAPI_END_ENUMERATION = -7,
NVAPI_INVALID_HANDLE = -8,
NVAPI_INCOMPATIBLE_STRUCT_VERSION = -9,
NVAPI_HANDLE_INVALIDATED = -10,
NVAPI_OPENGL_CONTEXT_NOT_CURRENT = -11,
NVAPI_INVALID_POINTER = -14,
NVAPI_NO_GL_EXPERT = -12,
NVAPI_INSTRUMENTATION_DISABLED = -13,
NVAPI_NO_GL_NSIGHT = -15,
NVAPI_EXPECTED_LOGICAL_GPU_HANDLE = -100,
NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE = -101,
NVAPI_EXPECTED_DISPLAY_HANDLE = -102,
NVAPI_INVALID_COMBINATION = -103,
NVAPI_NOT_SUPPORTED = -104,
NVAPI_PORTID_NOT_FOUND = -105,
NVAPI_EXPECTED_UNATTACHED_DISPLAY_HANDLE = -106,
NVAPI_INVALID_PERF_LEVEL = -107,
NVAPI_DEVICE_BUSY = -108,
NVAPI_NV_PERSIST_FILE_NOT_FOUND = -109,
NVAPI_PERSIST_DATA_NOT_FOUND = -110,
NVAPI_EXPECTED_TV_DISPLAY = -111,
NVAPI_EXPECTED_TV_DISPLAY_ON_DCONNECTOR = -112,
NVAPI_NO_ACTIVE_SLI_TOPOLOGY = -113,
NVAPI_SLI_RENDERING_MODE_NOTALLOWED = -114,
NVAPI_EXPECTED_DIGITAL_FLAT_PANEL = -115,
NVAPI_ARGUMENT_EXCEED_MAX_SIZE = -116,
NVAPI_DEVICE_SWITCHING_NOT_ALLOWED = -117,
NVAPI_TESTING_CLOCKS_NOT_SUPPORTED = -118,
NVAPI_UNKNOWN_UNDERSCAN_CONFIG = -119,
NVAPI_TIMEOUT_RECONFIGURING_GPU_TOPO = -120,
NVAPI_DATA_NOT_FOUND = -121,
NVAPI_EXPECTED_ANALOG_DISPLAY = -122,
NVAPI_NO_VIDLINK = -123,
NVAPI_REQUIRES_REBOOT = -124,
NVAPI_INVALID_HYBRID_MODE = -125,
NVAPI_MIXED_TARGET_TYPES = -126,
NVAPI_SYSWOW64_NOT_SUPPORTED = -127,
NVAPI_IMPLICIT_SET_GPU_TOPOLOGY_CHANGE_NOT_ALLOWED = -128,
NVAPI_REQUEST_USER_TO_CLOSE_NON_MIGRATABLE_APPS = -129,
NVAPI_OUT_OF_MEMORY = -130,
NVAPI_WAS_STILL_DRAWING = -131,
NVAPI_FILE_NOT_FOUND = -132,
NVAPI_TOO_MANY_UNIQUE_STATE_OBJECTS = -133,
NVAPI_INVALID_CALL = -134,
NVAPI_D3D10_1_LIBRARY_NOT_FOUND = -135,
NVAPI_FUNCTION_NOT_FOUND = -136,
NVAPI_INVALID_USER_PRIVILEGE = -137,
NVAPI_EXPECTED_NON_PRIMARY_DISPLAY_HANDLE = -138,
NVAPI_EXPECTED_COMPUTE_GPU_HANDLE = -139,
NVAPI_STEREO_NOT_INITIALIZED = -140,
NVAPI_STEREO_REGISTRY_ACCESS_FAILED = -141,
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED = -142,
NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED = -143,
NVAPI_STEREO_NOT_ENABLED = -144,
NVAPI_STEREO_NOT_TURNED_ON = -145,
NVAPI_STEREO_INVALID_DEVICE_INTERFACE = -146,
NVAPI_STEREO_PARAMETER_OUT_OF_RANGE = -147,
NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED = -148,
NVAPI_TOPO_NOT_POSSIBLE = -149,
NVAPI_MODE_CHANGE_FAILED = -150,
NVAPI_D3D11_LIBRARY_NOT_FOUND = -151,
NVAPI_INVALID_ADDRESS = -152,
NVAPI_STRING_TOO_SMALL = -153,
NVAPI_MATCHING_DEVICE_NOT_FOUND = -154,
NVAPI_DRIVER_RUNNING = -155,
NVAPI_DRIVER_NOTRUNNING = -156,
NVAPI_ERROR_DRIVER_RELOAD_REQUIRED = -157,
NVAPI_SET_NOT_ALLOWED = -158,
NVAPI_ADVANCED_DISPLAY_TOPOLOGY_REQUIRED = -159,
NVAPI_SETTING_NOT_FOUND = -160,
NVAPI_SETTING_SIZE_TOO_LARGE = -161,
NVAPI_TOO_MANY_SETTINGS_IN_PROFILE = -162,
NVAPI_PROFILE_NOT_FOUND = -163,
NVAPI_PROFILE_NAME_IN_USE = -164,
NVAPI_PROFILE_NAME_EMPTY = -165,
NVAPI_EXECUTABLE_NOT_FOUND = -166,
NVAPI_EXECUTABLE_ALREADY_IN_USE = -167,
NVAPI_DATATYPE_MISMATCH = -168,
NVAPI_PROFILE_REMOVED = -169,
NVAPI_UNREGISTERED_RESOURCE = -170,
NVAPI_ID_OUT_OF_RANGE = -171,
NVAPI_DISPLAYCONFIG_VALIDATION_FAILED = -172,
NVAPI_DPMST_CHANGED = -173,
NVAPI_INSUFFICIENT_BUFFER = -174,
NVAPI_ACCESS_DENIED = -175,
NVAPI_MOSAIC_NOT_ACTIVE = -176,
NVAPI_SHARE_RESOURCE_RELOCATED = -177,
NVAPI_REQUEST_USER_TO_DISABLE_DWM = -178,
NVAPI_D3D_DEVICE_LOST = -179,
NVAPI_INVALID_CONFIGURATION = -180,
NVAPI_STEREO_HANDSHAKE_NOT_DONE = -181,
NVAPI_EXECUTABLE_PATH_IS_AMBIGUOUS = -182,
NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED = -183,
NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST = -184,
NVAPI_CLUSTER_ALREADY_EXISTS = -185,
NVAPI_DPMST_DISPLAY_ID_EXPECTED = -186,
NVAPI_INVALID_DISPLAY_ID = -187,
NVAPI_STREAM_IS_OUT_OF_SYNC = -188,
NVAPI_INCOMPATIBLE_AUDIO_DRIVER = -189,
NVAPI_VALUE_ALREADY_SET = -190,
NVAPI_TIMEOUT = -191,
NVAPI_GPU_WORKSTATION_FEATURE_INCOMPLETE = -192,
NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE = -193,
NVAPI_SYNC_NOT_ACTIVE = -194,
NVAPI_SYNC_MASTER_NOT_FOUND = -195,
NVAPI_INVALID_SYNC_TOPOLOGY = -196,
NVAPI_ECID_SIGN_ALGO_UNSUPPORTED = -197,
NVAPI_ECID_KEY_VERIFICATION_FAILED = -198,
}
internal enum NVDRS_SETTING_TYPE : int
{
NVDRS_DWORD_TYPE,
NVDRS_BINARY_TYPE,
NVDRS_STRING_TYPE,
NVDRS_WSTRING_TYPE,
}
internal enum NVDRS_SETTING_LOCATION : int
{
NVDRS_CURRENT_PROFILE_LOCATION,
NVDRS_GLOBAL_PROFILE_LOCATION,
NVDRS_BASE_PROFILE_LOCATION,
NVDRS_DEFAULT_PROFILE_LOCATION,
}
[Flags]
public enum NVDRS_GPU_SUPPORT : uint
{
None,
Geforce,
Quadro,
Nvs,
}
[StructLayout(LayoutKind.Sequential, Pack = 8)]
internal struct NVDRS_SETTING_VALUES
{
public uint version;
public uint numSettingValues;
public NVDRS_SETTING_TYPE settingType;
public NVDRS_SETTING_UNION defaultValue;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)NvapiDrsWrapper.NVAPI_SETTING_MAX_VALUES)]
public NVDRS_SETTING_UNION[] settingValues;
}
//[StructLayout(LayoutKind.Sequential, Pack = 8)]
//internal struct NVDRS_BINARY_SETTING
//{
// public uint valueLength;
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)NvapiDrsWrapper.NVAPI_BINARY_DATA_MAX)]
// public byte[] valueData;
//}
//[StructLayout(LayoutKind.Explicit, Pack = 8, CharSet = CharSet.Unicode)]
//internal struct NVDRS_SETTING_UNION
//{
// public uint dwordValue
// {
// get { return binaryValue.valueLength; }
// set { binaryValue.valueLength = value; }
// }
// [FieldOffsetAttribute(0)]
// public NVDRS_BINARY_SETTING binaryValue;
// [FieldOffsetAttribute(0)]
// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
// public string stringValue;
//}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode, Size = 4100)]
internal struct NVDRS_SETTING_UNION
{
public uint dwordValue;
//massive hack for marshalling issues with unicode string overlapping
public string stringValue
{
get {
var firstPart = Encoding.Unicode.GetString(BitConverter.GetBytes(dwordValue));
return firstPart + stringRaw;
}
set
{
var bytesRaw = Encoding.Unicode.GetBytes(value);
var bytesFirst = new byte[4];
var firstLength = bytesRaw.Length;
if (firstLength > 4)
firstLength = 4;
Buffer.BlockCopy(bytesRaw, 0, bytesFirst, 0, firstLength);
dwordValue = BitConverter.ToUInt32(bytesFirst, 0);
if (value.Length > 2)
{
stringRaw = value.Substring(2);
}
}
}
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
private string stringRaw;
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
internal struct NVDRS_SETTING
{
public uint version;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string settingName;
public uint settingId;
public NVDRS_SETTING_TYPE settingType;
public NVDRS_SETTING_LOCATION settingLocation;
public uint isCurrentPredefined;
public uint isPredefinedValid;
public NVDRS_SETTING_UNION predefinedValue;
public NVDRS_SETTING_UNION currentValue;
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
internal struct NVDRS_APPLICATION_V1
{
public uint version;
public uint isPredefined;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string appName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string userFriendlyName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string launcher;
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
internal struct NVDRS_APPLICATION_V2
{
public uint version;
public uint isPredefined;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string appName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string userFriendlyName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string launcher;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string fileInFolder;
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
internal struct NVDRS_APPLICATION_V3
{
public uint isMetro { get { return ((uint)((bitvector1 & 1))); } set { bitvector1 = ((uint)((value | bitvector1))); } }
public uint version;
public uint isPredefined;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string appName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string userFriendlyName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string launcher;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string fileInFolder;
private uint bitvector1;
}
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
internal struct NVDRS_PROFILE
{
public uint version;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
public string profileName;
public NVDRS_GPU_SUPPORT gpuSupport;
public uint isPredefined;
public uint numOfApps;
public uint numOfSettings;
}
internal class NvapiDrsWrapper
{
#region CONSTANTS
public const uint NVAPI_GENERIC_STRING_MAX = 4096;
public const uint NVAPI_LONG_STRING_MAX = 256;
public const uint NVAPI_SHORT_STRING_MAX = 64;
public const uint NVAPI_MAX_PHYSICAL_GPUS = 64;
public const uint NVAPI_UNICODE_STRING_MAX = 2048;
public const uint NVAPI_BINARY_DATA_MAX = 4096;
public const uint NVAPI_SETTING_MAX_VALUES = 100;
public static uint NVDRS_SETTING_VALUES_VER = MAKE_NVAPI_VERSION<NVDRS_SETTING_VALUES>(1);
public static uint NVDRS_SETTING_VER = MAKE_NVAPI_VERSION<NVDRS_SETTING>(1);
public static uint NVDRS_APPLICATION_VER_V1 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V1>(1);
public static uint NVDRS_APPLICATION_VER_V2 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V2>(2);
public static uint NVDRS_APPLICATION_VER_V3 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V3>(3);
public static uint NVDRS_APPLICATION_VER = NVDRS_APPLICATION_VER_V3;
public static uint NVDRS_PROFILE_VER = MAKE_NVAPI_VERSION<NVDRS_PROFILE>(1);
public const uint OGL_IMPLICIT_GPU_AFFINITY_NUM_VALUES = 1;
public const uint CUDA_EXCLUDED_GPUS_NUM_VALUES = 1;
public const string D3DOGL_GPU_MAX_POWER_DEFAULTPOWER = "0";
public const uint D3DOGL_GPU_MAX_POWER_NUM_VALUES = 1;
public const string D3DOGL_GPU_MAX_POWER_DEFAULT = D3DOGL_GPU_MAX_POWER_DEFAULTPOWER;
#endregion
private NvapiDrsWrapper() { }
[DllImport("kernel32.dll")]
private static extern IntPtr LoadLibrary(String dllname);
[DllImport("kernel32.dll")]
private static extern IntPtr GetProcAddress(IntPtr hModule, String procname);
private static uint MAKE_NVAPI_VERSION<T>(int version)
{
return (UInt32)((Marshal.SizeOf(typeof(T))) | (int)(version << 16));
}
private static string GetDllName()
{
if (IntPtr.Size == 4)
{
return "nvapi.dll";
}
else
{
return "nvapi64.dll";
}
}
private static void GetDelegate<T>(uint id, out T newDelegate) where T : class
{
IntPtr ptr = nvapi_QueryInterface(id);
if (ptr != IntPtr.Zero)
{
newDelegate = Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T;
}
else
{
newDelegate = null;
}
}
private static T GetDelegateOfFunction<T>(IntPtr pLib, string signature)
{
T FuncT = default(T);
IntPtr FuncAddr = GetProcAddress(pLib, signature);
if (FuncAddr != IntPtr.Zero)
FuncT = (T)(object)Marshal.GetDelegateForFunctionPointer(FuncAddr, typeof(T));
return FuncT;
}
#region DELEGATES
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate IntPtr nvapi_QueryInterfaceDelegate(uint id);
private static readonly nvapi_QueryInterfaceDelegate nvapi_QueryInterface;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status NvAPI_InitializeDelegate();
public static readonly NvAPI_InitializeDelegate NvAPI_Initialize;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status InitializeDelegate();
public static readonly InitializeDelegate Initialize;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status UnloadDelegate();
public static readonly UnloadDelegate Unload;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status GetErrorMessageDelegate(NvAPI_Status nr, [MarshalAs(UnmanagedType.LPStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_SHORT_STRING_MAX)]StringBuilder szDesc);
public static readonly GetErrorMessageDelegate GetErrorMessage;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status GetInterfaceVersionStringDelegate([MarshalAs(UnmanagedType.LPStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_SHORT_STRING_MAX)]StringBuilder szDesc);
public static readonly GetInterfaceVersionStringDelegate GetInterfaceVersionString;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status SYS_GetDriverAndBranchVersionDelegate(ref uint pDriverVersion, [MarshalAs(UnmanagedType.LPStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_SHORT_STRING_MAX)]StringBuilder szBuildBranchString);
public static readonly SYS_GetDriverAndBranchVersionDelegate SYS_GetDriverAndBranchVersion;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_CreateSessionDelegate(ref IntPtr phSession);
public static readonly DRS_CreateSessionDelegate DRS_CreateSession;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_DestroySessionDelegate(IntPtr hSession);
public static readonly DRS_DestroySessionDelegate DRS_DestroySession;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_LoadSettingsDelegate(IntPtr hSession);
public static readonly DRS_LoadSettingsDelegate DRS_LoadSettings;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SaveSettingsDelegate(IntPtr hSession);
public static readonly DRS_SaveSettingsDelegate DRS_SaveSettings;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_LoadSettingsFromFileDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder fileName);
public static readonly DRS_LoadSettingsFromFileDelegate DRS_LoadSettingsFromFile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SaveSettingsToFileDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder fileName);
public static readonly DRS_SaveSettingsToFileDelegate DRS_SaveSettingsToFile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_LoadSettingsFromFileExDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder fileName);
public static readonly DRS_LoadSettingsFromFileExDelegate DRS_LoadSettingsFromFileEx;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SaveSettingsToFileExDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder fileName);
public static readonly DRS_SaveSettingsToFileExDelegate DRS_SaveSettingsToFileEx;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_CreateProfileDelegate(IntPtr hSession, ref NVDRS_PROFILE pProfileInfo, ref IntPtr phProfile);
public static readonly DRS_CreateProfileDelegate DRS_CreateProfile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_DeleteProfileDelegate(IntPtr hSession, IntPtr hProfile);
public static readonly DRS_DeleteProfileDelegate DRS_DeleteProfile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SetCurrentGlobalProfileDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder wszGlobalProfileName);
public static readonly DRS_SetCurrentGlobalProfileDelegate DRS_SetCurrentGlobalProfile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetCurrentGlobalProfileDelegate(IntPtr hSession, ref IntPtr phProfile);
public static readonly DRS_GetCurrentGlobalProfileDelegate DRS_GetCurrentGlobalProfile;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetProfileInfoDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_PROFILE pProfileInfo);
public static readonly DRS_GetProfileInfoDelegate DRS_GetProfileInfo;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SetProfileInfoDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_PROFILE pProfileInfo);
public static readonly DRS_SetProfileInfoDelegate DRS_SetProfileInfo;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_FindProfileByNameDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder profileName, ref IntPtr phProfile);
public static readonly DRS_FindProfileByNameDelegate DRS_FindProfileByName;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_EnumProfilesDelegate(IntPtr hSession, uint index, ref IntPtr phProfile);
public static readonly DRS_EnumProfilesDelegate DRS_EnumProfiles;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetNumProfilesDelegate(IntPtr hSession, ref uint numProfiles);
public static readonly DRS_GetNumProfilesDelegate DRS_GetNumProfiles;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_CreateApplicationDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V3 pApplication);
public static readonly DRS_CreateApplicationDelegate DRS_CreateApplication;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_DeleteApplicationExDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V3 pApp);
public static readonly DRS_DeleteApplicationExDelegate DRS_DeleteApplicationEx;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_DeleteApplicationDelegate(IntPtr hSession, IntPtr hProfile, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName);
public static readonly DRS_DeleteApplicationDelegate DRS_DeleteApplication;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetApplicationInfoDelegate(IntPtr hSession, IntPtr hProfile, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref NVDRS_APPLICATION_V3 pApplication);
public static readonly DRS_GetApplicationInfoDelegate DRS_GetApplicationInfo;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate NvAPI_Status DRS_EnumApplicationsDelegate(IntPtr hSession, IntPtr hProfile, uint startIndex, ref uint appCount, IntPtr pApplication);
private static readonly DRS_EnumApplicationsDelegate DRS_EnumApplicationsInternal;
public static NvAPI_Status DRS_EnumApplications<TDrsAppVersion>(IntPtr hSession, IntPtr hProfile, uint startIndex, ref uint appCount, ref TDrsAppVersion[] apps)
{
NvAPI_Status res;
IntPtr pSettings;
NativeArrayHelper.SetArrayData(apps, out pSettings);
try
{
res = DRS_EnumApplicationsInternal(hSession, hProfile, startIndex, ref appCount, pSettings);
apps = NativeArrayHelper.GetArrayData<TDrsAppVersion>(pSettings, (int)appCount);
}
finally
{
Marshal.FreeHGlobal(pSettings);
}
return res;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_FindApplicationByNameDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref IntPtr phProfile, ref NVDRS_APPLICATION_V3 pApplication);
public static readonly DRS_FindApplicationByNameDelegate DRS_FindApplicationByName;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_SetSettingDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_SETTING pSetting);
public static readonly DRS_SetSettingDelegate DRS_SetSetting;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetSettingDelegate(IntPtr hSession, IntPtr hProfile, uint settingId, ref NVDRS_SETTING pSetting);
public static readonly DRS_GetSettingDelegate DRS_GetSetting;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate NvAPI_Status DRS_EnumSettingsDelegate(IntPtr hSession, IntPtr hProfile, uint startIndex, ref uint settingsCount, IntPtr pSetting);
private static readonly DRS_EnumSettingsDelegate DRS_EnumSettingsInternal;
public static NvAPI_Status DRS_EnumSettings(IntPtr hSession, IntPtr hProfile, uint startIndex, ref uint settingsCount, ref NVDRS_SETTING[] settings)
{
NvAPI_Status res;
IntPtr pSettings;
NativeArrayHelper.SetArrayData(settings, out pSettings);
try
{
res = DRS_EnumSettingsInternal(hSession, hProfile, startIndex, ref settingsCount, pSettings);
settings = NativeArrayHelper.GetArrayData<NVDRS_SETTING>(pSettings, (int)settingsCount);
}
finally
{
Marshal.FreeHGlobal(pSettings);
}
return res;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_EnumAvailableSettingIdsDelegate(IntPtr pSettingIds, ref uint pMaxCount);
public static readonly DRS_EnumAvailableSettingIdsDelegate DRS_EnumAvailableSettingIdsInternal;
public static NvAPI_Status DRS_EnumAvailableSettingIds(out List<uint> settingIds, uint maxCount)
{
NvAPI_Status res;
var settingIdArray = new uint[maxCount];
var pSettingIds = IntPtr.Zero;
NativeArrayHelper.SetArrayData(settingIdArray, out pSettingIds);
try
{
res = DRS_EnumAvailableSettingIdsInternal(pSettingIds, ref maxCount);
settingIdArray = NativeArrayHelper.GetArrayData<uint>(pSettingIds, (int)maxCount);
settingIds = settingIdArray.ToList();
}
finally
{
Marshal.FreeHGlobal(pSettingIds);
}
return res;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate NvAPI_Status DRS_EnumAvailableSettingValuesDelegate(uint settingId, ref uint pMaxNumValues, IntPtr pSettingValues);
private static readonly DRS_EnumAvailableSettingValuesDelegate DRS_EnumAvailableSettingValuesInternal;
public static NvAPI_Status DRS_EnumAvailableSettingValues(uint settingId, ref uint pMaxNumValues, ref NVDRS_SETTING_VALUES settingValues)
{
var pSettingValues = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NVDRS_SETTING_VALUES)));
NvAPI_Status res;
try
{
settingValues.settingValues = new NVDRS_SETTING_UNION[(int)NVAPI_SETTING_MAX_VALUES];
Marshal.StructureToPtr(settingValues, pSettingValues, true);
res = DRS_EnumAvailableSettingValuesInternal(settingId, ref pMaxNumValues, pSettingValues);
settingValues = (NVDRS_SETTING_VALUES)Marshal.PtrToStructure(pSettingValues, typeof(NVDRS_SETTING_VALUES));
}
finally
{
Marshal.FreeHGlobal(pSettingValues);
}
return res;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetSettingIdFromNameDelegate([MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder settingName, ref uint pSettingId);
public static readonly DRS_GetSettingIdFromNameDelegate DRS_GetSettingIdFromName;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetSettingNameFromIdDelegate(uint settingId, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder pSettingName);
public static readonly DRS_GetSettingNameFromIdDelegate DRS_GetSettingNameFromId;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_DeleteProfileSettingDelegate(IntPtr hSession, IntPtr hProfile, uint settingId);
public static readonly DRS_DeleteProfileSettingDelegate DRS_DeleteProfileSetting;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_RestoreAllDefaultsDelegate(IntPtr hSession);
public static readonly DRS_RestoreAllDefaultsDelegate DRS_RestoreAllDefaults;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_RestoreProfileDefaultDelegate(IntPtr hSession, IntPtr hProfile);
public static readonly DRS_RestoreProfileDefaultDelegate DRS_RestoreProfileDefault;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_RestoreProfileDefaultSettingDelegate(IntPtr hSession, IntPtr hProfile, uint settingId);
public static readonly DRS_RestoreProfileDefaultSettingDelegate DRS_RestoreProfileDefaultSetting;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate NvAPI_Status DRS_GetBaseProfileDelegate(IntPtr hSession, ref IntPtr phProfile);
public static readonly DRS_GetBaseProfileDelegate DRS_GetBaseProfile;
#endregion
static NvapiDrsWrapper()
{
IntPtr lib = LoadLibrary(GetDllName());
if (lib != IntPtr.Zero)
{
nvapi_QueryInterface = GetDelegateOfFunction<nvapi_QueryInterfaceDelegate>(lib, "nvapi_QueryInterface");
if (nvapi_QueryInterface != null)
{
GetDelegate(0x0150E828, out NvAPI_Initialize);
if (NvAPI_Initialize() == NvAPI_Status.NVAPI_OK)
{
#region FUNCTION IDs
GetDelegate(0x0150E828, out Initialize);
GetDelegate(0xD22BDD7E, out Unload);
GetDelegate(0x6C2D048C, out GetErrorMessage);
GetDelegate(0x01053FA5, out GetInterfaceVersionString);
GetDelegate(0x2926AAAD, out SYS_GetDriverAndBranchVersion);
GetDelegate(0x0694D52E, out DRS_CreateSession);
GetDelegate(0xDAD9CFF8, out DRS_DestroySession);
GetDelegate(0x375DBD6B, out DRS_LoadSettings);
GetDelegate(0xFCBC7E14, out DRS_SaveSettings);
GetDelegate(0xD3EDE889, out DRS_LoadSettingsFromFile);
GetDelegate(0x2BE25DF8, out DRS_SaveSettingsToFile);
GetDelegate(0xC63C045B, out DRS_LoadSettingsFromFileEx);
GetDelegate(0x1267818E, out DRS_SaveSettingsToFileEx);
GetDelegate(0xCC176068, out DRS_CreateProfile);
GetDelegate(0x17093206, out DRS_DeleteProfile);
GetDelegate(0x1C89C5DF, out DRS_SetCurrentGlobalProfile);
GetDelegate(0x617BFF9F, out DRS_GetCurrentGlobalProfile);
GetDelegate(0x61CD6FD6, out DRS_GetProfileInfo);
GetDelegate(0x16ABD3A9, out DRS_SetProfileInfo);
GetDelegate(0x7E4A9A0B, out DRS_FindProfileByName);
GetDelegate(0xBC371EE0, out DRS_EnumProfiles);
GetDelegate(0x1DAE4FBC, out DRS_GetNumProfiles);
GetDelegate(0x4347A9DE, out DRS_CreateApplication);
GetDelegate(0xC5EA85A1, out DRS_DeleteApplicationEx);
GetDelegate(0x2C694BC6, out DRS_DeleteApplication);
GetDelegate(0xED1F8C69, out DRS_GetApplicationInfo);
GetDelegate(0x7FA2173A, out DRS_EnumApplicationsInternal);
GetDelegate(0xEEE566B2, out DRS_FindApplicationByName);
GetDelegate(0x577DD202, out DRS_SetSetting);
GetDelegate(0x73BF8338, out DRS_GetSetting);
GetDelegate(0xAE3039DA, out DRS_EnumSettingsInternal);
GetDelegate(0xF020614A, out DRS_EnumAvailableSettingIdsInternal);
GetDelegate(0x2EC39F90, out DRS_EnumAvailableSettingValuesInternal);
GetDelegate(0xCB7309CD, out DRS_GetSettingIdFromName);
GetDelegate(0xD61CBE6E, out DRS_GetSettingNameFromId);
GetDelegate(0xE4A26362, out DRS_DeleteProfileSetting);
GetDelegate(0x5927B094, out DRS_RestoreAllDefaults);
GetDelegate(0xFA5F6134, out DRS_RestoreProfileDefault);
GetDelegate(0x53F0381E, out DRS_RestoreProfileDefaultSetting);
GetDelegate(0xDA8466A0, out DRS_GetBaseProfile);
#endregion
}
}
}
}
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace nspector.Native
{
internal class NativeArrayHelper
{
public static T GetArrayItemData<T>(IntPtr sourcePointer)
{
return (T)Marshal.PtrToStructure(sourcePointer, typeof(T));
}
public static T[] GetArrayData<T>(IntPtr sourcePointer, int itemCount)
{
var lstResult = new List<T>();
if (sourcePointer != IntPtr.Zero && itemCount > 0)
{
var sizeOfItem = Marshal.SizeOf(typeof(T));
for (int i = 0; i < itemCount; i++)
{
lstResult.Add(GetArrayItemData<T>(sourcePointer + (sizeOfItem * i)));
}
}
return lstResult.ToArray();
}
public static void SetArrayData<T>(T[] items, out IntPtr targetPointer)
{
if (items != null && items.Length > 0)
{
var sizeOfItem = Marshal.SizeOf(typeof(T));
targetPointer = Marshal.AllocHGlobal(sizeOfItem * items.Length);
for (int i = 0; i < items.Length; i++)
{
Marshal.StructureToPtr(items[i], targetPointer + (sizeOfItem * i), true);
}
}
else
{
targetPointer = IntPtr.Zero;
}
}
public static void SetArrayItemData<T>(T item, out IntPtr targetPointer)
{
var sizeOfItem = Marshal.SizeOf(typeof(T));
targetPointer = Marshal.AllocHGlobal(sizeOfItem);
Marshal.StructureToPtr(item, targetPointer, true);
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
using System.Runtime.InteropServices;
namespace nspector.Native.WINAPI
{
internal static class DragAcceptNativeHelper
{
/// <summary>
/// Modifies the User Interface Privilege Isolation (UIPI) message filter for whole process. (Vista only)
/// </summary>
/// <param name="message"></param>
/// <param name="dwFlag"></param>
/// <returns></returns>
[DllImport("user32.dll", SetLastError = true)]
internal static extern IntPtr ChangeWindowMessageFilter(int message, int dwFlag);
/// <summary>
/// Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window. (Win7 or higher)
/// </summary>
/// <param name="handle"></param>
/// <param name="message"></param>
/// <param name="action"></param>
/// <returns></returns>
[DllImport("user32.dll", SetLastError = true)]
internal static extern IntPtr ChangeWindowMessageFilterEx(IntPtr handle, int message, int action, IntPtr pChangeFilterStruct);
//ChangeWindowMessageFilter
internal const int MSGFLT_ADD = 1;
internal const int MSGFLT_REMOVE = 2;
//ChangeWindowMessageFilterEx
internal const int MSGFLT_ALLOW = 1;
internal const int MSGFLT_DISALLOW = 2;
internal const int MSGFLT_RESET = 3;
[DllImport("shell32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
public static extern void DragAcceptFiles(IntPtr hWnd, bool fAccept);
internal const int WM_DROPFILES = 0x233;
internal const int WM_COPYDATA = 0x004A;
internal const int WM_COPYGLOBALDATA = 0x0049;
}
}

View File

@@ -0,0 +1,380 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace nspector.Native.WINAPI
{
internal class MessageHelper
{
[DllImport("User32.dll")]
private static extern int RegisterWindowMessage(string lpString);
[DllImport("User32.dll", EntryPoint = "FindWindow")]
internal static extern Int32 FindWindow(String lpClassName, String lpWindowName);
//For use with WM_COPYDATA and COPYDATASTRUCT
[DllImport("User32.dll", EntryPoint = "SendMessage")]
internal static extern int SendMessage(int hWnd, int Msg, int wParam, ref COPYDATASTRUCT lParam);
//For use with WM_COPYDATA and COPYDATASTRUCT
[DllImport("User32.dll", EntryPoint = "PostMessage")]
internal static extern int PostMessage(int hWnd, int Msg, int wParam, ref COPYDATASTRUCT lParam);
[DllImport("User32.dll", EntryPoint = "SendMessage")]
internal static extern int SendMessage(int hWnd, int Msg, int wParam, int lParam);
[DllImport("User32.dll", EntryPoint = "PostMessage")]
internal static extern int PostMessage(int hWnd, int Msg, int wParam, int lParam);
[DllImport("User32.dll", EntryPoint = "SetForegroundWindow")]
internal static extern bool SetForegroundWindow(int hWnd);
[DllImport("User32.dll")]
static extern bool SetWindowPlacement(int hWnd, [In] ref WINDOWPLACEMENT lpwndpl);
[DllImport("User32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowPlacement(int hWnd, ref WINDOWPLACEMENT lpwndpl);
#region Message Constants
internal const int WM_NULL = 0x00;
internal const int WM_CREATE = 0x01;
internal const int WM_DESTROY = 0x02;
internal const int WM_MOVE = 0x03;
internal const int WM_SIZE = 0x05;
internal const int WM_ACTIVATE = 0x06;
internal const int WM_SETFOCUS = 0x07;
internal const int WM_KILLFOCUS = 0x08;
internal const int WM_ENABLE = 0x0A;
internal const int WM_SETREDRAW = 0x0B;
internal const int WM_SETTEXT = 0x0C;
internal const int WM_GETTEXT = 0x0D;
internal const int WM_GETTEXTLENGTH = 0x0E;
internal const int WM_PAINT = 0x0F;
internal const int WM_CLOSE = 0x10;
internal const int WM_QUERYENDSESSION = 0x11;
internal const int WM_QUIT = 0x12;
internal const int WM_QUERYOPEN = 0x13;
internal const int WM_ERASEBKGND = 0x14;
internal const int WM_SYSCOLORCHANGE = 0x15;
internal const int WM_ENDSESSION = 0x16;
internal const int WM_SYSTEMERROR = 0x17;
internal const int WM_SHOWWINDOW = 0x18;
internal const int WM_CTLCOLOR = 0x19;
internal const int WM_WININICHANGE = 0x1A;
internal const int WM_SETTINGCHANGE = 0x1A;
internal const int WM_DEVMODECHANGE = 0x1B;
internal const int WM_ACTIVATEAPP = 0x1C;
internal const int WM_FONTCHANGE = 0x1D;
internal const int WM_TIMECHANGE = 0x1E;
internal const int WM_CANCELMODE = 0x1F;
internal const int WM_SETCURSOR = 0x20;
internal const int WM_MOUSEACTIVATE = 0x21;
internal const int WM_CHILDACTIVATE = 0x22;
internal const int WM_QUEUESYNC = 0x23;
internal const int WM_GETMINMAXINFO = 0x24;
internal const int WM_PAINTICON = 0x26;
internal const int WM_ICONERASEBKGND = 0x27;
internal const int WM_NEXTDLGCTL = 0x28;
internal const int WM_SPOOLERSTATUS = 0x2A;
internal const int WM_DRAWITEM = 0x2B;
internal const int WM_MEASUREITEM = 0x2C;
internal const int WM_DELETEITEM = 0x2D;
internal const int WM_VKEYTOITEM = 0x2E;
internal const int WM_CHARTOITEM = 0x2F;
internal const int WM_SETFONT = 0x30;
internal const int WM_GETFONT = 0x31;
internal const int WM_SETHOTKEY = 0x32;
internal const int WM_GETHOTKEY = 0x33;
internal const int WM_QUERYDRAGICON = 0x37;
internal const int WM_COMPAREITEM = 0x39;
internal const int WM_COMPACTING = 0x41;
internal const int WM_WINDOWPOSCHANGING = 0x46;
internal const int WM_WINDOWPOSCHANGED = 0x47;
internal const int WM_POWER = 0x48;
internal const int WM_COPYDATA = 0x4A;
internal const int WM_CANCELJOURNAL = 0x4B;
internal const int WM_NOTIFY = 0x4E;
internal const int WM_INPUTLANGCHANGEREQUEST = 0x50;
internal const int WM_INPUTLANGCHANGE = 0x51;
internal const int WM_TCARD = 0x52;
internal const int WM_HELP = 0x53;
internal const int WM_USERCHANGED = 0x54;
internal const int WM_NOTIFYFORMAT = 0x55;
internal const int WM_CONTEXTMENU = 0x7B;
internal const int WM_STYLECHANGING = 0x7C;
internal const int WM_STYLECHANGED = 0x7D;
internal const int WM_DISPLAYCHANGE = 0x7E;
internal const int WM_GETICON = 0x7F;
internal const int WM_SETICON = 0x80;
internal const int WM_NCCREATE = 0x81;
internal const int WM_NCDESTROY = 0x82;
internal const int WM_NCCALCSIZE = 0x83;
internal const int WM_NCHITTEST = 0x84;
internal const int WM_NCPAINT = 0x85;
internal const int WM_NCACTIVATE = 0x86;
internal const int WM_GETDLGCODE = 0x87;
internal const int WM_NCMOUSEMOVE = 0xA0;
internal const int WM_NCLBUTTONDOWN = 0xA1;
internal const int WM_NCLBUTTONUP = 0xA2;
internal const int WM_NCLBUTTONDBLCLK = 0xA3;
internal const int WM_NCRBUTTONDOWN = 0xA4;
internal const int WM_NCRBUTTONUP = 0xA5;
internal const int WM_NCRBUTTONDBLCLK = 0xA6;
internal const int WM_NCMBUTTONDOWN = 0xA7;
internal const int WM_NCMBUTTONUP = 0xA8;
internal const int WM_NCMBUTTONDBLCLK = 0xA9;
internal const int WM_KEYFIRST = 0x100;
internal const int WM_KEYDOWN = 0x100;
internal const int WM_KEYUP = 0x101;
internal const int WM_CHAR = 0x102;
internal const int WM_DEADCHAR = 0x103;
internal const int WM_SYSKEYDOWN = 0x104;
internal const int WM_SYSKEYUP = 0x105;
internal const int WM_SYSCHAR = 0x106;
internal const int WM_SYSDEADCHAR = 0x107;
internal const int WM_KEYLAST = 0x108;
internal const int WM_IME_STARTCOMPOSITION = 0x10D;
internal const int WM_IME_ENDCOMPOSITION = 0x10E;
internal const int WM_IME_COMPOSITION = 0x10F;
internal const int WM_IME_KEYLAST = 0x10F;
internal const int WM_INITDIALOG = 0x110;
internal const int WM_COMMAND = 0x111;
internal const int WM_SYSCOMMAND = 0x112;
internal const int WM_TIMER = 0x113;
internal const int WM_HSCROLL = 0x114;
internal const int WM_VSCROLL = 0x115;
internal const int WM_INITMENU = 0x116;
internal const int WM_INITMENUPOPUP = 0x117;
internal const int WM_MENUSELECT = 0x11F;
internal const int WM_MENUCHAR = 0x120;
internal const int WM_ENTERIDLE = 0x121;
internal const int WM_CTLCOLORMSGBOX = 0x132;
internal const int WM_CTLCOLOREDIT = 0x133;
internal const int WM_CTLCOLORLISTBOX = 0x134;
internal const int WM_CTLCOLORBTN = 0x135;
internal const int WM_CTLCOLORDLG = 0x136;
internal const int WM_CTLCOLORSCROLLBAR = 0x137;
internal const int WM_CTLCOLORSTATIC = 0x138;
internal const int WM_MOUSEFIRST = 0x200;
internal const int WM_MOUSEMOVE = 0x200;
internal const int WM_LBUTTONDOWN = 0x201;
internal const int WM_LBUTTONUP = 0x202;
internal const int WM_LBUTTONDBLCLK = 0x203;
internal const int WM_RBUTTONDOWN = 0x204;
internal const int WM_RBUTTONUP = 0x205;
internal const int WM_RBUTTONDBLCLK = 0x206;
internal const int WM_MBUTTONDOWN = 0x207;
internal const int WM_MBUTTONUP = 0x208;
internal const int WM_MBUTTONDBLCLK = 0x209;
internal const int WM_MOUSELAST = 0x20A;
internal const int WM_MOUSEWHEEL = 0x20A;
internal const int WM_PARENTNOTIFY = 0x210;
internal const int WM_ENTERMENULOOP = 0x211;
internal const int WM_EXITMENULOOP = 0x212;
internal const int WM_NEXTMENU = 0x213;
internal const int WM_SIZING = 0x214;
internal const int WM_CAPTURECHANGED = 0x215;
internal const int WM_MOVING = 0x216;
internal const int WM_POWERBROADCAST = 0x218;
internal const int WM_DEVICECHANGE = 0x219;
internal const int WM_MDICREATE = 0x220;
internal const int WM_MDIDESTROY = 0x221;
internal const int WM_MDIACTIVATE = 0x222;
internal const int WM_MDIRESTORE = 0x223;
internal const int WM_MDINEXT = 0x224;
internal const int WM_MDIMAXIMIZE = 0x225;
internal const int WM_MDITILE = 0x226;
internal const int WM_MDICASCADE = 0x227;
internal const int WM_MDIICONARRANGE = 0x228;
internal const int WM_MDIGETACTIVE = 0x229;
internal const int WM_MDISETMENU = 0x230;
internal const int WM_ENTERSIZEMOVE = 0x231;
internal const int WM_EXITSIZEMOVE = 0x232;
internal const int WM_DROPFILES = 0x233;
internal const int WM_MDIREFRESHMENU = 0x234;
internal const int WM_IME_SETCONTEXT = 0x281;
internal const int WM_IME_NOTIFY = 0x282;
internal const int WM_IME_CONTROL = 0x283;
internal const int WM_IME_COMPOSITIONFULL = 0x284;
internal const int WM_IME_SELECT = 0x285;
internal const int WM_IME_CHAR = 0x286;
internal const int WM_IME_KEYDOWN = 0x290;
internal const int WM_IME_KEYUP = 0x291;
internal const int WM_MOUSEHOVER = 0x2A1;
internal const int WM_NCMOUSELEAVE = 0x2A2;
internal const int WM_MOUSELEAVE = 0x2A3;
internal const int WM_CUT = 0x300;
internal const int WM_COPY = 0x301;
internal const int WM_PASTE = 0x302;
internal const int WM_CLEAR = 0x303;
internal const int WM_UNDO = 0x304;
internal const int WM_RENDERFORMAT = 0x305;
internal const int WM_RENDERALLFORMATS = 0x306;
internal const int WM_DESTROYCLIPBOARD = 0x307;
internal const int WM_DRAWCLIPBOARD = 0x308;
internal const int WM_PAINTCLIPBOARD = 0x309;
internal const int WM_VSCROLLCLIPBOARD = 0x30A;
internal const int WM_SIZECLIPBOARD = 0x30B;
internal const int WM_ASKCBFORMATNAME = 0x30C;
internal const int WM_CHANGECBCHAIN = 0x30D;
internal const int WM_HSCROLLCLIPBOARD = 0x30E;
internal const int WM_QUERYNEWPALETTE = 0x30F;
internal const int WM_PALETTEISCHANGING = 0x310;
internal const int WM_PALETTECHANGED = 0x311;
internal const int WM_HOTKEY = 0x312;
internal const int WM_PRINT = 0x317;
internal const int WM_PRINTCLIENT = 0x318;
internal const int WM_HANDHELDFIRST = 0x358;
internal const int WM_HANDHELDLAST = 0x35F;
internal const int WM_PENWINFIRST = 0x380;
internal const int WM_PENWINLAST = 0x38F;
internal const int WM_COALESCE_FIRST = 0x390;
internal const int WM_COALESCE_LAST = 0x39F;
internal const int WM_DDE_FIRST = 0x3E0;
internal const int WM_DDE_INITIATE = 0x3E0;
internal const int WM_DDE_TERMINATE = 0x3E1;
internal const int WM_DDE_ADVISE = 0x3E2;
internal const int WM_DDE_UNADVISE = 0x3E3;
internal const int WM_DDE_ACK = 0x3E4;
internal const int WM_DDE_DATA = 0x3E5;
internal const int WM_DDE_REQUEST = 0x3E6;
internal const int WM_DDE_POKE = 0x3E7;
internal const int WM_DDE_EXECUTE = 0x3E8;
internal const int WM_DDE_LAST = 0x3E8;
internal const int WM_USER = 0x400;
internal const int WM_APP = 0x8000;
internal const int SW_HIDE = 0;
internal const int SW_SHOWNORMAL = 1;
internal const int SW_NORMAL = 1;
internal const int SW_SHOWMINIMIZED = 2;
internal const int SW_SHOWMAXIMIZED = 3;
internal const int SW_MAXIMIZE = 3;
internal const int SW_SHOWNOACTIVATE = 4;
internal const int SW_SHOW = 5;
internal const int SW_MINIMIZE = 6;
internal const int SW_SHOWMINNOACTIVE = 7;
internal const int SW_SHOWNA = 8;
internal const int SW_RESTORE = 9;
#endregion
//Used for WM_COPYDATA for string messages
internal struct COPYDATASTRUCT
{
internal IntPtr dwData;
internal int cbData;
[MarshalAs(UnmanagedType.LPStr)]
internal string lpData;
}
internal struct WINDOWPLACEMENT
{
internal int length;
internal int flags;
internal int showCmd;
internal System.Drawing.Point ptMinPosition;
internal System.Drawing.Point ptMaxPosition;
internal System.Drawing.Rectangle rcNormalPosition;
}
internal bool bringAppToFront(int hWnd)
{
WINDOWPLACEMENT param = new WINDOWPLACEMENT();
if (GetWindowPlacement(hWnd,ref param))
{
if (param.showCmd != SW_NORMAL)
{
param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
param.showCmd = SW_NORMAL;
SetWindowPlacement(hWnd, ref param);
}
}
return SetForegroundWindow(hWnd);
}
internal int sendWindowsStringMessage(int hWnd, int wParam, string msg)
{
int result = 0;
if (hWnd > 0)
{
byte[] sarr = System.Text.Encoding.Default.GetBytes(msg);
int len = sarr.Length;
COPYDATASTRUCT cds;
cds.dwData = (IntPtr)100;
cds.lpData = msg;
cds.cbData = len + 1;
result = SendMessage(hWnd, WM_COPYDATA, wParam, ref cds);
}
return result;
}
internal int sendWindowsMessage(int hWnd, int Msg, int wParam, int lParam)
{
int result = 0;
if (hWnd > 0)
{
result = SendMessage(hWnd, Msg, wParam, lParam);
}
return result;
}
internal int getWindowId(string className, string windowName)
{
return FindWindow(className, windowName);
}
internal int checkIfProcessRunning(string process)
{
Process[] processes = Process.GetProcessesByName(process);
return processes.Length;
}
internal void closeProcesses(string process, bool force)
{
Process[] processes = Process.GetProcessesByName(process);
for (int i = 0; i < processes.Length; i++)
{
processes[i].CloseMainWindow();
if (force)
processes[i].Kill();
else
processes[i].WaitForExit();
}
}
internal void startProcess(string processName)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = processName;
process.Start();
}
}
}

View File

@@ -0,0 +1,11 @@
using System.Runtime.InteropServices;
namespace nspector.Native.WINAPI
{
static class SafeNativeMethods
{
[DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool DeleteFile(string name);
}
}

View File

@@ -0,0 +1,662 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace nspector.Native.WINAPI
{
internal class ShellLink : IDisposable
{
[ComImport()]
[Guid("0000010C-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IPersist
{
[PreserveSig]
void GetClassID(out Guid pClassID);
}
[ComImport()]
[Guid("0000010B-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IPersistFile
{
[PreserveSig]
void GetClassID(out Guid pClassID);
void IsDirty();
void Load(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
uint dwMode);
void Save(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName,
[MarshalAs(UnmanagedType.Bool)] bool fRemember);
void SaveCompleted(
[MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
void GetCurFile(
[MarshalAs(UnmanagedType.LPWStr)] out string ppszFileName);
}
[ComImport()]
[Guid("000214EE-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IShellLinkA
{
void GetPath(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszFile,
int cchMaxPath,
ref _WIN32_FIND_DATAA pfd,
uint fFlags);
void GetIDList(out IntPtr ppidl);
void SetIDList(IntPtr pidl);
void GetDescription(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszFile,
int cchMaxName);
void SetDescription(
[MarshalAs(UnmanagedType.LPStr)] string pszName);
void GetWorkingDirectory(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszDir,
int cchMaxPath);
void SetWorkingDirectory(
[MarshalAs(UnmanagedType.LPStr)] string pszDir);
void GetArguments(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszArgs,
int cchMaxPath);
void SetArguments(
[MarshalAs(UnmanagedType.LPStr)] string pszArgs);
void GetHotkey(out short pwHotkey);
void SetHotkey(short pwHotkey);
void GetShowCmd(out uint piShowCmd);
void SetShowCmd(uint piShowCmd);
void GetIconLocation(
[Out(), MarshalAs(UnmanagedType.LPStr)] StringBuilder pszIconPath,
int cchIconPath,
out int piIcon);
void SetIconLocation(
[MarshalAs(UnmanagedType.LPStr)] string pszIconPath,
int iIcon);
void SetRelativePath(
[MarshalAs(UnmanagedType.LPStr)] string pszPathRel,
uint dwReserved);
void Resolve(
IntPtr hWnd,
uint fFlags);
void SetPath(
[MarshalAs(UnmanagedType.LPStr)] string pszFile);
}
[ComImport()]
[Guid("000214F9-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface IShellLinkW
{
void GetPath(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile,
int cchMaxPath,
ref _WIN32_FIND_DATAW pfd,
uint fFlags);
void GetIDList(out IntPtr ppidl);
void SetIDList(IntPtr pidl);
void GetDescription(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile,
int cchMaxName);
void SetDescription(
[MarshalAs(UnmanagedType.LPWStr)] string pszName);
void GetWorkingDirectory(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir,
int cchMaxPath);
void SetWorkingDirectory(
[MarshalAs(UnmanagedType.LPWStr)] string pszDir);
void GetArguments(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs,
int cchMaxPath);
void SetArguments(
[MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
void GetHotkey(out short pwHotkey);
void SetHotkey(short pwHotkey);
void GetShowCmd(out uint piShowCmd);
void SetShowCmd(uint piShowCmd);
void GetIconLocation(
[Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath,
int cchIconPath,
out int piIcon);
void SetIconLocation(
[MarshalAs(UnmanagedType.LPWStr)] string pszIconPath,
int iIcon);
void SetRelativePath(
[MarshalAs(UnmanagedType.LPWStr)] string pszPathRel,
uint dwReserved);
void Resolve(
IntPtr hWnd,
uint fFlags);
void SetPath(
[MarshalAs(UnmanagedType.LPWStr)] string pszFile);
}
[Guid("00021401-0000-0000-C000-000000000046")]
[ClassInterface(ClassInterfaceType.None)]
[ComImport()]
private class CShellLink { }
private enum EShellLinkGP : uint
{
SLGP_SHORTPATH = 1,
SLGP_UNCPRIORITY = 2
}
[Flags]
private enum EShowWindowFlags : uint
{
SW_HIDE = 0,
SW_SHOWNORMAL = 1,
SW_NORMAL = 1,
SW_SHOWMINIMIZED = 2,
SW_SHOWMAXIMIZED = 3,
SW_MAXIMIZE = 3,
SW_SHOWNOACTIVATE = 4,
SW_SHOW = 5,
SW_MINIMIZE = 6,
SW_SHOWMINNOACTIVE = 7,
SW_SHOWNA = 8,
SW_RESTORE = 9,
SW_SHOWDEFAULT = 10,
SW_MAX = 10
}
[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 0, CharSet = CharSet.Unicode)]
private struct _WIN32_FIND_DATAW
{
internal uint dwFileAttributes;
internal _FILETIME ftCreationTime;
internal _FILETIME ftLastAccessTime;
internal _FILETIME ftLastWriteTime;
internal uint nFileSizeHigh;
internal uint nFileSizeLow;
internal uint dwReserved0;
internal uint dwReserved1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] // MAX_PATH
internal string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
internal string cAlternateFileName;
}
[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 0, CharSet = CharSet.Ansi)]
private struct _WIN32_FIND_DATAA
{
internal uint dwFileAttributes;
internal _FILETIME ftCreationTime;
internal _FILETIME ftLastAccessTime;
internal _FILETIME ftLastWriteTime;
internal uint nFileSizeHigh;
internal uint nFileSizeLow;
internal uint dwReserved0;
internal uint dwReserved1;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] // MAX_PATH
internal string cFileName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]
internal string cAlternateFileName;
}
[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 0)]
private struct _FILETIME
{
internal uint dwLowDateTime;
internal uint dwHighDateTime;
}
private class NativeMethods
{
[DllImport("Shell32", CharSet = CharSet.Auto)]
internal extern static int ExtractIconEx([MarshalAs(UnmanagedType.LPTStr)]
string lpszFile,
int nIconIndex,
IntPtr[] phIconLarge,
IntPtr[] phIconSmall,
int nIcons);
[DllImport("user32")]
internal static extern int DestroyIcon(IntPtr hIcon);
}
[Flags]
internal enum EShellLinkResolveFlags : uint
{
SLR_ANY_MATCH = 0x2,
SLR_INVOKE_MSI = 0x80,
SLR_NOLINKINFO = 0x40,
SLR_NO_UI = 0x1,
SLR_NO_UI_WITH_MSG_PUMP = 0x101,
SLR_NOUPDATE = 0x8,
SLR_NOSEARCH = 0x10,
SLR_NOTRACK = 0x20,
SLR_UPDATE = 0x4
}
internal enum LinkDisplayMode : uint
{
edmNormal = EShowWindowFlags.SW_NORMAL,
edmMinimized = EShowWindowFlags.SW_SHOWMINNOACTIVE,
edmMaximized = EShowWindowFlags.SW_MAXIMIZE
}
private IShellLinkW linkW;
private IShellLinkA linkA;
private string shortcutFile = "";
internal ShellLink()
{
if (System.Environment.OSVersion.Platform == PlatformID.Win32NT)
{
linkW = (IShellLinkW)new CShellLink();
}
else
{
linkA = (IShellLinkA)new CShellLink();
}
}
internal ShellLink(string linkFile)
: this()
{
Open(linkFile);
}
~ShellLink()
{
Dispose();
}
public void Dispose()
{
if (linkW != null)
{
Marshal.ReleaseComObject(linkW);
linkW = null;
}
if (linkA != null)
{
Marshal.ReleaseComObject(linkA);
linkA = null;
}
}
internal string ShortCutFile
{
get
{
return this.shortcutFile;
}
set
{
this.shortcutFile = value;
}
}
internal string IconPath
{
get
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
return iconPath.ToString();
}
set
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
if (linkA == null)
{
linkW.SetIconLocation(value, iconIndex);
}
else
{
linkA.SetIconLocation(value, iconIndex);
}
}
}
internal int IconIndex
{
get
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
return iconIndex;
}
set
{
StringBuilder iconPath = new StringBuilder(260, 260);
int iconIndex = 0;
if (linkA == null)
{
linkW.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
else
{
linkA.GetIconLocation(iconPath, iconPath.Capacity, out
iconIndex);
}
if (linkA == null)
{
linkW.SetIconLocation(iconPath.ToString(), value);
}
else
{
linkA.SetIconLocation(iconPath.ToString(), value);
}
}
}
internal string Target
{
get
{
StringBuilder target = new StringBuilder(260, 260);
if (linkA == null)
{
_WIN32_FIND_DATAW fd = new _WIN32_FIND_DATAW();
linkW.GetPath(target, target.Capacity, ref fd,
(uint)EShellLinkGP.SLGP_UNCPRIORITY);
}
else
{
_WIN32_FIND_DATAA fd = new _WIN32_FIND_DATAA();
linkA.GetPath(target, target.Capacity, ref fd,
(uint)EShellLinkGP.SLGP_UNCPRIORITY);
}
return target.ToString();
}
set
{
if (linkA == null)
{
linkW.SetPath(value);
}
else
{
linkA.SetPath(value);
}
}
}
internal string WorkingDirectory
{
get
{
StringBuilder path = new StringBuilder(260, 260);
if (linkA == null)
{
linkW.GetWorkingDirectory(path, path.Capacity);
}
else
{
linkA.GetWorkingDirectory(path, path.Capacity);
}
return path.ToString();
}
set
{
if (linkA == null)
{
linkW.SetWorkingDirectory(value);
}
else
{
linkA.SetWorkingDirectory(value);
}
}
}
internal string Description
{
get
{
StringBuilder description = new StringBuilder(1024, 1024);
if (linkA == null)
{
linkW.GetDescription(description, description.Capacity);
}
else
{
linkA.GetDescription(description, description.Capacity);
}
return description.ToString();
}
set
{
if (linkA == null)
{
linkW.SetDescription(value);
}
else
{
linkA.SetDescription(value);
}
}
}
internal string Arguments
{
get
{
StringBuilder arguments = new StringBuilder(260, 260);
if (linkA == null)
{
linkW.GetArguments(arguments, arguments.Capacity);
}
else
{
linkA.GetArguments(arguments, arguments.Capacity);
}
return arguments.ToString();
}
set
{
if (linkA == null)
{
linkW.SetArguments(value);
}
else
{
linkA.SetArguments(value);
}
}
}
internal LinkDisplayMode DisplayMode
{
get
{
uint cmd = 0;
if (linkA == null)
{
linkW.GetShowCmd(out cmd);
}
else
{
linkA.GetShowCmd(out cmd);
}
return (LinkDisplayMode)cmd;
}
set
{
if (linkA == null)
{
linkW.SetShowCmd((uint)value);
}
else
{
linkA.SetShowCmd((uint)value);
}
}
}
internal Keys HotKey
{
get
{
short key = 0;
if (linkA == null)
{
linkW.GetHotkey(out key);
}
else
{
linkA.GetHotkey(out key);
}
return (Keys)key;
}
set
{
if (linkA == null)
{
linkW.SetHotkey((short)value);
}
else
{
linkA.SetHotkey((short)value);
}
}
}
internal void Save()
{
Save(shortcutFile);
}
internal void Save(string linkFile
)
{
if (linkA == null)
{
((IPersistFile)linkW).Save(linkFile, true);
shortcutFile = linkFile;
}
else
{
((IPersistFile)linkA).Save(linkFile, true);
shortcutFile = linkFile;
}
}
internal void Open(string linkFile)
{
Open(linkFile,
IntPtr.Zero,
(EShellLinkResolveFlags.SLR_ANY_MATCH |
EShellLinkResolveFlags.SLR_NO_UI), 1);
}
internal void Open(
string linkFile,
IntPtr hWnd,
EShellLinkResolveFlags resolveFlags
)
{
Open(linkFile,
hWnd,
resolveFlags,
1);
}
internal void Open(
string linkFile,
IntPtr hWnd,
EShellLinkResolveFlags resolveFlags,
ushort timeOut
)
{
uint flags;
if ((resolveFlags & EShellLinkResolveFlags.SLR_NO_UI)
== EShellLinkResolveFlags.SLR_NO_UI)
{
flags = (uint)((int)resolveFlags | (timeOut << 16));
}
else
{
flags = (uint)resolveFlags;
}
if (linkA == null)
{
((IPersistFile)linkW).Load(linkFile, 0); //STGM_DIRECT)
linkW.Resolve(hWnd, flags);
this.shortcutFile = linkFile;
}
else
{
((IPersistFile)linkA).Load(linkFile, 0); //STGM_DIRECT)
linkA.Resolve(hWnd, flags);
this.shortcutFile = linkFile;
}
}
}
}

View File

@@ -0,0 +1,161 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace nspector.Native.WINAPI
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct THUMBBUTTON
{
Int32 dwMask;
uint iId;
uint iBitmap;
IntPtr hIcon;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
string szTip;
Int32 dwFlags;
}
[Flags]
internal enum THBF
{
THBF_ENABLED = 0x0000,
THBF_DISABLED = 0x0001,
THBF_DISMISSONCLICK = 0x0002,
THBF_NOBACKGROUND = 0x0004,
THBF_HIDDEN = 0x0008
}
[Flags]
internal enum THB
{
THB_BITMAP = 0x0001,
THB_ICON = 0x0002,
THB_TOOLTIP = 0x0004,
THB_FLAGS = 0x0008,
THBN_CLICKED = 0x1800
}
internal enum TBPFLAG
{
TBPF_NOPROGRESS = 0,
TBPF_INDETERMINATE = 0x1,
TBPF_NORMAL = 0x2,
TBPF_ERROR = 0x4,
TBPF_PAUSED = 0x8
}
internal enum TBATFLAG
{
TBATF_USEMDITHUMBNAIL = 0x1,
TBATF_USEMDILIVEPREVIEW = 0x2
}
[ComImport,
Guid("EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface ITaskbarList3
{
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void HrInit();
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void AddTab([In] IntPtr hwnd);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void DeleteTab([In] IntPtr hwnd);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void ActivateTab([In] IntPtr hwnd);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetActiveAlt([In] IntPtr hwnd);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void MarkFullscreenWindow([In] IntPtr hwnd,
[In, MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetProgressValue([In] IntPtr hwnd,
[In] ulong ullCompleted,
[In] ulong ullTotal);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetProgressState([In] IntPtr hwnd,
[In] TBPFLAG tbpFlags);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void RegisterTab([In] IntPtr hwndTab,
[In] IntPtr hwndMDI);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void UnregisterTab([In] IntPtr hwndTab);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetTabOrder([In] IntPtr hwndTab,
[In] IntPtr hwndInsertBefore);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetTabActive([In] IntPtr hwndTab,
[In] IntPtr hwndMDI,
[In] TBATFLAG tbatFlags);
//preliminary
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void ThumbBarAddButtons([In] IntPtr hwnd,
[In] uint cButtons,
[In] IntPtr pButton);
///* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
//preliminary
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void ThumbBarUpdateButtons([In] IntPtr hwnd,
[In] uint cButtons,
[In] IntPtr pButton);
///* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void ThumbBarSetImageList([In] IntPtr hwnd,
[In] IntPtr himl);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetOverlayIcon([In] IntPtr hwnd,
[In] IntPtr hIcon,
[In, MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetThumbnailTooltip([In] IntPtr hwnd,
[In, MarshalAs(UnmanagedType.LPWStr)] string pszTip);
//preliminary
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetThumbnailClip([In] IntPtr hwnd,
[In] IntPtr prcClip);
}
[ComImport]
[Guid("56FDF344-FD6D-11d0-958A-006097C9A090")]
internal class TaskbarList { }
}

123
nspector/Program.cs Normal file
View File

@@ -0,0 +1,123 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.Import;
using nspector.Native.WINAPI;
namespace nspector
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
#if DEBUG
if (!Debugger.IsAttached)
{
Application.EnableVisualStyles();
MessageBox.Show("Something unexpected has happened! Exit!","Error!");
return;
}
#endif
try
{
// Remove Zone.Identifier from Alternate Data Stream
SafeNativeMethods.DeleteFile(Application.ExecutablePath + ":Zone.Identifier");
}
catch { }
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (args.Length == 1 && File.Exists(args[0]))
{
if (new FileInfo(args[0]).Extension.ToLower() == ".nip")
{
try
{
var import = DrsServiceLocator.ImportService;
import.ImportProfiles(args[0]);
GC.Collect();
Process current = Process.GetCurrentProcess();
foreach (
Process process in
Process.GetProcessesByName(current.ProcessName.Replace(".vshost", "")))
{
if (process.Id != current.Id && process.MainWindowTitle.Contains("Settings"))
{
MessageHelper mh = new MessageHelper();
mh.sendWindowsStringMessage((int)process.MainWindowHandle, 0, "ProfilesImported");
}
}
MessageBox.Show("Profile(s) successfully imported!", Application.ProductName,
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show("Import Error: " + ex.Message, Application.ProductName + " Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
else if (ArgExists(args, "-createCSN"))
{
File.WriteAllText("CustomSettingNames.xml", Properties.Resources.CustomSettingNames);
}
else
{
bool createdNew = true;
using (Mutex mutex = new Mutex(true, Application.ProductName, out createdNew))
{
if (createdNew)
{
Application.Run(new frmDrvSettings(ArgExists(args, "-showOnlyCSN"), ArgExists(args, "-disableScan")));
}
else
{
Process current = Process.GetCurrentProcess();
foreach (
Process process in
Process.GetProcessesByName(current.ProcessName.Replace(".vshost", "")))
{
if (process.Id != current.Id && process.MainWindowTitle.Contains("Settings"))
{
MessageHelper mh = new MessageHelper();
mh.bringAppToFront((int)process.MainWindowHandle);
}
}
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + "\r\n\r\n" + ex.StackTrace ,"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
static bool ArgExists(string[] args, string arg)
{
foreach (string a in args)
{
if (a.ToUpper() == arg.ToUpper())
return true;
}
return false;
}
}
}

View File

@@ -0,0 +1,38 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("nvidiaProfileInspector")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NVIDIA Profile Inspector")]
[assembly: AssemblyCopyright("©2016 by Orbmu2k")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c2fe2861-54c5-4d63-968e-30472019bed3")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.1.1")]
[assembly: AssemblyFileVersion("2.1.1.1")]
[assembly: InternalsVisibleTo("nspector.Test")]

253
nspector/Properties/Resources.Designer.cs generated Normal file
View File

@@ -0,0 +1,253 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace nspector.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("nspector.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap apply {
get {
object obj = ResourceManager.GetObject("apply", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;CustomSettingNames&gt;
/// &lt;ShowCustomizedSettingNamesOnly&gt;false&lt;/ShowCustomizedSettingNamesOnly&gt;
/// &lt;Settings&gt;
/// &lt;CustomSetting&gt;
/// &lt;UserfriendlyName&gt;Enable Maxwell sample interleaving (MFAA)&lt;/UserfriendlyName&gt;
/// &lt;HexSettingID&gt;0x0098C1AC&lt;/HexSettingID&gt;
/// &lt;GroupName&gt;3 - Antialiasing&lt;/GroupName&gt;
/// &lt;MinRequiredDriverVersion&gt;344.11&lt;/MinRequiredDriverVersion&gt;
/// &lt;SettingValues&gt;
/// &lt;CustomSettingValue&gt;
/// &lt;UserfriendlyName&gt;Off&lt;/Userfrie [Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt.
/// </summary>
public static string CustomSettingNames {
get {
return ResourceManager.GetString("CustomSettingNames", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap export1 {
get {
object obj = ResourceManager.GetObject("export1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap filter_user {
get {
object obj = ResourceManager.GetObject("filter_user", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap find_set2 {
get {
object obj = ResourceManager.GetObject("find_set2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap home_sm {
get {
object obj = ResourceManager.GetObject("home_sm", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon Icon1 {
get {
object obj = ResourceManager.GetObject("Icon1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap ieframe_1_18212 {
get {
object obj = ResourceManager.GetObject("ieframe_1_18212", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap ieframe_1_31073_002 {
get {
object obj = ResourceManager.GetObject("ieframe_1_31073_002", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap import1 {
get {
object obj = ResourceManager.GetObject("import1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap n1_016 {
get {
object obj = ResourceManager.GetObject("n1-016", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap nv_btn {
get {
object obj = ResourceManager.GetObject("nv_btn", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap PortableDeviceStatus_3_16_011 {
get {
object obj = ResourceManager.GetObject("PortableDeviceStatus_3_16_011", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon shield16 {
get {
object obj = ResourceManager.GetObject("shield16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap text_binary {
get {
object obj = ResourceManager.GetObject("text_binary", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap transparent16 {
get {
object obj = ResourceManager.GetObject("transparent16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap window_application_add {
get {
object obj = ResourceManager.GetObject("window_application_add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap window_application_delete {
get {
object obj = ResourceManager.GetObject("window_application_delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="transparent16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\transparent16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="filter_user" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\filter_user.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="apply" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\apply.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="export1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\export1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ieframe_1_18212" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\ieframe_1_18212.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_application_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\window_application_delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="home_sm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\home_sm.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="window_application_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\window_application_add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="shield16" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHJyciV6enqzf39/7H9/f+96enqucnJyIgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHV1dUp+fn7nz8/P+NfX1/zX19f7yMjI+H5+fud1dXVKAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHR0dEp/f3/p19fX+Yewwv84hq//tWY1/7yWZf/Pz8/4f39/6nR0
dEoAAAAAAAAAAAAAAAAAAAAAAAAAAHFxcRh+fn7e19fX+VWwzP9Nv9v/Pcrq/9l/Hv/Pdjj/t3RA/9DQ
0Ph+fn7bcXFxGAAAAAAAAAAAAAAAAAAAAAB6enq72NjY+E2qx/9Q1O3/V+L2/z/b8f/Zfxf/9aQq/+qT
LP/BfkH/1tbW93l5eaYAAAAAAAAAAAAAAABycnIikJCQ19fX1/o2sdv/U933/03k9/8/2vH/2HsT//eI
EP/1nSH/0Hcu/9PBqvqPj4/OcXFxHAAAAAAAAAAAdnZ2bb6+vvFAo9L/PMfp/0vi9/9G6ff/P9rx/9h6
Ef/ufgf/940Y//CZHv/NhSf/urq653Z2dnIAAAAAAAAAAHp6ep/U1NT4K4+k/zfH5f8+2O//Ptjv/z3Z
8P/WeRH/13UK/9h5EP/agB//uXQ8/9DQ0Pd6enqlAAAAAAAAAAB9fX3S3t7e/c19Dv/Sgh//x3of/8Ny
Iv/GciT/Ir/l/ya85f8pvOP/Jrbd/zacyf/X19f6fX190gAAAAAAAAAAfn5+3N3d3f7ahhL/3Jcm/92R
If/Ndyz/wW0o/yLD5v8ky+z/KM/v/yrW8v8zocj/19fX/H5+fuMAAAAAAAAAAH5+ft7c3Nz+2oYS/+u2
Wv/orkr/3JAu/8V2LP8qvuT/Vev+/2To/f8f5/3/NZrE/9fX1/x/f3/jAAAAAAAAAAB+fn7d3d3d/uaS
Hf/msVr/7smC/+y1WP/Ohif/M7vi/3To+v806f7/KcLe/ziayP/X19f8f39/4wAAAAAAAAAAfHx80s3N
zfrY2Nj+25Aj/9CHKP/tyIL/048r/x6x3P8f4/n/L7LR/0moxv/Pz8/6zc3N+nx8fNwAAAAAAAAAAHNz
c0yIiIjJioqK6NDQ0PnR0dH9x5FF/8+RNf80osH/RLHP/8DAwPnMzMz3ioqK6IiIiL1zc3NMAAAAAAAA
AAAAAAAAAAAAAHJyciCXl5eVmJiY6MrKyvrY2Nj919fX/MnJyfiUlJTml5eXmHJyciAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHJyciGIiIi/iYmJ6ImJieqHh4e8cnJyEwAAAAAAAAAAAAAAAAAA
AAAAAAAA+B8AAPAPAADgBwAAwAMAAMADAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB
AADgBwAA+B8AAA==
</value>
</data>
<data name="PortableDeviceStatus_3_16_011" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\PortableDeviceStatus_3_16-011.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="text_binary" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\text_binary.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="nv_btn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\nv_btn.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\import1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ieframe_1_31073_002" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\ieframe_1_31073-002.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="find_set2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\find_set2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="n1-016" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\n1-016.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAQAAAABAAoAQAAJgAAACAgEAAAAAQA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAMAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAH//j/j/jwAAf/+P+P+PAAB4iIiIiIgAAH93h3h3
jwAAf3eHeHePAAB4iIiIiIgAAH93h3h3jwAAf3eHeHePAAB4iIiIiIgAAH93h3h3jwAAf3eHeHePAAB4
iIiIgAAAAH//j/j39wAAf/+P+PdwAAB3d3d3dwAAwAEAAMABAADAAQAAwAEAAMABAADAAQAAwAEAAMAB
AADAAQAAwAEAAMABAADAAQAAwAEAAMADAADABwAAwA8AACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
/wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAHiIiIiIiIiIiIiIiIAAAAB/////j///j/
//j/+AAAAAf////4///4///4//gAAAAH////+P//+P//+P/4AAAAB/////j///j///j/+AAAAAf////4
///4///4//gAAAAHiIiIiIiIiIiIiIiIAAAAB/94eHh4eHh4eHj/+AAAAAf/h4eIh4eIh4eI//gAAAAH
/3h4eHh4eHh4eP/4AAAAB/+Hh4iHh4iHh4j/+AAAAAf/eHh4eHh4eHh4//gAAAAHiIiIiIiIiIiIiIiI
AAAAB/94eHh4eHh4eHj/+AAAAAf/h4eIh4eIh4eI//gAAAAH/3h4eHh4eHh4eP/4AAAAB/+Hh4iHh4iH
h4j/+AAAAAf/eHh4eHh4eHh4//gAAAAHiIiIiIiIiIiIiIiIAAAAB/94eHh4eHh4eHj/+AAAAAf/h4eI
h4eIh4eI//gAAAAH/3h4eHh4eHh4eP/4AAAAB/+Hh4iHh4iHh4j/+AAAAAf/eHh4eHh4eHh4//gAAAAH
iIiIiIiIiIiIcAAAAAAAB/////j///j//3/4cAAAAAf////4///4//9/hwAAAAAH////+P//+P//eHAA
AAAAB/////j///j//3cAAAAAAAf////4///4//9wAAAAAAAHd3d3d3d3d3d3cAAAAADgAAAH4AAAB+AA
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
AAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAA/gAAAf4AAAP+AAAH/gAAD/4AAB/w==
</value>
</data>
<data name="CustomSettingNames" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\CustomSettingNames.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
</root>

3
nspector/app.config Normal file
View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

15
nspector/app.manifest Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<asmv2:trustInfo xmlns:asmv2="urn:schemas-microsoft-com:asm.v2">
<asmv2:security>
<asmv2:requestedPrivileges>
<asmv2:requestedExecutionLevel level="requireAdministrator" />
</asmv2:requestedPrivileges>
</asmv2:security>
</asmv2:trustInfo>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>false</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

253
nspector/frmBitEditor.Designer.cs generated Normal file
View File

@@ -0,0 +1,253 @@
namespace nspector
{
partial class frmBitEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnClose = new System.Windows.Forms.Button();
this.lValue = new System.Windows.Forms.Label();
this.lFilter = new System.Windows.Forms.Label();
this.tbFilter = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnDirectApplyStart = new System.Windows.Forms.Button();
this.gbDirectTest = new System.Windows.Forms.GroupBox();
this.btnBrowseGame = new System.Windows.Forms.Button();
this.tbGamePath = new System.Windows.Forms.TextBox();
this.lblGamePath = new System.Windows.Forms.Label();
this.clbBits = new nspector.ListViewEx();
this.chBit = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chProfileCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chProfileNames = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.gbDirectTest.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.Location = new System.Drawing.Point(914, 806);
this.btnClose.Margin = new System.Windows.Forms.Padding(4);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(132, 29);
this.btnClose.TabIndex = 1;
this.btnClose.Text = "Apply && Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// lValue
//
this.lValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lValue.AutoSize = true;
this.lValue.Location = new System.Drawing.Point(21, 813);
this.lValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lValue.Name = "lValue";
this.lValue.Size = new System.Drawing.Size(48, 17);
this.lValue.TabIndex = 2;
this.lValue.Text = "Value:";
//
// lFilter
//
this.lFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lFilter.AutoSize = true;
this.lFilter.Location = new System.Drawing.Point(187, 813);
this.lFilter.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lFilter.Name = "lFilter";
this.lFilter.Size = new System.Drawing.Size(87, 17);
this.lFilter.TabIndex = 23;
this.lFilter.Text = "Profile Filter:";
//
// tbFilter
//
this.tbFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbFilter.Location = new System.Drawing.Point(274, 809);
this.tbFilter.Margin = new System.Windows.Forms.Padding(4);
this.tbFilter.Name = "tbFilter";
this.tbFilter.Size = new System.Drawing.Size(632, 22);
this.tbFilter.TabIndex = 24;
this.tbFilter.TextChanged += new System.EventHandler(this.tbFilter_TextChanged);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox1.Location = new System.Drawing.Point(74, 809);
this.textBox1.Margin = new System.Windows.Forms.Padding(4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(86, 22);
this.textBox1.TabIndex = 31;
this.textBox1.Text = "0x00FF00FF";
this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave);
this.textBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.textBox1_PreviewKeyDown);
//
// btnDirectApplyStart
//
this.btnDirectApplyStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDirectApplyStart.Location = new System.Drawing.Point(6, 19);
this.btnDirectApplyStart.Margin = new System.Windows.Forms.Padding(4);
this.btnDirectApplyStart.Name = "btnDirectApplyStart";
this.btnDirectApplyStart.Size = new System.Drawing.Size(105, 42);
this.btnDirectApplyStart.TabIndex = 32;
this.btnDirectApplyStart.Text = "GO!";
this.btnDirectApplyStart.UseVisualStyleBackColor = true;
this.btnDirectApplyStart.Click += new System.EventHandler(this.btnDirectApply_Click);
//
// gbDirectTest
//
this.gbDirectTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.gbDirectTest.Controls.Add(this.btnBrowseGame);
this.gbDirectTest.Controls.Add(this.tbGamePath);
this.gbDirectTest.Controls.Add(this.lblGamePath);
this.gbDirectTest.Controls.Add(this.btnDirectApplyStart);
this.gbDirectTest.Location = new System.Drawing.Point(18, 733);
this.gbDirectTest.Margin = new System.Windows.Forms.Padding(4);
this.gbDirectTest.Name = "gbDirectTest";
this.gbDirectTest.Padding = new System.Windows.Forms.Padding(4);
this.gbDirectTest.Size = new System.Drawing.Size(1029, 66);
this.gbDirectTest.TabIndex = 33;
this.gbDirectTest.TabStop = false;
this.gbDirectTest.Text = "Quick Bit Value Tester (stores this setting value to the current profile and imme" +
"diately starts the game when successful)";
//
// btnBrowseGame
//
this.btnBrowseGame.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrowseGame.Location = new System.Drawing.Point(971, 24);
this.btnBrowseGame.Margin = new System.Windows.Forms.Padding(4);
this.btnBrowseGame.Name = "btnBrowseGame";
this.btnBrowseGame.Size = new System.Drawing.Size(41, 29);
this.btnBrowseGame.TabIndex = 35;
this.btnBrowseGame.Text = "...";
this.btnBrowseGame.UseVisualStyleBackColor = true;
this.btnBrowseGame.Click += new System.EventHandler(this.btnBrowseGame_Click);
//
// tbGamePath
//
this.tbGamePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbGamePath.Location = new System.Drawing.Point(218, 26);
this.tbGamePath.Margin = new System.Windows.Forms.Padding(4);
this.tbGamePath.Name = "tbGamePath";
this.tbGamePath.Size = new System.Drawing.Size(745, 22);
this.tbGamePath.TabIndex = 34;
//
// lblGamePath
//
this.lblGamePath.AutoSize = true;
this.lblGamePath.Location = new System.Drawing.Point(119, 29);
this.lblGamePath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblGamePath.Name = "lblGamePath";
this.lblGamePath.Size = new System.Drawing.Size(98, 17);
this.lblGamePath.TabIndex = 33;
this.lblGamePath.Text = "Game to start:";
//
// clbBits
//
this.clbBits.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.clbBits.CheckBoxes = true;
this.clbBits.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chBit,
this.chName,
this.chProfileCount,
this.chProfileNames});
this.clbBits.FullRowSelect = true;
this.clbBits.GridLines = true;
this.clbBits.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.clbBits.Location = new System.Drawing.Point(12, 12);
this.clbBits.MultiSelect = false;
this.clbBits.Name = "clbBits";
this.clbBits.ShowGroups = false;
this.clbBits.Size = new System.Drawing.Size(1035, 714);
this.clbBits.TabIndex = 34;
this.clbBits.UseCompatibleStateImageBehavior = false;
this.clbBits.View = System.Windows.Forms.View.Details;
this.clbBits.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbBits_ItemCheck);
//
// chBit
//
this.chBit.Text = "Bit";
//
// chName
//
this.chName.Text = "Name";
this.chName.Width = 200;
//
// chProfileCount
//
this.chProfileCount.Text = "Count";
//
// chProfileNames
//
this.chProfileNames.Text = "Profiles";
this.chProfileNames.Width = 4000;
//
// frmBitEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1059, 847);
this.Controls.Add(this.clbBits);
this.Controls.Add(this.gbDirectTest);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.tbFilter);
this.Controls.Add(this.lFilter);
this.Controls.Add(this.lValue);
this.Controls.Add(this.btnClose);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Margin = new System.Windows.Forms.Padding(4);
this.MinimumSize = new System.Drawing.Size(854, 609);
this.Name = "frmBitEditor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Bit Value Editor";
this.Load += new System.EventHandler(this.frmBitEditor_Load);
this.gbDirectTest.ResumeLayout(false);
this.gbDirectTest.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Label lValue;
private System.Windows.Forms.Label lFilter;
private System.Windows.Forms.TextBox tbFilter;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btnDirectApplyStart;
private System.Windows.Forms.GroupBox gbDirectTest;
private System.Windows.Forms.Button btnBrowseGame;
private System.Windows.Forms.TextBox tbGamePath;
private System.Windows.Forms.Label lblGamePath;
private ListViewEx clbBits;
private System.Windows.Forms.ColumnHeader chBit;
private System.Windows.Forms.ColumnHeader chProfileCount;
private System.Windows.Forms.ColumnHeader chName;
private System.Windows.Forms.ColumnHeader chProfileNames;
}
}

245
nspector/frmBitEditor.cs Normal file
View File

@@ -0,0 +1,245 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.CustomSettings;
namespace nspector
{
internal partial class frmBitEditor : Form
{
private uint _Settingid = 0;
private frmDrvSettings _SettingsOwner = null;
private uint _InitValue = 0;
private uint _CurrentValue = 0;
internal frmBitEditor()
{
InitializeComponent();
this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
this.DoubleBuffered = true;
}
internal void ShowDialog(frmDrvSettings SettingsOwner, uint SettingId, uint InitValue, string SettingName)
{
_Settingid = SettingId;
_SettingsOwner = SettingsOwner;
_InitValue = InitValue;
Text = string.Format("Bit Value Editor - {0}", SettingName);
this.ShowDialog(SettingsOwner);
}
private void frmBitEditor_Load(object sender, EventArgs e)
{
SplitBitsFromUnknownSettings();
clbBits.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
SetValue(_InitValue);
}
private void SplitBitsFromUnknownSettings()
{
uint lastValue = 0;
lastValue = _CurrentValue;
string[] filters = tbFilter.Text.Split(',');
clbBits.Items.Clear();
var referenceSettings = DrsServiceLocator.ReferenceSettings?.Settings.FirstOrDefault(s => s.SettingId == _Settingid);
var settingsCache = DrsServiceLocator.ScannerService.CachedSettings.FirstOrDefault(x => x.SettingId == _Settingid);
if (settingsCache != null)
{
for (int bit = 0; bit < 32; bit++)
{
string profileNames = "";
uint profileCount = 0;
for (int i = 0; i < settingsCache.SettingValues.Count; i++)
{
if (((settingsCache.SettingValues[i].Value >> bit) & 0x1) == 0x1)
{
if (filters.Length == 0)
{
profileNames += settingsCache.SettingValues[i].ProfileNames + ",";
}
else
{
string[] settingProfileNames = settingsCache.SettingValues[i].ProfileNames.ToString().Split(',');
for (int p = 0; p < settingProfileNames.Length; p++)
{
for (int f = 0; f < filters.Length; f++)
{
if (settingProfileNames[p].ToLower().Contains(filters[f].ToLower()))
{
profileNames += settingProfileNames[p] + ",";
}
}
}
}
profileCount += settingsCache.SettingValues[i].ValueProfileCount;
}
}
uint mask = (uint)1 << bit;
string maskStr="";
if (referenceSettings != null)
{
var maskValue = referenceSettings.SettingValues.FirstOrDefault(v => v.SettingValue == mask);
if (maskValue != null)
{
maskStr = maskValue.UserfriendlyName;
if (maskStr.Contains("("))
{
maskStr = maskStr.Substring(0, maskStr.IndexOf("(") - 1);
}
}
}
clbBits.Items.Add(new ListViewItem(new string[] {
string.Format("#{0:00}",bit),
maskStr,
profileCount.ToString(),
profileNames,
}));
}
}
SetValue(lastValue);
}
private void updateValue(bool changeState, int changedIndex)
{
uint val = 0;
for (int b = 0; b < clbBits.Items.Count; b++)
{
if (((clbBits.Items[b].Checked) && changedIndex != b) || (changeState && (changedIndex == b)))
{
val = (uint)((uint)val | (uint)(1 << b));
}
}
UpdateCurrent(val);
}
private void UpdateValue()
{
uint val = 0;
for (int b = 0; b < clbBits.Items.Count; b++)
{
if (clbBits.Items[b].Checked)
{
val = (uint)((uint)val | (uint)(1 << b));
}
}
UpdateCurrent(val);
}
private void SetValue(uint val)
{
for (int b = 0; b < clbBits.Items.Count; b++)
{
if (((val >> b) & 0x1) == 0x1)
clbBits.Items[b].Checked = true;
else
clbBits.Items[b].Checked = false;
}
UpdateValue();
}
private void UpdateCurrent(uint val)
{
_CurrentValue = val;
textBox1.Text = "0x" + (val).ToString("X8");
}
private void UpdateCurrent(string text)
{
uint val = DrsUtil.ParseDwordByInputSafe(text);
UpdateCurrent(val);
SetValue(val);
}
private void clbBits_ItemCheck(object sender, ItemCheckEventArgs e)
{
updateValue(e.NewValue == CheckState.Checked, e.Index);
}
private void btnClose_Click(object sender, EventArgs e)
{
_SettingsOwner.SetSelectedDwordValue(_CurrentValue);
Close();
}
private void tbFilter_TextChanged(object sender, EventArgs e)
{
SplitBitsFromUnknownSettings();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
SplitBitsFromUnknownSettings();
}
private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyValue == 13)
{
UpdateCurrent(textBox1.Text);
}
}
private void textBox1_Leave(object sender, EventArgs e)
{
UpdateCurrent(textBox1.Text);
}
private void ApplyValueToProfile(uint val)
{
DrsServiceLocator
.SettingService
.SetDwordValueToProfile(_SettingsOwner._CurrentProfile, _Settingid, val);
}
private uint GetStoredValue()
{
return DrsServiceLocator
.SettingService
.GetDwordValueFromProfile(_SettingsOwner._CurrentProfile, _Settingid);
}
private void btnDirectApply_Click(object sender, EventArgs e)
{
ApplyValueToProfile(_CurrentValue);
while (GetStoredValue() != _CurrentValue)
Application.DoEvents();
if (File.Exists(tbGamePath.Text))
{
Process.Start(tbGamePath.Text);
}
}
private void btnBrowseGame_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.DefaultExt = "*.exe";
ofd.Filter = "Applications|*.exe";
ofd.DereferenceLinks = false;
if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
tbGamePath.Text = ofd.FileName;
}
}
}
}

120
nspector/frmBitEditor.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

601
nspector/frmDrvSettings.Designer.cs generated Normal file
View File

@@ -0,0 +1,601 @@
namespace nspector
{
partial class frmDrvSettings
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDrvSettings));
this.ilListView = new System.Windows.Forms.ImageList(this.components);
this.pbMain = new System.Windows.Forms.ProgressBar();
this.tsMain = new System.Windows.Forms.ToolStrip();
this.tslProfiles = new System.Windows.Forms.ToolStripLabel();
this.cbProfiles = new System.Windows.Forms.ToolStripComboBox();
this.tsbModifiedProfiles = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.tsbRefreshProfile = new System.Windows.Forms.ToolStripButton();
this.tsbRestoreProfile = new System.Windows.Forms.ToolStripButton();
this.tsbCreateProfile = new System.Windows.Forms.ToolStripButton();
this.tsbDeleteProfile = new System.Windows.Forms.ToolStripButton();
this.tsSep2 = new System.Windows.Forms.ToolStripSeparator();
this.tsbAddApplication = new System.Windows.Forms.ToolStripButton();
this.tssbRemoveApplication = new System.Windows.Forms.ToolStripSplitButton();
this.tsSep3 = new System.Windows.Forms.ToolStripSeparator();
this.tsbExportProfiles = new System.Windows.Forms.ToolStripSplitButton();
this.exportUserdefinedProfilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportCurrentProfileOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tsbImportProfiles = new System.Windows.Forms.ToolStripSplitButton();
this.importProfilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importAllProfilesNVIDIATextFormatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tsSep4 = new System.Windows.Forms.ToolStripSeparator();
this.tscbShowCustomSettingNamesOnly = new System.Windows.Forms.ToolStripButton();
this.tsSep5 = new System.Windows.Forms.ToolStripSeparator();
this.tscbShowScannedUnknownSettings = new System.Windows.Forms.ToolStripButton();
this.tsbBitValueEditor = new System.Windows.Forms.ToolStripButton();
this.tsSep6 = new System.Windows.Forms.ToolStripSeparator();
this.tsbApplyProfile = new System.Windows.Forms.ToolStripButton();
this.btnResetValue = new System.Windows.Forms.Button();
this.lblApplications = new System.Windows.Forms.Label();
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.ilCombo = new System.Windows.Forms.ImageList(this.components);
this.cbValues = new System.Windows.Forms.ComboBox();
this.lblWidth96 = new System.Windows.Forms.Label();
this.lblWidth330 = new System.Windows.Forms.Label();
this.lblWidth16 = new System.Windows.Forms.Label();
this.lblWidth30 = new System.Windows.Forms.Label();
this.lvSettings = new nspector.ListViewEx();
this.chSettingID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chSettingValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chSettingValueHex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tsMain.SuspendLayout();
this.SuspendLayout();
//
// ilListView
//
this.ilListView.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilListView.ImageStream")));
this.ilListView.TransparentColor = System.Drawing.Color.Transparent;
this.ilListView.Images.SetKeyName(0, "0_gear2.png");
this.ilListView.Images.SetKeyName(1, "1_gear2_2.png");
this.ilListView.Images.SetKeyName(2, "4_gear_nv2.png");
this.ilListView.Images.SetKeyName(3, "6_gear_inherit.png");
//
// pbMain
//
this.pbMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pbMain.Location = new System.Drawing.Point(12, 692);
this.pbMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pbMain.Name = "pbMain";
this.pbMain.Size = new System.Drawing.Size(883, 9);
this.pbMain.TabIndex = 19;
//
// tsMain
//
this.tsMain.AllowMerge = false;
this.tsMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tsMain.AutoSize = false;
this.tsMain.BackgroundImage = global::nspector.Properties.Resources.transparent16;
this.tsMain.CanOverflow = false;
this.tsMain.Dock = System.Windows.Forms.DockStyle.None;
this.tsMain.GripMargin = new System.Windows.Forms.Padding(0);
this.tsMain.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.tsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tslProfiles,
this.cbProfiles,
this.tsbModifiedProfiles,
this.toolStripSeparator1,
this.tsbRefreshProfile,
this.tsbRestoreProfile,
this.tsbCreateProfile,
this.tsbDeleteProfile,
this.tsSep2,
this.tsbAddApplication,
this.tssbRemoveApplication,
this.tsSep3,
this.tsbExportProfiles,
this.tsbImportProfiles,
this.tsSep4,
this.tscbShowCustomSettingNamesOnly,
this.tsSep5,
this.tscbShowScannedUnknownSettings,
this.tsbBitValueEditor,
this.tsSep6,
this.tsbApplyProfile});
this.tsMain.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.tsMain.Location = new System.Drawing.Point(12, 4);
this.tsMain.Name = "tsMain";
this.tsMain.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.tsMain.Size = new System.Drawing.Size(883, 25);
this.tsMain.TabIndex = 24;
this.tsMain.Text = "toolStrip1";
//
// tslProfiles
//
this.tslProfiles.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tslProfiles.Margin = new System.Windows.Forms.Padding(0, 5, 10, 2);
this.tslProfiles.Name = "tslProfiles";
this.tslProfiles.Size = new System.Drawing.Size(49, 18);
this.tslProfiles.Text = "Profiles:";
//
// cbProfiles
//
this.cbProfiles.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.cbProfiles.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbProfiles.AutoSize = false;
this.cbProfiles.DropDownWidth = 290;
this.cbProfiles.Margin = new System.Windows.Forms.Padding(1);
this.cbProfiles.MaxDropDownItems = 50;
this.cbProfiles.Name = "cbProfiles";
this.cbProfiles.Size = new System.Drawing.Size(290, 23);
this.cbProfiles.SelectedIndexChanged += new System.EventHandler(this.cbProfiles_SelectedIndexChanged);
this.cbProfiles.TextChanged += new System.EventHandler(this.cbProfiles_TextChanged);
//
// tsbModifiedProfiles
//
this.tsbModifiedProfiles.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbModifiedProfiles.Enabled = false;
this.tsbModifiedProfiles.Image = global::nspector.Properties.Resources.home_sm;
this.tsbModifiedProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbModifiedProfiles.Name = "tsbModifiedProfiles";
this.tsbModifiedProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbModifiedProfiles.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
this.tsbModifiedProfiles.ToolTipText = "Back to global profile (Home) / User modified profiles";
this.tsbModifiedProfiles.ButtonClick += new System.EventHandler(this.tsbModifiedProfiles_ButtonClick);
this.tsbModifiedProfiles.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.tsbModifiedProfiles_DropDownItemClicked);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// tsbRefreshProfile
//
this.tsbRefreshProfile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbRefreshProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbRefreshProfile.Image")));
this.tsbRefreshProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRefreshProfile.Name = "tsbRefreshProfile";
this.tsbRefreshProfile.Size = new System.Drawing.Size(24, 22);
this.tsbRefreshProfile.Text = "Refresh current profile.";
this.tsbRefreshProfile.Click += new System.EventHandler(this.tsbRefreshProfile_Click);
//
// tsbRestoreProfile
//
this.tsbRestoreProfile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbRestoreProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbRestoreProfile.Image")));
this.tsbRestoreProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRestoreProfile.Name = "tsbRestoreProfile";
this.tsbRestoreProfile.Size = new System.Drawing.Size(24, 22);
this.tsbRestoreProfile.Text = "Restore current profile to NVIDIA defaults.";
this.tsbRestoreProfile.Click += new System.EventHandler(this.tsbRestoreProfile_Click);
//
// tsbCreateProfile
//
this.tsbCreateProfile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbCreateProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbCreateProfile.Image")));
this.tsbCreateProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbCreateProfile.Name = "tsbCreateProfile";
this.tsbCreateProfile.Size = new System.Drawing.Size(24, 22);
this.tsbCreateProfile.Text = "Create new profile";
this.tsbCreateProfile.Click += new System.EventHandler(this.tsbCreateProfile_Click);
//
// tsbDeleteProfile
//
this.tsbDeleteProfile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbDeleteProfile.Image = global::nspector.Properties.Resources.ieframe_1_18212;
this.tsbDeleteProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbDeleteProfile.Name = "tsbDeleteProfile";
this.tsbDeleteProfile.Size = new System.Drawing.Size(24, 22);
this.tsbDeleteProfile.Text = "Delete current Profile";
this.tsbDeleteProfile.Click += new System.EventHandler(this.tsbDeleteProfile_Click);
//
// tsSep2
//
this.tsSep2.Name = "tsSep2";
this.tsSep2.Size = new System.Drawing.Size(6, 25);
//
// tsbAddApplication
//
this.tsbAddApplication.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbAddApplication.Image = global::nspector.Properties.Resources.window_application_add;
this.tsbAddApplication.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbAddApplication.Name = "tsbAddApplication";
this.tsbAddApplication.Size = new System.Drawing.Size(24, 22);
this.tsbAddApplication.Text = "Add application to current profile.";
this.tsbAddApplication.Click += new System.EventHandler(this.tsbAddApplication_Click);
//
// tssbRemoveApplication
//
this.tssbRemoveApplication.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tssbRemoveApplication.Image = global::nspector.Properties.Resources.window_application_delete;
this.tssbRemoveApplication.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tssbRemoveApplication.Name = "tssbRemoveApplication";
this.tssbRemoveApplication.Size = new System.Drawing.Size(36, 22);
this.tssbRemoveApplication.Text = "Remove application from current profile";
this.tssbRemoveApplication.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.tssbRemoveApplication_DropDownItemClicked);
this.tssbRemoveApplication.Click += new System.EventHandler(this.tssbRemoveApplication_Click);
//
// tsSep3
//
this.tsSep3.Name = "tsSep3";
this.tsSep3.Size = new System.Drawing.Size(6, 25);
//
// tsbExportProfiles
//
this.tsbExportProfiles.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbExportProfiles.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exportUserdefinedProfilesToolStripMenuItem,
this.exportCurrentProfileOnlyToolStripMenuItem,
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem});
this.tsbExportProfiles.Image = global::nspector.Properties.Resources.export1;
this.tsbExportProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbExportProfiles.Name = "tsbExportProfiles";
this.tsbExportProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbExportProfiles.Text = "Export user defined profiles";
this.tsbExportProfiles.Click += new System.EventHandler(this.tsbExportProfiles_Click);
//
// exportUserdefinedProfilesToolStripMenuItem
//
this.exportUserdefinedProfilesToolStripMenuItem.Name = "exportUserdefinedProfilesToolStripMenuItem";
this.exportUserdefinedProfilesToolStripMenuItem.Size = new System.Drawing.Size(312, 22);
this.exportUserdefinedProfilesToolStripMenuItem.Text = "Export all customized profiles";
this.exportUserdefinedProfilesToolStripMenuItem.Click += new System.EventHandler(this.exportUserdefinedProfilesToolStripMenuItem_Click);
//
// exportCurrentProfileOnlyToolStripMenuItem
//
this.exportCurrentProfileOnlyToolStripMenuItem.Name = "exportCurrentProfileOnlyToolStripMenuItem";
this.exportCurrentProfileOnlyToolStripMenuItem.Size = new System.Drawing.Size(312, 22);
this.exportCurrentProfileOnlyToolStripMenuItem.Text = "Export current profile only";
this.exportCurrentProfileOnlyToolStripMenuItem.Click += new System.EventHandler(this.exportCurrentProfileOnlyToolStripMenuItem_Click);
//
// exportAllProfilesNVIDIATextFormatToolStripMenuItem
//
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Name = "exportAllProfilesNVIDIATextFormatToolStripMenuItem";
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(312, 22);
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Text = "Export all driver profiles (NVIDIA Text Format)";
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Click += new System.EventHandler(this.exportAllProfilesNVIDIATextFormatToolStripMenuItem_Click);
//
// tsbImportProfiles
//
this.tsbImportProfiles.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbImportProfiles.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.importProfilesToolStripMenuItem,
this.importAllProfilesNVIDIATextFormatToolStripMenuItem});
this.tsbImportProfiles.Image = global::nspector.Properties.Resources.import1;
this.tsbImportProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbImportProfiles.Name = "tsbImportProfiles";
this.tsbImportProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbImportProfiles.Text = "Import user defined profiles";
this.tsbImportProfiles.Click += new System.EventHandler(this.tsbImportProfiles_Click);
//
// importProfilesToolStripMenuItem
//
this.importProfilesToolStripMenuItem.Name = "importProfilesToolStripMenuItem";
this.importProfilesToolStripMenuItem.Size = new System.Drawing.Size(364, 22);
this.importProfilesToolStripMenuItem.Text = "Import profile(s)";
this.importProfilesToolStripMenuItem.Click += new System.EventHandler(this.importProfilesToolStripMenuItem_Click);
//
// importAllProfilesNVIDIATextFormatToolStripMenuItem
//
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Name = "importAllProfilesNVIDIATextFormatToolStripMenuItem";
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(364, 22);
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Text = "Import (replace) all driver profiles (NVIDIA Text Format)";
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Click += new System.EventHandler(this.importAllProfilesNVIDIATextFormatToolStripMenuItem_Click);
//
// tsSep4
//
this.tsSep4.Name = "tsSep4";
this.tsSep4.Size = new System.Drawing.Size(6, 25);
//
// tscbShowCustomSettingNamesOnly
//
this.tscbShowCustomSettingNamesOnly.CheckOnClick = true;
this.tscbShowCustomSettingNamesOnly.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tscbShowCustomSettingNamesOnly.Image = global::nspector.Properties.Resources.filter_user;
this.tscbShowCustomSettingNamesOnly.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tscbShowCustomSettingNamesOnly.Name = "tscbShowCustomSettingNamesOnly";
this.tscbShowCustomSettingNamesOnly.Size = new System.Drawing.Size(24, 22);
this.tscbShowCustomSettingNamesOnly.Text = "Show the settings and values from CustomSettingNames file only.";
this.tscbShowCustomSettingNamesOnly.CheckedChanged += new System.EventHandler(this.cbCustomSettingsOnly_CheckedChanged);
//
// tsSep5
//
this.tsSep5.Name = "tsSep5";
this.tsSep5.Size = new System.Drawing.Size(6, 25);
//
// tscbShowScannedUnknownSettings
//
this.tscbShowScannedUnknownSettings.CheckOnClick = true;
this.tscbShowScannedUnknownSettings.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tscbShowScannedUnknownSettings.Enabled = false;
this.tscbShowScannedUnknownSettings.Image = global::nspector.Properties.Resources.find_set2;
this.tscbShowScannedUnknownSettings.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tscbShowScannedUnknownSettings.Name = "tscbShowScannedUnknownSettings";
this.tscbShowScannedUnknownSettings.Size = new System.Drawing.Size(24, 22);
this.tscbShowScannedUnknownSettings.Text = "Show unknown settings from NVIDIA predefined profiles";
this.tscbShowScannedUnknownSettings.Click += new System.EventHandler(this.tscbShowScannedUnknownSettings_Click);
//
// tsbBitValueEditor
//
this.tsbBitValueEditor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.tsbBitValueEditor.Image = global::nspector.Properties.Resources.text_binary;
this.tsbBitValueEditor.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbBitValueEditor.Name = "tsbBitValueEditor";
this.tsbBitValueEditor.Size = new System.Drawing.Size(24, 22);
this.tsbBitValueEditor.Text = "Show bit value editor.";
this.tsbBitValueEditor.Click += new System.EventHandler(this.tsbBitValueEditor_Click);
//
// tsSep6
//
this.tsSep6.Name = "tsSep6";
this.tsSep6.Size = new System.Drawing.Size(6, 25);
//
// tsbApplyProfile
//
this.tsbApplyProfile.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsbApplyProfile.Image = global::nspector.Properties.Resources.apply;
this.tsbApplyProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbApplyProfile.Name = "tsbApplyProfile";
this.tsbApplyProfile.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
this.tsbApplyProfile.Size = new System.Drawing.Size(109, 22);
this.tsbApplyProfile.Text = "Apply changes";
this.tsbApplyProfile.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.tsbApplyProfile.Click += new System.EventHandler(this.tsbApplyProfile_Click);
//
// btnResetValue
//
this.btnResetValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnResetValue.Enabled = false;
this.btnResetValue.Image = global::nspector.Properties.Resources.nv_btn;
this.btnResetValue.Location = new System.Drawing.Point(775, 175);
this.btnResetValue.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.btnResetValue.Name = "btnResetValue";
this.btnResetValue.Size = new System.Drawing.Size(25, 19);
this.btnResetValue.TabIndex = 7;
this.btnResetValue.UseVisualStyleBackColor = true;
this.btnResetValue.Click += new System.EventHandler(this.btnResetValue_Click);
//
// lblApplications
//
this.lblApplications.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblApplications.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(185)))), ((int)(((byte)(0)))));
this.lblApplications.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lblApplications.ForeColor = System.Drawing.Color.White;
this.lblApplications.Location = new System.Drawing.Point(12, 32);
this.lblApplications.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblApplications.Name = "lblApplications";
this.lblApplications.Size = new System.Drawing.Size(883, 17);
this.lblApplications.TabIndex = 25;
this.lblApplications.Text = "fsagame.exe, bond.exe, herozero.exe";
//
// toolStripButton5
//
this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));
this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton5.Name = "toolStripButton5";
this.toolStripButton5.Size = new System.Drawing.Size(23, 22);
this.toolStripButton5.Text = "toolStripButton5";
//
// toolStripLabel2
//
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(86, 22);
this.toolStripLabel2.Text = "toolStripLabel2";
//
// toolStripButton6
//
this.toolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton6.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton6.Image")));
this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton6.Name = "toolStripButton6";
this.toolStripButton6.Size = new System.Drawing.Size(23, 22);
this.toolStripButton6.Text = "toolStripButton6";
//
// ilCombo
//
this.ilCombo.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.ilCombo.ImageSize = new System.Drawing.Size(16, 16);
this.ilCombo.TransparentColor = System.Drawing.Color.Transparent;
//
// cbValues
//
this.cbValues.BackColor = System.Drawing.SystemColors.Window;
this.cbValues.FormattingEnabled = true;
this.cbValues.Location = new System.Drawing.Point(524, 175);
this.cbValues.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.cbValues.Name = "cbValues";
this.cbValues.Size = new System.Drawing.Size(72, 21);
this.cbValues.TabIndex = 5;
this.cbValues.Visible = false;
this.cbValues.SelectedValueChanged += new System.EventHandler(this.cbValues_SelectedValueChanged);
this.cbValues.Leave += new System.EventHandler(this.cbValues_Leave);
//
// lblWidth96
//
this.lblWidth96.Location = new System.Drawing.Point(77, 233);
this.lblWidth96.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth96.Name = "lblWidth96";
this.lblWidth96.Size = new System.Drawing.Size(96, 18);
this.lblWidth96.TabIndex = 77;
this.lblWidth96.Text = "96";
this.lblWidth96.Visible = false;
//
// lblWidth330
//
this.lblWidth330.Location = new System.Drawing.Point(77, 210);
this.lblWidth330.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth330.Name = "lblWidth330";
this.lblWidth330.Size = new System.Drawing.Size(330, 22);
this.lblWidth330.TabIndex = 78;
this.lblWidth330.Text = "330 (Helper Labels for DPI Scaling)";
this.lblWidth330.Visible = false;
//
// lblWidth16
//
this.lblWidth16.Location = new System.Drawing.Point(77, 269);
this.lblWidth16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth16.Name = "lblWidth16";
this.lblWidth16.Size = new System.Drawing.Size(16, 18);
this.lblWidth16.TabIndex = 79;
this.lblWidth16.Text = "16";
this.lblWidth16.Visible = false;
//
// lblWidth30
//
this.lblWidth30.Location = new System.Drawing.Point(77, 251);
this.lblWidth30.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth30.Name = "lblWidth30";
this.lblWidth30.Size = new System.Drawing.Size(30, 18);
this.lblWidth30.TabIndex = 80;
this.lblWidth30.Text = "30";
this.lblWidth30.Visible = false;
//
// lvSettings
//
this.lvSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lvSettings.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chSettingID,
this.chSettingValue,
this.chSettingValueHex});
this.lvSettings.FullRowSelect = true;
this.lvSettings.GridLines = true;
this.lvSettings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvSettings.Location = new System.Drawing.Point(12, 51);
this.lvSettings.Margin = new System.Windows.Forms.Padding(4);
this.lvSettings.MultiSelect = false;
this.lvSettings.Name = "lvSettings";
this.lvSettings.ShowItemToolTips = true;
this.lvSettings.Size = new System.Drawing.Size(883, 635);
this.lvSettings.SmallImageList = this.ilListView;
this.lvSettings.TabIndex = 2;
this.lvSettings.UseCompatibleStateImageBehavior = false;
this.lvSettings.View = System.Windows.Forms.View.Details;
this.lvSettings.ColumnWidthChanging += new System.Windows.Forms.ColumnWidthChangingEventHandler(this.lvSettings_ColumnWidthChanging);
this.lvSettings.SelectedIndexChanged += new System.EventHandler(this.lvSettings_SelectedIndexChanged);
this.lvSettings.DoubleClick += new System.EventHandler(this.lvSettings_DoubleClick);
this.lvSettings.Resize += new System.EventHandler(this.lvSettings_Resize);
//
// chSettingID
//
this.chSettingID.Text = "SettingID";
this.chSettingID.Width = 330;
//
// chSettingValue
//
this.chSettingValue.Text = "SettingValue";
this.chSettingValue.Width = 340;
//
// chSettingValueHex
//
this.chSettingValueHex.Text = "SettingValueHex";
this.chSettingValueHex.Width = 96;
//
// frmDrvSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(907, 709);
this.Controls.Add(this.lblWidth30);
this.Controls.Add(this.lblWidth16);
this.Controls.Add(this.lblWidth330);
this.Controls.Add(this.lblWidth96);
this.Controls.Add(this.lvSettings);
this.Controls.Add(this.lblApplications);
this.Controls.Add(this.tsMain);
this.Controls.Add(this.pbMain);
this.Controls.Add(this.btnResetValue);
this.Controls.Add(this.cbValues);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MinimumSize = new System.Drawing.Size(920, 348);
this.Name = "frmDrvSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "nSpector - Driver Profile Settings";
this.Activated += new System.EventHandler(this.frmDrvSettings_Activated);
this.Load += new System.EventHandler(this.frmDrvSettings_Load);
this.Shown += new System.EventHandler(this.frmDrvSettings_Shown);
this.tsMain.ResumeLayout(false);
this.tsMain.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private ListViewEx lvSettings;
private System.Windows.Forms.ColumnHeader chSettingID;
private System.Windows.Forms.ColumnHeader chSettingValue;
private System.Windows.Forms.ColumnHeader chSettingValueHex;
private System.Windows.Forms.ImageList ilListView;
private System.Windows.Forms.ComboBox cbValues;
private System.Windows.Forms.Button btnResetValue;
private System.Windows.Forms.ProgressBar pbMain;
private System.Windows.Forms.ToolStrip tsMain;
private System.Windows.Forms.ToolStripButton tsbRestoreProfile;
private System.Windows.Forms.ToolStripButton tsbApplyProfile;
private System.Windows.Forms.ToolStripButton tsbRefreshProfile;
private System.Windows.Forms.ToolStripSeparator tsSep3;
private System.Windows.Forms.ToolStripButton tsbBitValueEditor;
private System.Windows.Forms.ToolStripSeparator tsSep6;
private System.Windows.Forms.ToolStripButton tscbShowCustomSettingNamesOnly;
private System.Windows.Forms.ToolStripSeparator tsSep5;
private System.Windows.Forms.ToolStripButton tscbShowScannedUnknownSettings;
private System.Windows.Forms.ToolStripLabel tslProfiles;
private System.Windows.Forms.Label lblApplications;
private System.Windows.Forms.ToolStripButton toolStripButton5;
private System.Windows.Forms.ToolStripLabel toolStripLabel2;
private System.Windows.Forms.ToolStripButton toolStripButton6;
private System.Windows.Forms.ToolStripSeparator tsSep2;
private System.Windows.Forms.ToolStripButton tsbDeleteProfile;
private System.Windows.Forms.ToolStripButton tsbCreateProfile;
private System.Windows.Forms.ToolStripButton tsbAddApplication;
private System.Windows.Forms.ToolStripSplitButton tssbRemoveApplication;
private System.Windows.Forms.ToolStripSeparator tsSep4;
private System.Windows.Forms.ToolStripSplitButton tsbExportProfiles;
private System.Windows.Forms.ToolStripMenuItem exportCurrentProfileOnlyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportUserdefinedProfilesToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
public System.Windows.Forms.ToolStripComboBox cbProfiles;
private System.Windows.Forms.ToolStripSplitButton tsbModifiedProfiles;
private System.Windows.Forms.ImageList ilCombo;
private System.Windows.Forms.ToolStripMenuItem exportAllProfilesNVIDIATextFormatToolStripMenuItem;
private System.Windows.Forms.ToolStripSplitButton tsbImportProfiles;
private System.Windows.Forms.ToolStripMenuItem importProfilesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importAllProfilesNVIDIATextFormatToolStripMenuItem;
private System.Windows.Forms.Label lblWidth96;
private System.Windows.Forms.Label lblWidth330;
private System.Windows.Forms.Label lblWidth16;
private System.Windows.Forms.Label lblWidth30;
}
}

1191
nspector/frmDrvSettings.cs Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,291 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ilListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>115, 17</value>
</metadata>
<data name="ilListView.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADI
DAAAAk1TRnQBSQFMAgEBBAEAAWgBBwFoAQcBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEYBgABGP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/ADMAAcgBvQGvAacBkQF5BgAD/iEA
A+QD2gYAA/4hAAGXAcMBqwFMAZwBcAYAA/4hAAOmA2gGAAP+FQAB8gHxAfABqQGPAXQBzwHHAbwD/wG6
AaUBjAGuAZQBeAHxAe8B7QHvAe0B6wGhAYgBbQHkAeAB2xIAA/UD3QPmA/8D4APeA/QD8wPaA+4SAAHt
AfIB7wE3AaEBZgGlAcwBtwP/AVgBsQGAATUBpgFoAekB8AHsAecB7wHqATwBlQFkAdQB4gHaEgAD7gNi
A7UD/wN6A2QD7APqA1oD2BIAAfMB8QHvAbwBoQGGAb4BogGHAb4BpQGIAbsBogGFAbwBogGEAagBlQGB
Aa0BlgF/Aa4BkgF3AegB5QHhEgAD9QnjBuIJ3gPwEgAB6wHyAe4BOgG1AXEBPAG2AXQBPgG3AXMBOgG1
AXEBOgG1AXEBNwGmAWoBOAGoAWsBNAGkAWcB2QHnAd8SAAPuA3MDdgN0A3EDbwNxA20DZAPeDAAB9AHz
AfIB7wHsAekB6AHiAdwByQGyAZcB0wHCAa4BzgG8AaYBzAG6AaUBzAG5AaMBywG3AaIBygG3AaIBvgGn
AY8BxgG1AaMB5AHgAdsB4wHeAdoD/wMAA/YD8wPvA+cD7AbqCekG5AbuA/8DAAHvAfQB8QHiAe4B5wHM
AeYB1wFCAcMBfAFUAckBiQFOAccBhQFLAcYBggFLAcYBggFJAcUBgQFJAcUBgQE8AbsBdQF7Ab8BmgHT
AeIB2gHTAeAB2QP/AwAD8QPnA9cDhAOgA5cDlgmTA34DlgPYA9cD/wMAAcYBswGdAb4BqAGPAcwBtQGa
AdMBvwGrAdUBxQGyAccBsAGXAcMBrAGNAb8BpgGMAb8BpwGMAcUBrwGXAcYBswGdAbsBowGJAaIBiwFx
AY0BcwFXAeEB3QHYAwAD5QPkA+gD7APtA+cD5APiA+QG5wPjA9sD1APtAwABXQHCAYoBPAG7AXUBSAHE
AYEBVAHJAYkBWAHKAYsBQgHDAXwBQAG+AXgBQAG5AXYBOwG5AXQBQAHCAXsBQwHDAX0BOgG2AXIBMQGb
AWEBLAGAAVEB0QHeAdcDAAOOA30DhwOdA6UDhQN3A3gDeQOGA40DdwNfA0MD1QMAAekB5AHeAcYBrgGU
AdUBxAGtAc0BuQGlAcoBsAGYAeUB3gHXAfgB9wH2A/oB6AHiAdwBwQGpAY4BwAGoAY4BxAGuAZUBsQGZ
AYABzwHGAb0D+wMAA+8D5gPsA+oD5gPtA/kD+wPvBuQD5gPgA+cD/AMAAc4B5wHaAUABwgF8AVUByQGJ
AUwBxgGDAUcBxAF/AcMB4wHRAfQB9wH2AfkC+gHOAeYB2QFFAbkBeQE8AbwBdgE9AcEBeQE3AawBbAGt
AcsBuwH6AvsDAAPZA4IDnQOXA4YD0QP2A/oD2AN6A3wDgwNuA7YD+wMAAfcB9gH1AcgBsAGVAd4BzAG2
AcsBtQGcAdQByQG6DAAB4gHdAdoBtwGgAY4BwwGwAaEBpQGSAYAB8AHuAewGAAP4A+cD7wboDAAD7gPj
A+gD3gPzBgAB8gH2AfQBQgHCAX0BYAHNAZEBRgHEAX8BmgHRAbMMAAHIAeMB1AE6AbYBcgFFAcQBfgE2
AaMBaAHnAe8B6gYAA/QDggOnA4oDsQwAA9gDgQOWA3ID6gMAAc0BuQGiAcsBtAGZAeMBzQG3AecB1gHD
AbsBoQGFA/oMAAP6Ab8BpgGMAcwBuQGjAbwBogGEAa4BlAF4AacBkQF5A+cD6APwA/ID4QP7DAAD+wPi
A+kD4gPeA9oBXgHJAY4BRQHEAX4BYwHOAZMBbAHQAZkBPAG0AXMB+QL6DAAB+QL6AUABuQF2AUsBxgGC
AToBtQFxATUBpgFoAUwBnAFwA5IDhgOnA7YDcwP5DAAD+gN4A5MDbwNkA2gB1wHJAbgBzwG4AaIB5gHR
Ab0B7AHbAcoBugGhAYUC+QH4DAAB+AH3AfYBwwGsAY0BzAG6AaUBuwGiAYUBugGlAYwByAG9Aa8D6QPn
A/ED9APhA/oMAAP5A+QD6gPiA+AD5AGKAdMBqwFXAccBigFoAc8BlgFyAdIBnQE8AbIBcAH4AfkB+AwA
AfQB9wH2AUABvgF4AUsBxgGCAToBtQFxAVgBsQGAAZcBwwGrA6wDkgOvA74DcQP4DAAD9gN3A5YDcQN6
A6YDAAP7AdwByQGzAewB3AHLAccBswGaAc4BxAG5DAAB5QHeAdcBxwGwAZcBzgG8AaYBvgGlAYgD/wYA
A/sD7QP0A+cD5QwAA+0D5wPqA+MD/wYAAfoC+wFeAcwBjwFyAdIBnQFCAcMBfAGoAckBtgwAAcMB4wHR
AUIBwwF8AU4BxwGFAT4BtwFzA/8GAAP7A6MDvwOIA7IMAAPRA4UDlwN0A/8GAAHxAe8B7AHZAcQBrQHv
Ad8BzgHfAc0BuwG2AaEBhQHOAcQBuQL5AfgD+gHUAckBugHKAbABmAHVAcUBsgHTAcIBrgG+AaIBhwHP
AccBvAYAA/QD7QP1A/AD4QPlA/oD+wPoA+YD7QPsA+MD5gYAAeUB8QHqAVkBygGNAXcB1AGhAWMBzgGT
ATwBsQFwAagByQG2AfgB+QH4AfkC+gGaAdEBswFHAcQBfwFYAcoBiwFUAckBiQE8AbYBdAGlAcwBtwYA
A+oDmwPCA64DcQOyA/gD+QOxA4YDpQOgA3YDtQYAAdYBxgGyAdABuAGdAdsBxQGwAfIB4gHSAeABzwG8
AccBswGaAboBoQGFAbsBoQGFAcsBtQGcAc0BuQGlAdMBvwGrAckBsgGXAbwBoQGGAakBjwF0BgAD6APp
A+wD9gPwA+cG4QPoA+oD7APnA+MD3QYAAXsB0QGhAUkBxQGBAV0BywGOAXsB1QGkAWQBzgGUAUIBwwF8
ATwBsgFwATwBtAFzAUYBxAF/AUwBxgGDAVQByQGJAUIBwwF8AToBtQFxATcBoQFmBgADowOKA6ADxwOv
A4gDcQNzA4oDlwOdA4QDcwNiBgAB8wHxAe8B8AHtAeoB8QHuAesB4gHOAboB7gHfAc0B7AHcAcsB7AHb
AcoB5wHWAcMB3gHMAbYB1QHEAa0BzAG1AZoB6AHiAdwB8wHxAe8B8gHxAfAGAAP1A/ID8wPwA/UG9APy
A+8D7APoA+8G9QYAAeoB8wHuAeEB7wHnAeMB8AHoAWQBzgGUAXUB0wGfAXIB0gGdAXIB0gGdAWwB0AGZ
AWABzQGRAVUByQGJAUgBxAGBAcwB5gHXAesB8gHuAe0B8gHvBgAD7gPoA+kDrAPAA78DvgO2A6cDnQOH
A9cG7gwAAfQB8wHxAdUBwAGnAdkBwwGqAdwByQGzAeYB0QG9AeMBzQG3AcgBsAGVAcYBrgGUAb4BqAGP
Ae8B7AHpEgAD9gPrA+wD7QPxA/AD5wPmA+QD8xIAAe0B9AHwAVIByAGHAVcByQGJAV4BzAGPAWgBzwGW
AWMBzgGTAUIBwgF9AUABwgF8ATwBuwF1AeIB7gHnEgAD8AOVA5gDowOvA6cGggN9A+cSAAH1AfQB8gHQ
Ab0BpAHgAdYBzAP7Ac8BuAGiAcsBtAGZAfcB9gH1AekB5AHeAcYBswGdAfQB8wHyEgAD9gPpA+sD+wPn
A+gD+APvA+UD9hIAAe4B9QHxAVsByQGNAasB3QHCAfoC+wFXAccBigFFAcQBfgHyAfYB9AHOAecB2gFd
AcIBigHvAfQB8RIAA/EDkgPEA/sDkgOGA/QD2QOOA/EVAAH9AvwD/gMAAdcByQG4Ac0BuQGiIQAD/QP+
AwAD6QPnIQAD/AP+AwABigHTAasBXgHJAY4hAAP8A/4DAAOsA5IVAAFCAU0BPgcAAT4DAAEoAwABQAMA
ASADAAEBAQABAQYAAQEWAAP/gQAB/gFvAf4BbwH+AW8B/gFvAeABBwHgAQcB4AEHAeABBwHgAQcB4AEH
AeABBwHgAQcBgAEAAYABAAGAAQABgAEAAYABAAGAAQABgAEAAYABAAGAAQABgAEAAYABAAGAAQABgwHB
AYMBwQGDAcEBgwHBAQMBwAEDAcABAwHAAQMBwAEDAcABAwHAAQMBwAEDAcABgwHBAYMBwQGDAcEBgwHB
AYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAeABBwHgAQcB4AEH
AeABBwHgAQcB4AEHAeABBwHgAQcB8gF/AfIBfwHyAX8B8gF/Cw==
</value>
</data>
<metadata name="pbMain.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tsMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>217, 17</value>
</metadata>
<metadata name="tsMain.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbRefreshProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVDhPrZPLSsNAFIb7BoKP4Upw5UoQBHfmMrG1olCa
pFoExY2KiHcRERFEwYUKglSQesFeQK2rFkFr0Y26MRAKpa2+QS+/MzGpaS114wdhQv7/nDknZ8bx7xDi
a+FFeYvnFU2QFHCcRxdEOcQTmTctjWHB4UgM2Wwe5XIZ+fwnko/PWF3bhiAqJzRRp2mtD0/U7oWlTbAK
Bj1jYO/vmo5SqYR44gG9fcPgiNpu2uvDkrCVEG+zIMkqcfqQuEuiWCwidhsHJ8qHhtEOLX2H9cxW81MF
nni7XP1+5PIfKBQKmJlbR1UrVnAul0O9JJa+fxAwPJehqx+fPdh6apPU6nZfY9Gk4SaWGDwN09FlsUfL
rIg2LB/z/NI5SW4bHZ9FJpPBy+sbnG4//Unfk7BjJalNbsBGEzwLIZ1OIxK9AXGqdCdZlSS1iel/HiB2
OCTXEM4vItB1nc79HpPTK3APjBiHamJquXp09eCI0sGJyvH84gat4hqp1BM0TUMymcJRIEhLV3ZNa2ME
4nXSCxQ1LhLrmVbAgnskudW0/BcOxxdQeE7WHAMG/AAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbRestoreProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFcSURBVDhP3VFNK0RhFL4/wNbM3PdcCgsfsbHDgkJKWPgD
ilJGNN73XEs/gbKUmvITuPc9d5iwYKfZyULZ26BkhTjnnXs1TWTNqafOx/M895z3ev84FsrwigQfvyGl
1yNM1IyO4cQNrUKdqGFj1awmuGgWZnDC9Wouz8U1xnATkj+oE78HLVyWKPeAlH9EUkOa1FyzWOAxeVIS
JuxtRoVeERhS51zviLlsIHNjYRltW1ejWOChDdbqhEIfRoVbE0PZbXXoP3G/ygZFNyeYZ4xlwgzC9fAI
7rmomUrQL01TyXekPUfSVo3zSSVXW3Ug75PNnEEpau+Uglff5XsnOH9D8reZuBJamOa6JvPQqkXhF89a
W9jw+MtAIiTVjRE88+AKY3/E5fKVGO74jC3hbMTBAPf2XT+FEzcGb7BqrH/KWNIUTLk34LX5V740Cn80
yGKU4P07QTNS+t8Nz/sEkToIpLSWKNoAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbCreateProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhP3Y/PKwRhHIf3f5g/wMWUlIuDUk5y5MCB3Dk4
7EUbBwdXJ3EXsksjidlk2x27NrXt5kdjlTQXbSFK2iaGaX7s491Zjppx5FNP7/et9/n0fmP/PFwu8JGd
5OsaLdxpNIyVQPL1GcyDwWDmVsEx1sLLGvdHeLtduKVh/GIPTlbGPRvF3mmjXm0Vh8a9SEBGAl1gCMoS
j2p/uOyX5/AK4/i5bqgI8UrQPFUJO9mOr43gHk/9XOToy9QLCd4O+yAvxCb7gg0JK9WJqcWxTubDf+Kd
x0ERYkqwLliVeE8PRNufWhpnUxY7j2Fu92IlO3jOT+AqMk+lxfAS+6HI6/VW8NA5neVlb6g11zLcVNRo
v/gO1SXM3PTvpL+WWOwT04jC5H73kgIAAAAASUVORK5CYII=
</value>
</data>
<metadata name="btnResetValue.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblApplications.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="ilCombo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="cbValues.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblWidth96.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblWidth330.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblWidth16.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lblWidth30.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="lvSettings.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

171
nspector/frmExportProfiles.Designer.cs generated Normal file
View File

@@ -0,0 +1,171 @@
namespace nspector
{
partial class frmExportProfiles
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lvProfiles = new System.Windows.Forms.ListView();
this.chProfileName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lProfiles = new System.Windows.Forms.Label();
this.btnExport = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnSelAll = new System.Windows.Forms.Button();
this.btnSelNone = new System.Windows.Forms.Button();
this.btnInvertSelection = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lvProfiles
//
this.lvProfiles.CheckBoxes = true;
this.lvProfiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chProfileName});
this.lvProfiles.FullRowSelect = true;
this.lvProfiles.GridLines = true;
this.lvProfiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvProfiles.Location = new System.Drawing.Point(18, 60);
this.lvProfiles.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.lvProfiles.MultiSelect = false;
this.lvProfiles.Name = "lvProfiles";
this.lvProfiles.Size = new System.Drawing.Size(688, 595);
this.lvProfiles.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.lvProfiles.TabIndex = 0;
this.lvProfiles.UseCompatibleStateImageBehavior = false;
this.lvProfiles.View = System.Windows.Forms.View.Details;
this.lvProfiles.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvProfiles_ItemChecked);
//
// chProfileName
//
this.chProfileName.Text = "ProfileName";
this.chProfileName.Width = 420;
//
// lProfiles
//
this.lProfiles.AutoSize = true;
this.lProfiles.Location = new System.Drawing.Point(14, 18);
this.lProfiles.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lProfiles.Name = "lProfiles";
this.lProfiles.Size = new System.Drawing.Size(273, 20);
this.lProfiles.TabIndex = 1;
this.lProfiles.Text = "Select the profiles you want to export:";
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnExport.Enabled = false;
this.btnExport.Location = new System.Drawing.Point(596, 666);
this.btnExport.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(112, 35);
this.btnExport.TabIndex = 2;
this.btnExport.Text = "Export";
this.btnExport.UseVisualStyleBackColor = true;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.Location = new System.Drawing.Point(474, 666);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(112, 35);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSelAll
//
this.btnSelAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSelAll.Location = new System.Drawing.Point(18, 666);
this.btnSelAll.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnSelAll.Name = "btnSelAll";
this.btnSelAll.Size = new System.Drawing.Size(112, 35);
this.btnSelAll.TabIndex = 4;
this.btnSelAll.Text = "Select All";
this.btnSelAll.UseVisualStyleBackColor = true;
this.btnSelAll.Click += new System.EventHandler(this.btnSelAll_Click);
//
// btnSelNone
//
this.btnSelNone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSelNone.Location = new System.Drawing.Point(140, 666);
this.btnSelNone.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnSelNone.Name = "btnSelNone";
this.btnSelNone.Size = new System.Drawing.Size(112, 35);
this.btnSelNone.TabIndex = 4;
this.btnSelNone.Text = "Select None";
this.btnSelNone.UseVisualStyleBackColor = true;
this.btnSelNone.Click += new System.EventHandler(this.btnSelNone_Click);
//
// btnInvertSelection
//
this.btnInvertSelection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnInvertSelection.Location = new System.Drawing.Point(261, 666);
this.btnInvertSelection.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnInvertSelection.Name = "btnInvertSelection";
this.btnInvertSelection.Size = new System.Drawing.Size(150, 35);
this.btnInvertSelection.TabIndex = 4;
this.btnInvertSelection.Text = "Invert Selection";
this.btnInvertSelection.UseVisualStyleBackColor = true;
this.btnInvertSelection.Click += new System.EventHandler(this.btnInvertSelection_Click);
//
// frmExportProfiles
//
this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(726, 720);
this.Controls.Add(this.btnInvertSelection);
this.Controls.Add(this.btnSelNone);
this.Controls.Add(this.btnSelAll);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnExport);
this.Controls.Add(this.lProfiles);
this.Controls.Add(this.lvProfiles);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmExportProfiles";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "frmExportProfiles";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView lvProfiles;
private System.Windows.Forms.ColumnHeader chProfileName;
private System.Windows.Forms.Label lProfiles;
private System.Windows.Forms.Button btnExport;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSelAll;
private System.Windows.Forms.Button btnSelNone;
private System.Windows.Forms.Button btnInvertSelection;
}
}

View File

@@ -0,0 +1,120 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.Helper;
using nspector.Common.Import;
namespace nspector
{
internal partial class frmExportProfiles : Form
{
frmDrvSettings settingsOwner = null;
internal frmExportProfiles()
{
InitializeComponent();
this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
this.DoubleBuffered = true;
}
internal void ShowDialog(frmDrvSettings SettingsOwner)
{
settingsOwner = SettingsOwner;
Text = "Profile Export";
updateProfileList();
this.ShowDialog();
}
private void updateProfileList()
{
lvProfiles.Items.Clear();
if (settingsOwner != null)
{
foreach(string mp in DrsServiceLocator.ScannerService.ModifiedProfiles)
{
lvProfiles.Items.Add(mp);
}
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnSelAll_Click(object sender, EventArgs e)
{
for(int i=0;i<lvProfiles.Items.Count;i++)
{
lvProfiles.Items[i].Checked = true;
}
}
private void btnSelNone_Click(object sender, EventArgs e)
{
for (int i = 0; i < lvProfiles.Items.Count; i++)
{
lvProfiles.Items[i].Checked = false;
}
}
private void btnInvertSelection_Click(object sender, EventArgs e)
{
for (int i = 0; i < lvProfiles.Items.Count; i++)
{
lvProfiles.Items[i].Checked = !lvProfiles.Items[i].Checked;
}
}
private void btnExport_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.DefaultExt = "*.nip";
sfd.Filter = Application.ProductName + " Profiles|*.nip";
if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
var profileNamesToExport = new List<string>();
for (int i = 0; i < lvProfiles.Items.Count; i++)
{
if (lvProfiles.Items[i].Checked)
{
profileNamesToExport.Add(lvProfiles.Items[i].Text);
}
}
DrsServiceLocator.ImportService.ExportProfiles(profileNamesToExport, sfd.FileName, false);
if (profileNamesToExport.Count > 0)
{
if (MessageBox.Show("Export succeeded.\r\n\r\nWould you like to continue exporting profiles?", "Profiles Export", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No)
Close();
}
else
MessageBox.Show("Nothing to export");
}
}
private void lvProfiles_ItemChecked(object sender, ItemCheckedEventArgs e)
{
int cc = 0;
for (int i = 0; i < lvProfiles.Items.Count;i++ )
if (lvProfiles.Items[i].Checked)
cc++;
if (cc > 0)
btnExport.Enabled = true;
else
btnExport.Enabled = false;
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

BIN
nspector/n1.ico Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

306
nspector/nspector.csproj Normal file
View File

@@ -0,0 +1,306 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{27B20027-E783-4ADC-AF16-40A49463F4BF}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>nspector</RootNamespace>
<AssemblyName>nspector</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PlatformTarget>x86</PlatformTarget>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>false</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>default</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>n1.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>nspector.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Common\CustomSettings\CustomSetting.cs" />
<Compile Include="Common\CustomSettings\CustomSettingValue.cs" />
<Compile Include="Common\DrsScannerService.cs" />
<Compile Include="Common\DrsServiceLocator.cs" />
<Compile Include="Common\DrsSettingsMetaService.cs" />
<Compile Include="Common\DrsUtil.cs" />
<Compile Include="Common\Helper\ListViewGroupSorter.cs" />
<Compile Include="Common\Meta\NvD3dUmxSettingMetaService.cs" />
<Compile Include="Common\Meta\MetaServiceItem.cs" />
<Compile Include="Common\Meta\ConstantSettingMetaService.cs" />
<Compile Include="Common\Meta\CustomSettingMetaService.cs" />
<Compile Include="Common\Meta\DriverSettingMetaService.cs" />
<Compile Include="Common\DrsSettingsServiceBase.cs" />
<Compile Include="Common\Helper\AdminHelper.cs" />
<Compile Include="Common\Cache\CachedSettings.cs" />
<Compile Include="Common\Cache\CachedSettingValue.cs" />
<Compile Include="Common\DrsSettingsService.cs" />
<Compile Include="Common\Helper\InputBox.cs" />
<Compile Include="Common\Helper\NoBorderRenderer.cs" />
<Compile Include="Common\CustomSettings\CustomSettingNames.cs" />
<Compile Include="Common\Helper\ListSort.cs" />
<Compile Include="Common\DrsImportService.cs" />
<Compile Include="Common\Import\Profile.cs" />
<Compile Include="Common\Import\Profiles.cs" />
<Compile Include="Common\Import\ProfileSetting.cs" />
<Compile Include="Common\Meta\ISettingMetaService.cs" />
<Compile Include="Common\Meta\ScannedSettingMetaService.cs" />
<Compile Include="Common\Meta\SettingMeta.cs" />
<Compile Include="Common\Meta\SettingMetaSource.cs" />
<Compile Include="Common\Meta\SettingValue.cs" />
<Compile Include="Common\NvapiException.cs" />
<Compile Include="Common\SettingItem.cs" />
<Compile Include="Common\SettingViewMode.cs" />
<Compile Include="Native\NativeArrayHelper.cs" />
<Compile Include="Native\NVAPI\NvApiDriverSettings.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>NvApiDriverSettings.tt</DependentUpon>
</Compile>
<Compile Include="Native\NVAPI\NvapiDrsWrapper.cs" />
<Compile Include="Native\WINAPI\DragAcceptNativeHelper.cs" />
<Compile Include="Native\WINAPI\MessageHelper.cs" />
<Compile Include="Native\WINAPI\SafeNativeMethods.cs" />
<Compile Include="Native\WINAPI\ShellLink.cs" />
<Compile Include="Native\WINAPI\TaskBarList3.cs" />
<Compile Include="Common\Helper\XMLHelper.cs" />
<Compile Include="frmBitEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBitEditor.Designer.cs">
<DependentUpon>frmBitEditor.cs</DependentUpon>
</Compile>
<Compile Include="frmDrvSettings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmDrvSettings.Designer.cs">
<DependentUpon>frmDrvSettings.cs</DependentUpon>
</Compile>
<Compile Include="frmExportProfiles.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmExportProfiles.Designer.cs">
<DependentUpon>frmExportProfiles.cs</DependentUpon>
</Compile>
<Compile Include="ListViewEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmBitEditor.resx">
<DependentUpon>frmBitEditor.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmDrvSettings.resx">
<DependentUpon>frmDrvSettings.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmExportProfiles.resx">
<DependentUpon>frmExportProfiles.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="Native\NVAPI\NvApiDriverSettings.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>NvApiDriverSettings.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="CustomSettingNames.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<Content Include="Native\NVAPI\NvApiDriverSettings.h" />
<None Include="Images\transparent16.png" />
<None Include="Images\n1-016.png" />
<None Include="Images\0_gear2.png" />
<None Include="Images\1_gear2_2.png" />
<None Include="Images\4_gear_nv2.png" />
<None Include="Images\6_gear_inherit.png" />
<None Include="Images\apply.png" />
<None Include="Images\export1.png" />
<None Include="Images\filter_user.png" />
<None Include="Images\find_set2.png" />
<None Include="Images\ieframe_1_18212.png" />
<None Include="Images\ieframe_1_31073-002.png" />
<None Include="Images\import1.png" />
<None Include="Images\nv_btn.png" />
<None Include="Images\PortableDeviceStatus_3_16-011.png" />
<None Include="Images\shield.png" />
<None Include="Images\text_binary.png" />
<None Include="Images\window_application_add.png" />
<None Include="Images\window_application_delete.png" />
<Content Include="n1.ico" />
<None Include="Images\home_sm.png" />
<Content Include="Images\shield16.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<Win32Resource>
</Win32Resource>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nspector", "nspector\nspector.csproj", "{27B20027-E783-4ADC-AF16-40A49463F4BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|x64.ActiveCfg = Debug|x64
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|x64.Build.0 = Debug|x64
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|x86.ActiveCfg = Debug|x86
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|x86.Build.0 = Debug|x86
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|Any CPU.Build.0 = Release|Any CPU
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|x64.ActiveCfg = Release|x64
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|x64.Build.0 = Release|x64
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|x86.ActiveCfg = Release|x86
{27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal