├── .gitattributes ├── .gitconfig ├── .gitignore ├── AutoBuild.bat ├── LICENSE ├── NVidiaProfileInspectorDmW.sln ├── NVidiaProfileInspectorDmWPortable ├── App │ └── AppInfo │ │ ├── Launcher │ │ ├── NVidiaProfileInspectorDmWPortable.ini │ │ └── Splash.jpg │ │ ├── appicon.ico │ │ └── appinfo.ini ├── Data │ └── settings │ │ └── NVidiaProfileInspectorDmWPortableSettings.ini ├── NVidiaProfileInspectorDmWPortable.exe └── Other │ └── Source │ ├── PortableApps.comInstaller.bmp │ ├── PortableApps.comInstaller.ico │ ├── PortableApps.comInstaller.nsi │ ├── PortableApps.comInstallerConfig.nsh │ ├── PortableApps.comInstallerDriveFreeSpaceCustom.nsh │ ├── PortableApps.comInstallerDumpLogToFile.nsh │ ├── PortableApps.comInstallerLanguages │ ├── Afrikaans.nsh │ ├── Albanian.nsh │ ├── Arabic.nsh │ ├── Armenian.nsh │ ├── Asturian.nsh │ ├── Basque.nsh │ ├── Belarusian.nsh │ ├── Bosnian.nsh │ ├── Breton.nsh │ ├── Bulgarian.nsh │ ├── Catalan.nsh │ ├── Cibemba.nsh │ ├── Croatian.nsh │ ├── Czech.nsh │ ├── Danish.nsh │ ├── Dutch.nsh │ ├── Efik.nsh │ ├── English.nsh │ ├── EnglishGB.nsh │ ├── Esperanto.nsh │ ├── Estonian.nsh │ ├── Farsi.nsh │ ├── Finnish.nsh │ ├── French.nsh │ ├── Galician.nsh │ ├── Georgian.nsh │ ├── German.nsh │ ├── Greek.nsh │ ├── Hebrew.nsh │ ├── Hindi.nsh │ ├── Hungarian.nsh │ ├── Icelandic.nsh │ ├── Igbo.nsh │ ├── Indonesian.nsh │ ├── Irish.nsh │ ├── Italian.nsh │ ├── Japanese.nsh │ ├── Khmer.nsh │ ├── Korean.nsh │ ├── Kurdish.nsh │ ├── Latvian.nsh │ ├── Lithuanian.nsh │ ├── Luxembourgish.nsh │ ├── Macedonian.nsh │ ├── Malagasy.nsh │ ├── Malay.nsh │ ├── Mongolian.nsh │ ├── Norwegian.nsh │ ├── NorwegianNynorsk.nsh │ ├── Pashto.nsh │ ├── Polish.nsh │ ├── Portuguese.nsh │ ├── PortugueseBR.nsh │ ├── Romanian.nsh │ ├── Russian.nsh │ ├── Serbian.nsh │ ├── SerbianLatin.nsh │ ├── SimpChinese.nsh │ ├── Slovak.nsh │ ├── Slovenian.nsh │ ├── Spanish.nsh │ ├── SpanishInternational.nsh │ ├── Swahili.nsh │ ├── Swedish.nsh │ ├── Thai.nsh │ ├── TradChinese.nsh │ ├── Turkish.nsh │ ├── Ukrainian.nsh │ ├── Uzbek.nsh │ ├── Valencian.nsh │ ├── Vietnamese.nsh │ ├── Welsh.nsh │ └── Yoruba.nsh │ ├── PortableApps.comInstallerMoveFiles.nsh │ └── PortableApps.comInstallerTBProgress.nsh ├── README.md ├── nspector ├── Common │ ├── Cache │ │ ├── CachedSettingValue.cs │ │ └── CachedSettings.cs │ ├── CustomSettings │ │ ├── CustomSetting.cs │ │ ├── CustomSettingNames.cs │ │ └── CustomSettingValue.cs │ ├── DrsDecrypterService.cs │ ├── DrsImportService.cs │ ├── DrsScannerService.cs │ ├── DrsServiceLocator.cs │ ├── DrsSessionScope.cs │ ├── DrsSettingsMetaService.cs │ ├── DrsSettingsService.cs │ ├── DrsSettingsServiceBase.cs │ ├── DrsUtil.cs │ ├── Helper │ │ ├── AdminHelper.cs │ │ ├── InputBox.cs │ │ ├── ListSort.cs │ │ ├── ListViewGroupSorter.cs │ │ ├── NoBorderRenderer.cs │ │ ├── ShortcutResolver.cs │ │ ├── SteamAppResolver.cs │ │ └── XMLHelper.cs │ ├── Import │ │ ├── ImportExportUitl.cs │ │ ├── Profile.cs │ │ ├── ProfileSetting.cs │ │ ├── Profiles.cs │ │ └── SettingValueType.cs │ ├── Meta │ │ ├── ConstantSettingMetaService.cs │ │ ├── CustomSettingMetaService.cs │ │ ├── DriverSettingMetaService.cs │ │ ├── ISettingMetaService.cs │ │ ├── MetaServiceItem.cs │ │ ├── NvD3dUmxSettingMetaService.cs │ │ ├── ScannedSettingMetaService.cs │ │ ├── SettingMeta.cs │ │ ├── SettingMetaSource.cs │ │ └── SettingValue.cs │ ├── NvapiException.cs │ ├── SettingItem.cs │ └── SettingViewMode.cs ├── CustomSettingNames.xml ├── Images │ ├── 0_gear2.png │ ├── 1_gear2_2.png │ ├── 4_gear_nv2.png │ ├── 6_gear_inherit.png │ ├── Nvidia.ico │ ├── PortableDeviceStatus_3_16-011.png │ ├── apply.png │ ├── export1.png │ ├── filter_user.png │ ├── find_set2.png │ ├── home_sm.png │ ├── ieframe_1_18212.png │ ├── ieframe_1_31073-002.png │ ├── import1.png │ ├── n1-016.png │ ├── nv_btn.png │ ├── shield.png │ ├── shield16.ico │ ├── text_binary.png │ ├── transparent16.png │ ├── window_application_add.png │ └── window_application_delete.png ├── ListViewEx.cs ├── NVidiaProfileInspectorDmW.csproj ├── Native │ ├── NVAPI │ │ ├── NvApiDriverSettings.cs │ │ ├── NvApiDriverSettings.h │ │ ├── NvApiDriverSettings.tt │ │ └── NvapiDrsWrapper.cs │ ├── NativeArrayHelper.cs │ └── WINAPI │ │ ├── DragAcceptNativeHelper.cs │ │ ├── MessageHelper.cs │ │ ├── SafeNativeMethods.cs │ │ ├── ShellLink.cs │ │ └── TaskBarList3.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Reference.xml ├── app.config ├── app.manifest ├── dmw.cs ├── frmBitEditor.Designer.cs ├── frmBitEditor.cs ├── frmBitEditor.resx ├── frmDrvSettings.Designer.cs ├── frmDrvSettings.cs ├── frmDrvSettings.resx ├── frmExportProfiles.Designer.cs ├── frmExportProfiles.cs ├── frmExportProfiles.resx └── packages.config ├── packages ├── AutoClosingMessageBox.1.0.0.2 │ ├── AutoClosingMessageBox.1.0.0.2.nupkg │ └── lib │ │ └── net40 │ │ └── AutoClosingMessageBox.dll └── DmWPackages │ └── DeadManWalkingTO-Github └── version /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2018-2019 DeadManWalking (DeadManWalkingTO-GitHub) 2 | 3 | # Auto detect text files and perform LF normalization 4 | * text=auto 5 | 6 | # Custom for Visual Studio 7 | *.cs diff=csharp 8 | 9 | # Custom for NSIS 10 | *.nsh diff=localizablensh 11 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [diff "localizablensh"] 2 | textconv = "iconv -f utf-16 -t utf-8" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | 24 | # Visual Studio 2015 cache/options directory 25 | .vs/ 26 | # Uncomment if you have tasks that create the project's static files in wwwroot 27 | #wwwroot/ 28 | 29 | # MSTest test Results 30 | [Tt]est[Rr]esult*/ 31 | [Bb]uild[Ll]og.* 32 | 33 | # NUNIT 34 | *.VisualState.xml 35 | TestResult.xml 36 | 37 | # Build Results of an ATL Project 38 | [Dd]ebugPS/ 39 | [Rr]eleasePS/ 40 | dlldata.c 41 | 42 | # DNX 43 | project.lock.json 44 | artifacts/ 45 | 46 | *_i.c 47 | *_p.c 48 | *_i.h 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.tmp_proj 63 | *.log 64 | *.vspscc 65 | *.vssscc 66 | .builds 67 | *.pidb 68 | *.svclog 69 | *.scc 70 | 71 | # Chutzpah Test files 72 | _Chutzpah* 73 | 74 | # Visual C++ cache files 75 | ipch/ 76 | *.aps 77 | *.ncb 78 | *.opendb 79 | *.opensdf 80 | *.sdf 81 | *.cachefile 82 | 83 | # Visual Studio profiler 84 | *.psess 85 | *.vsp 86 | *.vspx 87 | *.sap 88 | 89 | # TFS 2012 Local Workspace 90 | $tf/ 91 | 92 | # Guidance Automation Toolkit 93 | *.gpState 94 | 95 | # ReSharper is a .NET coding add-in 96 | _ReSharper*/ 97 | *.[Rr]e[Ss]harper 98 | *.DotSettings.user 99 | 100 | # JustCode is a .NET coding add-in 101 | .JustCode 102 | 103 | # TeamCity is a build add-in 104 | _TeamCity* 105 | 106 | # DotCover is a Code Coverage Tool 107 | *.dotCover 108 | 109 | # NCrunch 110 | _NCrunch_* 111 | .*crunch*.local.xml 112 | nCrunchTemp_* 113 | 114 | # MightyMoose 115 | *.mm.* 116 | AutoTest.Net/ 117 | 118 | # Web workbench (sass) 119 | .sass-cache/ 120 | 121 | # Installshield output folder 122 | [Ee]xpress/ 123 | 124 | # DocProject is a documentation generator add-in 125 | DocProject/buildhelp/ 126 | DocProject/Help/*.HxT 127 | DocProject/Help/*.HxC 128 | DocProject/Help/*.hhc 129 | DocProject/Help/*.hhk 130 | DocProject/Help/*.hhp 131 | DocProject/Help/Html2 132 | DocProject/Help/html 133 | 134 | # Click-Once directory 135 | publish/ 136 | 137 | # Publish Web Output 138 | *.[Pp]ublish.xml 139 | *.azurePubxml 140 | # TODO: Comment the next line if you want to checkin your web deploy settings 141 | # but database connection strings (with potential passwords) will be unencrypted 142 | *.pubxml 143 | *.publishproj 144 | 145 | # NuGet Packages 146 | *.nupkg 147 | # The packages folder can be ignored because of Package Restore 148 | **/packages/* 149 | # except build/, which is used as an MSBuild target. 150 | !**/packages/build/ 151 | # Uncomment if necessary however generally it will be regenerated when needed 152 | #!**/packages/repositories.config 153 | # NuGet v3's project.json files produces more ignoreable files 154 | *.nuget.props 155 | *.nuget.targets 156 | 157 | # Microsoft Azure Build Output 158 | csx/ 159 | *.build.csdef 160 | 161 | # Microsoft Azure Emulator 162 | ecf/ 163 | rcf/ 164 | 165 | # Microsoft Azure ApplicationInsights config file 166 | ApplicationInsights.config 167 | 168 | # Windows Store app package directory 169 | AppPackages/ 170 | BundleArtifacts/ 171 | 172 | # Visual Studio cache files 173 | # files ending in .cache can be ignored 174 | *.[Cc]ache 175 | # but keep track of directories ending in .cache 176 | !*.[Cc]ache/ 177 | 178 | # Others 179 | ClientBin/ 180 | ~$* 181 | *~ 182 | *.dbmdl 183 | *.dbproj.schemaview 184 | *.pfx 185 | *.publishsettings 186 | node_modules/ 187 | orleans.codegen.cs 188 | 189 | # RIA/Silverlight projects 190 | Generated_Code/ 191 | 192 | # Backup & report files from converting an old project file 193 | # to a newer Visual Studio version. Backup files are not needed, 194 | # because we have git ;-) 195 | _UpgradeReport_Files/ 196 | Backup*/ 197 | UpgradeLog*.XML 198 | UpgradeLog*.htm 199 | 200 | # SQL Server files 201 | *.mdf 202 | *.ldf 203 | 204 | # Business Intelligence projects 205 | *.rdl.data 206 | *.bim.layout 207 | *.bim_*.settings 208 | 209 | # Microsoft Fakes 210 | FakesAssemblies/ 211 | 212 | # GhostDoc plugin setting file 213 | *.GhostDoc.xml 214 | 215 | # Node.js Tools for Visual Studio 216 | .ntvs_analysis.dat 217 | 218 | # Visual Studio 6 build log 219 | *.plg 220 | 221 | # Visual Studio 6 workspace options file 222 | *.opt 223 | 224 | # Visual Studio LightSwitch build output 225 | **/*.HTMLClient/GeneratedArtifacts 226 | **/*.DesktopClient/GeneratedArtifacts 227 | **/*.DesktopClient/ModelManifest.xml 228 | **/*.Server/GeneratedArtifacts 229 | **/*.Server/ModelManifest.xml 230 | _Pvt_Extensions 231 | 232 | # Paket dependency manager 233 | .paket/paket.exe 234 | 235 | # FAKE - F# Make 236 | .fake/ 237 | -------------------------------------------------------------------------------- /AutoBuild.bat: -------------------------------------------------------------------------------- 1 | rem ========== PreStart ========== 2 | @echo off 3 | chcp 65001 4 | 5 | rem Set version info 6 | set /p V= nul 50 | 51 | rem Build Project 52 | echo ================================================== 53 | echo Build %DmW_Project_Name_V% 54 | echo -------------------------------------------------- 55 | msbuild nvidiaProfileInspectorDmW.sln /verbosity:minimal /t:Rebuild /p:Configuration=Release 56 | if %ERRORLEVEL%==0 (echo. & echo Done) else (echo. & echo Fail & pause & goto :eof) 57 | echo ================================================== 58 | echo. 59 | timeout 1 > nul 60 | 61 | rem Copy Portable Folder 62 | echo ================================================== 63 | echo Copy Portable Folder 64 | echo -------------------------------------------------- 65 | xcopy "%~dp0\NVidiaProfileInspectorDmWPortable" ..\NVidiaProfileInspectorDmWPortable /E /Y 66 | if %ERRORLEVEL%==0 (echo. & echo Done) else (echo. & echo Fail & pause & goto :eof) 67 | echo ================================================== 68 | echo. 69 | timeout 1 > nul 70 | 71 | rem Copy in nvidiaProfileInspectorDmW 72 | echo ================================================== 73 | echo Copy in nvidiaProfileInspectorDmW 74 | echo -------------------------------------------------- 75 | xcopy "%~dp0\nspector\bin\Release" ..\NVidiaProfileInspectorDmW-%V%\ /E /Y 76 | if %ERRORLEVEL%==0 (echo. & echo Done) else (echo. & echo Fail & pause & goto :eof) 77 | echo ================================================== 78 | echo. 79 | timeout 1 > nul 80 | 81 | rem Copy in Portable Folde 82 | echo ================================================== 83 | echo Copy in Portable Folder 84 | echo -------------------------------------------------- 85 | xcopy "%~dp0\nspector\bin\Release" ..\NVidiaProfileInspectorDmWPortable\App\NVidiaProfileInspectorDmW\ /E /Y 86 | if %ERRORLEVEL%==0 (echo. & echo Done) else (echo. & echo Fail & pause & goto :eof) 87 | echo ================================================== 88 | echo. 89 | timeout 1 > nul 90 | 91 | rem Back to Directory 92 | echo ================================================== 93 | echo Change Directory to Home 94 | echo -------------------------------------------------- 95 | cd "%~dp0\" 96 | if %ERRORLEVEL%==0 (echo. & echo Done) else (echo. & echo Fail & pause & goto :eof) 97 | echo ================================================== 98 | echo. 99 | timeout 1 > nul 100 | 101 | rem Project was completed 102 | echo ================================================== 103 | echo %DmW_Project_Name_V% was completed successfully. 104 | echo ================================================== 105 | 106 | rem ========== End ========== 107 | 108 | endlocal 109 | pause 110 | echo. 111 | 112 | rem ========== EoF ========== 113 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Orbmu2k [Original Code] 4 | Copyright (c) 2018 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 5 | Copyright (c) 2019 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 6 | Copyright (c) 2020 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 7 | Copyright (c) 2021 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 8 | Copyright (c) 2022 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 9 | Copyright (c) 2023 DeadManWalking (DeadManWalkingTO-Github) [Modified Code] 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all 19 | copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | SOFTWARE. 28 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmW.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NVidiaProfileInspectorDmW", "nspector\NVidiaProfileInspectorDmW.csproj", "{27B20027-E783-4ADC-AF16-40A49463F4BF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {27B20027-E783-4ADC-AF16-40A49463F4BF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {27B20027-E783-4ADC-AF16-40A49463F4BF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/App/AppInfo/Launcher/NVidiaProfileInspectorDmWPortable.ini: -------------------------------------------------------------------------------- 1 | [Launch] 2 | ProgramExecutable=NVidiaProfileInspectorDmW\NVidiaProfileInspectorDmW.exe 3 | ProgramExecutable64=NVidiaProfileInspectorDmW\NVidiaProfileInspectorDmW.exe 4 | ProgramParameters= 5 | WorkingDirectory=%PAL:AppDir%\NVidiaProfileInspectorDmW 6 | DataDirectory=Data 7 | SplashScreen=enabled 8 | ExtractSources=TRUE 9 | RunAsAdmin=compile-force 10 | SplashTime=1500 11 | LaunchAppAfterSplash=true 12 | DirectoryMoveOK=yes 13 | SupportsUNC=warn 14 | 15 | [Activate] 16 | Registry=true 17 | 18 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/App/AppInfo/Launcher/Splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/App/AppInfo/Launcher/Splash.jpg -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/App/AppInfo/appicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/App/AppInfo/appicon.ico -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/App/AppInfo/appinfo.ini: -------------------------------------------------------------------------------- 1 | [Format] 2 | Type=PortableApps.comFormat 3 | Version=3.5 4 | 5 | [Details] 6 | Name=NVidiaProfileInspectorDmW Portable 7 | AppID=NVidiaProfileInspectorDmWPortable 8 | Publisher=DeadManWalkingTO 9 | Homepage=github.com/DeadManWalkingTO/NVidiaProfileInspectorDmW 10 | Category=Utilities 11 | Description=Portable App Launcher by DeadManWalkingTO 12 | 13 | Language=English 14 | Trademarks=DeadManWalkingTO-Github 15 | 16 | [License] 17 | Freeware=true 18 | 19 | [Version] 20 | PackageVersion=3.5.0.0 21 | PackageRevision=1 22 | DisplayVersion=3.5.0.0 DeadManWalkingTO 23 | 24 | [Control] 25 | Icons=1 26 | Start=NVidiaProfileInspectorDmWPortable.exe 27 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Data/settings/NVidiaProfileInspectorDmWPortableSettings.ini: -------------------------------------------------------------------------------- 1 | [NVidiaProfileInspectorDmWPortableSettings] 2 | LastDrive=D: 3 | LastDirectory=\PortableApps\NVidiaProfileInspectorDmWPortable 4 | [PortableApps.comLauncherLastRunEnvironment] 5 | PAL:LastPortableAppsBaseDir=D: 6 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/NVidiaProfileInspectorDmWPortable.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/NVidiaProfileInspectorDmWPortable.exe -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstaller.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstaller.bmp -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstaller.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstaller.ico -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerConfig.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerConfig.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerDriveFreeSpaceCustom.nsh: -------------------------------------------------------------------------------- 1 | ;NSIS' built-in DriveSpace function fails for unmapped UNC paths 2 | ;This function retrieves the free space on a local, mapped or UNC path in MB 3 | 4 | !ifndef DriveFreeSpaceCustom 5 | 6 | !define DriveFreeSpaceCustom "!insertmacro DriveFreeSpaceCustom" 7 | 8 | !macro DriveFreeSpaceCustom DRIVE_OR_UNC FREE_SPACE 9 | push `${DRIVE_OR_UNC}` 10 | call DriveFreeSpaceCustom 11 | pop `${FREE_SPACE}` 12 | !macroend 13 | 14 | Function DriveFreeSpaceCustom 15 | Exch $0 ;DRIVE_OR_UNC 16 | Push $1 ;Free space variable 17 | 18 | System::Call 'kernel32::GetDiskFreeSpaceEx(t, *l, *l, *l) i(r0,.r1,.,.)' 19 | System::Int64Op $1 / 1024 20 | Pop $1 21 | System::Int64Op $1 / 1024 22 | Pop $1 23 | 24 | Exch 25 | Pop $0 26 | Exch $1 27 | FunctionEnd 28 | 29 | !endif -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerDumpLogToFile.nsh: -------------------------------------------------------------------------------- 1 | ;http://nsis.sourceforge.net/Docs/AppendixD.html#D.4 2 | ;Define added by John T. Haller of PortableApps.com 3 | 4 | !ifndef DumpLogToFile 5 | 6 | !define DumpLogToFile "!insertmacro DumpLogToFile" 7 | !macro DumpLogToFile logfilename 8 | Delete `${logfilename}` 9 | push `${logfilename}` 10 | call DumpLog 11 | !macroend 12 | 13 | !ifndef LVM_GETITEMCOUNT 14 | !define LVM_GETITEMCOUNT 0x1004 15 | !endif 16 | !ifndef LVM_GETITEMTEXT 17 | !define LVM_GETITEMTEXT 0x1073 18 | !endif 19 | 20 | Function DumpLog 21 | Exch $5 22 | Push $0 23 | Push $1 24 | Push $2 25 | Push $3 26 | Push $4 27 | Push $6 28 | 29 | FindWindow $0 "#32770" "" $HWNDPARENT 30 | GetDlgItem $0 $0 1016 31 | StrCmp $0 0 error 32 | FileOpen $5 $5 "w" 33 | FileWriteWord $5 0xfeff ; Write the BOM 34 | StrCmp $5 0 error 35 | SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6 36 | System::StrAlloc ${NSIS_MAX_STRLEN} 37 | Pop $3 38 | StrCpy $2 0 39 | System::Call "*(i, i, i, i, i, i, i, i, i) i \ 40 | (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1" 41 | loop: StrCmp $2 $6 done 42 | System::Call "User32::SendMessageW(i, i, i, i) i \ 43 | ($0, ${LVM_GETITEMTEXT}, $2, r1)" 44 | System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)" 45 | FileWriteUTF16LE $5 "$4$\r$\n" 46 | IntOp $2 $2 + 1 47 | Goto loop 48 | done: 49 | FileClose $5 50 | System::Free $1 51 | System::Free $3 52 | Goto exit 53 | error: 54 | ;MessageBox MB_OK error 55 | exit: 56 | Pop $6 57 | Pop $4 58 | Pop $3 59 | Pop $2 60 | Pop $1 61 | Pop $0 62 | Exch $5 63 | FunctionEnd 64 | !endif -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Afrikaans.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Afrikaans.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Albanian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Albanian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Arabic.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Arabic.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Armenian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Armenian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Asturian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Asturian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Basque.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Basque.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Belarusian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Belarusian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Bosnian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Bosnian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Breton.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Breton.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Bulgarian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Bulgarian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Catalan.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Catalan.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Cibemba.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Cibemba.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Croatian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Croatian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Czech.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Czech.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Danish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Danish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Dutch.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Dutch.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Efik.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Efik.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/English.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/English.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/EnglishGB.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/EnglishGB.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Esperanto.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Esperanto.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Estonian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Estonian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Farsi.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Farsi.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Finnish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Finnish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/French.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/French.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Galician.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Galician.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Georgian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Georgian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/German.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/German.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Greek.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Greek.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hebrew.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hebrew.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hindi.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hindi.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hungarian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Hungarian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Icelandic.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Icelandic.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Igbo.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Igbo.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Indonesian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Indonesian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Irish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Irish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Italian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Italian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Japanese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Japanese.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Khmer.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Khmer.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Korean.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Korean.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Kurdish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Kurdish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Latvian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Latvian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Lithuanian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Lithuanian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Luxembourgish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Luxembourgish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Macedonian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Macedonian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Malagasy.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Malagasy.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Malay.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Malay.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Mongolian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Mongolian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Norwegian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Norwegian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/NorwegianNynorsk.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/NorwegianNynorsk.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Pashto.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Pashto.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Polish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Polish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Portuguese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Portuguese.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/PortugueseBR.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/PortugueseBR.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Romanian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Romanian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Russian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Russian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Serbian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Serbian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SerbianLatin.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SerbianLatin.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SimpChinese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SimpChinese.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Slovak.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Slovak.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Slovenian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Slovenian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Spanish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Spanish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SpanishInternational.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/SpanishInternational.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Swahili.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Swahili.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Swedish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Swedish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Thai.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Thai.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/TradChinese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/TradChinese.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Turkish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Turkish.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Ukrainian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Ukrainian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Uzbek.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Uzbek.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Valencian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Valencian.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Vietnamese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Vietnamese.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Welsh.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Welsh.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Yoruba.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerLanguages/Yoruba.nsh -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerMoveFiles.nsh: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2008, Harold E Austin Jr 2 | ; All rights reserved. 3 | ; 4 | ; Redistribution and use in source and binary forms, with or without 5 | ; modification, are permitted provided that the following conditions are met: 6 | ; * Redistributions of source code must retain the above copyright 7 | ; notice, this list of conditions and the following disclaimer. 8 | ; * Redistributions in binary form must reproduce the above copyright 9 | ; notice, this list of conditions and the following disclaimer in the 10 | ; documentation and/or other materials provided with the distribution. 11 | ; * Neither the name of the organization nor the 12 | ; names of its contributors may be used to endorse or promote products 13 | ; derived from this software without specific prior written permission. 14 | ; 15 | ; THIS SOFTWARE IS PROVIDED BY Harold E Austin Jr ``AS IS'' AND ANY 16 | ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | ; DISCLAIMED. IN NO EVENT SHALL Harold E Austin Jr BE LIABLE FOR ANY 19 | ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | /* 27 | MoveFiles.nsh -- version 1.0 (May 5, 2008) 28 | move files matching "filespec" from "source-directory" to "destination-directory" 29 | 30 | usage: 31 | !include MoveFiles.nsh 32 | 33 | ${MoveFiles} mode "filespec" "source-directory" "destination-directory" 34 | 35 | where: 36 | mode can be DOS, DIR, FORCE or DIR+FORCE (anything else = DOS): 37 | DOS means act like the DOS MOVE command (move only files) 38 | DIR means move files AND directories 39 | FORCE means overwrite destination files (like MOVE/Y) 40 | 41 | example: 42 | CreateDirectory "C:\NEW\DIR" 43 | DetailPrint "Moving files and directories..." 44 | ${MoveFiles} DIR+FORCE "*" "C:\OLD\DIR" "C:\NEW\DIR" 45 | DetailPrint `"Processing"...` 46 | Sleep 2000 47 | DetailPrint "Moving only the files back..." 48 | ${MoveFiles} DOS "*" "C:\NEW\DIR" "C:\OLD\DIR" 49 | DetailPrint "Moving the directories back..." 50 | ${MoveFiles} DIR "*" "C:\NEW\DIR" "C:\OLD\DIR" 51 | */ 52 | !ifndef MoveFiles 53 | !define MoveFiles "!insertmacro MoveFiles" 54 | !macro MoveFiles mode filespec sourcedir destdir 55 | push `${destdir}` 56 | push `${sourcedir}` 57 | push `${filespec}` 58 | push `${mode}` 59 | call MoveFiles 60 | !macroend 61 | 62 | Function MoveFiles ; mode filespec sourcedir destdir 63 | Exch $0 ; mode, directory mode 64 | Exch 65 | Exch $1 ; filespec, force mode 66 | Exch 2 67 | Exch $2 ; source directory 68 | Exch 3 69 | Exch $3 ; destination directory 70 | Push $4 ; FindFirst/FindNext search handle 71 | Push $5 ; current filename matching filespec in sourcedir 72 | FindFirst $4 $5 "$2\$1" 73 | StrCpy $1 "" ; FORCE mode disabled by default 74 | StrCmp $0 FORCE 0 +2 75 | StrCpy $1 FORCE 76 | StrCmp $0 DIR+FORCE 0 +3 77 | StrCpy $0 DIR 78 | StrCpy $1 FORCE 79 | loop: 80 | StrCmp $5 "" done ; $5 == "", if no more matching files 81 | StrCmp $5 . next 82 | StrCmp $5 .. next 83 | StrCmp $0 DIR +2 84 | ; DIR mode disabled: ignore directories that match ${filespec} 85 | IfFileExists "$2\$5\*.*" next 86 | StrCmp $1 FORCE 0 +4 87 | ; FORCE mode: make sure destination doesn't exist 88 | Delete "$3\$5" 89 | StrCmp $0 DIR 0 +2 90 | RMDir /R "$3\$5" 91 | Rename "$2\$5" "$3\$5" 92 | next: 93 | FindNext $4 $5 94 | Goto loop 95 | done: 96 | FindClose $4 ; finished with this search; close handle 97 | Pop $5 98 | Pop $4 99 | Pop $3 100 | Pop $0 101 | Pop $1 102 | Pop $2 103 | FunctionEnd 104 | !endif 105 | -------------------------------------------------------------------------------- /NVidiaProfileInspectorDmWPortable/Other/Source/PortableApps.comInstallerTBProgress.nsh: -------------------------------------------------------------------------------- 1 | !include "LogicLib.nsh" 2 | 3 | !ifndef CLSCTX_INPROC_SERVER 4 | !define CLSCTX_INPROC_SERVER 1 5 | !endif 6 | 7 | !define CLSID_ITaskbarList {56fdf344-fd6d-11d0-958a-006097c9a090} 8 | 9 | !define IID_ITaskbarList3 {ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf} 10 | !define ITaskbarList3->SetProgressState $ITaskbarList3->10 11 | !define ITaskbarList3->SetProgressValue $ITaskbarList3->9 12 | 13 | !define TBPF_NOPROGRESS 0x00000000 ; Normal state / no progress bar 14 | !define TBPF_INDETERMINATE 0x00000001 ; Marquee style progress bar 15 | !define TBPF_NORMAL 0x00000002 ; Standard progress bar 16 | !define TBPF_ERROR 0x00000004 ; Red taskbar button to indicate an error occurred 17 | !define TBPF_PAUSED 0x00000008 ; Yellow taskbar button to indicate user attention 18 | ; (input) is required to resume progress 19 | 20 | Var ITaskbarList3 21 | 22 | !macro TBProgress_Init 23 | !ifndef TBProgressInitialized 24 | !define TBProgressInitialized 25 | ${Unless} ${Silent} 26 | System::Call "ole32::CoCreateInstance( \ 27 | g '${CLSID_ITaskbarList}', \ 28 | i 0, \ 29 | i ${CLSCTX_INPROC_SERVER}, \ 30 | g '${IID_ITaskbarList3}', \ 31 | *i .s)" 32 | Pop $ITaskbarList3 33 | ${Else} 34 | StrCpy $ITaskbarList3 0 35 | ${EndIf} 36 | !endif 37 | !macroend 38 | !define TBProgress_Init `!insertmacro TBProgress_Init` 39 | 40 | !macro TBProgress_Progress Val Max 41 | ${TBProgress_Init} 42 | ${If} $ITaskbarList3 <> 0 43 | System::Call "${ITaskbarList3->SetProgressValue}(i$HWNDPARENT, l${Val}, l${Max})" 44 | ${EndIf} 45 | !macroend 46 | !define TBProgress_Progress `!insertmacro TBProgress_Progress` 47 | 48 | !macro TBProgress Val 49 | ${TBProgress_Progress} ${Val} 100 50 | !macroend 51 | !define TBProgress `!insertmacro TBProgress` 52 | 53 | !macro TBProgress_State State 54 | ${TBProgress_Init} 55 | ${If} $ITaskbarList3 <> 0 56 | System::Call "${ITaskbarList3->SetProgressState}(i$HWNDPARENT, i${TBPF_${State}})" 57 | ${EndIf} 58 | !macroend 59 | !define TBProgress_State `!insertmacro TBProgress_State` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NVidiaProfileInspectorDmW 2 | [![Hits](https://hits.sh/github.com/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg?style=plastic&label=HitCount)](../../) 3 | [![GitHub release](https://img.shields.io/github/release/DeadManWalkingTO/NVidiaProfileInspectorDmW/all.svg)](../../releases/latest) 4 | [![GitHub Release Date](https://img.shields.io/github/release-date-pre/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../releases/latest) 5 | [![GitHub top language](https://img.shields.io/github/languages/top/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../) 6 | [![GitHub language count](https://img.shields.io/github/languages/count/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../) 7 | [![GitHub repo size in bytes](https://img.shields.io/github/repo-size/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../) 8 | 9 | [![GitHub last commit](https://img.shields.io/github/last-commit/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../) 10 | [![Github commits (since latest release)](https://img.shields.io/github/commits-since/DeadManWalkingTO/NVidiaProfileInspectorDmW/latest.svg)](../../) 11 | [![GitHub stars](https://img.shields.io/github/stars/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../stargazers) 12 | [![GitHub forks](https://img.shields.io/github/forks/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../network) 13 | [![GitHub issues](https://img.shields.io/github/issues/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../issues) 14 | [![GitHub closed issues](https://img.shields.io/github/issues-closed/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](../../issues) 15 | 16 | [![DMCA Protection](https://img.shields.io/badge/DMCA-Protected-brightgreen.svg)](https://www.dmca.com/Takedowns.aspx?r=m) 17 | [![GitHub license](https://img.shields.io/github/license/DeadManWalkingTO/NVidiaProfileInspectorDmW.svg)](./LICENSE) 18 | [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](./README.md) 19 | 20 | >Nvidia GPU Profile Inspector by [DeadManWalking (DeadManWalkingTO-GitHub)](https://github.com/DeadManWalkingTO) 21 | 22 | NVidiaProfileInspectorDmW is a Fork from Orbmu2k/nvidiaProfileInspector for full optimization that increase hashrate on NVidia graphic cards. 23 | - Updated settings constants to [**R418**](https://www.nvidia.com/download/driverResults.aspx/143117/en-us). 24 | - Microsoft **.NET Framework v4.0**. 25 | - [Standalone Installer](https://www.microsoft.com/en-us/download/details.aspx?id=17718) 26 | - [Web Installer](https://www.microsoft.com/en-us/download/details.aspx?id=17851) 27 | - Supported Operating System 28 | - Windows XP SP3 29 | - Windows Vista SP1 or later 30 | - Windows 7 31 | - Windows 7 SP1 32 | - Windows 8 33 | - Windows 8.1 34 | - Windows 10 35 | - Windows Server 2003 SP2 36 | - Windows Server 2008 37 | - Windows Server 2008 R2 38 | - Windows Server 2008 R2 SP1 39 | - Windows Server 2012 40 | - Windows Server 2012 R2 41 | - Windows Server 2016 42 | - Windows Server 2019 43 | 44 | - Supported Architectures: 45 | - x86 46 | - x64 47 | 48 | - [Potrable Apps](https://portableapps.com/) Original App Format. 49 | 50 | ## Table of Contents 51 | - [Features](#features) 52 | - [Download](#download) 53 | - [Install](#install) 54 | - [Usage](#usage) 55 | - [Build](#build) 56 | - [Feedback](#feedback) 57 | - [Maintainers](#maintainers) 58 | - [Contribute](#contribute) 59 | - [License](#license) 60 | - [Donations](#donations) 61 | - [Common Issues](#common-issues) 62 | 63 | ## Features 64 | Full optimization NVidia graphic cards. 65 | 66 | Autocheck for new version since version 3.2.5.5. 67 | 68 | AutoBuild bat script. 69 | 70 | [Potrable Apps](https://portableapps.com/) Original App Format. 71 | 72 | Lots of modifications. 73 | 74 | ## Download 75 | Download [Last release here.](../../releases/latest) 76 | 77 | ## Install 78 | Standalone executable is provided in the [Releases](../../releases/latest) section. (No installation required) 79 | 80 | ## Usage 81 | Download, unzip and run NVidiaProfileInspectorDMW.exe 82 | 83 | For the best mining hashrate choose from sector "5 - Common": 84 | * CUDA - Force P2 State (Set to "Off") 85 | * Power managment mode (Set to "Prefer maximum performance") 86 | 87 | ## Build 88 | 89 | ### AutoBuild 90 | 91 | Download [Latest Master](https://github.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/archive/master.zip). 92 | 93 | Unzip using your favorite tool, for example, [7-Zip](https://www.7-zip.org/) 94 | 95 | Run AutoBuild.bat 96 | 97 | ### Classic 98 | For build needed [GIT](https://git-scm.com/downloads) (optional) and [Microsoft Build Tools 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48159) 99 | 100 | Open Command Prompt and run 101 | ``` 102 | git clone https://github.com/DeadManWalkingTO/NVidiaProfileInspectorDmW.git 103 | ``` 104 | Open Visual C++ 2015 MSBuild Command Prompt, go to NVidiaProfileInspectorDmW folder and run 105 | ``` 106 | msbuild nvidiaProfileInspectorDmW.sln /verbosity:minimal /t:Rebuild /p:Configuration=Release 107 | ``` 108 | Release files build in NVidiaProfileInspectorDmW\nspector\bin\release 109 | ``` 110 | AutoClosingMessageBox.dll 111 | NVidiaProfileInspectorDMW.exe 112 | NVidiaProfileInspectorDMW.exe.config 113 | Reference.xml 114 | ``` 115 | 116 | ### Optional 117 | Rebuild NVidiaProfileInspectorDmWPortable.exe with [PortableApps.com Launcher](https://portableapps.com/apps/development/portableapps.com_launcher) 118 | 119 | ## Feedback 120 | Please inform me for aditional Improvments. [Open an Issue](../../issues). 121 | 122 | If you like please give a [GitHub Star](../../stargazers) (it's free!). 123 | 124 | ## Maintainers 125 | [DeadManWalking (DeadManWalkingTO-GitHub)](https://github.com/DeadManWalkingTO). 126 | 127 | ## Contribute 128 | Feel free to open an [Issue](../../issues/new) or submit [Pull Requests](../../pulls). 129 | 130 | ## License 131 | Licensed under the [MIT LICENSE](./LICENSE). 132 | 133 | ## Donations 134 | 135 | Bitcoin Address (BTC): 136 | * bc1qcsh3zxlrmfmeyz38j7uzk8z2g2qtuctdtttttp 137 | 138 | Ethereum Address (ETH): 139 | * 0x5c9D5F4fC058726c2Fe76463FB21DDdfCff0bc44 140 | 141 | Monero Address (XMR): 142 | * 42q4HmXdsp1XgNCrDmPubL8ndtgG2JBtmZMEn28sB4XtEGHhwYojvB65HXPidByfNUFSzxg6ysQsHUHa3ZSrsKLX5pTkCET 143 | 144 | Aeon Address (AEON): 145 | * WmssXd9iiPCjjhfVyqYvPzhBuPKkZ5wkVXP5q8L7aYxfPJG5Z8nLyLJXUzxMeuvna9dCEBAmqBzCRWezF6AQqUS51EDJtjAYL 146 | 147 | ## Common Issues 148 | 149 | #### NVAPI_ACCESS_DENIED: 150 | Issue [#9](../../issues/9) | Status: **Solved**. 151 | #### Application window is not visible: 152 | Issue [#12](../../issues/12) | Status: **Solved**. 153 | Issue [#13](../../issues/13) | Status: **Solved**. 154 | -------------------------------------------------------------------------------- /nspector/Common/Cache/CachedSettingValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace nspector.Common 5 | { 6 | internal class CachedSettingValue 7 | { 8 | 9 | internal CachedSettingValue() { } 10 | 11 | internal CachedSettingValue(uint Value, string ProfileNames) 12 | { 13 | this.Value = Value; 14 | this.ProfileNames = new StringBuilder(ProfileNames); 15 | this.ValueProfileCount = 1; 16 | } 17 | 18 | internal CachedSettingValue(string ValueStr, string ProfileNames) 19 | { 20 | this.ValueStr = ValueStr; 21 | this.ProfileNames = new StringBuilder(ProfileNames); 22 | this.ValueProfileCount = 1; 23 | } 24 | 25 | internal CachedSettingValue(byte[] ValueBin, string ProfileNames) 26 | { 27 | this.ValueBin = ValueBin; 28 | this.ProfileNames = new StringBuilder(ProfileNames); 29 | this.ValueProfileCount = 1; 30 | } 31 | 32 | internal string ValueStr = ""; 33 | internal uint Value = 0; 34 | internal byte[] ValueBin = new byte[0]; 35 | internal StringBuilder ProfileNames; 36 | internal uint ValueProfileCount; 37 | } 38 | } -------------------------------------------------------------------------------- /nspector/Common/Cache/CachedSettings.cs: -------------------------------------------------------------------------------- 1 | using nspector.Native.NVAPI2; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace nspector.Common 6 | { 7 | internal class CachedSettings 8 | { 9 | internal CachedSettings() { } 10 | 11 | internal CachedSettings(uint settingId, NVDRS_SETTING_TYPE settingType) 12 | { 13 | SettingId = settingId; 14 | SettingType = settingType; 15 | } 16 | 17 | internal uint SettingId; 18 | 19 | internal List SettingValues = new List(); 20 | 21 | internal uint ProfileCount = 0; 22 | 23 | internal NVDRS_SETTING_TYPE SettingType = NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE; 24 | 25 | internal void AddDwordValue(uint valueDword, string Profile) 26 | { 27 | var setting = SettingValues.FirstOrDefault(s => s.Value == valueDword); 28 | if (setting == null) 29 | { 30 | SettingValues.Add(new CachedSettingValue(valueDword, Profile)); 31 | } 32 | else 33 | { 34 | setting.ProfileNames.Append(", " + Profile); 35 | setting.ValueProfileCount++; 36 | } 37 | ProfileCount++; 38 | } 39 | 40 | internal void AddStringValue(string valueStr, string Profile) 41 | { 42 | 43 | var setting = SettingValues.FirstOrDefault(s => s.ValueStr == valueStr); 44 | if (setting == null) 45 | { 46 | SettingValues.Add(new CachedSettingValue(valueStr, Profile)); 47 | } 48 | else 49 | { 50 | setting.ProfileNames.Append(", " + Profile); 51 | setting.ValueProfileCount++; 52 | } 53 | ProfileCount++; 54 | } 55 | 56 | internal void AddBinaryValue(byte[] valueBin, string Profile) 57 | { 58 | 59 | var setting = SettingValues.FirstOrDefault(s => s.ValueBin.SequenceEqual(valueBin)); 60 | if (setting == null) 61 | { 62 | SettingValues.Add(new CachedSettingValue(valueBin, Profile)); 63 | } 64 | else 65 | { 66 | setting.ProfileNames.Append(", " + Profile); 67 | setting.ValueProfileCount++; 68 | } 69 | ProfileCount++; 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /nspector/Common/CustomSettings/CustomSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Xml.Serialization; 5 | 6 | namespace nspector.Common.CustomSettings 7 | { 8 | [Serializable] 9 | public class CustomSetting 10 | { 11 | 12 | public string UserfriendlyName { get; set; } 13 | [XmlElement(ElementName = "HexSettingID")] 14 | public string HexSettingId { get; set; } 15 | public string Description { get; set; } 16 | public string GroupName { get; set; } 17 | public string OverrideDefault { get; set; } 18 | public float MinRequiredDriverVersion { get; set; } 19 | 20 | public List SettingValues { get; set; } 21 | 22 | internal uint SettingId 23 | { 24 | get { return Convert.ToUInt32(HexSettingId.Trim(), 16); } 25 | } 26 | 27 | internal uint? DefaultValue 28 | { 29 | get { return string.IsNullOrEmpty(OverrideDefault) ? null : (uint?)Convert.ToUInt32(OverrideDefault.Trim(), 16); } 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /nspector/Common/CustomSettings/CustomSettingNames.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using nspector.Common.Helper; 5 | 6 | namespace nspector.Common.CustomSettings 7 | { 8 | [Serializable] 9 | public class CustomSettingNames 10 | { 11 | public bool ShowCustomizedSettingNamesOnly = false; 12 | 13 | public List Settings = new List(); 14 | 15 | public void StoreToFile(string filename) 16 | { 17 | XMLHelper.SerializeToXmlFile(this, filename, Encoding.Unicode, true); 18 | } 19 | 20 | public static CustomSettingNames FactoryLoadFromFile(string filename) 21 | { 22 | return XMLHelper.DeserializeFromXMLFile(filename); 23 | } 24 | 25 | public static CustomSettingNames FactoryLoadFromString(string xml) 26 | { 27 | return XMLHelper.DeserializeFromXmlString(xml); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /nspector/Common/CustomSettings/CustomSettingValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | 4 | namespace nspector.Common.CustomSettings 5 | { 6 | [Serializable] 7 | public class CustomSettingValue 8 | { 9 | internal uint SettingValue 10 | { 11 | get { return Convert.ToUInt32(HexValue.Trim(), 16); } 12 | } 13 | 14 | public string UserfriendlyName { get; set; } 15 | 16 | public string HexValue { get; set; } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /nspector/Common/DrsDecrypterService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using nspector.Native.NVAPI2; 8 | 9 | namespace nspector.Common 10 | { 11 | internal class DrsDecrypterService : DrsSettingsServiceBase 12 | { 13 | 14 | private static readonly byte[] _InternalSettingsKey = new byte[] { 15 | 0x2f, 0x7c, 0x4f, 0x8b, 0x20, 0x24, 0x52, 0x8d, 0x26, 0x3c, 0x94, 0x77, 0xf3, 0x7c, 0x98, 0xa5, 16 | 0xfa, 0x71, 0xb6, 0x80, 0xdd, 0x35, 0x84, 0xba, 0xfd, 0xb6, 0xa6, 0x1b, 0x39, 0xc4, 0xcc, 0xb0, 17 | 0x7e, 0x95, 0xd9, 0xee, 0x18, 0x4b, 0x9c, 0xf5, 0x2d, 0x4e, 0xd0, 0xc1, 0x55, 0x17, 0xdf, 0x18, 18 | 0x1e, 0x0b, 0x18, 0x8b, 0x88, 0x58, 0x86, 0x5a, 0x1e, 0x03, 0xed, 0x56, 0xfb, 0x16, 0xfe, 0x8a, 19 | 0x01, 0x32, 0x9c, 0x8d, 0xf2, 0xe8, 0x4a, 0xe6, 0x90, 0x8e, 0x15, 0x68, 0xe8, 0x2d, 0xf4, 0x40, 20 | 0x37, 0x9a, 0x72, 0xc7, 0x02, 0x0c, 0xd1, 0xd3, 0x58, 0xea, 0x62, 0xd1, 0x98, 0x36, 0x2b, 0xb2, 21 | 0x16, 0xd5, 0xde, 0x93, 0xf1, 0xba, 0x74, 0xe3, 0x32, 0xc4, 0x9f, 0xf6, 0x12, 0xfe, 0x18, 0xc0, 22 | 0xbb, 0x35, 0x79, 0x9c, 0x6b, 0x7a, 0x23, 0x7f, 0x2b, 0x15, 0x9b, 0x42, 0x07, 0x1a, 0xff, 0x69, 23 | 0xfb, 0x9c, 0xbd, 0x23, 0x97, 0xa8, 0x22, 0x63, 0x8f, 0x32, 0xc8, 0xe9, 0x9b, 0x63, 0x1c, 0xee, 24 | 0x2c, 0xd9, 0xed, 0x8d, 0x3a, 0x35, 0x9c, 0xb1, 0x60, 0xae, 0x5e, 0xf5, 0x97, 0x6b, 0x9f, 0x20, 25 | 0x8c, 0xf7, 0x98, 0x2c, 0x43, 0x79, 0x95, 0x1d, 0xcd, 0x46, 0x36, 0x6c, 0xd9, 0x67, 0x20, 0xab, 26 | 0x41, 0x22, 0x21, 0xe5, 0x55, 0x82, 0xf5, 0x27, 0x20, 0xf5, 0x08, 0x07, 0x3f, 0x6d, 0x69, 0xd9, 27 | 0x1c, 0x4b, 0xf8, 0x26, 0x03, 0x6e, 0xb2, 0x3f, 0x1e, 0xe6, 0xca, 0x3d, 0x61, 0x44, 0xb0, 0x92, 28 | 0xaf, 0xf0, 0x88, 0xca, 0xe0, 0x5f, 0x5d, 0xf4, 0xdf, 0xc6, 0x4c, 0xa4, 0xe0, 0xca, 0xb0, 0x20, 29 | 0x5d, 0xc0, 0xfa, 0xdd, 0x9a, 0x34, 0x8f, 0x50, 0x79, 0x5a, 0x5f, 0x7c, 0x19, 0x9e, 0x40, 0x70, 30 | 0x71, 0xb5, 0x45, 0x19, 0xb8, 0x53, 0xfc, 0xdf, 0x24, 0xbe, 0x22, 0x1c, 0x79, 0xbf, 0x42, 0x89 }; 31 | 32 | public DrsDecrypterService(DrsSettingsMetaService metaService) : base(metaService) 33 | { 34 | CreateInternalSettingMap(); 35 | } 36 | 37 | private uint GetDwordFromKey(uint offset) 38 | { 39 | var bytes = new byte[4]; 40 | bytes[0] = _InternalSettingsKey[(offset + 0) % 256]; 41 | bytes[1] = _InternalSettingsKey[(offset + 1) % 256]; 42 | bytes[2] = _InternalSettingsKey[(offset + 2) % 256]; 43 | bytes[3] = _InternalSettingsKey[(offset + 3) % 256]; 44 | return BitConverter.ToUInt32(bytes, 0); 45 | } 46 | 47 | public uint DecryptDwordValue(uint orgValue, uint settingId) 48 | { 49 | var keyOffset = (settingId << 1); 50 | var key = GetDwordFromKey(keyOffset); 51 | return orgValue ^ key; 52 | } 53 | 54 | public string DecryptStringValue(byte[] rawData, uint settingId) 55 | { 56 | var keyOffset = (settingId << 1); 57 | for (uint i = 0; i < (uint)rawData.Length; i++) 58 | { 59 | rawData[i] ^= _InternalSettingsKey[(keyOffset + i) % 256]; 60 | } 61 | return Encoding.Unicode.GetString(rawData).Trim('\0'); 62 | } 63 | 64 | public void DecryptSettingIfNeeded(string profileName, ref NVDRS_SETTING setting) 65 | { 66 | if (setting.isPredefinedValid == 1) 67 | { 68 | if (IsInternalSetting(profileName, setting.settingId)) 69 | { 70 | if (setting.settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE) 71 | { 72 | setting.predefinedValue.stringValue = DecryptStringValue(setting.predefinedValue.rawData, setting.settingId); 73 | if (setting.isCurrentPredefined == 1) 74 | setting.currentValue.stringValue = DecryptStringValue(setting.currentValue.rawData, setting.settingId); 75 | } 76 | else if (setting.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE) 77 | { 78 | setting.predefinedValue.dwordValue = DecryptDwordValue(setting.predefinedValue.dwordValue, setting.settingId); 79 | if (setting.isCurrentPredefined == 1) 80 | setting.currentValue.dwordValue = DecryptDwordValue(setting.currentValue.dwordValue, setting.settingId); 81 | } 82 | } 83 | } 84 | } 85 | 86 | private string FormatInternalSettingKey(string profileName, uint settingId) 87 | { 88 | return profileName + settingId.ToString("X8").ToLower(); 89 | } 90 | 91 | public bool IsInternalSetting(string profileName, uint settingId) 92 | { 93 | return _InternalSettings.Contains(FormatInternalSettingKey(profileName, settingId)); 94 | } 95 | 96 | private HashSet _InternalSettings = new HashSet(); 97 | 98 | private void CreateInternalSettingMap() 99 | { 100 | string tmpfile = Path.GetTempFileName(); 101 | DrsSession((hSession) => 102 | { 103 | SaveSettingsFileEx(hSession, tmpfile); 104 | }); 105 | 106 | if (File.Exists(tmpfile)) 107 | { 108 | var lines = File.ReadAllLines(tmpfile); 109 | 110 | _InternalSettings = new HashSet(); 111 | 112 | var paProfile = "Profile\\s\\\"(?.*?)\\\""; 113 | var rxProfile = new Regex(paProfile, RegexOptions.Compiled); 114 | 115 | var paSetting = "ID_0x(?[0-9a-fA-F]+)\\s\\=.*?InternalSettingFlag\\=V0"; 116 | var rxSetting = new Regex(paSetting, RegexOptions.Compiled); 117 | 118 | var currentProfileName = ""; 119 | for (int i = 0; i < lines.Length; i++) 120 | { 121 | foreach (Match ms in rxProfile.Matches(lines[i])) 122 | { 123 | currentProfileName = ms.Result("${profileName}"); 124 | } 125 | foreach (Match ms in rxSetting.Matches(lines[i])) 126 | { 127 | _InternalSettings.Add(currentProfileName + ms.Result("${sid}")); 128 | } 129 | } 130 | 131 | File.Delete(tmpfile); 132 | } 133 | } 134 | 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /nspector/Common/DrsServiceLocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using nspector.Common.CustomSettings; 10 | 11 | using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper; 12 | 13 | namespace nspector.Common 14 | { 15 | internal class DrsServiceLocator 16 | { 17 | private static readonly CustomSettingNames CustomSettings; 18 | public static readonly CustomSettingNames ReferenceSettings; 19 | public static readonly DrsSettingsMetaService MetaService; 20 | public static readonly DrsSettingsService SettingService; 21 | public static readonly DrsImportService ImportService; 22 | public static readonly DrsScannerService ScannerService; 23 | public static readonly DrsDecrypterService DecrypterService; 24 | 25 | static DrsServiceLocator() 26 | { 27 | CustomSettings = LoadCustomSettings(); 28 | ReferenceSettings = LoadReferenceSettings(); 29 | 30 | MetaService = new DrsSettingsMetaService(CustomSettings, ReferenceSettings); 31 | DecrypterService = new DrsDecrypterService(MetaService); 32 | ScannerService = new DrsScannerService(MetaService, DecrypterService); 33 | SettingService = new DrsSettingsService(MetaService, DecrypterService); 34 | ImportService = new DrsImportService(MetaService, SettingService, ScannerService, DecrypterService); 35 | } 36 | 37 | private static CustomSettingNames LoadCustomSettings() 38 | { 39 | string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CustomSettingNames.xml"; 40 | 41 | if (File.Exists(csnDefaultPath)) 42 | return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath); 43 | else 44 | return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames); 45 | } 46 | 47 | private static CustomSettingNames LoadReferenceSettings() 48 | { 49 | string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Reference.xml"; 50 | 51 | if (File.Exists(csnDefaultPath)) 52 | return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath); 53 | 54 | return null; 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /nspector/Common/DrsSessionScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using nspector.Native.NVAPI2; 7 | using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper; 8 | 9 | namespace nspector.Common 10 | { 11 | public class DrsSessionScope 12 | { 13 | 14 | private static volatile IntPtr GlobalSession; // Modified by DeadManWalking 15 | 16 | public static volatile bool HoldSession = true; 17 | 18 | private static object _Sync = new object(); 19 | 20 | 21 | public static T DrsSession(Func action) 22 | { 23 | lock (_Sync) 24 | { 25 | if (HoldSession && (GlobalSession == IntPtr.Zero)) 26 | { 27 | 28 | #pragma warning disable CS0420 29 | var csRes = nvw.DRS_CreateSession(ref GlobalSession); 30 | #pragma warning restore CS0420 31 | 32 | if (csRes != NvAPI_Status.NVAPI_OK) 33 | throw new NvapiException("DRS_CreateSession", csRes); 34 | 35 | var nvRes = nvw.DRS_LoadSettings(GlobalSession); 36 | if (nvRes != NvAPI_Status.NVAPI_OK) 37 | throw new NvapiException("DRS_LoadSettings", nvRes); 38 | } 39 | } 40 | 41 | if (HoldSession && GlobalSession != IntPtr.Zero) 42 | { 43 | return action(GlobalSession); 44 | } 45 | 46 | return NonGlobalDrsSession(action); 47 | } 48 | 49 | public static void DestroyGlobalSession() 50 | { 51 | lock (_Sync) 52 | { 53 | if (GlobalSession != IntPtr.Zero) 54 | { 55 | var csRes = nvw.DRS_DestroySession(GlobalSession); 56 | GlobalSession = IntPtr.Zero; 57 | } 58 | } 59 | } 60 | 61 | private static T NonGlobalDrsSession(Func action) 62 | { 63 | IntPtr hSession = IntPtr.Zero; 64 | var csRes = nvw.DRS_CreateSession(ref hSession); 65 | if (csRes != NvAPI_Status.NVAPI_OK) 66 | throw new NvapiException("DRS_CreateSession", csRes); 67 | 68 | try 69 | { 70 | var nvRes = nvw.DRS_LoadSettings(hSession); 71 | if (nvRes != NvAPI_Status.NVAPI_OK) 72 | throw new NvapiException("DRS_LoadSettings", nvRes); 73 | 74 | return action(hSession); 75 | } 76 | finally 77 | { 78 | var nvRes = nvw.DRS_DestroySession(hSession); 79 | if (nvRes != NvAPI_Status.NVAPI_OK) 80 | throw new NvapiException("DRS_DestroySession", nvRes); 81 | } 82 | 83 | } 84 | 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /nspector/Common/DrsUtil.cs: -------------------------------------------------------------------------------- 1 | using nspector.Common.Meta; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace nspector.Common 9 | { 10 | public static class DrsUtil 11 | { 12 | public static string StringValueRaw = "Text"; 13 | 14 | public static string GetDwordString(uint dword) 15 | { 16 | return string.Format("0x{0:X8}", dword); 17 | } 18 | 19 | public static uint ParseDwordByInputSafe(string input) 20 | { 21 | uint result = 0; 22 | if (input.ToLower().StartsWith("0x")) 23 | { 24 | try 25 | { 26 | int blankPos = input.IndexOf(' '); 27 | int parseLen = blankPos > 2 ? blankPos - 2 : input.Length - 2; 28 | result = uint.Parse(input.Substring(2, parseLen), NumberStyles.AllowHexSpecifier); 29 | } 30 | catch { } 31 | } 32 | else 33 | try { result = uint.Parse(input); } 34 | catch { } 35 | 36 | return result; 37 | } 38 | 39 | internal static uint ParseDwordSettingValue(SettingMeta meta, string text) 40 | { 41 | var valueByName = meta.DwordValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text)); 42 | if (valueByName != null) 43 | return valueByName.Value; 44 | 45 | return ParseDwordByInputSafe(text); 46 | } 47 | 48 | internal static string GetDwordSettingValueName(SettingMeta meta, uint dwordValue) 49 | { 50 | var settingValue = meta.DwordValues 51 | .FirstOrDefault(x => x.Value.Equals(dwordValue)); 52 | 53 | return settingValue == null ? GetDwordString(dwordValue): settingValue.ValueName; 54 | } 55 | 56 | internal static string ParseStringSettingValue(SettingMeta meta, string text) 57 | { 58 | var valueByName = meta.StringValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text)); 59 | if (valueByName != null) 60 | return valueByName.Value; 61 | 62 | return text; 63 | } 64 | 65 | internal static string GetStringSettingValueName(SettingMeta meta, string stringValue) 66 | { 67 | var settingValue = meta.StringValues 68 | .FirstOrDefault(x => x.Value.Equals(stringValue)); 69 | 70 | return settingValue == null ? stringValue : settingValue.ValueName; 71 | } 72 | 73 | public static string GetBinaryString(byte[] binaryValue) 74 | { 75 | if (binaryValue == null) 76 | return ""; 77 | 78 | if (binaryValue.Length == 8) 79 | return string.Format("0x{0:X16}", BitConverter.ToUInt64(binaryValue, 0)); 80 | 81 | return BitConverter.ToString(binaryValue); 82 | } 83 | 84 | internal static string GetBinarySettingValueName(SettingMeta meta, byte[] binaryValue) 85 | { 86 | var settingValue = meta.BinaryValues? 87 | .FirstOrDefault(x => x.Value.Equals(binaryValue)); 88 | 89 | return settingValue == null ? GetBinaryString(binaryValue) : settingValue.ValueName; 90 | } 91 | 92 | internal static byte[] ParseBinarySettingValue(SettingMeta meta, string text) 93 | { 94 | var valueByName = meta.BinaryValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text)); 95 | if (valueByName != null) 96 | return valueByName.Value; 97 | 98 | return ParseBinaryByInputSafe(text); 99 | } 100 | 101 | public static byte[] ParseBinaryByInputSafe(string input) 102 | { 103 | if (string.IsNullOrWhiteSpace(input)) 104 | return null; 105 | 106 | if (input.StartsWith("0x")) 107 | { 108 | int blankPos = input.IndexOf(' '); 109 | int parseLen = blankPos > 2 ? blankPos - 2 : input.Length - 2; 110 | var qword = ulong.Parse(input.Substring(2, parseLen), NumberStyles.AllowHexSpecifier); 111 | return BitConverter.GetBytes(qword); 112 | } 113 | 114 | if (input.Contains("-")) 115 | return Array.ConvertAll(input.Split('-'), s => Convert.ToByte(s, 16)); 116 | 117 | return null; 118 | } 119 | 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /nspector/Common/Helper/AdminHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Principal; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | public static class AdminHelper 6 | { 7 | private static bool isAdmin = false; 8 | static AdminHelper() 9 | { 10 | var identity = WindowsIdentity.GetCurrent(); 11 | var principal = new WindowsPrincipal(identity); 12 | isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator); 13 | } 14 | 15 | public static bool IsAdmin 16 | { 17 | get { return isAdmin; } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /nspector/Common/Helper/InputBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Text.RegularExpressions; 5 | using System.Windows.Forms; 6 | 7 | namespace nspector.Common.Helper 8 | { 9 | internal class InputBox 10 | { 11 | internal static DialogResult Show(string title, string promptText, ref string value, List invalidInputs, string mandatoryFormatRegExPattern, int maxLength) 12 | { 13 | var form = new Form(); 14 | var label = new Label(); 15 | var textBox = new TextBox(); 16 | var buttonOk = new Button(); 17 | var buttonCancel = new Button(); 18 | var imageBox = new PictureBox(); 19 | 20 | EventHandler textchanged = delegate(object sender, EventArgs e) 21 | { 22 | bool mandatory_success = Regex.IsMatch(textBox.Text, mandatoryFormatRegExPattern); 23 | 24 | if (textBox.Text == "" || textBox.Text.Length > maxLength || !mandatory_success) 25 | { 26 | imageBox.Image = nspector.Properties.Resources.ieframe_1_18212; 27 | buttonOk.Enabled = false; 28 | return; 29 | } 30 | 31 | foreach (string invStr in invalidInputs) 32 | { 33 | if (textBox.Text.ToUpper() == invStr.ToUpper()) 34 | { 35 | imageBox.Image = Properties.Resources.ieframe_1_18212; 36 | buttonOk.Enabled = false; 37 | return; 38 | } 39 | } 40 | 41 | imageBox.Image = Properties.Resources.ieframe_1_31073_002; 42 | buttonOk.Enabled = true; 43 | }; 44 | 45 | 46 | textBox.TextChanged += textchanged; 47 | 48 | 49 | form.Text = title; 50 | label.Text = promptText; 51 | textBox.Text = value; 52 | textBox.MaxLength = maxLength; 53 | imageBox.Image = Properties.Resources.ieframe_1_18212; 54 | 55 | buttonOk.Text = "OK"; 56 | buttonCancel.Text = "Cancel"; 57 | buttonOk.DialogResult = DialogResult.OK; 58 | buttonCancel.DialogResult = DialogResult.Cancel; 59 | 60 | buttonOk.Enabled = false; 61 | 62 | label.SetBounds(9, 20, 372, 13); 63 | textBox.SetBounds(12, 36, 352, 20); 64 | buttonOk.SetBounds(228, 72, 75, 23); 65 | buttonCancel.SetBounds(309, 72, 75, 23); 66 | 67 | imageBox.SetBounds(368, 36, 16, 16); 68 | 69 | label.AutoSize = true; 70 | imageBox.Anchor = AnchorStyles.Top | AnchorStyles.Right; 71 | textBox.Anchor = textBox.Anchor | AnchorStyles.Right; 72 | buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; 73 | buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; 74 | 75 | form.ClientSize = new Size(396, 107); 76 | form.Controls.AddRange(new Control[] { label, textBox, imageBox, buttonOk, buttonCancel }); 77 | form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); 78 | form.FormBorderStyle = FormBorderStyle.FixedDialog; 79 | form.StartPosition = FormStartPosition.CenterParent; 80 | form.MinimizeBox = false; 81 | form.MaximizeBox = false; 82 | form.AcceptButton = buttonOk; 83 | form.CancelButton = buttonCancel; 84 | 85 | textchanged(form, new EventArgs()); 86 | 87 | DialogResult dialogResult = form.ShowDialog(); 88 | value = textBox.Text; 89 | return dialogResult; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /nspector/Common/Helper/ListSort.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | internal class ListSort : IComparer 6 | { 7 | public int Compare(object x, object y) 8 | { 9 | try 10 | { 11 | return System.String.CompareOrdinal(x.ToString(), y.ToString()); 12 | } 13 | catch 14 | { 15 | return 0; 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /nspector/Common/Helper/ListViewGroupSorter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | 7 | namespace nspector.Common.Helper 8 | { 9 | 10 | public class ListViewGroupHeaderSorter : IComparer 11 | { 12 | private bool _ascending = true; 13 | public ListViewGroupHeaderSorter(bool ascending) 14 | { 15 | _ascending = ascending; 16 | } 17 | 18 | #region IComparer Members 19 | 20 | public int Compare(ListViewGroup x, ListViewGroup y) 21 | { 22 | if (_ascending) 23 | return string.Compare(((ListViewGroup)x).Header, ((ListViewGroup)y).Header); 24 | else 25 | return string.Compare(((ListViewGroup)y).Header, ((ListViewGroup)x).Header); 26 | } 27 | #endregion 28 | } 29 | 30 | public class ListViewGroupSorter 31 | { 32 | internal ListView _listview; 33 | 34 | public static bool operator ==(ListView listview, ListViewGroupSorter sorter) 35 | { 36 | return listview == sorter._listview; 37 | } 38 | public static bool operator !=(ListView listview, ListViewGroupSorter sorter) 39 | { 40 | return listview != sorter._listview; 41 | } 42 | 43 | public static implicit operator ListView(ListViewGroupSorter sorter) 44 | { 45 | return sorter._listview; 46 | } 47 | public static implicit operator ListViewGroupSorter(ListView listview) 48 | { 49 | return new ListViewGroupSorter(listview); 50 | } 51 | 52 | internal ListViewGroupSorter(ListView listview) 53 | { 54 | _listview = listview; 55 | } 56 | 57 | public void SortGroups(bool ascending) 58 | { 59 | _listview.BeginUpdate(); 60 | List lvgs = new List(); 61 | foreach (ListViewGroup lvg in _listview.Groups) 62 | lvgs.Add(lvg); 63 | _listview.Groups.Clear(); 64 | lvgs.Sort(new ListViewGroupHeaderSorter(ascending)); 65 | _listview.Groups.AddRange(lvgs.ToArray()); 66 | _listview.EndUpdate(); 67 | } 68 | 69 | #region overridden methods 70 | 71 | public override bool Equals(object obj) 72 | { 73 | return _listview.Equals(obj); 74 | } 75 | 76 | public override int GetHashCode() 77 | { 78 | return _listview.GetHashCode(); 79 | } 80 | 81 | public override string ToString() 82 | { 83 | return _listview.ToString(); 84 | } 85 | 86 | #endregion 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /nspector/Common/Helper/NoBorderRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace nspector.Common.Helper 4 | { 5 | internal class NoBorderRenderer : ToolStripProfessionalRenderer 6 | { 7 | protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) {} 8 | 9 | protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) {} 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /nspector/Common/Helper/ShortcutResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using nspector.Native.WINAPI; 7 | 8 | namespace nspector.Common.Helper 9 | { 10 | public class ShortcutResolver 11 | { 12 | 13 | public static string GetUrlFromInternetShortcut(string filePath) 14 | { 15 | var lines = File.ReadAllLines(filePath); 16 | foreach (var line in lines) 17 | { 18 | if (line.StartsWith("URL=")) 19 | { 20 | string[] splitLine = line.Split('='); 21 | if (splitLine.Length > 0) 22 | { 23 | return splitLine[1]; 24 | } 25 | } 26 | } 27 | return ""; 28 | } 29 | 30 | public static string ResolveExecuteable(string filename, out string profileName) 31 | { 32 | var fileInfo = new FileInfo(filename); 33 | profileName = fileInfo.Name.Substring(0, fileInfo.Name.Length - fileInfo.Extension.Length); 34 | 35 | try 36 | { 37 | switch (fileInfo.Extension.ToLower()) 38 | { 39 | case ".lnk": return ResolveFromShellLinkFile(fileInfo.FullName); 40 | case ".url": return ResolveFromUrlFile(fileInfo.FullName); 41 | case ".exe": return fileInfo.Name; 42 | default: return ""; 43 | } 44 | } 45 | catch 46 | { 47 | return ""; 48 | } 49 | } 50 | 51 | private static string ResolveFromShellLinkFile(string filename) 52 | { 53 | var shellLink = new ShellLink(filename); 54 | if (shellLink.Arguments.StartsWith(SteamAppResolver.SteamUrlPattern)) 55 | { 56 | var resolver = new SteamAppResolver(); 57 | return resolver.ResolveExeFromSteamUrl(shellLink.Arguments); 58 | } 59 | 60 | var targetInfo = new FileInfo(shellLink.Target); 61 | if (targetInfo.Name.ToLower() == SteamAppResolver.SteamExeName) 62 | { 63 | if (shellLink.Arguments.Contains(SteamAppResolver.SteamArgumentPattern)) 64 | { 65 | var resolver = new SteamAppResolver(); 66 | return resolver.ResolveExeFromSteamArguments(shellLink.Arguments); 67 | } 68 | } 69 | 70 | if (targetInfo.Extension.ToLower().Equals(".exe")) 71 | { 72 | return targetInfo.Name; 73 | } 74 | return ""; 75 | } 76 | 77 | private static string ResolveFromUrlFile(string filename) 78 | { 79 | var url = GetUrlFromInternetShortcut(filename); 80 | if (url.StartsWith(SteamAppResolver.SteamUrlPattern)) 81 | { 82 | var resolver = new SteamAppResolver(); 83 | return resolver.ResolveExeFromSteamUrl(url); 84 | } 85 | return ""; 86 | } 87 | 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /nspector/Common/Helper/SteamAppResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using Microsoft.Win32; 8 | 9 | namespace nspector.Common.Helper 10 | { 11 | public class SteamAppResolver 12 | { 13 | 14 | public const string SteamExeName = "steam.exe"; 15 | public const string SteamUrlPattern = "steam://rungameid/"; 16 | public const string SteamArgumentPattern = "-applaunch"; 17 | 18 | private byte[] _appinfoBytes; 19 | 20 | public SteamAppResolver() 21 | { 22 | var appInfoLocation = GetSteamAppInfoLocation(); 23 | if (File.Exists(appInfoLocation)) 24 | _appinfoBytes = File.ReadAllBytes(appInfoLocation); 25 | else 26 | _appinfoBytes = null; 27 | } 28 | 29 | private string GetSteamAppInfoLocation() 30 | { 31 | var reg = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam", false); 32 | 33 | if (reg != null) 34 | { 35 | string steamPath = (string)reg.GetValue("SteamPath", null); 36 | if (steamPath != null) 37 | return Path.Combine(steamPath, @"appcache\appinfo.vdf"); 38 | } 39 | 40 | return ""; 41 | } 42 | 43 | public string ResolveExeFromSteamUrl(string url) 44 | { 45 | if (url.StartsWith(SteamUrlPattern)) 46 | { 47 | var appIdStr = url.Substring(SteamUrlPattern.Length); 48 | int appid = 0; 49 | if (int.TryParse(appIdStr, out appid)) 50 | { 51 | return FindCommonExecutableForApp(appid); 52 | } 53 | } 54 | return ""; 55 | } 56 | 57 | public string ResolveExeFromSteamArguments(string arguments) 58 | { 59 | if (arguments.Contains(SteamArgumentPattern)) 60 | { 61 | var rxRungame = new Regex(SteamArgumentPattern + @"\s+(?\d+)"); 62 | foreach (Match m in rxRungame.Matches(arguments)) 63 | { 64 | var appIdStr = m.Result("${appid}"); 65 | int appid = 0; 66 | if (int.TryParse(appIdStr, out appid)) 67 | { 68 | return FindCommonExecutableForApp(appid); 69 | } 70 | } 71 | 72 | } 73 | return ""; 74 | } 75 | 76 | private string FindCommonExecutableForApp(int appid) 77 | { 78 | var apps = FindAllExecutablesForApp(appid); 79 | if (apps.Count > 0) 80 | { 81 | return new FileInfo(apps[0]).Name; 82 | } 83 | return ""; 84 | } 85 | 86 | private List FindAllExecutablesForApp(int appid) 87 | { 88 | if (_appinfoBytes == null) 89 | return new List(); 90 | 91 | var bid = BitConverter.GetBytes(appid); 92 | int offset = 0; 93 | 94 | var appidPattern = new byte[] { 0x08, bid[0], bid[1], bid[2], bid[3] }; 95 | var launchPattern = new byte[] { 0x00, 0x6C, 0x61, 0x75, 0x6E, 0x63, 0x68, 0x00 }; 96 | 97 | var appidOffset = FindOffset(_appinfoBytes, appidPattern, offset); 98 | if (appidOffset == -1) 99 | return new List(); 100 | else 101 | offset = appidOffset + appidPattern.Length; 102 | 103 | var launchOffset = FindOffset(_appinfoBytes, launchPattern, offset); 104 | if (launchOffset == -1) 105 | return new List(); 106 | else 107 | offset = launchOffset; 108 | 109 | var executables = new List(); 110 | FindExecutables(_appinfoBytes, ref offset, ref executables); 111 | return executables; 112 | } 113 | 114 | 115 | private void FindExecutables(byte[] bytes, ref int offset, ref List executables) 116 | { 117 | while (true) 118 | { 119 | var valueType = ReadByte(bytes, ref offset); 120 | if (valueType == 0x08) 121 | { 122 | break; 123 | } 124 | 125 | var valueName = ReadCString(bytes, ref offset); 126 | var valueString = ""; 127 | switch (valueType) 128 | { 129 | case 0: 130 | { 131 | FindExecutables(bytes, ref offset, ref executables); 132 | break; 133 | } 134 | case 1: 135 | { 136 | valueString = ReadCString(bytes, ref offset); 137 | 138 | if (valueName == "executable" && valueString.EndsWith(".exe")) 139 | { 140 | executables.Add(valueString); 141 | } 142 | 143 | break; 144 | } 145 | case 2: 146 | { 147 | offset += 4; 148 | break; 149 | } 150 | 151 | case 7: 152 | { 153 | offset += 8; 154 | break; 155 | } 156 | default: break; 157 | } 158 | } 159 | } 160 | 161 | private static int FindOffset(byte[] bytes, byte[] pattern, int offset = 0, byte? wildcard = null) 162 | { 163 | for (int i = offset; i < bytes.Length; i++) 164 | { 165 | if (pattern[0] == bytes[i] && bytes.Length - i >= pattern.Length) 166 | { 167 | bool ismatch = true; 168 | for (int j = 1; j < pattern.Length && ismatch == true; j++) 169 | { 170 | if (bytes[i + j] != pattern[j] && ((wildcard.HasValue && wildcard != pattern[j]) || !wildcard.HasValue)) 171 | { 172 | ismatch = false; 173 | break; 174 | } 175 | } 176 | if (ismatch) 177 | return i; 178 | 179 | } 180 | } 181 | return -1; 182 | } 183 | 184 | private static byte ReadByte(byte[] bytes, ref int offset) 185 | { 186 | offset += 1; 187 | return bytes[offset - 1]; 188 | } 189 | 190 | private static string ReadCString(byte[] bytes, ref int offset) 191 | { 192 | var tmpOffset = offset; 193 | while (bytes[tmpOffset] != 0) 194 | { 195 | tmpOffset++; 196 | } 197 | 198 | var start = offset; 199 | var length = tmpOffset - offset; 200 | offset += length + 1; 201 | 202 | return Encoding.UTF8.GetString(bytes, start, length); 203 | 204 | } 205 | 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /nspector/Common/Helper/XMLHelper.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | using System.Xml; 4 | using System.Xml.Serialization; 5 | 6 | namespace nspector.Common.Helper 7 | { 8 | internal static class XMLHelper where T : new() 9 | { 10 | static XmlSerializer xmlSerializer; 11 | 12 | static XMLHelper() 13 | { 14 | //TODO: Fix It! 15 | //xmlSerializer = new XmlSerializer(typeof(T)); 16 | xmlSerializer = XmlSerializer.FromTypes(new[]{typeof(T)})[0]; 17 | } 18 | 19 | internal static string SerializeToXmlString(T xmlObject, Encoding encoding, bool removeNamespace) 20 | { 21 | var memoryStream = new MemoryStream(); 22 | var xmlWriter = new XmlTextWriter(memoryStream, encoding) { Formatting = Formatting.Indented }; 23 | 24 | if (removeNamespace) 25 | { 26 | var xs = new XmlSerializerNamespaces(); 27 | xs.Add("", ""); 28 | xmlSerializer.Serialize(xmlWriter, xmlObject, xs); 29 | } 30 | else 31 | xmlSerializer.Serialize(xmlWriter, xmlObject); 32 | 33 | return encoding.GetString(memoryStream.ToArray()); 34 | } 35 | 36 | internal static void SerializeToXmlFile(T xmlObject, string filename, Encoding encoding, bool removeNamespace) 37 | { 38 | File.WriteAllText(filename, SerializeToXmlString(xmlObject, encoding, removeNamespace)); 39 | } 40 | 41 | internal static T DeserializeFromXmlString(string xml) 42 | { 43 | var reader = new StringReader(xml); 44 | var xmlObject = (T)xmlSerializer.Deserialize(reader); 45 | return xmlObject; 46 | } 47 | 48 | internal static T DeserializeFromXMLFile(string filename) 49 | { 50 | return DeserializeFromXmlString(File.ReadAllText(filename)); 51 | } 52 | 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /nspector/Common/Import/ImportExportUitl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using nspector.Native.NVAPI2; 6 | 7 | namespace nspector.Common.Import 8 | { 9 | internal class ImportExportUitl 10 | { 11 | public static bool AreDrsSettingEqualToProfileSetting(NVDRS_SETTING drsSetting, ProfileSetting profileSetting) 12 | { 13 | var profileSettingCompare = ConvertDrsSettingToProfileSetting(drsSetting); 14 | return profileSetting.SettingValue.Equals(profileSettingCompare.SettingValue); 15 | } 16 | 17 | public static ProfileSetting ConvertDrsSettingToProfileSetting(NVDRS_SETTING setting) 18 | { 19 | return new ProfileSetting 20 | { 21 | SettingId = setting.settingId, 22 | SettingNameInfo = setting.settingName, 23 | SettingValue = ConvertSettingValueToString(setting), 24 | ValueType = MapValueType(setting.settingType), 25 | }; 26 | } 27 | 28 | private static string ConvertSettingValueToString(NVDRS_SETTING setting) 29 | { 30 | var settingUnion = setting.currentValue; 31 | if (setting.isCurrentPredefined == 1) 32 | { 33 | settingUnion = setting.predefinedValue; 34 | } 35 | 36 | switch (setting.settingType) 37 | { 38 | case NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE: 39 | return settingUnion.dwordValue.ToString(); 40 | case NVDRS_SETTING_TYPE.NVDRS_STRING_TYPE: 41 | return settingUnion.ansiStringValue; 42 | case NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE: 43 | return settingUnion.stringValue; 44 | case NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE: 45 | return Convert.ToBase64String(settingUnion.binaryValue); 46 | default: 47 | throw new Exception("invalid setting type"); 48 | } 49 | } 50 | 51 | private static SettingValueType MapValueType(NVDRS_SETTING_TYPE input) 52 | { 53 | switch (input) 54 | { 55 | case NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE: return SettingValueType.Binary; 56 | case NVDRS_SETTING_TYPE.NVDRS_STRING_TYPE: return SettingValueType.AnsiString; 57 | case NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE: return SettingValueType.String; 58 | default: return SettingValueType.Dword; 59 | } 60 | } 61 | 62 | public static NVDRS_SETTING ConvertProfileSettingToDrsSetting(ProfileSetting setting) 63 | { 64 | var newSetting = new NVDRS_SETTING() 65 | { 66 | version = NvapiDrsWrapper.NVDRS_SETTING_VER, 67 | settingId = setting.SettingId, 68 | settingType = MapValueType(setting.ValueType), 69 | settingLocation = NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION, 70 | currentValue = ConvertStringToSettingUnion(setting.ValueType, setting.SettingValue), 71 | }; 72 | return newSetting; 73 | } 74 | 75 | private static NVDRS_SETTING_UNION ConvertStringToSettingUnion(SettingValueType valueType, string valueString) 76 | { 77 | var union = new NVDRS_SETTING_UNION(); 78 | switch (valueType) 79 | { 80 | case SettingValueType.Dword: 81 | union.dwordValue = uint.Parse(valueString); 82 | break; 83 | case SettingValueType.String: 84 | union.stringValue = valueString; 85 | break; 86 | case SettingValueType.AnsiString: 87 | union.ansiStringValue = valueString; 88 | break; 89 | case SettingValueType.Binary: 90 | union.binaryValue = Convert.FromBase64String(valueString); 91 | break; 92 | default: 93 | throw new Exception("invalid value type"); 94 | } 95 | return union; 96 | } 97 | 98 | private static NVDRS_SETTING_TYPE MapValueType(SettingValueType input) 99 | { 100 | switch (input) 101 | { 102 | case SettingValueType.Binary: return NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE; 103 | case SettingValueType.AnsiString: return NVDRS_SETTING_TYPE.NVDRS_STRING_TYPE; 104 | case SettingValueType.String: return NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE; 105 | default: return NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE; 106 | } 107 | } 108 | 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /nspector/Common/Import/Profile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class Profile 8 | { 9 | public string ProfileName = ""; 10 | public List Executeables = new List(); 11 | public List Settings = new List(); 12 | } 13 | } -------------------------------------------------------------------------------- /nspector/Common/Import/ProfileSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Serialization; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class ProfileSetting 8 | { 9 | public string SettingNameInfo = ""; 10 | 11 | [XmlElement(ElementName = "SettingID")] 12 | public uint SettingId = 0; 13 | 14 | public string SettingValue = "0"; 15 | 16 | public SettingValueType ValueType = SettingValueType.Dword; 17 | } 18 | } -------------------------------------------------------------------------------- /nspector/Common/Import/Profiles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace nspector.Common.Import 5 | { 6 | [Serializable] 7 | public class Profiles : List 8 | { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /nspector/Common/Import/SettingValueType.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Import 2 | { 3 | public enum SettingValueType : int 4 | { 5 | Dword, 6 | AnsiString, 7 | String, 8 | Binary 9 | } 10 | } -------------------------------------------------------------------------------- /nspector/Common/Meta/ConstantSettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using nspector.Native.NvApi.DriverSettings; 7 | using nspector.Native.NVAPI2; 8 | 9 | namespace nspector.Common.Meta 10 | { 11 | internal class ConstantSettingMetaService : ISettingMetaService 12 | { 13 | 14 | public ConstantSettingMetaService() 15 | { 16 | settingEnumTypeCache = CreateSettingEnumTypeCache(); 17 | GetSettingIds(); 18 | } 19 | 20 | private readonly Dictionary settingEnumTypeCache; 21 | 22 | private string[] ignoreSettingNames = new[] { "TOTAL_DWORD_SETTING_NUM", "TOTAL_WSTRING_SETTING_NUM", 23 | "TOTAL_SETTING_NUM", "INVALID_SETTING_ID" }; 24 | 25 | private Dictionary CreateSettingEnumTypeCache() 26 | { 27 | var result = new Dictionary(); 28 | 29 | var drsEnumTypes = Assembly.GetExecutingAssembly().GetTypes() 30 | .Where(t => t.Namespace == "nspector.Native.NvApi.DriverSettings" 31 | && t.IsEnum && t.Name.StartsWith("EValues_")).ToList(); 32 | 33 | var settingIdNames = Enum.GetNames(typeof(ESetting)).Distinct().ToList(); 34 | 35 | foreach (var settingIdName in settingIdNames) 36 | { 37 | if (ignoreSettingNames.Contains(settingIdName)) 38 | continue; 39 | 40 | var enumType = drsEnumTypes 41 | .FirstOrDefault(x => settingIdName 42 | .Substring(0, settingIdName.Length - 3) 43 | .Equals(x.Name.Substring(8)) 44 | ); 45 | 46 | if (enumType != null) 47 | { 48 | var settingIdVal = (ESetting)Enum.Parse(typeof(ESetting), settingIdName); 49 | result.Add(settingIdVal, enumType); 50 | } 51 | } 52 | 53 | return result; 54 | } 55 | 56 | public Type GetSettingEnumType(uint settingId) 57 | { 58 | if (settingEnumTypeCache.ContainsKey((ESetting)settingId)) 59 | return settingEnumTypeCache[(ESetting)settingId]; 60 | 61 | return null; 62 | } 63 | 64 | public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId) 65 | { 66 | return null; 67 | } 68 | 69 | public string GetSettingName(uint settingId) 70 | { 71 | if (settingIds.Contains(settingId)) 72 | return ((ESetting)settingId).ToString(); 73 | 74 | return null; 75 | } 76 | 77 | public uint? GetDwordDefaultValue(uint settingId) 78 | { 79 | if (settingEnumTypeCache.ContainsKey((ESetting)settingId)) 80 | { 81 | var enumType = settingEnumTypeCache[(ESetting)settingId]; 82 | 83 | var defaultName = Enum.GetNames(enumType).FirstOrDefault(x => x.EndsWith("_DEFAULT")); 84 | if (defaultName != null) 85 | return (uint)Enum.Parse(enumType, defaultName); 86 | } 87 | return null; 88 | } 89 | 90 | public string GetStringDefaultValue(uint settingId) 91 | { 92 | return null; 93 | } 94 | 95 | public List> GetStringValues(uint settingId) 96 | { 97 | return null; 98 | } 99 | 100 | private uint ParseEnumValue(Type enumType, string enumText) 101 | { 102 | try 103 | { 104 | return (uint)Enum.Parse(enumType, enumText); 105 | } 106 | catch (InvalidCastException) 107 | { 108 | var intValue = (int)Enum.Parse(enumType, enumText); 109 | var bytes = BitConverter.GetBytes(intValue); 110 | return BitConverter.ToUInt32(bytes, 0); 111 | } 112 | } 113 | 114 | public List> GetDwordValues(uint settingId) 115 | { 116 | if (settingEnumTypeCache.ContainsKey((ESetting)settingId)) 117 | { 118 | var enumType = settingEnumTypeCache[(ESetting)settingId]; 119 | 120 | var validNames = Enum.GetNames(enumType) 121 | .Where(x => 1 == 1 122 | && !x.EndsWith("_DEFAULT") 123 | && !x.EndsWith("_NUM_VALUES") 124 | //&& !x.EndsWith("_NUM") 125 | //&& !x.EndsWith("_MASK") 126 | //&& (!x.EndsWith("_MIN") || x.Equals("PREFERRED_PSTATE_PREFER_MIN")) 127 | //&& (!x.EndsWith("_MAX") || x.Equals("PREFERRED_PSTATE_PREFER_MAX")) 128 | ).ToList(); 129 | 130 | return validNames.Select(x => new SettingValue(Source) 131 | { 132 | Value = ParseEnumValue(enumType, x), 133 | ValueName = DrsUtil.GetDwordString(ParseEnumValue(enumType, x)) + " " + x 134 | }).ToList(); 135 | 136 | } 137 | return null; 138 | } 139 | 140 | private HashSet settingIds; 141 | public List GetSettingIds() 142 | { 143 | if (settingIds == null) 144 | settingIds = new HashSet( 145 | Enum.GetValues(typeof(ESetting)) 146 | .Cast() 147 | .Where(x => !ignoreSettingNames.Contains(x.ToString())) 148 | .Cast() 149 | .Distinct() 150 | .ToList()); 151 | 152 | return settingIds.ToList(); 153 | } 154 | 155 | 156 | public string GetGroupName(uint settingId) 157 | { 158 | return null; 159 | } 160 | 161 | public byte[] GetBinaryDefaultValue(uint settingId) 162 | { 163 | return null; 164 | } 165 | 166 | public List> GetBinaryValues(uint settingId) 167 | { 168 | return null; 169 | } 170 | 171 | public SettingMetaSource Source 172 | { 173 | get { return SettingMetaSource.ConstantSettings; } 174 | } 175 | } 176 | } 177 | -------------------------------------------------------------------------------- /nspector/Common/Meta/CustomSettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using nspector.Common.CustomSettings; 2 | using nspector.Native.NVAPI2; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace nspector.Common.Meta 9 | { 10 | internal class CustomSettingMetaService : ISettingMetaService 11 | { 12 | 13 | private readonly CustomSettingNames customSettings; 14 | private readonly SettingMetaSource _source; 15 | 16 | public CustomSettingMetaService(CustomSettingNames customSettings, SettingMetaSource sourceOverride = SettingMetaSource.CustomSettings) 17 | { 18 | this.customSettings = customSettings; 19 | _source = sourceOverride; 20 | } 21 | 22 | public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId) 23 | { 24 | return null; 25 | } 26 | 27 | public string GetSettingName(uint settingId) 28 | { 29 | var setting = customSettings.Settings 30 | .FirstOrDefault(x => x.SettingId.Equals(settingId)); 31 | 32 | if (setting != null) 33 | return setting.UserfriendlyName; 34 | 35 | return null; 36 | } 37 | 38 | public uint? GetDwordDefaultValue(uint settingId) 39 | { 40 | var setting = customSettings.Settings 41 | .FirstOrDefault(x => x.SettingId.Equals(settingId)); 42 | 43 | if (setting != null) 44 | return setting.DefaultValue; 45 | 46 | return null; 47 | } 48 | 49 | public string GetStringDefaultValue(uint settingId) 50 | { 51 | return null; 52 | } 53 | 54 | public List> GetStringValues(uint settingId) 55 | { 56 | return null; 57 | } 58 | 59 | public List> GetDwordValues(uint settingId) 60 | { 61 | var setting = customSettings.Settings 62 | .FirstOrDefault(x => x.SettingId.Equals(settingId)); 63 | 64 | if (setting != null) 65 | { 66 | var i = 0; 67 | return setting.SettingValues.Select(x => new SettingValue(Source) 68 | { 69 | ValuePos = i++, 70 | Value = x.SettingValue, 71 | ValueName = _source == SettingMetaSource.CustomSettings ? x.UserfriendlyName : DrsUtil.GetDwordString(x.SettingValue) + " " + x.UserfriendlyName, 72 | }).ToList(); 73 | } 74 | 75 | return null; 76 | } 77 | 78 | public List GetSettingIds() 79 | { 80 | return customSettings.Settings 81 | .Select(x => x.SettingId).ToList(); 82 | } 83 | 84 | 85 | public string GetGroupName(uint settingId) 86 | { 87 | var setting = customSettings.Settings 88 | .FirstOrDefault(x => x.SettingId.Equals(settingId)); 89 | 90 | if (setting != null && !string.IsNullOrWhiteSpace(setting.GroupName)) 91 | return setting.GroupName; 92 | 93 | return null; 94 | } 95 | 96 | public byte[] GetBinaryDefaultValue(uint settingId) 97 | { 98 | return null; 99 | } 100 | 101 | public List> GetBinaryValues(uint settingId) 102 | { 103 | return null; 104 | } 105 | 106 | public SettingMetaSource Source 107 | { 108 | get { return _source; } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /nspector/Common/Meta/DriverSettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using nspector.Common.CustomSettings; 7 | 8 | using nspector.Native.NvApi.DriverSettings; 9 | using nspector.Native.NVAPI2; 10 | using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper; 11 | 12 | namespace nspector.Common.Meta 13 | { 14 | 15 | internal class DriverSettingMetaService : ISettingMetaService 16 | { 17 | 18 | private readonly Dictionary _settingMetaCache = new Dictionary(); 19 | private readonly List _settingIds; 20 | 21 | public DriverSettingMetaService() 22 | { 23 | _settingIds = InitSettingIds(); 24 | } 25 | 26 | private List InitSettingIds() 27 | { 28 | var settingIds = new List(); 29 | 30 | var nvRes = nvw.DRS_EnumAvailableSettingIds(out settingIds, 512); 31 | if (nvRes != NvAPI_Status.NVAPI_OK) 32 | throw new NvapiException("DRS_EnumAvailableSettingIds", nvRes); 33 | 34 | return settingIds; 35 | } 36 | 37 | private SettingMeta GetDriverSettingMetaInternal(uint settingId) 38 | { 39 | var values = new NVDRS_SETTING_VALUES(); 40 | values.version = nvw.NVDRS_SETTING_VALUES_VER; 41 | uint valueCount = 255; 42 | 43 | var nvRes = nvw.DRS_EnumAvailableSettingValues(settingId, ref valueCount, ref values); 44 | 45 | if (nvRes == NvAPI_Status.NVAPI_SETTING_NOT_FOUND) 46 | return null; 47 | 48 | if (nvRes != NvAPI_Status.NVAPI_OK) 49 | throw new NvapiException("DRS_EnumAvailableSettingValues", nvRes); 50 | 51 | 52 | var sbSettingName = new StringBuilder((int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX); 53 | nvRes = nvw.DRS_GetSettingNameFromId(settingId, sbSettingName); 54 | if (nvRes != NvAPI_Status.NVAPI_OK) 55 | throw new NvapiException("DRS_GetSettingNameFromId", nvRes); 56 | 57 | var settingName = sbSettingName.ToString(); 58 | if (string.IsNullOrWhiteSpace(settingName)) 59 | settingName = DrsUtil.GetDwordString(settingId); 60 | 61 | var result = new SettingMeta { 62 | SettingType = values.settingType, 63 | SettingName = settingName, 64 | }; 65 | 66 | 67 | if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE) 68 | { 69 | result.DefaultDwordValue = values.defaultValue.dwordValue; 70 | result.DwordValues = new List>(); 71 | for (int i = 0; i < values.numSettingValues; i++) 72 | { 73 | result.DwordValues.Add( 74 | new SettingValue (Source) { 75 | Value = values.settingValues[i].dwordValue, 76 | ValueName = DrsUtil.GetDwordString(values.settingValues[i].dwordValue), 77 | }); 78 | } 79 | } 80 | 81 | if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE) 82 | { 83 | result.DefaultStringValue = values.defaultValue.stringValue; 84 | result.StringValues = new List>(); 85 | for (int i = 0; i < values.numSettingValues; i++) 86 | { 87 | var strValue = values.settingValues[i].stringValue; 88 | if (strValue != null) 89 | { 90 | result.StringValues.Add( 91 | new SettingValue(Source) 92 | { 93 | Value = strValue, 94 | ValueName = strValue, 95 | }); 96 | } 97 | } 98 | } 99 | 100 | if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE) 101 | { 102 | result.DefaultBinaryValue = values.defaultValue.binaryValue; 103 | result.BinaryValues = new List>(); 104 | for (int i = 0; i < values.numSettingValues; i++) 105 | { 106 | var binValue = values.settingValues[i].binaryValue; 107 | if (binValue != null) 108 | { 109 | result.BinaryValues.Add( 110 | new SettingValue(Source) 111 | { 112 | Value = binValue, 113 | ValueName = DrsUtil.GetBinaryString(binValue), 114 | }); 115 | } 116 | } 117 | } 118 | return result; 119 | 120 | } 121 | 122 | private SettingMeta GetSettingsMeta(uint settingId) 123 | { 124 | if (_settingMetaCache.ContainsKey(settingId)) 125 | return _settingMetaCache[settingId]; 126 | else 127 | { 128 | var settingMeta = GetDriverSettingMetaInternal(settingId); 129 | if (settingMeta != null) 130 | { 131 | _settingMetaCache.Add(settingId, settingMeta); 132 | return settingMeta; 133 | } 134 | 135 | return null; 136 | } 137 | } 138 | 139 | public string GetSettingName(uint settingId) 140 | { 141 | var settingMeta = GetSettingsMeta(settingId); 142 | if (settingMeta != null) 143 | return settingMeta.SettingName; 144 | 145 | return null; 146 | } 147 | 148 | public uint? GetDwordDefaultValue(uint settingId) 149 | { 150 | var settingMeta = GetSettingsMeta(settingId); 151 | if (settingMeta != null) 152 | return settingMeta.DefaultDwordValue; 153 | 154 | return null; 155 | } 156 | 157 | public string GetStringDefaultValue(uint settingId) 158 | { 159 | var settingMeta = GetSettingsMeta(settingId); 160 | if (settingMeta != null) 161 | return settingMeta.DefaultStringValue; 162 | 163 | return null; 164 | } 165 | 166 | public List> GetStringValues(uint settingId) 167 | { 168 | var settingMeta = GetSettingsMeta(settingId); 169 | if (settingMeta != null) 170 | return settingMeta.StringValues; 171 | 172 | return null; 173 | } 174 | 175 | public List> GetDwordValues(uint settingId) 176 | { 177 | var settingMeta = GetSettingsMeta(settingId); 178 | if (settingMeta != null) 179 | return settingMeta.DwordValues; 180 | 181 | return null; 182 | } 183 | 184 | public List GetSettingIds() 185 | { 186 | return _settingIds; 187 | } 188 | 189 | public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId) 190 | { 191 | var settingMeta = GetSettingsMeta(settingId); 192 | if (settingMeta != null) 193 | return settingMeta.SettingType; 194 | 195 | return null; 196 | } 197 | 198 | public string GetGroupName(uint settingId) 199 | { 200 | return null; 201 | } 202 | 203 | public byte[] GetBinaryDefaultValue(uint settingId) 204 | { 205 | var settingMeta = GetSettingsMeta(settingId); 206 | if (settingMeta != null) 207 | return settingMeta.DefaultBinaryValue; 208 | 209 | return null; 210 | } 211 | 212 | public List> GetBinaryValues(uint settingId) 213 | { 214 | var settingMeta = GetSettingsMeta(settingId); 215 | if (settingMeta != null) 216 | return settingMeta.BinaryValues; 217 | 218 | return null; 219 | } 220 | 221 | public SettingMetaSource Source 222 | { 223 | get { return SettingMetaSource.DriverSettings; } 224 | } 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /nspector/Common/Meta/ISettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using nspector.Native.NVAPI2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace nspector.Common.Meta 8 | { 9 | internal interface ISettingMetaService 10 | { 11 | SettingMetaSource Source {get; } 12 | 13 | NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId); 14 | 15 | string GetSettingName(uint settingId); 16 | 17 | string GetGroupName(uint settingId); 18 | 19 | uint? GetDwordDefaultValue(uint settingId); 20 | 21 | string GetStringDefaultValue(uint settingId); 22 | 23 | byte[] GetBinaryDefaultValue(uint settingId); 24 | 25 | List> GetStringValues(uint settingId); 26 | 27 | List> GetDwordValues(uint settingId); 28 | 29 | List> GetBinaryValues(uint settingId); 30 | 31 | List GetSettingIds(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /nspector/Common/Meta/MetaServiceItem.cs: -------------------------------------------------------------------------------- 1 | namespace nspector.Common.Meta 2 | { 3 | internal class MetaServiceItem 4 | { 5 | public ISettingMetaService Service { get; set; } 6 | public uint ValueNamePrio { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /nspector/Common/Meta/NvD3dUmxSettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Runtime.InteropServices; 7 | using System.Text; 8 | using nspector.Native.NvApi.DriverSettings; 9 | using nspector.Native.NVAPI2; 10 | 11 | namespace nspector.Common.Meta 12 | { 13 | internal class NvD3dUmxSettingMetaService : ISettingMetaService 14 | { 15 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 16 | struct NvD3dUmxName 17 | { 18 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)] 19 | public string settingName; 20 | 21 | public uint settingId; 22 | public uint unknown; 23 | } 24 | 25 | [StructLayout(LayoutKind.Sequential)] 26 | struct NvD3dUmxNameList 27 | { 28 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)] 29 | public NvD3dUmxName[] settingNames; 30 | } 31 | 32 | private static int FindOffset(byte[] bytes, byte[] pattern, int offset = 0, byte? wildcard = null) 33 | { 34 | for (int i = offset; i < bytes.Length; i++) 35 | { 36 | if (pattern[0] == bytes[i] && bytes.Length - i >= pattern.Length) 37 | { 38 | bool ismatch = true; 39 | for (int j = 1; j < pattern.Length && ismatch == true; j++) 40 | { 41 | if (bytes[i + j] != pattern[j] && ((wildcard.HasValue && wildcard != pattern[j]) || !wildcard.HasValue)) 42 | { 43 | ismatch = false; 44 | break; 45 | } 46 | } 47 | if (ismatch) 48 | return i; 49 | 50 | } 51 | } 52 | return -1; 53 | } 54 | 55 | private static List ParseNvD3dUmxNames(string filename) 56 | { 57 | if (!File.Exists(filename)) return null; 58 | 59 | var bytes = File.ReadAllBytes(filename); 60 | 61 | var runtimeNameOffset = FindOffset(bytes, new byte[] { 0x52, 0x75, 0x6E, 0x54, 0x69, 0x6D, 0x65, 0x4E, 0x61, 0x6D, 0x65 }); 62 | if (runtimeNameOffset > -1) 63 | { 64 | var _2ddNotesOffset = FindOffset(bytes, new byte[] { 0x32, 0x44, 0x44, 0x5F, 0x4E, 0x6F, 0x74, 0x65, 0x73 }); 65 | if (_2ddNotesOffset > -1) 66 | { 67 | var itemSize = Marshal.SizeOf(typeof(NvD3dUmxName)); 68 | var startOffset = runtimeNameOffset - itemSize; 69 | var endOffset = _2ddNotesOffset + itemSize; 70 | var tableLength = endOffset - startOffset; 71 | 72 | var bufferSize = Marshal.SizeOf(typeof(NvD3dUmxNameList)); 73 | if (tableLength > bufferSize) 74 | { 75 | tableLength = bufferSize; 76 | } 77 | 78 | var itemCount = tableLength / itemSize; 79 | var buffer = new byte[bufferSize]; 80 | Buffer.BlockCopy(bytes, startOffset, buffer, 0, tableLength); 81 | 82 | var poBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned); 83 | try 84 | { 85 | var nvD3dUmxNames = (NvD3dUmxNameList)Marshal.PtrToStructure( 86 | poBuffer.AddrOfPinnedObject(), 87 | typeof(NvD3dUmxNameList)); 88 | 89 | var result = new List(); 90 | for (int i = 0; i < itemCount; i++) 91 | { 92 | result.Add(nvD3dUmxNames.settingNames[i]); 93 | } 94 | return result; 95 | 96 | } 97 | finally 98 | { 99 | poBuffer.Free(); 100 | } 101 | } 102 | } 103 | 104 | return null; 105 | } 106 | 107 | private readonly List _SettingNames; 108 | 109 | private void ExportSettingsToCsn() 110 | { 111 | var settings = _SettingNames.Select(s => new CustomSettings.CustomSetting() 112 | { 113 | GroupName = "7 - Stereo", 114 | HexSettingId = $"0x{s.settingId.ToString("X8")}", 115 | UserfriendlyName = s.settingName, 116 | }).ToList(); 117 | 118 | var xml = new CustomSettings.CustomSettingNames(); 119 | xml.Settings.AddRange(settings); 120 | xml.StoreToFile("NvD3dUmx.xml"); 121 | } 122 | 123 | public NvD3dUmxSettingMetaService() 124 | { 125 | var systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System); 126 | var nvD3dUmxPath = Path.Combine(systemPath, "nvd3dumx.dll"); 127 | _SettingNames = ParseNvD3dUmxNames(nvD3dUmxPath); 128 | 129 | //ExportSettingsToCsn(); 130 | } 131 | 132 | public Type GetSettingEnumType(uint settingId) 133 | { 134 | return null; 135 | } 136 | 137 | public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId) 138 | { 139 | return null; 140 | } 141 | 142 | public string GetSettingName(uint settingId) 143 | { 144 | if (_SettingNames != null) 145 | { 146 | var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId); 147 | return setting.settingId != 0 ? setting.settingName : null; 148 | } 149 | return null; 150 | } 151 | 152 | public uint? GetDwordDefaultValue(uint settingId) 153 | { 154 | return null; 155 | } 156 | 157 | public string GetStringDefaultValue(uint settingId) 158 | { 159 | return null; 160 | } 161 | 162 | public List> GetStringValues(uint settingId) 163 | { 164 | return null; 165 | } 166 | 167 | public List> GetDwordValues(uint settingId) 168 | { 169 | return null; 170 | } 171 | 172 | public List GetSettingIds() 173 | { 174 | if (_SettingNames != null) 175 | { 176 | return _SettingNames.Select(s => s.settingId).ToList(); 177 | } 178 | return new List(); 179 | } 180 | 181 | public string GetGroupName(uint settingId) 182 | { 183 | if (_SettingNames != null) 184 | { 185 | var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId); 186 | return setting.settingId != 0 ? "7 - Stereo" : null; 187 | } 188 | 189 | return null; 190 | } 191 | 192 | public byte[] GetBinaryDefaultValue(uint settingId) 193 | { 194 | return null; 195 | } 196 | 197 | public List> GetBinaryValues(uint settingId) 198 | { 199 | return null; 200 | } 201 | 202 | public SettingMetaSource Source 203 | { 204 | get { return SettingMetaSource.NvD3dUmxSettings; } 205 | } 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /nspector/Common/Meta/ScannedSettingMetaService.cs: -------------------------------------------------------------------------------- 1 | using nspector.Native.NVAPI2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace nspector.Common.Meta 8 | { 9 | internal class ScannedSettingMetaService : ISettingMetaService 10 | { 11 | private readonly List CachedSettings; 12 | 13 | public ScannedSettingMetaService(List cachedSettings) 14 | { 15 | CachedSettings = cachedSettings; 16 | } 17 | 18 | public SettingMetaSource Source 19 | { 20 | get { return SettingMetaSource.ScannedSettings; } 21 | } 22 | 23 | public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId) 24 | { 25 | var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId)); 26 | if (cached != null) 27 | return cached.SettingType; 28 | 29 | return null; 30 | } 31 | 32 | public string GetSettingName(uint settingId) 33 | { 34 | var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId)); 35 | if (cached != null) 36 | return string.Format("0x{0:X8} ({1} Profiles)", settingId, cached.ProfileCount); 37 | 38 | return null; 39 | } 40 | 41 | public string GetGroupName(uint settingId) 42 | { 43 | return null; 44 | } 45 | 46 | public uint? GetDwordDefaultValue(uint settingId) 47 | { 48 | return null; 49 | } 50 | 51 | public string GetStringDefaultValue(uint settingId) 52 | { 53 | return null; 54 | } 55 | 56 | public List> GetStringValues(uint settingId) 57 | { 58 | var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId)); 59 | if (cached != null) 60 | return cached.SettingValues.Select(s => new SettingValue(Source) 61 | { 62 | Value = s.ValueStr, 63 | ValueName = string.Format("'{0}' ({1})", s.ValueStr.Trim(), s.ProfileNames), 64 | 65 | }).ToList(); 66 | 67 | return null; 68 | } 69 | 70 | public List> GetDwordValues(uint settingId) 71 | { 72 | var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId)); 73 | if (cached != null) 74 | return cached.SettingValues.Select(s => new SettingValue(Source) 75 | { 76 | Value = s.Value, 77 | ValueName = string.Format("0x{0:X8} ({1})", s.Value, s.ProfileNames), 78 | 79 | }).ToList(); 80 | 81 | return null; 82 | } 83 | 84 | public List GetSettingIds() 85 | { 86 | return CachedSettings.Select(c => c.SettingId).ToList(); 87 | } 88 | 89 | public byte[] GetBinaryDefaultValue(uint settingId) 90 | { 91 | return null; 92 | } 93 | 94 | public List> GetBinaryValues(uint settingId) 95 | { 96 | var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId)); 97 | if (cached != null) 98 | return cached.SettingValues.Select(s => new SettingValue(Source) 99 | { 100 | Value = s.ValueBin, 101 | ValueName = string.Format("{0} ({1})", DrsUtil.GetBinaryString(s.ValueBin), s.ProfileNames), 102 | 103 | }).ToList(); 104 | 105 | return null; 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /nspector/Common/Meta/SettingMeta.cs: -------------------------------------------------------------------------------- 1 | using nspector.Native.NVAPI2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace nspector.Common.Meta 8 | { 9 | internal class SettingMeta 10 | { 11 | public NVDRS_SETTING_TYPE? SettingType { get; set; } 12 | 13 | public string GroupName { get; set; } 14 | 15 | public string SettingName { get; set; } 16 | 17 | public string DefaultStringValue { get; set; } 18 | 19 | public uint DefaultDwordValue { get; set; } 20 | 21 | public byte[] DefaultBinaryValue { get; set; } 22 | 23 | public List> StringValues { get; set; } 24 | 25 | public List> DwordValues { get; set; } 26 | 27 | public List> BinaryValues { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /nspector/Common/Meta/SettingMetaSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace nspector.Common.Meta 7 | { 8 | public enum SettingMetaSource 9 | { 10 | CustomSettings = 10, 11 | DriverSettings = 20, 12 | ConstantSettings = 30, 13 | ReferenceSettings = 40, 14 | NvD3dUmxSettings = 50, 15 | ScannedSettings = 60, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /nspector/Common/Meta/SettingValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace nspector.Common.Meta 7 | { 8 | internal class SettingValue 9 | { 10 | 11 | public SettingMetaSource ValueSource; 12 | 13 | public SettingValue(SettingMetaSource source) 14 | { 15 | ValueSource = source; 16 | } 17 | 18 | public int ValuePos { get; set; } 19 | public string ValueName { get; set; } 20 | public T Value { get; set; } 21 | 22 | public override string ToString() 23 | { 24 | if (typeof(T) == typeof(uint)) 25 | return string.Format("Value=0x{0:X8}; ValueName={1}; Source={2};", Value, ValueName, ValueSource); 26 | 27 | return string.Format("Value={0}; ValueName={1};", Value, ValueName); 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /nspector/Common/NvapiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using nspector.Native.NVAPI2; 6 | 7 | namespace nspector.Common 8 | { 9 | public class NvapiException : Exception 10 | { 11 | public readonly NvAPI_Status Status; 12 | 13 | public NvapiException(string function, NvAPI_Status status) 14 | : base(function + " failed: " + status) 15 | { 16 | Status = status; 17 | } 18 | 19 | } 20 | 21 | public class NvapiAddApplicationException : NvapiException 22 | { 23 | public readonly string ApplicationName; 24 | 25 | public NvapiAddApplicationException(string applicationName) 26 | : base("DRS_CreateApplication", NvAPI_Status.NVAPI_EXECUTABLE_ALREADY_IN_USE) 27 | { 28 | ApplicationName = applicationName; 29 | } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /nspector/Common/SettingItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace nspector.Common 7 | { 8 | 9 | internal enum SettingState 10 | { 11 | NotAssiged, 12 | GlobalSetting, 13 | UserdefinedSetting, 14 | NvidiaSetting, 15 | } 16 | 17 | internal class SettingItem 18 | { 19 | public uint SettingId { get; set; } 20 | 21 | public string SettingText { get; set; } 22 | 23 | public string ValueText { get; set; } 24 | 25 | public string ValueRaw { get; set; } 26 | 27 | public string GroupName { get; set; } 28 | 29 | public SettingState State { get; set; } 30 | 31 | public bool IsStringValue { get; set; } 32 | 33 | public override string ToString() 34 | { 35 | return string.Format("{0}; 0x{1:X8}; {2}; {3}; {4};", State, SettingId, SettingText, ValueText, ValueRaw); 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /nspector/Common/SettingViewMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace nspector.Common 7 | { 8 | public enum SettingViewMode 9 | { 10 | Normal, 11 | IncludeScannedSetttings, 12 | CustomSettingsOnly, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /nspector/Images/0_gear2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/0_gear2.png -------------------------------------------------------------------------------- /nspector/Images/1_gear2_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/1_gear2_2.png -------------------------------------------------------------------------------- /nspector/Images/4_gear_nv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/4_gear_nv2.png -------------------------------------------------------------------------------- /nspector/Images/6_gear_inherit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/6_gear_inherit.png -------------------------------------------------------------------------------- /nspector/Images/Nvidia.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/Nvidia.ico -------------------------------------------------------------------------------- /nspector/Images/PortableDeviceStatus_3_16-011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/PortableDeviceStatus_3_16-011.png -------------------------------------------------------------------------------- /nspector/Images/apply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/apply.png -------------------------------------------------------------------------------- /nspector/Images/export1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/export1.png -------------------------------------------------------------------------------- /nspector/Images/filter_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/filter_user.png -------------------------------------------------------------------------------- /nspector/Images/find_set2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/find_set2.png -------------------------------------------------------------------------------- /nspector/Images/home_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/home_sm.png -------------------------------------------------------------------------------- /nspector/Images/ieframe_1_18212.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/ieframe_1_18212.png -------------------------------------------------------------------------------- /nspector/Images/ieframe_1_31073-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/ieframe_1_31073-002.png -------------------------------------------------------------------------------- /nspector/Images/import1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/import1.png -------------------------------------------------------------------------------- /nspector/Images/n1-016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/n1-016.png -------------------------------------------------------------------------------- /nspector/Images/nv_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/nv_btn.png -------------------------------------------------------------------------------- /nspector/Images/shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/shield.png -------------------------------------------------------------------------------- /nspector/Images/shield16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/shield16.ico -------------------------------------------------------------------------------- /nspector/Images/text_binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/text_binary.png -------------------------------------------------------------------------------- /nspector/Images/transparent16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/transparent16.png -------------------------------------------------------------------------------- /nspector/Images/window_application_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/window_application_add.png -------------------------------------------------------------------------------- /nspector/Images/window_application_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/nspector/Images/window_application_delete.png -------------------------------------------------------------------------------- /nspector/ListViewEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Drawing; 6 | using System.Runtime.InteropServices; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace nspector 11 | { 12 | internal delegate void DropFilesNativeHandler(string[] files); 13 | 14 | internal class ListViewEx : ListView 15 | { 16 | 17 | public event DropFilesNativeHandler OnDropFilesNative; 18 | 19 | [DllImport("user32.dll")] 20 | private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wPar, IntPtr lPar); 21 | 22 | private const int LVM_FIRST = 0x1000; 23 | private const int LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59); 24 | 25 | private const int WM_PAINT = 0x000F; 26 | 27 | private struct EmbeddedControl 28 | { 29 | internal Control Control; 30 | internal int Column; 31 | internal int Row; 32 | internal DockStyle Dock; 33 | internal ListViewItem Item; 34 | } 35 | 36 | private ArrayList _embeddedControls = new ArrayList(); 37 | 38 | public ListViewEx() 39 | { 40 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); 41 | this.SetStyle(ControlStyles.EnableNotifyMessage, true); 42 | } 43 | 44 | protected override void OnNotifyMessage(Message m) 45 | { 46 | if (m.Msg != 0x14) 47 | { 48 | base.OnNotifyMessage(m); 49 | } 50 | } 51 | 52 | protected int[] GetColumnOrder() 53 | { 54 | IntPtr lPar = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)) * Columns.Count); 55 | 56 | IntPtr res = SendMessage(Handle, LVM_GETCOLUMNORDERARRAY, new IntPtr(Columns.Count), lPar); 57 | if (res.ToInt32() == 0) 58 | { 59 | Marshal.FreeHGlobal(lPar); 60 | return null; 61 | } 62 | 63 | int [] order = new int[Columns.Count]; 64 | Marshal.Copy(lPar, order, 0, Columns.Count); 65 | 66 | Marshal.FreeHGlobal(lPar); 67 | 68 | return order; 69 | } 70 | 71 | protected Rectangle GetSubItemBounds(ListViewItem Item, int SubItem) 72 | { 73 | Rectangle subItemRect = Rectangle.Empty; 74 | 75 | if (Item == null) 76 | throw new ArgumentNullException("Item"); 77 | 78 | int[] order = GetColumnOrder(); 79 | if (order == null) // No Columns 80 | return subItemRect; 81 | 82 | if (SubItem >= order.Length) 83 | throw new IndexOutOfRangeException("SubItem "+SubItem+" out of range"); 84 | 85 | Rectangle lviBounds = Item.GetBounds(ItemBoundsPortion.Entire); 86 | int subItemX = lviBounds.Left; 87 | 88 | ColumnHeader col; 89 | int i; 90 | for (i=0; i=Columns.Count || row>=Items.Count) 113 | throw new ArgumentOutOfRangeException(); 114 | 115 | EmbeddedControl ec; 116 | ec.Control = c; 117 | ec.Column = col; 118 | ec.Row = row; 119 | ec.Dock = dock; 120 | ec.Item = Items[row]; 121 | 122 | _embeddedControls.Add(ec); 123 | 124 | c.Click += new EventHandler(_embeddedControl_Click); 125 | 126 | this.Controls.Add(c); 127 | } 128 | 129 | internal void RemoveEmbeddedControl(Control c) 130 | { 131 | if (c == null) 132 | throw new ArgumentNullException(); 133 | 134 | for (int i=0; i<_embeddedControls.Count; i++) 135 | { 136 | EmbeddedControl ec = (EmbeddedControl)_embeddedControls[i]; 137 | if (ec.Control == c) 138 | { 139 | c.Click -= new EventHandler(_embeddedControl_Click); 140 | this.Controls.Remove(c); 141 | _embeddedControls.RemoveAt(i); 142 | return; 143 | } 144 | } 145 | } 146 | 147 | internal Control GetEmbeddedControl(int col, int row) 148 | { 149 | foreach (EmbeddedControl ec in _embeddedControls) 150 | if (ec.Row == row && ec.Column == col) 151 | return ec.Control; 152 | 153 | return null; 154 | } 155 | 156 | [DefaultValue(View.LargeIcon)] 157 | internal new View View 158 | { 159 | get 160 | { 161 | return base.View; 162 | } 163 | set 164 | { 165 | foreach (EmbeddedControl ec in _embeddedControls) 166 | ec.Control.Visible = (value == View.Details); 167 | 168 | base.View = value; 169 | } 170 | } 171 | 172 | [DllImport("shell32.dll", CharSet = CharSet.Auto)] 173 | public static extern int DragQueryFile(IntPtr hDrop, uint iFile, [Out] StringBuilder lpszFile, int cch); 174 | private const int WM_DROPFILES = 0x233; 175 | 176 | protected override void WndProc(ref Message m) 177 | { 178 | switch (m.Msg) 179 | { 180 | case WM_PAINT: 181 | if (View != View.Details) 182 | break; 183 | 184 | foreach (EmbeddedControl ec in _embeddedControls) 185 | { 186 | Rectangle rc = this.GetSubItemBounds(ec.Item, ec.Column); 187 | 188 | if ((this.HeaderStyle != ColumnHeaderStyle.None) && 189 | (rc.Top 0) 239 | { 240 | var files = new List(); 241 | 242 | for (uint i = 0; i < dropped; i++) 243 | { 244 | var size = DragQueryFile(m.WParam, i, null, 0); 245 | if (size > 0) 246 | { 247 | var sb = new StringBuilder(size + 1); 248 | var result = DragQueryFile(m.WParam, i, sb, size + 1); 249 | files.Add(sb.ToString()); 250 | } 251 | } 252 | 253 | OnDropFilesNative(files.ToArray()); 254 | } 255 | } 256 | 257 | base.WndProc(ref m); 258 | break; 259 | } 260 | base.WndProc (ref m); 261 | } 262 | 263 | private void _embeddedControl_Click(object sender, EventArgs e) 264 | { 265 | foreach (EmbeddedControl ec in _embeddedControls) 266 | { 267 | if (ec.Control == (Control)sender) 268 | { 269 | this.SelectedItems.Clear(); 270 | ec.Item.Selected = true; 271 | } 272 | } 273 | } 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /nspector/Native/NVAPI/NvApiDriverSettings.tt: -------------------------------------------------------------------------------- 1 | <#@ template debug="false" hostspecific="true" language="C#" #> 2 | <#@ assembly name="System.Core" #> 3 | <#@ import namespace="System.Linq" #> 4 | <#@ import namespace="System.Text" #> 5 | <#@ import namespace="System.Collections.Generic" #> 6 | <#@ import namespace="System.IO" #> 7 | <#@ import namespace="System.Text.RegularExpressions" #> 8 | <#@ output extension=".cs" #> 9 | namespace nspector.Native.NvApi.DriverSettings 10 | { 11 | <# 12 | string absolutePath = Host.ResolvePath("NvApiDriverSettings.h"); 13 | string contents = File.ReadAllText(absolutePath); 14 | 15 | string pattern = "enum\\s+(?.*?)\\{(?.*?)\\}"; 16 | var rx = new Regex(pattern, RegexOptions.Singleline); 17 | foreach (Match m in rx.Matches(contents)) 18 | { 19 | PushIndent("\t"); 20 | 21 | string enumSrc = m.Result("${enums}").Trim(); 22 | string enumType = ""; 23 | 24 | if (Regex.IsMatch(enumSrc, "0x[A-Fa-f0-9]{8}L")) 25 | enumType = " : ulong"; 26 | else if (Regex.IsMatch(enumSrc, @".*?=\s+-.*?")) 27 | enumType = " : int"; 28 | else 29 | enumType = " : uint"; 30 | 31 | WriteLine("public enum " + m.Result("${name}").Trim() + enumType + " {"); 32 | 33 | WriteLine("\t" + enumSrc); 34 | 35 | WriteLine("}"); 36 | 37 | PopIndent(); 38 | WriteLine(""); 39 | } 40 | 41 | #> 42 | } -------------------------------------------------------------------------------- /nspector/Native/NativeArrayHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | 7 | namespace nspector.Native 8 | { 9 | internal class NativeArrayHelper 10 | { 11 | public static T GetArrayItemData(IntPtr sourcePointer) 12 | { 13 | return (T)Marshal.PtrToStructure(sourcePointer, typeof(T)); 14 | } 15 | 16 | public static T[] GetArrayData(IntPtr sourcePointer, int itemCount) 17 | { 18 | var lstResult = new List(); 19 | if (sourcePointer != IntPtr.Zero && itemCount > 0) 20 | { 21 | var sizeOfItem = Marshal.SizeOf(typeof(T)); 22 | for (int i = 0; i < itemCount; i++) 23 | { 24 | lstResult.Add(GetArrayItemData(sourcePointer + (sizeOfItem * i))); 25 | } 26 | } 27 | return lstResult.ToArray(); 28 | } 29 | 30 | public static void SetArrayData(T[] items, out IntPtr targetPointer) 31 | { 32 | if (items != null && items.Length > 0) 33 | { 34 | var sizeOfItem = Marshal.SizeOf(typeof(T)); 35 | targetPointer = Marshal.AllocHGlobal(sizeOfItem * items.Length); 36 | for (int i = 0; i < items.Length; i++) 37 | { 38 | Marshal.StructureToPtr(items[i], targetPointer + (sizeOfItem * i), true); 39 | } 40 | } 41 | else 42 | { 43 | targetPointer = IntPtr.Zero; 44 | } 45 | 46 | } 47 | 48 | public static void SetArrayItemData(T item, out IntPtr targetPointer) 49 | { 50 | var sizeOfItem = Marshal.SizeOf(typeof(T)); 51 | targetPointer = Marshal.AllocHGlobal(sizeOfItem); 52 | Marshal.StructureToPtr(item, targetPointer, true); 53 | } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /nspector/Native/WINAPI/DragAcceptNativeHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace nspector.Native.WINAPI 5 | { 6 | internal static class DragAcceptNativeHelper 7 | { 8 | /// 9 | /// Modifies the User Interface Privilege Isolation (UIPI) message filter for whole process. (Vista only) 10 | /// 11 | /// 12 | /// 13 | /// 14 | [DllImport("user32.dll", SetLastError = true)] 15 | internal static extern IntPtr ChangeWindowMessageFilter(int message, int dwFlag); 16 | 17 | /// 18 | /// Modifies the User Interface Privilege Isolation (UIPI) message filter for a specified window. (Win7 or higher) 19 | /// 20 | /// 21 | /// 22 | /// 23 | /// 24 | [DllImport("user32.dll", SetLastError = true)] 25 | internal static extern IntPtr ChangeWindowMessageFilterEx(IntPtr handle, int message, int action, IntPtr pChangeFilterStruct); 26 | 27 | //ChangeWindowMessageFilter 28 | internal const int MSGFLT_ADD = 1; 29 | internal const int MSGFLT_REMOVE = 2; 30 | 31 | //ChangeWindowMessageFilterEx 32 | internal const int MSGFLT_ALLOW = 1; 33 | internal const int MSGFLT_DISALLOW = 2; 34 | internal const int MSGFLT_RESET = 3; 35 | 36 | 37 | [DllImport("shell32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)] 38 | public static extern void DragAcceptFiles(IntPtr hWnd, bool fAccept); 39 | 40 | internal const int WM_DROPFILES = 0x233; 41 | internal const int WM_COPYDATA = 0x004A; 42 | internal const int WM_COPYGLOBALDATA = 0x0049; 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /nspector/Native/WINAPI/SafeNativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace nspector.Native.WINAPI 4 | { 5 | static class SafeNativeMethods 6 | { 7 | [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)] 8 | [return: MarshalAs(UnmanagedType.Bool)] 9 | internal static extern bool DeleteFile(string name); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /nspector/Native/WINAPI/TaskBarList3.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace nspector.Native.WINAPI 6 | { 7 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 8 | internal struct THUMBBUTTON 9 | { 10 | Int32 dwMask; 11 | uint iId; 12 | uint iBitmap; 13 | IntPtr hIcon; 14 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] 15 | string szTip; 16 | Int32 dwFlags; 17 | } 18 | 19 | [Flags] 20 | internal enum THBF 21 | { 22 | THBF_ENABLED = 0x0000, 23 | THBF_DISABLED = 0x0001, 24 | THBF_DISMISSONCLICK = 0x0002, 25 | THBF_NOBACKGROUND = 0x0004, 26 | THBF_HIDDEN = 0x0008 27 | } 28 | 29 | [Flags] 30 | internal enum THB 31 | { 32 | THB_BITMAP = 0x0001, 33 | THB_ICON = 0x0002, 34 | THB_TOOLTIP = 0x0004, 35 | THB_FLAGS = 0x0008, 36 | THBN_CLICKED = 0x1800 37 | } 38 | 39 | internal enum TBPFLAG 40 | { 41 | TBPF_NOPROGRESS = 0, 42 | TBPF_INDETERMINATE = 0x1, 43 | TBPF_NORMAL = 0x2, 44 | TBPF_ERROR = 0x4, 45 | TBPF_PAUSED = 0x8 46 | } 47 | 48 | internal enum TBATFLAG 49 | { 50 | TBATF_USEMDITHUMBNAIL = 0x1, 51 | TBATF_USEMDILIVEPREVIEW = 0x2 52 | } 53 | 54 | [ComImport, 55 | Guid("EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF"), 56 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 57 | internal interface ITaskbarList3 58 | { 59 | 60 | [MethodImpl(MethodImplOptions.InternalCall, 61 | MethodCodeType = MethodCodeType.Runtime)] 62 | void HrInit(); 63 | 64 | [MethodImpl(MethodImplOptions.InternalCall, 65 | MethodCodeType = MethodCodeType.Runtime)] 66 | void AddTab([In] IntPtr hwnd); 67 | 68 | [MethodImpl(MethodImplOptions.InternalCall, 69 | MethodCodeType = MethodCodeType.Runtime)] 70 | void DeleteTab([In] IntPtr hwnd); 71 | 72 | [MethodImpl(MethodImplOptions.InternalCall, 73 | MethodCodeType = MethodCodeType.Runtime)] 74 | void ActivateTab([In] IntPtr hwnd); 75 | 76 | [MethodImpl(MethodImplOptions.InternalCall, 77 | MethodCodeType = MethodCodeType.Runtime)] 78 | void SetActiveAlt([In] IntPtr hwnd); 79 | 80 | [MethodImpl(MethodImplOptions.InternalCall, 81 | MethodCodeType = MethodCodeType.Runtime)] 82 | void MarkFullscreenWindow([In] IntPtr hwnd, 83 | [In, MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 84 | 85 | [MethodImpl(MethodImplOptions.InternalCall, 86 | MethodCodeType = MethodCodeType.Runtime)] 87 | void SetProgressValue([In] IntPtr hwnd, 88 | [In] ulong ullCompleted, 89 | [In] ulong ullTotal); 90 | 91 | [MethodImpl(MethodImplOptions.InternalCall, 92 | MethodCodeType = MethodCodeType.Runtime)] 93 | void SetProgressState([In] IntPtr hwnd, 94 | [In] TBPFLAG tbpFlags); 95 | 96 | [MethodImpl(MethodImplOptions.InternalCall, 97 | MethodCodeType = MethodCodeType.Runtime)] 98 | void RegisterTab([In] IntPtr hwndTab, 99 | [In] IntPtr hwndMDI); 100 | 101 | [MethodImpl(MethodImplOptions.InternalCall, 102 | MethodCodeType = MethodCodeType.Runtime)] 103 | void UnregisterTab([In] IntPtr hwndTab); 104 | 105 | [MethodImpl(MethodImplOptions.InternalCall, 106 | MethodCodeType = MethodCodeType.Runtime)] 107 | void SetTabOrder([In] IntPtr hwndTab, 108 | [In] IntPtr hwndInsertBefore); 109 | 110 | [MethodImpl(MethodImplOptions.InternalCall, 111 | MethodCodeType = MethodCodeType.Runtime)] 112 | void SetTabActive([In] IntPtr hwndTab, 113 | [In] IntPtr hwndMDI, 114 | [In] TBATFLAG tbatFlags); 115 | 116 | //preliminary 117 | [MethodImpl(MethodImplOptions.InternalCall, 118 | MethodCodeType = MethodCodeType.Runtime)] 119 | void ThumbBarAddButtons([In] IntPtr hwnd, 120 | [In] uint cButtons, 121 | [In] IntPtr pButton); 122 | ///* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton); 123 | 124 | //preliminary 125 | [MethodImpl(MethodImplOptions.InternalCall, 126 | MethodCodeType = MethodCodeType.Runtime)] 127 | void ThumbBarUpdateButtons([In] IntPtr hwnd, 128 | [In] uint cButtons, 129 | [In] IntPtr pButton); 130 | ///* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton); 131 | 132 | [MethodImpl(MethodImplOptions.InternalCall, 133 | MethodCodeType = MethodCodeType.Runtime)] 134 | void ThumbBarSetImageList([In] IntPtr hwnd, 135 | [In] IntPtr himl); 136 | 137 | [MethodImpl(MethodImplOptions.InternalCall, 138 | MethodCodeType = MethodCodeType.Runtime)] 139 | void SetOverlayIcon([In] IntPtr hwnd, 140 | [In] IntPtr hIcon, 141 | [In, MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 142 | 143 | [MethodImpl(MethodImplOptions.InternalCall, 144 | MethodCodeType = MethodCodeType.Runtime)] 145 | void SetThumbnailTooltip([In] IntPtr hwnd, 146 | [In, MarshalAs(UnmanagedType.LPWStr)] string pszTip); 147 | 148 | //preliminary 149 | [MethodImpl(MethodImplOptions.InternalCall, 150 | MethodCodeType = MethodCodeType.Runtime)] 151 | void SetThumbnailClip([In] IntPtr hwnd, 152 | [In] IntPtr prcClip); 153 | 154 | } 155 | 156 | 157 | [ComImport] 158 | [Guid("56FDF344-FD6D-11d0-958A-006097C9A090")] 159 | internal class TaskbarList { } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /nspector/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Threading; 5 | using System.Windows.Forms; 6 | using nspector.Common; 7 | using nspector.Common.Import; 8 | using nspector.Native.WINAPI; 9 | 10 | namespace nspector 11 | { 12 | static class Program 13 | { 14 | /// 15 | /// The main entry point for the application. 16 | /// 17 | /// 18 | [STAThread] 19 | static void Main(string[] args) 20 | { 21 | try 22 | { 23 | // Remove Zone.Identifier from Alternate Data Stream 24 | SafeNativeMethods.DeleteFile(Application.ExecutablePath + ":Zone.Identifier"); 25 | } 26 | catch { } 27 | #if RELEASE 28 | try 29 | { 30 | #endif 31 | Application.EnableVisualStyles(); 32 | Application.SetCompatibleTextRenderingDefault(false); 33 | 34 | var argFileIndex = ArgFileIndex(args); 35 | if (argFileIndex != -1) 36 | { 37 | 38 | if (new FileInfo(args[argFileIndex]).Extension.ToLower() == ".nip") 39 | { 40 | try 41 | { 42 | var import = DrsServiceLocator.ImportService; 43 | var importReport = import.ImportProfiles(args[argFileIndex]); 44 | GC.Collect(); 45 | Process current = Process.GetCurrentProcess(); 46 | foreach ( 47 | Process process in 48 | Process.GetProcessesByName(current.ProcessName.Replace(".vshost", ""))) 49 | { 50 | if (process.Id != current.Id && process.MainWindowTitle.Contains("Settings")) 51 | { 52 | MessageHelper mh = new MessageHelper(); 53 | mh.sendWindowsStringMessage((int)process.MainWindowHandle, 0, "ProfilesImported"); 54 | } 55 | } 56 | 57 | if (string.IsNullOrEmpty(importReport) && !ArgExists(args, "-silentImport") && !ArgExists(args, "-silent")) 58 | { 59 | frmDrvSettings.ShowImportDoneMessage(importReport); 60 | } 61 | } 62 | catch (Exception ex) 63 | { 64 | MessageBox.Show("Import Error: " + ex.Message, Application.ProductName + " Error", 65 | MessageBoxButtons.OK, MessageBoxIcon.Error); 66 | } 67 | } 68 | } 69 | 70 | else if (ArgExists(args, "-createCSN")) 71 | { 72 | File.WriteAllText("CustomSettingNames.xml", Properties.Resources.CustomSettingNames); 73 | } 74 | else 75 | { 76 | 77 | bool createdNew = true; 78 | using (Mutex mutex = new Mutex(true, Application.ProductName, out createdNew)) 79 | { 80 | if (createdNew) 81 | { 82 | Application.Run(new frmDrvSettings(ArgExists(args, "-showOnlyCSN"), ArgExists(args, "-disableScan"))); 83 | } 84 | else 85 | { 86 | Process current = Process.GetCurrentProcess(); 87 | foreach ( 88 | Process process in 89 | Process.GetProcessesByName(current.ProcessName.Replace(".vshost", ""))) 90 | { 91 | if (process.Id != current.Id && process.MainWindowTitle.Contains("Settings")) 92 | { 93 | MessageHelper mh = new MessageHelper(); 94 | mh.bringAppToFront((int)process.MainWindowHandle); 95 | } 96 | } 97 | } 98 | } 99 | } 100 | #if RELEASE 101 | 102 | } 103 | catch (Exception ex) 104 | { 105 | MessageBox.Show(ex.Message + "\r\n\r\n" + ex.StackTrace ,"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 106 | } 107 | #endif 108 | 109 | } 110 | 111 | static bool ArgExists(string[] args, string arg) 112 | { 113 | foreach (string a in args) 114 | { 115 | if (a.ToUpper() == arg.ToUpper()) 116 | return true; 117 | } 118 | return false; 119 | } 120 | 121 | static int ArgFileIndex(string[] args) 122 | { 123 | for (int i = 0; i < args.Length; i++) 124 | { 125 | if (File.Exists(args[i])) 126 | return i; 127 | } 128 | 129 | return -1; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /nspector/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NVidiaProfileInspectorDmW")] 9 | [assembly: AssemblyDescription("NVIDIA Profile Inspector - Modified by DeadManWalking")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Modified by DeadManWalking (DeadManWalkingTO-Github)")] 12 | [assembly: AssemblyProduct("NVIDIA Profile Inspector DmW")] 13 | [assembly: AssemblyCopyright("©2017 by Orbmu2k")] 14 | [assembly: AssemblyTrademark("Modified by DeadManWalking")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c2fe2861-54c5-4d63-968e-30472019bed3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.5.0.0")] 36 | [assembly: AssemblyFileVersion("3.5.0.0")] 37 | 38 | 39 | -------------------------------------------------------------------------------- /nspector/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace nspector.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("nspector.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | public static System.Drawing.Bitmap apply { 67 | get { 68 | object obj = ResourceManager.GetObject("apply", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> 75 | ///<!-- Rewrite by DeadManWalking (DeadManWalkingTO-GitHub) --> 76 | ///<CustomSettingNames> 77 | /// <ShowCustomizedSettingNamesOnly>false</ShowCustomizedSettingNamesOnly> 78 | /// <Settings> 79 | /// 80 | ///<!-- Group 1 - Compatibility --> 81 | /// 82 | /// <CustomSetting> 83 | /// <UserfriendlyName>Antialiasing fix</UserfriendlyName> 84 | /// <HexSettingID>0x000858F7</HexSettingID> 85 | /// <MinRequiredDriverVersion>320.14</MinRequiredDriverVersion> 86 | /// <Description /> 87 | /// <GroupName>1 - Compatibility</GroupNa [rest of string was truncated]";. 88 | /// 89 | public static string CustomSettingNames { 90 | get { 91 | return ResourceManager.GetString("CustomSettingNames", resourceCulture); 92 | } 93 | } 94 | 95 | /// 96 | /// Looks up a localized resource of type System.Drawing.Bitmap. 97 | /// 98 | public static System.Drawing.Bitmap export1 { 99 | get { 100 | object obj = ResourceManager.GetObject("export1", resourceCulture); 101 | return ((System.Drawing.Bitmap)(obj)); 102 | } 103 | } 104 | 105 | /// 106 | /// Looks up a localized resource of type System.Drawing.Bitmap. 107 | /// 108 | public static System.Drawing.Bitmap filter_user { 109 | get { 110 | object obj = ResourceManager.GetObject("filter_user", resourceCulture); 111 | return ((System.Drawing.Bitmap)(obj)); 112 | } 113 | } 114 | 115 | /// 116 | /// Looks up a localized resource of type System.Drawing.Bitmap. 117 | /// 118 | public static System.Drawing.Bitmap find_set2 { 119 | get { 120 | object obj = ResourceManager.GetObject("find_set2", resourceCulture); 121 | return ((System.Drawing.Bitmap)(obj)); 122 | } 123 | } 124 | 125 | /// 126 | /// Looks up a localized resource of type System.Drawing.Bitmap. 127 | /// 128 | public static System.Drawing.Bitmap home_sm { 129 | get { 130 | object obj = ResourceManager.GetObject("home_sm", resourceCulture); 131 | return ((System.Drawing.Bitmap)(obj)); 132 | } 133 | } 134 | 135 | /// 136 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 137 | /// 138 | public static System.Drawing.Icon Icon1 { 139 | get { 140 | object obj = ResourceManager.GetObject("Icon1", resourceCulture); 141 | return ((System.Drawing.Icon)(obj)); 142 | } 143 | } 144 | 145 | /// 146 | /// Looks up a localized resource of type System.Drawing.Bitmap. 147 | /// 148 | public static System.Drawing.Bitmap ieframe_1_18212 { 149 | get { 150 | object obj = ResourceManager.GetObject("ieframe_1_18212", resourceCulture); 151 | return ((System.Drawing.Bitmap)(obj)); 152 | } 153 | } 154 | 155 | /// 156 | /// Looks up a localized resource of type System.Drawing.Bitmap. 157 | /// 158 | public static System.Drawing.Bitmap ieframe_1_31073_002 { 159 | get { 160 | object obj = ResourceManager.GetObject("ieframe_1_31073_002", resourceCulture); 161 | return ((System.Drawing.Bitmap)(obj)); 162 | } 163 | } 164 | 165 | /// 166 | /// Looks up a localized resource of type System.Drawing.Bitmap. 167 | /// 168 | public static System.Drawing.Bitmap import1 { 169 | get { 170 | object obj = ResourceManager.GetObject("import1", resourceCulture); 171 | return ((System.Drawing.Bitmap)(obj)); 172 | } 173 | } 174 | 175 | /// 176 | /// Looks up a localized resource of type System.Drawing.Bitmap. 177 | /// 178 | public static System.Drawing.Bitmap n1_016 { 179 | get { 180 | object obj = ResourceManager.GetObject("n1_016", resourceCulture); 181 | return ((System.Drawing.Bitmap)(obj)); 182 | } 183 | } 184 | 185 | /// 186 | /// Looks up a localized resource of type System.Drawing.Bitmap. 187 | /// 188 | public static System.Drawing.Bitmap nv_btn { 189 | get { 190 | object obj = ResourceManager.GetObject("nv_btn", resourceCulture); 191 | return ((System.Drawing.Bitmap)(obj)); 192 | } 193 | } 194 | 195 | /// 196 | /// Looks up a localized resource of type System.Drawing.Bitmap. 197 | /// 198 | public static System.Drawing.Bitmap PortableDeviceStatus_3_16_011 { 199 | get { 200 | object obj = ResourceManager.GetObject("PortableDeviceStatus_3_16_011", resourceCulture); 201 | return ((System.Drawing.Bitmap)(obj)); 202 | } 203 | } 204 | 205 | /// 206 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 207 | /// 208 | public static System.Drawing.Icon shield16 { 209 | get { 210 | object obj = ResourceManager.GetObject("shield16", resourceCulture); 211 | return ((System.Drawing.Icon)(obj)); 212 | } 213 | } 214 | 215 | /// 216 | /// Looks up a localized resource of type System.Drawing.Bitmap. 217 | /// 218 | public static System.Drawing.Bitmap text_binary { 219 | get { 220 | object obj = ResourceManager.GetObject("text_binary", resourceCulture); 221 | return ((System.Drawing.Bitmap)(obj)); 222 | } 223 | } 224 | 225 | /// 226 | /// Looks up a localized resource of type System.Drawing.Bitmap. 227 | /// 228 | public static System.Drawing.Bitmap transparent16 { 229 | get { 230 | object obj = ResourceManager.GetObject("transparent16", resourceCulture); 231 | return ((System.Drawing.Bitmap)(obj)); 232 | } 233 | } 234 | 235 | /// 236 | /// Looks up a localized resource of type System.Drawing.Bitmap. 237 | /// 238 | public static System.Drawing.Bitmap window_application_add { 239 | get { 240 | object obj = ResourceManager.GetObject("window_application_add", resourceCulture); 241 | return ((System.Drawing.Bitmap)(obj)); 242 | } 243 | } 244 | 245 | /// 246 | /// Looks up a localized resource of type System.Drawing.Bitmap. 247 | /// 248 | public static System.Drawing.Bitmap window_application_delete { 249 | get { 250 | object obj = ResourceManager.GetObject("window_application_delete", resourceCulture); 251 | return ((System.Drawing.Bitmap)(obj)); 252 | } 253 | } 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /nspector/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /nspector/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | true 13 | 14 | 15 | -------------------------------------------------------------------------------- /nspector/dmw.cs: -------------------------------------------------------------------------------- 1 | //Copyright(c) 2018-2019 DeadManWalking (DeadManWalkingTO-Github) 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Net.NetworkInformation; 8 | using System.Net; 9 | using System.Reflection; 10 | using System.Windows.Forms; 11 | using System.Threading; 12 | 13 | namespace DmW 14 | { 15 | class DmWcode 16 | { 17 | public static bool CheckForInternetConnection() 18 | { 19 | try 20 | { 21 | Ping myPing = new Ping(); 22 | String host = "github.com"; 23 | byte[] buffer = new byte[32]; 24 | int timeout = 1000; 25 | PingOptions pingOptions = new PingOptions(); 26 | PingReply reply = myPing.Send(host, timeout, buffer, pingOptions); 27 | return (reply.Status == IPStatus.Success); 28 | } 29 | catch (Exception) 30 | { 31 | return false; 32 | } 33 | } 34 | 35 | public static string CheckForNewVersion() 36 | { 37 | try 38 | { 39 | using (WebClient client = new WebClient()) 40 | { 41 | string s = client.DownloadString("https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/master/version"); 42 | return s; 43 | } 44 | } 45 | catch (Exception) 46 | { 47 | return ""; 48 | } 49 | } 50 | 51 | public static string DmWassemblyVersion() 52 | { 53 | 54 | string assemblyVersion = "v" + Assembly.GetExecutingAssembly().GetName().Version.ToString(); 55 | return assemblyVersion; 56 | } 57 | 58 | public static string DmWgitVersion() 59 | { 60 | string v = CheckForNewVersion(); 61 | string GitVersion = v.Substring(0, DmWassemblyVersion().Length); 62 | return GitVersion; 63 | } 64 | 65 | public static bool NewVersion() 66 | { 67 | bool InetCon = CheckForInternetConnection(); 68 | if (InetCon) 69 | { 70 | if (DmWassemblyVersion().Equals(DmWgitVersion())) { return false; } else { return true; }; 71 | } 72 | else 73 | { 74 | return false; 75 | } 76 | } 77 | 78 | public static void NewVersionDownload() 79 | { 80 | if (NewVersion()) 81 | { 82 | string msg = "New version is avaible : " + DmWgitVersion() + Environment.NewLine + "Current version: " + DmWassemblyVersion() + Environment.NewLine + "Download new version?"; 83 | DialogResult dialogResult = MessageBox.Show(msg, "New version", MessageBoxButtons.YesNo); 84 | if (dialogResult == DialogResult.Yes) 85 | { 86 | System.Diagnostics.Process.Start("https://github.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/releases/latest"); 87 | } 88 | else if (dialogResult == DialogResult.No) 89 | { 90 | //do nothing 91 | } 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /nspector/frmBitEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Drawing; 4 | using System.Globalization; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Windows.Forms; 8 | using nspector.Common; 9 | using nspector.Common.CustomSettings; 10 | 11 | namespace nspector 12 | { 13 | internal partial class frmBitEditor : Form 14 | { 15 | private uint _Settingid = 0; 16 | private frmDrvSettings _SettingsOwner = null; 17 | private uint _InitValue = 0; 18 | private uint _CurrentValue = 0; 19 | 20 | 21 | internal frmBitEditor() 22 | { 23 | InitializeComponent(); 24 | this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 25 | this.DoubleBuffered = true; 26 | } 27 | 28 | internal void ShowDialog(frmDrvSettings SettingsOwner, uint SettingId, uint InitValue, string SettingName) 29 | { 30 | _Settingid = SettingId; 31 | _SettingsOwner = SettingsOwner; 32 | _InitValue = InitValue; 33 | Text = string.Format("Bit Value Editor - {0}", SettingName); 34 | this.ShowDialog(SettingsOwner); 35 | } 36 | 37 | private void frmBitEditor_Load(object sender, EventArgs e) 38 | { 39 | SplitBitsFromUnknownSettings(); 40 | clbBits.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); 41 | SetValue(_InitValue); 42 | } 43 | 44 | private void SplitBitsFromUnknownSettings() 45 | { 46 | uint lastValue = 0; 47 | lastValue = _CurrentValue; 48 | string[] filters = tbFilter.Text.Split(','); 49 | clbBits.Items.Clear(); 50 | 51 | var referenceSettings = DrsServiceLocator.ReferenceSettings?.Settings.FirstOrDefault(s => s.SettingId == _Settingid); 52 | 53 | var settingsCache = DrsServiceLocator.ScannerService.CachedSettings.FirstOrDefault(x => x.SettingId == _Settingid); 54 | if (settingsCache != null) 55 | { 56 | for (int bit = 0; bit < 32; bit++) 57 | { 58 | string profileNames = ""; 59 | uint profileCount = 0; 60 | 61 | for (int i = 0; i < settingsCache.SettingValues.Count; i++) 62 | { 63 | if (((settingsCache.SettingValues[i].Value >> bit) & 0x1) == 0x1) 64 | { 65 | if (filters.Length == 0) 66 | { 67 | profileNames += settingsCache.SettingValues[i].ProfileNames + ","; 68 | } 69 | else 70 | { 71 | string[] settingProfileNames = settingsCache.SettingValues[i].ProfileNames.ToString().Split(','); 72 | for (int p = 0; p < settingProfileNames.Length; p++) 73 | { 74 | for (int f = 0; f < filters.Length; f++) 75 | { 76 | if (settingProfileNames[p].ToLower().Contains(filters[f].ToLower())) 77 | { 78 | profileNames += settingProfileNames[p] + ","; 79 | } 80 | } 81 | } 82 | } 83 | profileCount += settingsCache.SettingValues[i].ValueProfileCount; 84 | } 85 | } 86 | 87 | uint mask = (uint)1 << bit; 88 | string maskStr=""; 89 | 90 | if (referenceSettings != null) 91 | { 92 | var maskValue = referenceSettings.SettingValues.FirstOrDefault(v => v.SettingValue == mask); 93 | if (maskValue != null) 94 | { 95 | maskStr = maskValue.UserfriendlyName; 96 | if (maskStr.Contains("(")) 97 | { 98 | maskStr = maskStr.Substring(0, maskStr.IndexOf("(") - 1); 99 | } 100 | } 101 | } 102 | 103 | clbBits.Items.Add(new ListViewItem(new string[] { 104 | string.Format("#{0:00}",bit), 105 | maskStr, 106 | profileCount.ToString(), 107 | profileNames, 108 | })); 109 | 110 | } 111 | } 112 | 113 | SetValue(lastValue); 114 | } 115 | 116 | private void updateValue(bool changeState, int changedIndex) 117 | { 118 | uint val = 0; 119 | for (int b = 0; b < clbBits.Items.Count; b++) 120 | { 121 | if (((clbBits.Items[b].Checked) && changedIndex != b) || (changeState && (changedIndex == b))) 122 | { 123 | val = (uint)((uint)val | (uint)(1 << b)); 124 | } 125 | } 126 | 127 | UpdateCurrent(val); 128 | } 129 | 130 | private void UpdateValue() 131 | { 132 | uint val = 0; 133 | for (int b = 0; b < clbBits.Items.Count; b++) 134 | { 135 | if (clbBits.Items[b].Checked) 136 | { 137 | val = (uint)((uint)val | (uint)(1 << b)); 138 | } 139 | } 140 | 141 | UpdateCurrent(val); 142 | } 143 | 144 | 145 | private void SetValue(uint val) 146 | { 147 | for (int b = 0; b < clbBits.Items.Count; b++) 148 | { 149 | if (((val >> b) & 0x1) == 0x1) 150 | clbBits.Items[b].Checked = true; 151 | else 152 | clbBits.Items[b].Checked = false; 153 | } 154 | 155 | UpdateValue(); 156 | } 157 | 158 | private void UpdateCurrent(uint val) 159 | { 160 | _CurrentValue = val; 161 | textBox1.Text = "0x" + (val).ToString("X8"); 162 | } 163 | 164 | private void UpdateCurrent(string text) 165 | { 166 | uint val = DrsUtil.ParseDwordByInputSafe(text); 167 | UpdateCurrent(val); 168 | SetValue(val); 169 | } 170 | 171 | private void clbBits_ItemCheck(object sender, ItemCheckEventArgs e) 172 | { 173 | updateValue(e.NewValue == CheckState.Checked, e.Index); 174 | } 175 | 176 | private void btnClose_Click(object sender, EventArgs e) 177 | { 178 | _SettingsOwner.SetSelectedDwordValue(_CurrentValue); 179 | Close(); 180 | } 181 | 182 | private void tbFilter_TextChanged(object sender, EventArgs e) 183 | { 184 | SplitBitsFromUnknownSettings(); 185 | } 186 | 187 | private void numericUpDown1_ValueChanged(object sender, EventArgs e) 188 | { 189 | SplitBitsFromUnknownSettings(); 190 | } 191 | 192 | private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) 193 | { 194 | if (e.KeyValue == 13) 195 | { 196 | UpdateCurrent(textBox1.Text); 197 | } 198 | } 199 | 200 | private void textBox1_Leave(object sender, EventArgs e) 201 | { 202 | UpdateCurrent(textBox1.Text); 203 | } 204 | 205 | 206 | private void ApplyValueToProfile(uint val) 207 | { 208 | DrsServiceLocator 209 | .SettingService 210 | .SetDwordValueToProfile(_SettingsOwner._CurrentProfile, _Settingid, val); 211 | } 212 | 213 | private uint GetStoredValue() 214 | { 215 | return DrsServiceLocator 216 | .SettingService 217 | .GetDwordValueFromProfile(_SettingsOwner._CurrentProfile, _Settingid); 218 | } 219 | 220 | private void btnDirectApply_Click(object sender, EventArgs e) 221 | { 222 | ApplyValueToProfile(_CurrentValue); 223 | while (GetStoredValue() != _CurrentValue) 224 | Application.DoEvents(); 225 | if (File.Exists(tbGamePath.Text)) 226 | { 227 | Process.Start(tbGamePath.Text); 228 | } 229 | } 230 | 231 | private void btnBrowseGame_Click(object sender, EventArgs e) 232 | { 233 | OpenFileDialog ofd = new OpenFileDialog(); 234 | ofd.DefaultExt = "*.exe"; 235 | ofd.Filter = "Applications|*.exe"; 236 | ofd.DereferenceLinks = false; 237 | 238 | if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) 239 | { 240 | tbGamePath.Text = ofd.FileName; 241 | } 242 | } 243 | 244 | } 245 | } 246 | -------------------------------------------------------------------------------- /nspector/frmExportProfiles.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace nspector 2 | { 3 | partial class frmExportProfiles 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmExportProfiles)); 32 | this.lvProfiles = new System.Windows.Forms.ListView(); 33 | this.chProfileName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 34 | this.lProfiles = new System.Windows.Forms.Label(); 35 | this.btnExport = new System.Windows.Forms.Button(); 36 | this.btnCancel = new System.Windows.Forms.Button(); 37 | this.btnSelAll = new System.Windows.Forms.Button(); 38 | this.btnSelNone = new System.Windows.Forms.Button(); 39 | this.btnInvertSelection = new System.Windows.Forms.Button(); 40 | this.cbIncludePredefined = new System.Windows.Forms.CheckBox(); 41 | this.SuspendLayout(); 42 | // 43 | // lvProfiles 44 | // 45 | this.lvProfiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 46 | | System.Windows.Forms.AnchorStyles.Left) 47 | | System.Windows.Forms.AnchorStyles.Right))); 48 | this.lvProfiles.CheckBoxes = true; 49 | this.lvProfiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 50 | this.chProfileName}); 51 | this.lvProfiles.FullRowSelect = true; 52 | this.lvProfiles.GridLines = true; 53 | this.lvProfiles.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 54 | this.lvProfiles.Location = new System.Drawing.Point(12, 40); 55 | this.lvProfiles.MultiSelect = false; 56 | this.lvProfiles.Name = "lvProfiles"; 57 | this.lvProfiles.Size = new System.Drawing.Size(492, 382); 58 | this.lvProfiles.Sorting = System.Windows.Forms.SortOrder.Ascending; 59 | this.lvProfiles.TabIndex = 0; 60 | this.lvProfiles.UseCompatibleStateImageBehavior = false; 61 | this.lvProfiles.View = System.Windows.Forms.View.Details; 62 | this.lvProfiles.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvProfiles_ItemChecked); 63 | // 64 | // chProfileName 65 | // 66 | this.chProfileName.Text = "ProfileName"; 67 | this.chProfileName.Width = 420; 68 | // 69 | // lProfiles 70 | // 71 | this.lProfiles.AutoSize = true; 72 | this.lProfiles.Location = new System.Drawing.Point(9, 12); 73 | this.lProfiles.Name = "lProfiles"; 74 | this.lProfiles.Size = new System.Drawing.Size(184, 13); 75 | this.lProfiles.TabIndex = 1; 76 | this.lProfiles.Text = "Select the profiles you want to export:"; 77 | // 78 | // btnExport 79 | // 80 | this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 81 | this.btnExport.Enabled = false; 82 | this.btnExport.Location = new System.Drawing.Point(429, 451); 83 | this.btnExport.Name = "btnExport"; 84 | this.btnExport.Size = new System.Drawing.Size(75, 23); 85 | this.btnExport.TabIndex = 2; 86 | this.btnExport.Text = "Export"; 87 | this.btnExport.UseVisualStyleBackColor = true; 88 | this.btnExport.Click += new System.EventHandler(this.btnExport_Click); 89 | // 90 | // btnCancel 91 | // 92 | this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 93 | this.btnCancel.Location = new System.Drawing.Point(348, 451); 94 | this.btnCancel.Name = "btnCancel"; 95 | this.btnCancel.Size = new System.Drawing.Size(75, 23); 96 | this.btnCancel.TabIndex = 3; 97 | this.btnCancel.Text = "Cancel"; 98 | this.btnCancel.UseVisualStyleBackColor = true; 99 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 100 | // 101 | // btnSelAll 102 | // 103 | this.btnSelAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 104 | this.btnSelAll.Location = new System.Drawing.Point(12, 451); 105 | this.btnSelAll.Name = "btnSelAll"; 106 | this.btnSelAll.Size = new System.Drawing.Size(75, 23); 107 | this.btnSelAll.TabIndex = 4; 108 | this.btnSelAll.Text = "Select All"; 109 | this.btnSelAll.UseVisualStyleBackColor = true; 110 | this.btnSelAll.Click += new System.EventHandler(this.btnSelAll_Click); 111 | // 112 | // btnSelNone 113 | // 114 | this.btnSelNone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 115 | this.btnSelNone.Location = new System.Drawing.Point(93, 451); 116 | this.btnSelNone.Name = "btnSelNone"; 117 | this.btnSelNone.Size = new System.Drawing.Size(75, 23); 118 | this.btnSelNone.TabIndex = 4; 119 | this.btnSelNone.Text = "Select None"; 120 | this.btnSelNone.UseVisualStyleBackColor = true; 121 | this.btnSelNone.Click += new System.EventHandler(this.btnSelNone_Click); 122 | // 123 | // btnInvertSelection 124 | // 125 | this.btnInvertSelection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 126 | this.btnInvertSelection.Location = new System.Drawing.Point(174, 451); 127 | this.btnInvertSelection.Name = "btnInvertSelection"; 128 | this.btnInvertSelection.Size = new System.Drawing.Size(100, 23); 129 | this.btnInvertSelection.TabIndex = 4; 130 | this.btnInvertSelection.Text = "Invert Selection"; 131 | this.btnInvertSelection.UseVisualStyleBackColor = true; 132 | this.btnInvertSelection.Click += new System.EventHandler(this.btnInvertSelection_Click); 133 | // 134 | // cbIncludePredefined 135 | // 136 | this.cbIncludePredefined.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 137 | this.cbIncludePredefined.AutoSize = true; 138 | this.cbIncludePredefined.Location = new System.Drawing.Point(12, 428); 139 | this.cbIncludePredefined.Name = "cbIncludePredefined"; 140 | this.cbIncludePredefined.Size = new System.Drawing.Size(153, 17); 141 | this.cbIncludePredefined.TabIndex = 5; 142 | this.cbIncludePredefined.Text = "Include predefined settings"; 143 | this.cbIncludePredefined.UseVisualStyleBackColor = true; 144 | // 145 | // frmExportProfiles 146 | // 147 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); 148 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 149 | this.ClientSize = new System.Drawing.Size(516, 487); 150 | this.Controls.Add(this.cbIncludePredefined); 151 | this.Controls.Add(this.btnInvertSelection); 152 | this.Controls.Add(this.btnSelNone); 153 | this.Controls.Add(this.btnSelAll); 154 | this.Controls.Add(this.btnCancel); 155 | this.Controls.Add(this.btnExport); 156 | this.Controls.Add(this.lProfiles); 157 | this.Controls.Add(this.lvProfiles); 158 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 159 | this.MaximizeBox = false; 160 | this.MinimizeBox = false; 161 | this.MinimumSize = new System.Drawing.Size(464, 319); 162 | this.Name = "frmExportProfiles"; 163 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 164 | this.Text = "frmExportProfiles"; 165 | this.Load += new System.EventHandler(this.frmExportProfiles_Load); 166 | this.ResumeLayout(false); 167 | this.PerformLayout(); 168 | 169 | } 170 | 171 | #endregion 172 | 173 | private System.Windows.Forms.ListView lvProfiles; 174 | private System.Windows.Forms.ColumnHeader chProfileName; 175 | private System.Windows.Forms.Label lProfiles; 176 | private System.Windows.Forms.Button btnExport; 177 | private System.Windows.Forms.Button btnCancel; 178 | private System.Windows.Forms.Button btnSelAll; 179 | private System.Windows.Forms.Button btnSelNone; 180 | private System.Windows.Forms.Button btnInvertSelection; 181 | private System.Windows.Forms.CheckBox cbIncludePredefined; 182 | } 183 | } -------------------------------------------------------------------------------- /nspector/frmExportProfiles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | using nspector.Common; 7 | using nspector.Common.Helper; 8 | using nspector.Common.Import; 9 | 10 | namespace nspector 11 | { 12 | internal partial class frmExportProfiles : Form 13 | { 14 | frmDrvSettings settingsOwner = null; 15 | 16 | internal frmExportProfiles() 17 | { 18 | InitializeComponent(); 19 | this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 20 | this.DoubleBuffered = true; 21 | } 22 | 23 | internal void ShowDialog(frmDrvSettings SettingsOwner) 24 | { 25 | settingsOwner = SettingsOwner; 26 | Text = "Profile Export"; 27 | updateProfileList(); 28 | this.ShowDialog(); 29 | } 30 | 31 | 32 | private void updateProfileList() 33 | { 34 | lvProfiles.Items.Clear(); 35 | 36 | if (settingsOwner != null) 37 | { 38 | foreach(string mp in DrsServiceLocator.ScannerService.ModifiedProfiles) 39 | { 40 | lvProfiles.Items.Add(mp); 41 | } 42 | } 43 | } 44 | 45 | 46 | private void btnCancel_Click(object sender, EventArgs e) 47 | { 48 | Close(); 49 | } 50 | 51 | private void btnSelAll_Click(object sender, EventArgs e) 52 | { 53 | for(int i=0;i(); 83 | for (int i = 0; i < lvProfiles.Items.Count; i++) 84 | { 85 | if (lvProfiles.Items[i].Checked) 86 | { 87 | profileNamesToExport.Add(lvProfiles.Items[i].Text); 88 | } 89 | } 90 | 91 | DrsServiceLocator.ImportService.ExportProfiles(profileNamesToExport, sfd.FileName, cbIncludePredefined.Checked); 92 | 93 | if (profileNamesToExport.Count > 0) 94 | { 95 | 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) 96 | Close(); 97 | } 98 | else 99 | MessageBox.Show("Nothing to export"); 100 | } 101 | } 102 | 103 | private void lvProfiles_ItemChecked(object sender, ItemCheckedEventArgs e) 104 | { 105 | int cc = 0; 106 | for (int i = 0; i < lvProfiles.Items.Count;i++ ) 107 | if (lvProfiles.Items[i].Checked) 108 | cc++; 109 | 110 | if (cc > 0) 111 | btnExport.Enabled = true; 112 | else 113 | btnExport.Enabled = false; 114 | } 115 | 116 | private void frmExportProfiles_Load(object sender, EventArgs e) 117 | { 118 | 119 | } 120 | } 121 | 122 | } 123 | -------------------------------------------------------------------------------- /nspector/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/AutoClosingMessageBox.1.0.0.2/AutoClosingMessageBox.1.0.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/packages/AutoClosingMessageBox.1.0.0.2/AutoClosingMessageBox.1.0.0.2.nupkg -------------------------------------------------------------------------------- /packages/AutoClosingMessageBox.1.0.0.2/lib/net40/AutoClosingMessageBox.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeadManWalkingTO/NVidiaProfileInspectorDmW/b70841db4f7582e3b9ac2c95139b8fb179eff0d5/packages/AutoClosingMessageBox.1.0.0.2/lib/net40/AutoClosingMessageBox.dll -------------------------------------------------------------------------------- /packages/DmWPackages/DeadManWalkingTO-Github: -------------------------------------------------------------------------------- 1 | DeadManWalking (DeadManWalkingTO-Github) 2 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | v3.5.0.0 2 | --------------------------------------------------------------------------------