├── .gitattributes ├── .github ├── dependabot.yml ├── funding.yml └── workflows │ └── msbuild.yml ├── .gitignore ├── .gitmodules ├── 7za.exe ├── appveyor.yml ├── data └── scripts │ └── global.ini ├── external └── ModuleList │ └── ModuleList.hpp ├── license ├── premake5.bat ├── premake5.exe ├── premake5.lua ├── readme.md ├── release-Win32.bat ├── release-x64.bat ├── release.bat ├── release.md ├── release.ps1 └── source ├── demo_plugins ├── ExeUnprotect.cpp ├── MessageBox.cpp ├── MonoLoader.cpp ├── RE7Demo.InfiniteAmmo.cpp └── plugins │ └── MessageBox.NET.dll ├── dllmain.cpp ├── dllmain.h ├── exception.hpp ├── resources ├── UALx86.rc ├── VersionInfo.h ├── Versioninfo.rc ├── binkw32.dll ├── vorbisfile.dll ├── wndmode.dll └── wndmode.ini ├── x64.def ├── x86.def └── xlive ├── resource.h ├── xliveless.cpp ├── xliveless.h └── xliveless.rc /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | 13 | - package-ecosystem: "gitsubmodule" 14 | directory: "/" 15 | schedule: 16 | interval: "daily" 17 | groups: 18 | submodules: 19 | patterns: 20 | - "*" -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: ThirteenAG 2 | ko_fi: thirteenag 3 | patreon: ThirteenAG 4 | custom: [https://paypal.me/SergeyP13, https://boosty.to/thirteenag/donate] -------------------------------------------------------------------------------- /.github/workflows/msbuild.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Actions Build 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - "**/*.md" 7 | - '**/*.txt' 8 | branches: 9 | - '**' 10 | pull_request: 11 | paths-ignore: 12 | - "**/*.md" 13 | - '**/*.txt' 14 | workflow_dispatch: 15 | inputs: 16 | release: 17 | description: "Create a release" 18 | type: choice 19 | required: false 20 | default: 'false' 21 | options: 22 | - 'true' 23 | - 'false' 24 | version_increment: 25 | description: "Default semantic version release type" 26 | type: choice 27 | required: false 28 | default: 'minor' 29 | options: 30 | - 'major' 31 | - 'minor' 32 | - 'patch' 33 | 34 | env: 35 | VERINC: ${{ github.event.inputs.version_increment || 'minor' }} 36 | 37 | concurrency: 38 | group: ${{ github.ref }} 39 | cancel-in-progress: false 40 | 41 | permissions: 42 | contents: write 43 | 44 | jobs: 45 | build: 46 | runs-on: windows-latest 47 | 48 | steps: 49 | - name: Checkout Repository 50 | uses: actions/checkout@v4 51 | with: 52 | submodules: recursive 53 | 54 | - name: Add msbuild to PATH 55 | uses: microsoft/setup-msbuild@main 56 | 57 | - name: Auto Increment Version 58 | uses: MCKanpolat/auto-semver-action@v2 59 | id: versioning 60 | with: 61 | releaseType: ${{ env.VERINC }} 62 | incrementPerCommit: false 63 | github_token: ${{ secrets.GITHUB_TOKEN }} 64 | 65 | - name: Configure build 66 | run: ./premake5 vs2022 --with-version=${{ steps.versioning.outputs.version }} 67 | 68 | - name: Build 69 | run: | 70 | msbuild -m build/Ultimate-ASI-Loader-x64.sln /property:Configuration=Release /property:Platform=x64 71 | msbuild -m build/Ultimate-ASI-Loader-Win32.sln /property:Configuration=Release /property:Platform=Win32 72 | 73 | - name: Pack binaries 74 | run: | 75 | ./release.bat 76 | ./release.ps1 77 | 78 | - name: Upload artifact (Win32) 79 | uses: actions/upload-artifact@v4 80 | with: 81 | name: Ultimate-ASI-Loader-Win32 82 | path: dist/Win32/dll/* 83 | 84 | - name: Upload artifact (x64) 85 | uses: actions/upload-artifact@v4 86 | with: 87 | name: Ultimate-ASI-Loader-x64 88 | path: dist/x64/dll/* 89 | 90 | - name: Upload Release (Main) 91 | if: | 92 | github.event.inputs.release == 'true' && 93 | github.ref_name == 'master' && 94 | github.repository == 'ThirteenAG/Ultimate-ASI-Loader' 95 | uses: ncipollo/release-action@main 96 | with: 97 | token: ${{ secrets.GITHUB_TOKEN }} 98 | allowUpdates: false 99 | name: Ultimate ASI Loader v${{ steps.versioning.outputs.version }} 100 | bodyFile: "release.md" 101 | tag: v${{ steps.versioning.outputs.version }} 102 | artifacts: bin/Ultimate-ASI-Loader.zip, bin/Ultimate-ASI-Loader_x64.zip 103 | 104 | - name: Get release info (Win32) 105 | if: | 106 | github.event.inputs.release == 'true' && 107 | github.ref_name == 'master' && 108 | github.repository == 'ThirteenAG/Ultimate-ASI-Loader' 109 | id: release_info_x86 110 | uses: cardinalby/git-get-release-action@master 111 | env: 112 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 113 | with: 114 | tag: Win32-latest 115 | 116 | - name: Upload Release (Win32) 117 | if: | 118 | github.event.inputs.release == 'true' && 119 | github.ref_name == 'master' && 120 | github.repository == 'ThirteenAG/Ultimate-ASI-Loader' 121 | uses: ncipollo/release-action@main 122 | with: 123 | token: ${{ secrets.GITHUB_TOKEN }} 124 | allowUpdates: true 125 | name: ${{ steps.release_info_x86.outputs.name }} 126 | body: ${{ steps.release_info_x86.outputs.body }} 127 | tag: ${{ steps.release_info_x86.outputs.tag_name }} 128 | artifacts: dist/Win32/zip/*.zip 129 | 130 | - name: Get release info (Win64) 131 | if: | 132 | github.event.inputs.release == 'true' && 133 | github.ref_name == 'master' && 134 | github.repository == 'ThirteenAG/Ultimate-ASI-Loader' 135 | id: release_info_x64 136 | uses: cardinalby/git-get-release-action@master 137 | env: 138 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 139 | with: 140 | tag: x64-latest 141 | 142 | - name: Upload Release (Win64) 143 | if: | 144 | github.event.inputs.release == 'true' && 145 | github.ref_name == 'master' && 146 | github.repository == 'ThirteenAG/Ultimate-ASI-Loader' 147 | uses: ncipollo/release-action@main 148 | with: 149 | token: ${{ secrets.GITHUB_TOKEN }} 150 | allowUpdates: true 151 | name: ${{ steps.release_info_x64.outputs.name }} 152 | body: ${{ steps.release_info_x64.outputs.body }} 153 | tag: ${{ steps.release_info_x64.outputs.tag_name }} 154 | artifacts: dist/x64/zip/*.zip 155 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | data/ 12 | !data/**/*.ini 13 | 14 | # User-specific files (MonoDevelop/Xamarin Studio) 15 | *.userprefs 16 | 17 | # Build results 18 | [Dd]ebug/ 19 | [Dd]ebugPublic/ 20 | [Rr]elease/ 21 | [Rr]eleases/ 22 | x64/ 23 | x86/ 24 | bld/ 25 | [Bb]in/ 26 | [Oo]bj/ 27 | [Ll]og/ 28 | [Bb]uild/ 29 | 30 | # Visual Studio 2015 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # .NET Core 49 | project.lock.json 50 | project.fragment.lock.json 51 | artifacts/ 52 | **/Properties/launchSettings.json 53 | 54 | *_i.c 55 | *_p.c 56 | *_i.h 57 | *.ilk 58 | *.meta 59 | *.obj 60 | *.pch 61 | *.pdb 62 | *.pgc 63 | *.pgd 64 | *.rsp 65 | *.sbr 66 | *.tlb 67 | *.tli 68 | *.tlh 69 | *.tmp 70 | *.tmp_proj 71 | *.log 72 | *.vspscc 73 | *.vssscc 74 | .builds 75 | *.pidb 76 | *.svclog 77 | *.scc 78 | 79 | # Chutzpah Test files 80 | _Chutzpah* 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opendb 87 | *.opensdf 88 | *.sdf 89 | *.cachefile 90 | *.VC.db 91 | *.VC.VC.opendb 92 | 93 | # Visual Studio profiler 94 | *.psess 95 | *.vsp 96 | *.vspx 97 | *.sap 98 | 99 | # TFS 2012 Local Workspace 100 | $tf/ 101 | 102 | # Guidance Automation Toolkit 103 | *.gpState 104 | 105 | # ReSharper is a .NET coding add-in 106 | _ReSharper*/ 107 | *.[Rr]e[Ss]harper 108 | *.DotSettings.user 109 | 110 | # JustCode is a .NET coding add-in 111 | .JustCode 112 | 113 | # TeamCity is a build add-in 114 | _TeamCity* 115 | 116 | # DotCover is a Code Coverage Tool 117 | *.dotCover 118 | 119 | # Visual Studio code coverage results 120 | *.coverage 121 | *.coveragexml 122 | 123 | # NCrunch 124 | _NCrunch_* 125 | .*crunch*.local.xml 126 | nCrunchTemp_* 127 | 128 | # MightyMoose 129 | *.mm.* 130 | AutoTest.Net/ 131 | 132 | # Web workbench (sass) 133 | .sass-cache/ 134 | 135 | # Installshield output folder 136 | [Ee]xpress/ 137 | 138 | # DocProject is a documentation generator add-in 139 | DocProject/buildhelp/ 140 | DocProject/Help/*.HxT 141 | DocProject/Help/*.HxC 142 | DocProject/Help/*.hhc 143 | DocProject/Help/*.hhk 144 | DocProject/Help/*.hhp 145 | DocProject/Help/Html2 146 | DocProject/Help/html 147 | 148 | # Click-Once directory 149 | publish/ 150 | 151 | # Publish Web Output 152 | *.[Pp]ublish.xml 153 | *.azurePubxml 154 | # TODO: Comment the next line if you want to checkin your web deploy settings 155 | # but database connection strings (with potential passwords) will be unencrypted 156 | *.pubxml 157 | *.publishproj 158 | 159 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 160 | # checkin your Azure Web App publish settings, but sensitive information contained 161 | # in these scripts will be unencrypted 162 | PublishScripts/ 163 | 164 | # NuGet Packages 165 | *.nupkg 166 | # The packages folder can be ignored because of Package Restore 167 | **/packages/* 168 | # except build/, which is used as an MSBuild target. 169 | !**/packages/build/ 170 | # Uncomment if necessary however generally it will be regenerated when needed 171 | #!**/packages/repositories.config 172 | # NuGet v3's project.json files produces more ignorable files 173 | *.nuget.props 174 | *.nuget.targets 175 | 176 | # Microsoft Azure Build Output 177 | csx/ 178 | *.build.csdef 179 | 180 | # Microsoft Azure Emulator 181 | ecf/ 182 | rcf/ 183 | 184 | # Windows Store app package directories and files 185 | AppPackages/ 186 | BundleArtifacts/ 187 | Package.StoreAssociation.xml 188 | _pkginfo.txt 189 | 190 | # Visual Studio cache files 191 | # files ending in .cache can be ignored 192 | *.[Cc]ache 193 | # but keep track of directories ending in .cache 194 | !*.[Cc]ache/ 195 | 196 | # Others 197 | ClientBin/ 198 | ~$* 199 | *~ 200 | *.dbmdl 201 | *.dbproj.schemaview 202 | *.jfm 203 | *.pfx 204 | *.publishsettings 205 | orleans.codegen.cs 206 | 207 | # Since there are multiple workflows, uncomment next line to ignore bower_components 208 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 209 | #bower_components/ 210 | 211 | # RIA/Silverlight projects 212 | Generated_Code/ 213 | 214 | # Backup & report files from converting an old project file 215 | # to a newer Visual Studio version. Backup files are not needed, 216 | # because we have git ;-) 217 | _UpgradeReport_Files/ 218 | Backup*/ 219 | UpgradeLog*.XML 220 | UpgradeLog*.htm 221 | 222 | # SQL Server files 223 | *.mdf 224 | *.ldf 225 | *.ndf 226 | 227 | # Business Intelligence projects 228 | *.rdl.data 229 | *.bim.layout 230 | *.bim_*.settings 231 | 232 | # Microsoft Fakes 233 | FakesAssemblies/ 234 | 235 | # GhostDoc plugin setting file 236 | *.GhostDoc.xml 237 | 238 | # Node.js Tools for Visual Studio 239 | .ntvs_analysis.dat 240 | node_modules/ 241 | 242 | # Typescript v1 declaration files 243 | typings/ 244 | 245 | # Visual Studio 6 build log 246 | *.plg 247 | 248 | # Visual Studio 6 workspace options file 249 | *.opt 250 | 251 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 252 | *.vbw 253 | 254 | # Visual Studio LightSwitch build output 255 | **/*.HTMLClient/GeneratedArtifacts 256 | **/*.DesktopClient/GeneratedArtifacts 257 | **/*.DesktopClient/ModelManifest.xml 258 | **/*.Server/GeneratedArtifacts 259 | **/*.Server/ModelManifest.xml 260 | _Pvt_Extensions 261 | 262 | # Paket dependency manager 263 | .paket/paket.exe 264 | paket-files/ 265 | 266 | # FAKE - F# Make 267 | .fake/ 268 | 269 | # JetBrains Rider 270 | .idea/ 271 | *.sln.iml 272 | 273 | # CodeRush 274 | .cr/ 275 | 276 | # Python Tools for Visual Studio (PTVS) 277 | __pycache__/ 278 | *.pyc 279 | 280 | # Cake - Uncomment if you are using it 281 | # tools/** 282 | # !tools/packages.config 283 | 284 | # Telerik's JustMock configuration file 285 | *.jmconfig 286 | 287 | # BizTalk build output 288 | *.btp.cs 289 | *.btm.cs 290 | *.odx.cs 291 | *.xsd.cs 292 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/d3d8to9"] 2 | path = external/d3d8to9 3 | url = https://github.com/crosire/d3d8to9 4 | branch = main 5 | [submodule "external/MemoryModule"] 6 | path = external/MemoryModule 7 | url = https://github.com/fancycode/MemoryModule 8 | [submodule "external/minidx9"] 9 | path = external/minidx9 10 | url = https://github.com/hrydgard/minidx9 11 | [submodule "external/injector"] 12 | path = external/injector 13 | url = https://github.com/ThirteenAG/injector 14 | -------------------------------------------------------------------------------- /7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/7za.exe -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 6.{build}.0 2 | skip_tags: true 3 | image: Visual Studio 2022 4 | configuration: Release 5 | install: 6 | - cmd: >- 7 | git submodule update --init --recursive 8 | 9 | premake5.exe vs2022 --with-version=%APPVEYOR_BUILD_VERSION% 10 | build: 11 | project: build/Ultimate-ASI-Loader-Win32.sln 12 | verbosity: minimal 13 | before_package: 14 | - cmd: msbuild.exe build/Ultimate-ASI-Loader-x64.sln /t:Build /p:Configuration=Release;Platform=x64 15 | after_build: 16 | - cmd: release.bat 17 | artifacts: 18 | - path: bin\Ultimate-ASI-Loader.zip 19 | name: Ultimate-ASI-Loader.zip 20 | - path: bin\Ultimate-ASI-Loader_x64.zip 21 | name: Ultimate-ASI-Loader_x64.zip 22 | - path: bin\RE7Demo.InfiniteAmmo-x64.zip 23 | name: RE7Demo.InfiniteAmmo-x64.zip 24 | - path: bin\MessageBox-x64.zip 25 | name: MessageBox-x64.zip 26 | - path: bin\OverloadFromFolderDLL-x64.zip 27 | name: OverloadFromFolderDLL-x64.zip 28 | - path: bin\ExeUnprotect-Win32.zip 29 | name: ExeUnprotect-Win32.zip 30 | - path: bin\MessageBox-Win32.zip 31 | name: MessageBox-Win32.zip 32 | - path: bin\OverloadFromFolderDLL-Win32.zip 33 | name: OverloadFromFolderDLL-Win32.zip 34 | - path: bin\MonoLoader-Win32.zip 35 | name: MonoLoader-Win32.zip 36 | - path: bin\MonoLoader-x64.zip 37 | name: MonoLoader-x64.zip 38 | deploy: 39 | - provider: GitHub 40 | tag: v$(appveyor_build_version) 41 | release: Ultimate ASI Loader v$(appveyor_build_version) 42 | description: DESCRIPTION\n------------------------\nThis is a DLL file which adds ASI plugin loading functionality to any game, which uses any of the following libraries:\n* d3d8.dll\n* d3d9.dll\n* d3d11.dll\n* ddraw.dll\n* dinput.dll\n* dinput8.dll (x86 and x64)\n* dsound.dll (x86 and x64)\n* msacm32.dll\n* msvfw32.dll\n* version.dll (x86 and x64)\n* vorbisFile.dll\n* wininet.dll (x86 and x64)\n* winmm.dll (x86 and x64)\n* winhttp.dll (x86 and x64)\n* xlive.dll\n\n\nINSTALLATION\n------------------------\nIn order to install it, you just need to place DLL into game directory. Usually it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above). 43 | auth_token: 44 | secure: ugbti+bXX/7zqu39OyiPxgRPd2pQn2FEV/12ABees2fHfpZob0tWXzqD/zSYmibJ 45 | artifact: Ultimate-ASI-Loader.zip, Ultimate-ASI-Loader_x64.zip 46 | prerelease: false 47 | on: 48 | branch: undefined 49 | - provider: GitHub 50 | tag: demo-plugins 51 | release: Ultimate ASI Loader Demo Plugins 52 | description: Demo plugins to test or extend Ultimate ASI Loader's functionality. 53 | auth_token: 54 | secure: ugbti+bXX/7zqu39OyiPxgRPd2pQn2FEV/12ABees2fHfpZob0tWXzqD/zSYmibJ 55 | artifact: RE7Demo.InfiniteAmmo-x64.zip, MessageBox-x64.zip, OverloadFromFolderDLL-x64.zip, ExeUnprotect-Win32.zip, MessageBox-Win32.zip, OverloadFromFolderDLL-Win32.zip, MonoLoader-Win32.zip, MonoLoader-x64.zip 56 | force_update: true 57 | on: 58 | branch: master -------------------------------------------------------------------------------- /data/scripts/global.ini: -------------------------------------------------------------------------------- 1 | [GlobalSets] 2 | LoadPlugins=1 3 | LoadFromScriptsOnly=0 4 | LoadRecursively=1 5 | DontLoadFromDllMain=1 6 | ;LoadFromAPI=GetSystemTimeAsFileTime 7 | FindModule=0 8 | UseD3D8to9=0 9 | DisableCrashDumps=0 10 | Direct3D8DisableMaximizedWindowedModeShim=0 11 | 12 | [FileLoader] 13 | OverloadFromFolder=update 14 | -------------------------------------------------------------------------------- /external/ModuleList/ModuleList.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | std::wstring GetModuleFileNameW(HMODULE hModule) 9 | { 10 | static constexpr auto INITIAL_BUFFER_SIZE = MAX_PATH; 11 | static constexpr auto MAX_ITERATIONS = 7; 12 | std::wstring ret; 13 | auto bufferSize = INITIAL_BUFFER_SIZE; 14 | for (size_t iterations = 0; iterations < MAX_ITERATIONS; ++iterations) 15 | { 16 | ret.resize(bufferSize); 17 | auto charsReturned = GetModuleFileNameW(hModule, &ret[0], bufferSize); 18 | if (charsReturned < ret.length()) 19 | { 20 | ret.resize(charsReturned); 21 | return ret; 22 | } 23 | else 24 | { 25 | bufferSize *= 2; 26 | } 27 | } 28 | return L""; 29 | } 30 | 31 | auto starts_with = [](const std::wstring &big_str, const std::wstring &small_str) -> auto 32 | { 33 | return big_str.compare(0, small_str.length(), small_str) == 0; 34 | }; 35 | 36 | // Stores a list of loaded modules with their names, WITHOUT extension 37 | class ModuleList 38 | { 39 | public: 40 | enum class SearchLocation 41 | { 42 | All, 43 | LocalOnly, 44 | SystemOnly, 45 | }; 46 | 47 | // Initializes module list 48 | // Needs to be called before any calls to Get or GetAll 49 | void Enumerate( SearchLocation location = SearchLocation::All ) 50 | { 51 | constexpr size_t INITIAL_SIZE = sizeof(HMODULE) * 256; 52 | HMODULE* modules = static_cast(malloc( INITIAL_SIZE )); 53 | if ( modules != nullptr ) 54 | { 55 | typedef BOOL (WINAPI * Func)(HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded); 56 | 57 | HMODULE hLib = LoadLibrary( TEXT("kernel32") ); 58 | assert( hLib != nullptr ); // If this fails then everything is probably broken anyway 59 | 60 | Func pEnumProcessModules = reinterpret_cast(GetProcAddress( hLib, "K32EnumProcessModules" )); 61 | if ( pEnumProcessModules == nullptr ) 62 | { 63 | // Try psapi 64 | FreeLibrary( hLib ); 65 | hLib = LoadLibrary( TEXT("psapi") ); 66 | if ( hLib != nullptr ) 67 | { 68 | pEnumProcessModules = reinterpret_cast(GetProcAddress( hLib, "EnumProcessModules" )); 69 | } 70 | } 71 | 72 | if ( pEnumProcessModules != nullptr ) 73 | { 74 | const HANDLE currentProcess = GetCurrentProcess(); 75 | DWORD cbNeeded = 0; 76 | if ( pEnumProcessModules( currentProcess, modules, INITIAL_SIZE, &cbNeeded ) != 0 ) 77 | { 78 | if ( cbNeeded > INITIAL_SIZE ) 79 | { 80 | HMODULE* newModules = static_cast(realloc( modules, cbNeeded )); 81 | if ( newModules != nullptr ) 82 | { 83 | modules = newModules; 84 | 85 | if ( pEnumProcessModules( currentProcess, modules, cbNeeded, &cbNeeded ) != 0 ) 86 | { 87 | EnumerateInternal( modules, location, cbNeeded / sizeof(HMODULE) ); 88 | } 89 | } 90 | } 91 | else 92 | { 93 | EnumerateInternal( modules, location, cbNeeded / sizeof(HMODULE) ); 94 | } 95 | } 96 | } 97 | 98 | if ( hLib != nullptr ) 99 | { 100 | FreeLibrary( hLib ); 101 | } 102 | 103 | free( modules ); 104 | } 105 | } 106 | 107 | // Recreates module list 108 | void ReEnumerate( SearchLocation location = SearchLocation::All ) 109 | { 110 | Clear(); 111 | Enumerate( location ); 112 | } 113 | 114 | // Clears module list 115 | void Clear() 116 | { 117 | m_moduleList.clear(); 118 | } 119 | 120 | // Gets handle of a loaded module with given name, NULL otherwise 121 | HMODULE Get( const wchar_t* moduleName ) const 122 | { 123 | // If vector is empty then we're trying to call it without calling Enumerate first 124 | assert( m_moduleList.size() != 0 ); 125 | 126 | auto it = std::find_if( m_moduleList.begin(), m_moduleList.end(), [&]( const auto& e ) { 127 | return _wcsicmp( moduleName, std::get<1>(e).c_str() ) == 0; 128 | } ); 129 | return it != m_moduleList.end() ? std::get<0>(*it) : nullptr; 130 | } 131 | 132 | // Gets handles to all loaded modules with given name 133 | std::vector GetAll( const wchar_t* moduleName ) const 134 | { 135 | // If vector is empty then we're trying to call it without calling Enumerate first 136 | assert( m_moduleList.size() != 0 ); 137 | 138 | std::vector results; 139 | for ( auto& e : m_moduleList ) 140 | { 141 | if ( _wcsicmp( moduleName, std::get<1>(e).c_str()) == 0 ) 142 | { 143 | results.push_back(std::get<0>(e)); 144 | } 145 | } 146 | 147 | return results; 148 | } 149 | 150 | private: 151 | void EnumerateInternal( HMODULE* modules, SearchLocation location, size_t numModules ) 152 | { 153 | const auto exeModulePath = GetModuleFileNameW(NULL).substr(0, GetModuleFileNameW(NULL).find_last_of(L"/\\")); 154 | 155 | m_moduleList.reserve(numModules); 156 | for (size_t i = 0; i < numModules; i++) 157 | { 158 | // Obtain module name, with resizing if necessary 159 | auto moduleName = GetModuleFileNameW(*modules); 160 | 161 | if (!moduleName.empty()) 162 | { 163 | const wchar_t* nameBegin = wcsrchr(moduleName.c_str(), '\\') + 1; 164 | const wchar_t* dotPos = wcsrchr(nameBegin, '.'); 165 | bool isLocal = starts_with(std::wstring(moduleName), exeModulePath); 166 | 167 | if ( (isLocal && location != SearchLocation::SystemOnly) || (!isLocal && location != SearchLocation::LocalOnly) ) 168 | { 169 | if (dotPos != nullptr) 170 | { 171 | m_moduleList.emplace_back(*modules, std::wstring(nameBegin, dotPos), isLocal); 172 | } 173 | else 174 | { 175 | m_moduleList.emplace_back(*modules, nameBegin, isLocal); 176 | } 177 | } 178 | } 179 | 180 | modules++; 181 | } 182 | } 183 | 184 | public: std::vector< std::tuple > m_moduleList; 185 | }; -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ThirteenAG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /premake5.bat: -------------------------------------------------------------------------------- 1 | premake5 vs2022 -------------------------------------------------------------------------------- /premake5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/premake5.exe -------------------------------------------------------------------------------- /premake5.lua: -------------------------------------------------------------------------------- 1 | newoption { 2 | trigger = "with-version", 3 | value = "STRING", 4 | description = "Current UAL version", 5 | default = "8.0.0", 6 | } 7 | 8 | -- x86 9 | workspace "Ultimate-ASI-Loader-Win32" 10 | configurations { "Release", "Debug" } 11 | architecture "x86" 12 | location "build" 13 | cppdialect "C++latest" 14 | exceptionhandling ("SEH") 15 | 16 | defines { "rsc_CompanyName=\"ThirteenAG\"" } 17 | defines { "rsc_LegalCopyright=\"MIT License\""} 18 | defines { "rsc_InternalName=\"%{prj.name}\"", "rsc_ProductName=\"%{prj.name}\"", "rsc_OriginalFilename=\"%{prj.name}.dll\"" } 19 | defines { "rsc_FileDescription=\"Ultimate ASI Loader\"" } 20 | defines { "rsc_UpdateUrl=\"https://github.com/ThirteenAG/Ultimate-ASI-Loader\"" } 21 | 22 | local major = 1 23 | local minor = 0 24 | local build = 0 25 | local revision = 0 26 | if(_OPTIONS["with-version"]) then 27 | local t = {} 28 | for i in _OPTIONS["with-version"]:gmatch("([^.]+)") do 29 | t[#t + 1], _ = i:gsub("%D+", "") 30 | end 31 | while #t < 4 do t[#t + 1] = 0 end 32 | major = math.min(tonumber(t[1]), 255) 33 | minor = math.min(tonumber(t[2]), 255) 34 | build = math.min(tonumber(t[3]), 65535) 35 | revision = math.min(tonumber(t[4]), 65535) 36 | end 37 | defines { "rsc_FileVersion_MAJOR=" .. major } 38 | defines { "rsc_FileVersion_MINOR=" .. minor } 39 | defines { "rsc_FileVersion_BUILD=" .. build } 40 | defines { "rsc_FileVersion_REVISION=" .. revision } 41 | defines { "rsc_FileVersion=\"" .. major .. "." .. minor .. "." .. build .. "\"" } 42 | defines { "rsc_ProductVersion=\"" .. major .. "." .. minor .. "." .. build .. "\"" } 43 | 44 | project "Ultimate-ASI-Loader-Win32" 45 | kind "SharedLib" 46 | language "C++" 47 | targetdir "bin/Win32/%{cfg.buildcfg}" 48 | targetname "dinput8" 49 | targetextension ".dll" 50 | linkoptions { "/DELAYLOAD:\"Comctl32.dll\"" } 51 | 52 | includedirs { "source" } 53 | includedirs { "external" } 54 | 55 | includedirs { "external/injector/minhook/include" } 56 | files { "external/injector/minhook/include/*.h", "external/injector/minhook/src/**.h", "external/injector/minhook/src/**.c" } 57 | includedirs { "external/injector/utility" } 58 | files { "external/injector/utility/FunctionHookMinHook.hpp", "external/injector/utility/FunctionHookMinHook.cpp" } 59 | 60 | files { "source/dllmain.h", "source/dllmain.cpp" } 61 | files { "source/x86.def" } 62 | files { "source/xlive/xliveless.h", "source/xlive/xliveless.cpp", "source/xlive/xliveless.rc"} 63 | files { "source/resources/*.rc" } 64 | files { "external/d3d8to9/source/*.hpp", "external/d3d8to9/source/*.cpp" } 65 | files { "external/MemoryModule/*.h", "external/MemoryModule/*.c" } 66 | files { "external/ModuleList/*.hpp" } 67 | 68 | local dxsdk = os.getenv "DXSDK_DIR" 69 | if dxsdk then 70 | includedirs { dxsdk .. "/include" } 71 | libdirs { dxsdk .. "/lib/x86" } 72 | elseif os.isdir("external/minidx9") then 73 | includedirs { "external/minidx9/Include" } 74 | libdirs { "external/minidx9/Lib/x86" } 75 | else 76 | includedirs { "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/include" } 77 | libdirs { "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/lib/x86" } 78 | end 79 | 80 | characterset ("UNICODE") 81 | 82 | filter "configurations:Debug" 83 | defines { "DEBUG" } 84 | symbols "On" 85 | 86 | filter "configurations:Release" 87 | defines { "NDEBUG", "D3D8TO9NOLOG" } 88 | optimize "On" 89 | staticruntime "On" 90 | 91 | project "MessageBox" 92 | kind "SharedLib" 93 | language "C++" 94 | targetdir "bin/Win32/%{cfg.buildcfg}/scripts" 95 | targetextension ".asi" 96 | 97 | files { "source/demo_plugins/MessageBox.cpp" } 98 | files { "source/resources/Versioninfo.rc" } 99 | 100 | characterset ("UNICODE") 101 | 102 | filter "configurations:Debug" 103 | defines { "DEBUG" } 104 | symbols "On" 105 | 106 | filter "configurations:Release" 107 | defines { "NDEBUG" } 108 | optimize "On" 109 | staticruntime "On" 110 | 111 | project "ExeUnprotect" 112 | kind "SharedLib" 113 | language "C++" 114 | targetdir "bin/Win32/%{cfg.buildcfg}/scripts" 115 | targetextension ".asi" 116 | 117 | files { "source/demo_plugins/ExeUnprotect.cpp" } 118 | files { "source/resources/Versioninfo.rc" } 119 | 120 | characterset ("UNICODE") 121 | 122 | filter "configurations:Debug" 123 | defines { "DEBUG" } 124 | symbols "On" 125 | 126 | filter "configurations:Release" 127 | defines { "NDEBUG" } 128 | optimize "On" 129 | staticruntime "On" 130 | 131 | project "MonoLoader" 132 | kind "SharedLib" 133 | language "C++" 134 | targetdir "bin/Win32/%{cfg.buildcfg}/scripts" 135 | targetextension ".asi" 136 | 137 | files { "source/demo_plugins/MonoLoader.cpp" } 138 | files { "source/resources/Versioninfo.rc" } 139 | 140 | includedirs { "external/injector/safetyhook/include" } 141 | files { "external/injector/safetyhook/include/**.hpp", "external/injector/safetyhook/src/**.cpp" } 142 | includedirs { "external/injector/zydis" } 143 | files { "external/injector/zydis/**.h", "external/injector/zydis/**.c" } 144 | 145 | characterset ("UNICODE") 146 | 147 | filter "configurations:Debug" 148 | defines { "DEBUG" } 149 | symbols "On" 150 | 151 | filter "configurations:Release" 152 | defines { "NDEBUG" } 153 | optimize "On" 154 | staticruntime "On" 155 | 156 | -- x64 157 | workspace "Ultimate-ASI-Loader-x64" 158 | configurations { "Release", "Debug" } 159 | architecture "x86_64" 160 | location "build" 161 | cppdialect "C++latest" 162 | exceptionhandling ("SEH") 163 | 164 | defines { "rsc_CompanyName=\"ThirteenAG\"" } 165 | defines { "rsc_LegalCopyright=\"MIT License\""} 166 | defines { "rsc_InternalName=\"%{prj.name}\"", "rsc_ProductName=\"%{prj.name}\"", "rsc_OriginalFilename=\"%{prj.name}.dll\"" } 167 | defines { "rsc_FileDescription=\"Ultimate ASI Loader\"" } 168 | defines { "rsc_UpdateUrl=\"https://github.com/ThirteenAG/Ultimate-ASI-Loader\"" } 169 | 170 | local major = 1 171 | local minor = 0 172 | local build = 0 173 | local revision = 0 174 | if(_OPTIONS["with-version"]) then 175 | local t = {} 176 | for i in _OPTIONS["with-version"]:gmatch("([^.]+)") do 177 | t[#t + 1], _ = i:gsub("%D+", "") 178 | end 179 | while #t < 4 do t[#t + 1] = 0 end 180 | major = math.min(tonumber(t[1]), 255) 181 | minor = math.min(tonumber(t[2]), 255) 182 | build = math.min(tonumber(t[3]), 65535) 183 | revision = math.min(tonumber(t[4]), 65535) 184 | end 185 | defines { "rsc_FileVersion_MAJOR=" .. major } 186 | defines { "rsc_FileVersion_MINOR=" .. minor } 187 | defines { "rsc_FileVersion_BUILD=" .. build } 188 | defines { "rsc_FileVersion_REVISION=" .. revision } 189 | defines { "rsc_FileVersion=\"" .. major .. "." .. minor .. "." .. build .. "\"" } 190 | defines { "rsc_ProductVersion=\"" .. major .. "." .. minor .. "." .. build .. "\"" } 191 | 192 | defines { "X64" } 193 | 194 | project "Ultimate-ASI-Loader-x64" 195 | kind "SharedLib" 196 | language "C++" 197 | targetdir "bin/x64/%{cfg.buildcfg}" 198 | targetname "dinput8" 199 | targetextension ".dll" 200 | linkoptions { "/DELAYLOAD:\"Comctl32.dll\"" } 201 | 202 | includedirs { "source" } 203 | includedirs { "external" } 204 | 205 | includedirs { "external/injector/minhook/include" } 206 | files { "external/injector/minhook/include/*.h", "external/injector/minhook/src/**.h", "external/injector/minhook/src/**.c" } 207 | includedirs { "external/injector/utility" } 208 | files { "external/injector/utility/FunctionHookMinHook.hpp", "external/injector/utility/FunctionHookMinHook.cpp" } 209 | 210 | files { "source/dllmain.h", "source/dllmain.cpp" } 211 | files { "source/x64.def" } 212 | files { "source/resources/Versioninfo.rc" } 213 | 214 | characterset ("UNICODE") 215 | 216 | filter "configurations:Debug" 217 | defines { "DEBUG" } 218 | symbols "On" 219 | 220 | filter "configurations:Release" 221 | defines { "NDEBUG" } 222 | optimize "On" 223 | staticruntime "On" 224 | 225 | project "RE7Demo.InfiniteAmmo" 226 | kind "SharedLib" 227 | language "C++" 228 | targetdir "bin/x64/%{cfg.buildcfg}/scripts" 229 | targetextension ".asi" 230 | 231 | files { "source/demo_plugins/RE7Demo.InfiniteAmmo.cpp" } 232 | files { "source/resources/Versioninfo.rc" } 233 | 234 | characterset ("UNICODE") 235 | 236 | filter "configurations:Debug" 237 | defines { "DEBUG" } 238 | symbols "On" 239 | 240 | filter "configurations:Release" 241 | defines { "NDEBUG" } 242 | optimize "On" 243 | staticruntime "On" 244 | 245 | project "MessageBox_x64" 246 | kind "SharedLib" 247 | language "C++" 248 | targetdir "bin/x64/%{cfg.buildcfg}/scripts" 249 | targetextension ".asi" 250 | 251 | files { "source/demo_plugins/MessageBox.cpp" } 252 | files { "source/resources/Versioninfo.rc" } 253 | 254 | characterset ("UNICODE") 255 | 256 | filter "configurations:Debug" 257 | defines { "DEBUG" } 258 | symbols "On" 259 | 260 | filter "configurations:Release" 261 | defines { "NDEBUG" } 262 | optimize "On" 263 | staticruntime "On" 264 | 265 | project "MonoLoader_x64" 266 | kind "SharedLib" 267 | language "C++" 268 | targetdir "bin/x64/%{cfg.buildcfg}/scripts" 269 | targetextension ".asi" 270 | 271 | files { "source/demo_plugins/MonoLoader.cpp" } 272 | files { "source/resources/Versioninfo.rc" } 273 | 274 | includedirs { "external/injector/safetyhook/include" } 275 | files { "external/injector/safetyhook/include/**.hpp", "external/injector/safetyhook/src/**.cpp" } 276 | includedirs { "external/injector/zydis" } 277 | files { "external/injector/zydis/**.h", "external/injector/zydis/**.c" } 278 | 279 | characterset ("UNICODE") 280 | 281 | filter "configurations:Debug" 282 | defines { "DEBUG" } 283 | symbols "On" 284 | 285 | filter "configurations:Release" 286 | defines { "NDEBUG" } 287 | optimize "On" 288 | staticruntime "On" -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | [![AppVeyor](https://img.shields.io/appveyor/build/ThirteenAG/Ultimate-ASI-Loader?label=AppVeyor%20Build&logo=Appveyor&logoColor=white)](https://ci.appveyor.com/project/ThirteenAG/ultimate-asi-loader) 2 | [![GitHub Actions Build](https://github.com/ThirteenAG/Ultimate-ASI-Loader/actions/workflows/msbuild.yml/badge.svg)](https://github.com/ThirteenAG/Ultimate-ASI-Loader/actions/workflows/msbuild.yml) 3 | 4 | # Ultimate ASI Loader 5 | 6 | ## DESCRIPTION 7 | 8 | This is a DLL file that adds ASI plugin loading functionality to any game, which uses any of the following libraries: 9 | 10 | | Win32 | Win64 | 11 | | :-----------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | 12 | | [d3d8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d8-Win32.zip) | - | 13 | | [d3d9.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d9-Win32.zip) | [d3d9.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d9-x64.zip) | 14 | | [d3d10.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d10-Win32.zip) | [d3d10.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d10-x64.zip) | 15 | | [d3d11.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d11-Win32.zip) | [d3d11.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d11-x64.zip) | 16 | | [d3d12.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d12-Win32.zip) | [d3d12.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d12-x64.zip) | 17 | | [ddraw.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/ddraw-Win32.zip) | - | 18 | | [dinput.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dinput-Win32.zip) | - | 19 | | [dinput8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dinput8-Win32.zip) | [dinput8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/dinput8-x64.zip) | 20 | | [dsound.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dsound-Win32.zip) | [dsound.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/dsound-x64.zip) | 21 | | [msacm32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/msacm32-Win32.zip) | - | 22 | | [msvfw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/msvfw32-Win32.zip) | - | 23 | | [version.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/version-Win32.zip) | [version.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/version-x64.zip) | 24 | | [wininet.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/wininet-Win32.zip) | [wininet.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/wininet-x64.zip) | 25 | | [winmm.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winmm-Win32.zip) | [winmm.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winmm-x64.zip) | 26 | | [winhttp.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winhttp-Win32.zip) | [winhttp.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winhttp-x64.zip) | 27 | | [xlive.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xlive-Win32.zip) | - | 28 | | [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) | - | 29 | | [bink2w32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/bink2w32-Win32.zip) | - | 30 | | - | [binkw64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/binkw64-x64.zip) | 31 | | - | [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) | 32 | | [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) | - | 33 | | [xinput1_1.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_1-Win32.zip) | [xinput1_1.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_1-x64.zip) | 34 | | [xinput1_2.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_2-Win32.zip) | [xinput1_2.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_2-x64.zip) | 35 | | [xinput1_3.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_3-Win32.zip) | [xinput1_3.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_3-x64.zip) | 36 | | [xinput1_4.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_4-Win32.zip) | [XInput1_4.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_4-x64.zip) | 37 | | [xinput9_1_0.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput9_1_0-Win32.zip) | [XInput9_1_0.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput9_1_0-x64.zip) | 38 | | [xinputuap.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinputuap-Win32.zip) | [XInputUap.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinputuap-x64.zip) | 39 | 40 | It is possible(and sometimes necessary) to load the original dll by renaming it to `Hooked.dll`, e.g. `d3d12Hooked.dll`. 41 | With **binkw32.dll** and **vorbisFile.dll** it is optional and you can simply replace the dll. Always make a backup before replacing any files. 42 | 43 | 44 | ## INSTALLATION 45 | 46 | To install it, you just need to place DLL into the game directory. Usually, it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above). 47 | 48 | ## USAGE 49 | 50 | Put ASI files in the game root directory, 'scripts', 'plugins', or 'update' folder. 51 | If a configuration is necessary, the global.ini file can be placed in the 'scripts' or 'plugins' folder. It can be used alongside the chosen dll and if so, it is also possible to use the dll name for ini file, e.g. version.dll/version.ini. 52 | [See an example of global.ini here](https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/data/scripts/global.ini). 53 | 54 | ## UPDATE FOLDER (Overload From Folder) 55 | 56 | It is possible to install mods that replace files via the `update` folder, allowing you to avoid actual file replacement. 57 | 58 | For example, if a mod replaces the file located at: 59 | 60 | ``` 61 | Resident Evil 5\nativePC_MT\Image\Archive\ChapterEnd11.arc 62 | ``` 63 | 64 | With Ultimate ASI Loader installed, you can create an `update` folder and place the file at: 65 | 66 | ``` 67 | Resident Evil 5\update\nativePC_MT\Image\Archive\ChapterEnd11.arc 68 | ``` 69 | 70 | To revert the game to its initial state, simply remove the `update` folder. 71 | 72 | Please note that the `update` folder is relative to the location of the ASI loader, so you need to adjust paths accordingly. For example: 73 | 74 | ``` 75 | \Gameface\Content\Movies\1080\GTA_SA_CREDITS_FINAL_1920x1080.mp4 76 | ``` 77 | 78 | Should be adjusted to: 79 | 80 | ``` 81 | \Gameface\Binaries\Win64\update\Content\Movies\1080\GTA_SA_CREDITS_FINAL_1920x1080.mp4 82 | ``` 83 | 84 | Starting with version 7.9.0, you can use this functionality for total conversions: 85 | 86 | ![re5dx9_update](https://github.com/user-attachments/assets/7ec4c006-2205-444f-9a7a-8d3c8f5b62fb) 87 | 88 | Two or more folders must be specified and exist for the selector dialog to appear. Define them inside global.ini under `[FileLoader]` section at `OverloadFromFolder` key. Use `|` symbol as a separator. If only one folder is specified and exists, it will be used to overload files, but the selector will not appear. Without ini file, `update` folder is always used if it exists. Example: 89 | 90 | ```ini 91 | [FileLoader] 92 | OverloadFromFolder=update | nightmare 93 | ``` 94 | 95 | To create a custom header, create `update.txt` inside update/total conversion folder and insert the custom name there. 96 | 97 | `Resident Evil 5\nightmare\update.txt:` 98 | 99 | ``` 100 | Resident Evil 5 - Nightmare (Story mode mod) 101 | ``` 102 | 103 | To get the current update path, use the `GetOverloadPathA` or `GetOverloadPathW` exports from the ASI plugin. 104 | 105 | ```cpp 106 | bool (WINAPI* GetOverloadPathW)(wchar_t* out, size_t out_size) = nullptr; 107 | 108 | ModuleList dlls; 109 | dlls.Enumerate(ModuleList::SearchLocation::LocalOnly); 110 | for (auto& e : dlls.m_moduleList) 111 | { 112 | auto m = std::get(e); 113 | if (IsModuleUAL(m)) { 114 | GetOverloadPathW = (decltype(GetOverloadPathW))GetProcAddress(m, "GetOverloadPathW"); 115 | break; 116 | } 117 | } 118 | 119 | std::wstring s; 120 | s.resize(MAX_PATH, L'\0'); 121 | if (!GetOverloadPathW || !GetOverloadPathW(s.data(), s.size())) 122 | s = GetExeModulePath() / L"update"; 123 | 124 | auto updatePath = std::filesystem::path(s.data()); 125 | ``` 126 | 127 | ## ADDITIONAL WINDOWED MODE FEATURE (x86 builds only) 128 | 129 | 32-bit version of ASI loader has built-in wndmode.dll, which can be loaded if you create empty wndmode.ini in the folder with asi loader's dll. It will be automatically filled with example configuration at the first run of the game. Settings are not universal and should be changed in every specific case, but usually, it works as is. 130 | 131 | ## D3D8TO9 132 | 133 | Some mods, like [SkyGfx](https://github.com/aap/skygfx_vc) require [d3d8to9](https://github.com/crosire/d3d8to9). It is also a part of the ASI loader, so to use it, create [global.ini](https://github.com/ThirteenAG/Ultimate-ASI-Loader/edit/master/readme.md#usage) with the following content: 134 | 135 | ```ini 136 | [GlobalSets] 137 | UseD3D8to9=1 138 | ``` 139 | Asi loader must be named `d3d8.dll` in order for this feature to take effect. 140 | 141 | [See an example of global.ini here](https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/data/scripts/global.ini#L8). 142 | 143 | ## CrashDumps 144 | 145 | ASI loader is now capable of generating crash minidumps and crash logs. To use this feature, create a folder named `CrashDumps` in the folder with asi loader's dll. You can disable that via the `DisableCrashDumps=1` ini option. 146 | 147 | ## Using with UWP games 148 | 149 | 1. Enable Developer Mode (Windows Settings -> Update and Security -> For Developers -> Developer Mode) 150 | ![image](https://user-images.githubusercontent.com/4904157/136562544-6d249514-203e-40c2-808f-34786b043ec5.png) 151 | 2. Install a UWP game, for example, GTA San Andreas. 152 | ![image](https://user-images.githubusercontent.com/4904157/136558440-553ef1f6-cf69-413b-903b-fd4203d6cc1f.png) 153 | 3. Launch a UWP game through the start menu. 154 | 4. Open [UWPInjector.exe](https://github.com/Wunkolo/UWPDumper) from the UWPDumper download. 155 | ![image](https://user-images.githubusercontent.com/4904157/136558563-6e39dd67-778e-4159-bb3b-83c499017223.png) 156 | 5. Enter the Process ID that is displayed from the injector and then hit enter. 157 | 6. Wait until the game is dumped. 158 | ![image](https://user-images.githubusercontent.com/4904157/136558813-8b7c271c-2475-40b9-a432-f9640f328a43.png) 159 | 7. Go to the directory : `C:\Users\[YOUR USERNAME]\AppData\Local\Packages\[YOUR UWP GAME NAME]\TempState\DUMP` 160 | 8. Copy these files into a new folder somewhere else of your choosing. 161 | 9. Uninstall a UWP game by clicking on the start menu, right-clicking on its icon, and uninstall. 162 | ![image](https://user-images.githubusercontent.com/4904157/136559019-bdd6d278-d2ae-4acf-b119-9933baab7d96.png) 163 | 10. Go to your directory with your new dumped files (the ones you copied over) and shift + right-click in the directory and "Open Powershell window here". 164 | 11. In that folder, rename **AppxBlockMap.xml** and **AppxSignature.xml** to anything else. 165 | 12. Run the following command: `Add-AppxPackage -Register AppxManifest.xml` 166 | 13. Place Ultimate ASI Loader DLL into the game directory. You need to find out which name works for a specific game, in the case of GTA SA I've used **d3d11.dll**, so I put **dinput8.dll** from the x86 archive and renamed it to **d3d11.dll**. 167 | 14. Create a **scripts** or **plugins** folder within the root directory and place your plugins in it. 168 | Rough code example of radio for all vehicles plugin [here](https://gist.github.com/ThirteenAG/868a964b46b82ce5cebbd4a0823c69e4). Compiled binary here - [GTASAUWP.RadioForAllVehicles.zip](https://github.com/ThirteenAG/Ultimate-ASI-Loader/files/7311505/GTASAUWP.RadioForAllVehicles.zip) 169 | 15. Click on the start menu and launch the game! 170 | 16. See your mods in action. 171 | ![ApplicationFrameHost_2021-10-08_15-57-14](https://user-images.githubusercontent.com/4904157/136561208-e989119e-1ef4-42c2-8b20-c1f81f4e0931.png) 172 | -------------------------------------------------------------------------------- /release-Win32.bat: -------------------------------------------------------------------------------- 1 | set list=d3d8, d3d9, d3d10, d3d11, d3d12, ddraw, dinput, dinput8, dsound, msacm32, msvfw32, version, wininet, winmm, winhttp, xlive, vorbisFile, binkw32, bink2w32, xinput1_1, xinput1_2, xinput1_3, xinput1_4, xinput9_1_0, xinputuap 2 | mkdir dist\Win32 3 | cd .\bin\Win32\Release 4 | (for %%a in (%list%) do ( 5 | copy dinput8.dll %%a.dll 6 | )) 7 | cd ../../../ 8 | (for %%a in (%list%) do ( 9 | 7za a -tzip ".\bin\%%a-Win32.zip" ".\bin\Win32\Release\%%a.dll" 10 | )) 11 | -------------------------------------------------------------------------------- /release-x64.bat: -------------------------------------------------------------------------------- 1 | set list=d3d9, d3d10, d3d11, d3d12, dinput8, dsound, version, wininet, winmm, winhttp, binkw64, bink2w64, xinput1_1, xinput1_2, xinput1_3, xinput1_4, xinput9_1_0, xinputuap 2 | mkdir dist\x64 3 | cd bin\x64\Release\ 4 | (for %%a in (%list%) do ( 5 | copy dinput8.dll %%a.dll 6 | )) 7 | cd ../../../ 8 | (for %%a in (%list%) do ( 9 | 7za a -tzip ".\bin\%%a-x64.zip" ".\bin\x64\Release\%%a.dll" 10 | )) 11 | -------------------------------------------------------------------------------- /release.bat: -------------------------------------------------------------------------------- 1 | 7za a -tzip ".\bin\Ultimate-ASI-Loader.zip" ".\bin\Win32\Release\dinput8.dll" 2 | 7za a -tzip ".\bin\Ultimate-ASI-Loader_x64.zip" ".\bin\x64\Release\dinput8.dll" 3 | 4 | type nul >"bin\place both files in RESIDENT EVIL 7 biohazard Demo folder" 5 | 7za a -tzip ".\bin\ExeUnprotect-Win32.zip" ".\bin\Win32\Release\scripts\ExeUnprotect.asi" 6 | 7za a -tzip ".\bin\RE7Demo.InfiniteAmmo-x64.zip" ".\bin\x64\Release\dinput8.dll" ".\bin\x64\Release\scripts\RE7Demo.InfiniteAmmo.asi" ".\bin\place both files in RESIDENT EVIL 7 biohazard Demo folder" 7 | 7za a -tzip ".\bin\MessageBox-Win32.zip" ".\bin\Win32\Release\scripts\MessageBox.asi" 8 | 7za a -tzip ".\bin\MessageBox-x64.zip" ".\bin\x64\Release\scripts\MessageBox_x64.asi" 9 | 7za a -tzip ".\bin\MonoLoader-Win32.zip" ".\bin\Win32\Release\scripts\MonoLoader.asi" ".\source\demo_plugins\plugins\" 10 | 7za a -tzip ".\bin\MonoLoader-x64.zip" ".\bin\x64\Release\scripts\MonoLoader_x64.asi" ".\source\demo_plugins\plugins\" 11 | EXIT 12 | 13 | 7-Zip Extra 14 | ~~~~~~~~~~~ 15 | License for use and distribution 16 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17 | 18 | Copyright (C) 1999-2016 Igor Pavlov. 19 | 20 | 7-Zip Extra files are under the GNU LGPL license. 21 | 22 | 23 | Notes: 24 | You can use 7-Zip Extra on any computer, including a computer in a commercial 25 | organization. You don't need to register or pay for 7-Zip. 26 | 27 | 28 | GNU LGPL information 29 | -------------------- 30 | 31 | This library is free software; you can redistribute it and/or 32 | modify it under the terms of the GNU Lesser General Public 33 | License as published by the Free Software Foundation; either 34 | version 2.1 of the License, or (at your option) any later version. 35 | 36 | This library is distributed in the hope that it will be useful, 37 | but WITHOUT ANY WARRANTY; without even the implied warranty of 38 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 39 | Lesser General Public License for more details. 40 | 41 | You can receive a copy of the GNU Lesser General Public License from 42 | http://www.gnu.org/ 43 | 44 | -------------------------------------------------------------------------------- /release.md: -------------------------------------------------------------------------------- 1 | This is a DLL file which adds ASI plugin loading functionality to any game, which uses any of the following libraries: 2 | 3 | | Win32 | Win64 | 4 | | :-----------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | 5 | | [d3d8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d8-Win32.zip) | - | 6 | | [d3d9.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d9-Win32.zip) | [d3d9.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d9-x64.zip) | 7 | | [d3d10.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d10-Win32.zip) | [d3d10.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d10-x64.zip) | 8 | | [d3d11.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d11-Win32.zip) | [d3d11.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d11-x64.zip) | 9 | | [d3d12.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/d3d12-Win32.zip) | [d3d12.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/d3d12-x64.zip) | 10 | | [ddraw.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/ddraw-Win32.zip) | - | 11 | | [dinput.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dinput-Win32.zip) | - | 12 | | [dinput8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dinput8-Win32.zip) | [dinput8.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/dinput8-x64.zip) | 13 | | [dsound.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/dsound-Win32.zip) | [dsound.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/dsound-x64.zip) | 14 | | [msacm32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/msacm32-Win32.zip) | - | 15 | | [msvfw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/msvfw32-Win32.zip) | - | 16 | | [version.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/version-Win32.zip) | [version.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/version-x64.zip) | 17 | | [wininet.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/wininet-Win32.zip) | [wininet.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/wininet-x64.zip) | 18 | | [winmm.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winmm-Win32.zip) | [winmm.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winmm-x64.zip) | 19 | | [winhttp.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winhttp-Win32.zip) | [winhttp.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winhttp-x64.zip) | 20 | | [xlive.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xlive-Win32.zip) | - | 21 | | [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) | - | 22 | | [bink2w32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/bink2w32-Win32.zip) | - | 23 | | - | [binkw64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/binkw64-x64.zip) | 24 | | - | [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) | 25 | | [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) | - | 26 | | [xinput1_1.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_1-Win32.zip) | [xinput1_1.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_1-x64.zip) | 27 | | [xinput1_2.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_2-Win32.zip) | [xinput1_2.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_2-x64.zip) | 28 | | [xinput1_3.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_3-Win32.zip) | [xinput1_3.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_3-x64.zip) | 29 | | [xinput1_4.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput1_4-Win32.zip) | [xinput1_4.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput1_4-x64.zip) | 30 | | [xinput9_1_0.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinput9_1_0-Win32.zip) | [xinput9_1_0.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinput9_1_0-x64.zip) | 31 | | [xinputuap.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xinputuap-Win32.zip) | [xinputuap.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/xinputuap-x64.zip) | 32 | 33 | It is possible(and sometimes necessary) to load the original dll by renaming it to `Hooked.dll`, e.g. `d3d12Hooked.dll`. 34 | With **binkw32.dll** and **vorbisFile.dll** it is optional and you can simply replace the dll. Always make a backup before replacing any files. 35 | 36 | ## INSTALLATION 37 | 38 | To install it, you just need to place DLL into the game directory. Usually, it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above). 39 | 40 | ## USAGE 41 | 42 | Put ASI files in the game root directory, 'scripts', 'plugins', or 'update' folder. 43 | -------------------------------------------------------------------------------- /release.ps1: -------------------------------------------------------------------------------- 1 | $aliases_array_Win32 = "d3d8", "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "ddraw", "dinput", "dsound", "msacm32", "msvfw32", "version", "wininet", "winmm", "winhttp", "xlive", "vorbisFile", "binkw32", "bink2w32", "xinput1_1", "xinput1_2", "xinput1_3", "xinput1_4", "xinput9_1_0", "xinputuap" 2 | $aliases_array_x64 = "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "dsound", "version", "wininet", "winmm", "winhttp", "binkw64", "bink2w64", "xinput1_1", "xinput1_2", "xinput1_3", "xinput1_4", "xinput9_1_0", "xinputuap" 3 | $platform_array = "Win32", "x64" 4 | $hash_alrg = "SHA512" 5 | 6 | foreach ($platform in $platform_array) 7 | { 8 | mkdir "dist\$platform\dll" 9 | mkdir "dist\$platform\zip" 10 | if ($platform -eq "Win32") { 11 | Move-Item ".\bin\$platform\Release\dinput8.dll" ".\bin\$platform\Release\_dinput8.dll" 12 | foreach ($file in $aliases_array_Win32) { 13 | Copy-Item ".\bin\$platform\Release\_dinput8.dll" ".\bin\$platform\Release\$file.dll" 14 | } 15 | } 16 | else 17 | { 18 | Move-Item ".\bin\$platform\Release\dinput8.dll" ".\bin\$platform\Release\_dinput8.dll" 19 | foreach ($file in $aliases_array_x64) { 20 | Copy-Item ".\bin\$platform\Release\_dinput8.dll" ".\bin\$platform\Release\$file.dll" 21 | } 22 | } 23 | if ($platform -eq "Win32") { 24 | foreach ($file in $aliases_array_Win32) { 25 | Get-FileHash ".\bin\$platform\Release\$file.dll" -Algorithm "$hash_alrg" | Format-List | Out-File -Encoding "utf8" ".\bin\$file-$platform.$hash_alrg" 26 | Copy-Item ".\bin\$platform\Release\$file.dll", ".\bin\$file-$platform.$hash_alrg" -Destination ".\dist\$platform\dll\" 27 | $compress = @{ 28 | Path = ".\bin\$platform\Release\$file.dll", ".\bin\$file-$platform.$hash_alrg" 29 | CompressionLevel = "NoCompression" 30 | DestinationPath = ".\dist\$platform\zip\$file-$platform.zip" 31 | } 32 | Compress-Archive @compress 33 | } 34 | } 35 | else 36 | { 37 | foreach ($file in $aliases_array_x64) { 38 | Get-FileHash ".\bin\$platform\Release\$file.dll" -Algorithm "$hash_alrg" | Format-List | Out-File -Encoding "utf8" ".\bin\$file-$platform.$hash_alrg" 39 | Copy-Item ".\bin\$platform\Release\$file.dll", ".\bin\$file-$platform.$hash_alrg" -Destination ".\dist\$platform\dll\" 40 | $compress = @{ 41 | Path = ".\bin\$platform\Release\$file.dll", ".\bin\$file-$platform.$hash_alrg" 42 | CompressionLevel = "NoCompression" 43 | DestinationPath = ".\dist\$platform\zip\$file-$platform.zip" 44 | } 45 | Compress-Archive @compress 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/demo_plugins/ExeUnprotect.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID) 4 | { 5 | if (reason == DLL_PROCESS_ATTACH) 6 | { 7 | // Unprotect the module NOW 8 | auto hExecutableInstance = (size_t)GetModuleHandle(NULL); 9 | IMAGE_NT_HEADERS* ntHeader = (IMAGE_NT_HEADERS*)(hExecutableInstance + ((IMAGE_DOS_HEADER*)hExecutableInstance)->e_lfanew); 10 | SIZE_T size = ntHeader->OptionalHeader.SizeOfImage; 11 | DWORD oldProtect; 12 | VirtualProtect((VOID*)hExecutableInstance, size, PAGE_EXECUTE_READWRITE, &oldProtect); 13 | } 14 | return TRUE; 15 | } -------------------------------------------------------------------------------- /source/demo_plugins/MessageBox.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID) 4 | { 5 | if (reason == DLL_PROCESS_ATTACH) 6 | { 7 | MessageBox(0, TEXT("ASI Loader works correctly."), TEXT("ASI Loader Test Plugin"), MB_ICONWARNING); 8 | } 9 | return TRUE; 10 | } -------------------------------------------------------------------------------- /source/demo_plugins/MonoLoader.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../../external/ModuleList/ModuleList.hpp" 6 | #include "safetyhook.hpp" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | HMODULE hm = NULL; 18 | HMODULE ual = NULL; 19 | 20 | template 21 | bool iequals(const T& s1, const V& s2) 22 | { 23 | T str1(s1); T str2(s2); 24 | std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); 25 | std::transform(str2.begin(), str2.end(), str2.begin(), ::tolower); 26 | return (str1 == str2); 27 | } 28 | 29 | class DllCallbackHandler 30 | { 31 | public: 32 | static inline void RegisterCallback(std::function&& fn) 33 | { 34 | RegisterDllNotification(); 35 | GetCallbackList().emplace_back(std::forward>(fn)); 36 | } 37 | private: 38 | static inline void callOnLoad(HMODULE mod) 39 | { 40 | if (!GetCallbackList().empty()) 41 | { 42 | for (auto& f : GetCallbackList()) 43 | { 44 | f(mod); 45 | } 46 | } 47 | } 48 | 49 | private: 50 | static inline std::vector>& GetCallbackList() 51 | { 52 | return onLoad; 53 | } 54 | 55 | typedef NTSTATUS(NTAPI* _LdrRegisterDllNotification) (ULONG, PVOID, PVOID, PVOID); 56 | typedef NTSTATUS(NTAPI* _LdrUnregisterDllNotification) (PVOID); 57 | 58 | typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA 59 | { 60 | ULONG Flags; //Reserved. 61 | PUNICODE_STRING FullDllName; //The full path name of the DLL module. 62 | PUNICODE_STRING BaseDllName; //The base file name of the DLL module. 63 | PVOID DllBase; //A pointer to the base address for the DLL in memory. 64 | ULONG SizeOfImage; //The size of the DLL image, in bytes. 65 | } LDR_DLL_LOADED_NOTIFICATION_DATA, LDR_DLL_UNLOADED_NOTIFICATION_DATA, * PLDR_DLL_LOADED_NOTIFICATION_DATA, * PLDR_DLL_UNLOADED_NOTIFICATION_DATA; 66 | 67 | typedef union _LDR_DLL_NOTIFICATION_DATA 68 | { 69 | LDR_DLL_LOADED_NOTIFICATION_DATA Loaded; 70 | LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded; 71 | } LDR_DLL_NOTIFICATION_DATA, * PLDR_DLL_NOTIFICATION_DATA; 72 | 73 | typedef NTSTATUS(NTAPI* PLDR_MANIFEST_PROBER_ROUTINE) (IN HMODULE DllBase, IN PCWSTR FullDllPath, OUT PHANDLE ActivationContext); 74 | typedef NTSTATUS(NTAPI* PLDR_ACTX_LANGUAGE_ROURINE) (IN HANDLE Unk, IN USHORT LangID, OUT PHANDLE ActivationContext); 75 | typedef void(NTAPI* PLDR_RELEASE_ACT_ROUTINE) (IN HANDLE ActivationContext); 76 | typedef VOID(NTAPI* fnLdrSetDllManifestProber) (IN PLDR_MANIFEST_PROBER_ROUTINE ManifestProberRoutine, 77 | IN PLDR_ACTX_LANGUAGE_ROURINE CreateActCtxLanguageRoutine, IN PLDR_RELEASE_ACT_ROUTINE ReleaseActCtxRoutine); 78 | 79 | private: 80 | static inline void CALLBACK LdrDllNotification(ULONG NotificationReason, PLDR_DLL_NOTIFICATION_DATA NotificationData, PVOID Context) 81 | { 82 | static constexpr auto LDR_DLL_NOTIFICATION_REASON_LOADED = 1; 83 | static constexpr auto LDR_DLL_NOTIFICATION_REASON_UNLOADED = 2; 84 | if (NotificationReason == LDR_DLL_NOTIFICATION_REASON_LOADED) 85 | { 86 | callOnLoad((HMODULE)NotificationData->Loaded.DllBase); 87 | } 88 | } 89 | 90 | static inline NTSTATUS NTAPI ProbeCallback(IN HMODULE DllBase, IN PCWSTR FullDllPath, OUT PHANDLE ActivationContext) 91 | { 92 | std::wstring str(FullDllPath); 93 | callOnLoad(DllBase); 94 | 95 | HANDLE actx = NULL; 96 | ACTCTXW act = { 0 }; 97 | 98 | act.cbSize = sizeof(act); 99 | act.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID; 100 | act.lpSource = FullDllPath; 101 | act.hModule = DllBase; 102 | act.lpResourceName = ISOLATIONAWARE_MANIFEST_RESOURCE_ID; 103 | *ActivationContext = 0; 104 | actx = CreateActCtxW(&act); 105 | if (actx == INVALID_HANDLE_VALUE) 106 | return 0xC000008B; //STATUS_RESOURCE_NAME_NOT_FOUND; 107 | *ActivationContext = actx; 108 | return STATUS_SUCCESS; 109 | } 110 | 111 | static inline void RegisterDllNotification() 112 | { 113 | LdrRegisterDllNotification = (_LdrRegisterDllNotification)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "LdrRegisterDllNotification"); 114 | if (LdrRegisterDllNotification) 115 | { 116 | if (!cookie) 117 | LdrRegisterDllNotification(0, LdrDllNotification, 0, &cookie); 118 | } 119 | else 120 | { 121 | LdrSetDllManifestProber = (fnLdrSetDllManifestProber)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "LdrSetDllManifestProber"); 122 | if (LdrSetDllManifestProber) 123 | { 124 | LdrSetDllManifestProber(&ProbeCallback, NULL, &ReleaseActCtx); 125 | } 126 | } 127 | } 128 | 129 | static inline void UnRegisterDllNotification() 130 | { 131 | LdrUnregisterDllNotification = (_LdrUnregisterDllNotification)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "LdrUnregisterDllNotification"); 132 | if (LdrUnregisterDllNotification && cookie) 133 | LdrUnregisterDllNotification(cookie); 134 | } 135 | 136 | private: 137 | static inline _LdrRegisterDllNotification LdrRegisterDllNotification; 138 | static inline _LdrUnregisterDllNotification LdrUnregisterDllNotification; 139 | static inline void* cookie; 140 | static inline fnLdrSetDllManifestProber LdrSetDllManifestProber; 141 | static inline std::vector> onLoad; 142 | }; 143 | 144 | using MonoObject = void; 145 | using MonoMethod = void; 146 | using MonoMethodDesc = void; 147 | using MonoDomain = void; 148 | using MonoAssembly = void; 149 | using MonoImage = void; 150 | using MonoImageOpenStatus = void; 151 | using mono_bool = bool; 152 | 153 | static std::map monoExports = { 154 | { "mono_assembly_load_from_full", nullptr }, 155 | { "mono_get_root_domain", nullptr }, 156 | { "mono_domain_assembly_open", nullptr }, 157 | { "mono_assembly_get_image", nullptr }, 158 | { "mono_runtime_invoke", nullptr }, 159 | { "mono_method_desc_new", nullptr }, 160 | { "mono_method_desc_free", nullptr }, 161 | { "mono_method_desc_search_in_image", nullptr }, 162 | }; 163 | 164 | SafetyHookInline sh_mono_assembly_load_from_full_hook{}; 165 | std::map> pluginsToLoad; 166 | MonoAssembly* mono_assembly_load_from_full_hook(MonoImage* image, const char* fname, MonoImageOpenStatus* status, mono_bool refonly) 167 | { 168 | auto ret = sh_mono_assembly_load_from_full_hook.unsafe_call(image, fname, status, refonly); 169 | 170 | static std::once_flag flag; 171 | std::call_once(flag, []() 172 | { 173 | auto mono_get_root_domain = (MonoDomain*(*)())monoExports["mono_get_root_domain"]; 174 | auto mono_domain_assembly_open = (MonoAssembly*(*)(MonoDomain* domain, const char* name))monoExports["mono_domain_assembly_open"]; 175 | auto mono_assembly_get_image = (MonoImage*(*)(MonoAssembly* assembly))monoExports["mono_assembly_get_image"]; 176 | auto mono_runtime_invoke = (MonoObject*(*)(MonoMethod* method, void* obj, void** params, MonoObject** exc))monoExports["mono_runtime_invoke"]; 177 | auto mono_method_desc_new = (MonoMethodDesc*(*)(const char* name, mono_bool include_namespace))monoExports["mono_method_desc_new"]; 178 | auto mono_method_desc_search_in_image = (MonoMethod*(*)(MonoMethodDesc* desc, MonoImage* image))monoExports["mono_method_desc_search_in_image"]; 179 | auto mono_method_desc_free = (void(*)(MonoMethodDesc* desc))monoExports["mono_method_desc_free"]; 180 | 181 | std::set invokedMethods; 182 | 183 | auto insertDefaults = [&](auto dll) 184 | { 185 | pluginsToLoad[dll].emplace(L"UltimateASILoader:InitializeASI"); 186 | pluginsToLoad[dll].emplace(L"UltimateASILoader.UltimateASILoader:InitializeASI"); 187 | }; 188 | 189 | auto split = [](std::wstring_view string, std::wstring_view delimiter) -> std::vector 190 | { 191 | auto t = [](auto&& rng) { return std::wstring_view(&*rng.begin(), std::ranges::distance(rng)); }; 192 | auto s = string | std::ranges::views::split(delimiter) | std::ranges::views::transform(t); 193 | return { s.begin(), s.end() }; 194 | }; 195 | 196 | auto parseFile = [&](std::filesystem::path file, std::filesystem::path dll = std::filesystem::path()) 197 | { 198 | std::wifstream infile(file); 199 | std::wstring line; 200 | while (std::getline(infile, line)) { 201 | if (line.empty() || line.starts_with(L"#") || line.starts_with(L";")) 202 | continue; 203 | 204 | auto subs = split(line, L"="); 205 | if (subs.size() == 2) 206 | pluginsToLoad[subs.front()].emplace(subs.back()); 207 | else if (line.contains(L":")) 208 | pluginsToLoad[dll].emplace(line); 209 | else 210 | insertDefaults(line); 211 | } 212 | }; 213 | 214 | HMODULE h; 215 | WCHAR buffer[MAX_PATH]; 216 | GetModuleFileNameW(GetModuleHandleW(NULL), buffer, ARRAYSIZE(buffer)); 217 | std::filesystem::path exePath(buffer); 218 | GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCWSTR)&monoExports, &h); 219 | GetModuleFileNameW(h, buffer, ARRAYSIZE(buffer)); 220 | std::filesystem::path modulePath(buffer); 221 | 222 | parseFile(exePath.parent_path() / L"assemblies.txt"); 223 | parseFile(std::filesystem::path(modulePath).replace_extension(".ini")); 224 | parseFile(std::filesystem::path(modulePath).replace_extension(".txt")); 225 | 226 | std::error_code ec; 227 | for (auto& folder : { L"scripts", L"plugins" }) 228 | { 229 | for (const auto& file : std::filesystem::recursive_directory_iterator(folder, std::filesystem::directory_options::skip_permission_denied, ec)) 230 | { 231 | if (!std::filesystem::is_directory(file, ec) && file.is_regular_file(ec) && iequals(file.path().extension().wstring(), L".dll")) 232 | { 233 | auto plugin_path = std::filesystem::absolute(file, ec); 234 | insertDefaults(plugin_path); 235 | parseFile(std::filesystem::path(plugin_path).replace_extension(".ini"), plugin_path); 236 | parseFile(std::filesystem::path(plugin_path).replace_extension(".txt"), plugin_path); 237 | } 238 | } 239 | } 240 | 241 | for (auto& plugin : pluginsToLoad) 242 | { 243 | auto rootDomain = mono_get_root_domain(); 244 | if (rootDomain) 245 | { 246 | auto monoAssembly = mono_domain_assembly_open(rootDomain, plugin.first.string().c_str()); 247 | if (monoAssembly) 248 | { 249 | auto image = mono_assembly_get_image(monoAssembly); 250 | for (auto& method : plugin.second) 251 | { 252 | if (!method.empty()) 253 | { 254 | for (auto inc_ns : { true, false }) 255 | { 256 | auto description = mono_method_desc_new(method.string().c_str(), inc_ns); 257 | if (description) 258 | { 259 | auto method = mono_method_desc_search_in_image(description, image); 260 | mono_method_desc_free(description); 261 | if (method && !invokedMethods.contains(method)) 262 | { 263 | void* exc = nullptr; 264 | mono_runtime_invoke(method, nullptr, nullptr, &exc); 265 | if (!exc) 266 | { 267 | invokedMethods.emplace(method); 268 | break; 269 | } 270 | } 271 | } 272 | } 273 | } 274 | } 275 | } 276 | } 277 | } 278 | }); 279 | 280 | return ret; 281 | } 282 | 283 | void GetMonoDllCB(HMODULE mod) 284 | { 285 | ModuleList dlls; 286 | dlls.Enumerate(ModuleList::SearchLocation::LocalOnly); 287 | for (auto& e : dlls.m_moduleList) 288 | { 289 | auto m = std::get(e); 290 | if (m == mod && m != ual && m != hm && m != GetModuleHandle(NULL)) 291 | { 292 | for (auto& [key, value] : monoExports) 293 | { 294 | auto v = GetProcAddress(m, key.c_str()); 295 | if (v) 296 | value = v; 297 | else 298 | break; 299 | } 300 | } 301 | } 302 | 303 | if (std::all_of(monoExports.begin(), monoExports.end(), [](const auto& it) { return it.second != nullptr; })) 304 | { 305 | sh_mono_assembly_load_from_full_hook = safetyhook::create_inline(monoExports["mono_assembly_load_from_full"], mono_assembly_load_from_full_hook); 306 | } 307 | } 308 | 309 | extern "C" __declspec(dllexport) void InitializeASI() 310 | { 311 | static std::once_flag flag; 312 | std::call_once(flag, []() 313 | { 314 | ModuleList dlls; 315 | dlls.Enumerate(ModuleList::SearchLocation::LocalOnly); 316 | for (auto& e : dlls.m_moduleList) 317 | GetMonoDllCB(std::get(e)); 318 | DllCallbackHandler::RegisterCallback(GetMonoDllCB); 319 | }); 320 | } 321 | 322 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID /*lpReserved*/) 323 | { 324 | if (reason == DLL_PROCESS_ATTACH) 325 | { 326 | hm = hModule; 327 | } 328 | else if (reason == DLL_PROCESS_DETACH) 329 | { 330 | sh_mono_assembly_load_from_full_hook.reset(); 331 | } 332 | return TRUE; 333 | } -------------------------------------------------------------------------------- /source/demo_plugins/RE7Demo.InfiniteAmmo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DWORD WINAPI Thread(LPVOID) 5 | { 6 | MEMORY_BASIC_INFORMATION mbi = { 0 }; 7 | uintptr_t dwEndAddr; 8 | while (true) 9 | { 10 | Sleep(1000); 11 | 12 | while (VirtualQuery((VOID *)((uintptr_t)mbi.BaseAddress + mbi.RegionSize), &mbi, sizeof(MEMORY_BASIC_INFORMATION))) 13 | { 14 | if (mbi.Protect == PAGE_EXECUTE_READWRITE) 15 | { 16 | dwEndAddr = (uintptr_t)mbi.BaseAddress + mbi.RegionSize - 1 - 4; 17 | 18 | for (uintptr_t i = (uintptr_t)mbi.BaseAddress; i <= dwEndAddr; i++) 19 | { 20 | __try 21 | { 22 | if (*(uint64_t*)i == (uint64_t)0x49244889C9480F41) 23 | { 24 | if (*(uint32_t*)(i + sizeof(uint64_t)) == (uint32_t)0x4C50428B) 25 | { 26 | *(uint32_t*)i = 0x072440C7; 27 | *(uint32_t*)(i + 4) = 0x49000000; //mov [rax+24],00000007 28 | return 0; 29 | } 30 | } 31 | } 32 | __except (true) 33 | { 34 | i = dwEndAddr; 35 | } 36 | } 37 | } 38 | } 39 | } 40 | return 0; 41 | } 42 | 43 | 44 | BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD reason, LPVOID /*lpReserved*/) 45 | { 46 | if (reason == DLL_PROCESS_ATTACH) 47 | { 48 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&Thread, NULL, 0, NULL); 49 | } 50 | return TRUE; 51 | } -------------------------------------------------------------------------------- /source/demo_plugins/plugins/MessageBox.NET.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/demo_plugins/plugins/MessageBox.NET.dll -------------------------------------------------------------------------------- /source/exception.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * Unhandled Exception Tracer 4 | * by LINK/2012 5 | * 6 | * This source code is offered for use in the public domain. You may 7 | * use, modify or distribute it freely. 8 | * 9 | * This code is distributed in the hope that it will be useful but 10 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 11 | * DISCLAIMED. This includes but is not limited to warranties of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | * 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #pragma comment(lib, "Dbghelp.lib") 23 | 24 | /* 25 | * Special Note: 26 | * Try not to allocate any memory in this file! 27 | * Allocation after a exception may not be a good idea... 28 | */ 29 | 30 | #define LODWORD(_qw) ((DWORD)(_qw)) 31 | #define HIDWORD(_qw) ((DWORD)(((_qw) >> 32) & 0xffffffff)) 32 | 33 | // General constants 34 | static const int sizeof_word = sizeof(void*); // Size of a CPU word (4 bytes on x86) 35 | static const int max_chars_per_print = MAX_PATH + 256; // Max characters per Print() call 36 | static const int symbol_max = 256; // Max size of a symbol (func symbol, var symbol, etc) 37 | static const int max_static_buffer = 4096; // Max static buffer for logging 38 | 39 | // Stackdump constants 40 | static const int stackdump_max_words = 60; // max number of CPU words that the stackdump should dump 41 | static const int stackdump_words_per_line = 6; // max CPU words in a single line 42 | static const int stackdump_line_count = (stackdump_max_words / stackdump_words_per_line) + 1; 43 | 44 | // Backtrace constants 45 | static const int max_backtrace_ever = 100; 46 | static const int max_backtrace = 20; 47 | 48 | // Maximum log size constants 49 | static const int max_logsize_basic = (MAX_PATH + 200); // module path + other text 50 | static const int max_logsize_regs = 32 + (4 * 4 * 28); // info + (regsPerLine * numLines * charsPerReg) 51 | static const int max_logsize_stackdump = 32 + 80 + (stackdump_line_count * 32) + (10 * stackdump_words_per_line * stackdump_line_count); 52 | static const int max_logsize_backtrace = 32 + max_backtrace_ever * (MAX_PATH + symbol_max + 90); 53 | static const int max_logsize_ever = 32 + max_logsize_basic + max_logsize_regs + max_logsize_stackdump + max_logsize_backtrace; 54 | 55 | // Internal 56 | class ExceptionTracer; 57 | class StackTrace; 58 | static HMODULE GetModuleFromAddress(LPVOID address); 59 | static const char* GetExceptionCodeString(unsigned int code); 60 | static const char* FindModuleName(HMODULE module, char* output, DWORD size); 61 | static int LogException(char* buffer, size_t max, LPEXCEPTION_POINTERS pException, bool bLogRegisters, bool bLogStack, bool bLogBacktrace); 62 | static LPTOP_LEVEL_EXCEPTION_FILTER PrevFilter = nullptr; 63 | static void(*ExceptionCallback)(const char* buffer) = nullptr; 64 | 65 | // Exportable 66 | int InstallExceptionCatcher(void(*OnException)(const char* log)); 67 | 68 | /* 69 | * ExceptionTrace 70 | * This class is responssible for tracing all possible informations about an LPEXCEPTION_POINTER 71 | */ 72 | class ExceptionTracer 73 | { 74 | public: 75 | ExceptionTracer(char* buffer, size_t max, LPEXCEPTION_POINTERS pException); 76 | void PrintUnhandledException(); 77 | void PrintRegisters(); 78 | void PrintStackdump(); 79 | void PrintBacktrace(); 80 | 81 | void EnterScope(); 82 | void LeaveScope(); 83 | void Print(const char* fmt, ...); 84 | void NewLine() { Print("\n%s", spc); } 85 | 86 | protected: 87 | EXCEPTION_POINTERS& exception; 88 | EXCEPTION_RECORD& record; 89 | CONTEXT& context; 90 | HMODULE module; 91 | 92 | char* buffer; // Logging buffer 93 | size_t len; // Logged length 94 | size_t max; // Maximum we can log in that buffer 95 | 96 | char spc[(10 * 4) + 1]; // Scope/spacing buffer, 4 spaces per scope, max 10 scopes 97 | size_t nspc; // Number spaces used up there 98 | }; 99 | 100 | /* 101 | * StackTracer 102 | * Responssible for backtracing an stack from a context 103 | */ 104 | class StackTracer 105 | { 106 | public: 107 | struct Trace 108 | { 109 | // The following values may be null (any) 110 | HMODULE module; // The module the func related to this frame is located 111 | void *pc; // Program counter at func related to this frame (EIP) 112 | void *ret; // Return address for the frame 113 | void *frame; // The frame address (EBP) 114 | void *stack; // The stack pointer at the frame (ESP) 115 | }; 116 | 117 | StackTracer(const CONTEXT& context); 118 | Trace* Walk(); 119 | 120 | private: 121 | Trace trace; 122 | DWORD old_options; 123 | CONTEXT context; 124 | STACKFRAME64 frame; 125 | }; 126 | 127 | /* 128 | * TheUnhandledExceptionFilter 129 | * Logs an unhandled exception 130 | */ 131 | static LONG CALLBACK TheUnhandledExceptionFilter(LPEXCEPTION_POINTERS pException) 132 | { 133 | // Logs exception into buffer and calls the callback 134 | auto Log = [pException](char* buffer, size_t size, bool reg, bool stack, bool trace) 135 | { 136 | if (LogException(buffer, size, (LPEXCEPTION_POINTERS)pException, reg, stack, trace)) 137 | ExceptionCallback(buffer); 138 | }; 139 | 140 | // Try to make a very descriptive exception, for that we need to malloc a huge buffer... 141 | if (auto buffer = (char*)malloc(max_logsize_ever)) 142 | { 143 | Log(buffer, max_logsize_ever, true, true, true); 144 | free(buffer); 145 | } 146 | else 147 | { 148 | // Use a static buffer, no need for any allocation 149 | static const auto size = max_logsize_basic + max_logsize_regs + max_logsize_stackdump; 150 | static char static_buf[size]; 151 | static_assert(size <= max_static_buffer, "Static buffer is too big"); 152 | 153 | Log(buffer = static_buf, sizeof(static_buf), true, true, false); 154 | } 155 | 156 | // Continue exception propagation 157 | return (PrevFilter ? PrevFilter(pException) : EXCEPTION_CONTINUE_SEARCH); // I'm not really sure about this return 158 | } 159 | 160 | /* 161 | * InstallExceptionCatcher 162 | * Installs a exception handler to call the specified callback when it happens with human readalbe information. 163 | */ 164 | int InstallExceptionCatcher(void(*cb)(const char* log)) 165 | { 166 | PrevFilter = SetUnhandledExceptionFilter(TheUnhandledExceptionFilter); 167 | ExceptionCallback = cb; 168 | return 1; 169 | } 170 | 171 | /* 172 | * LogException 173 | * Takes an LPEXCEPTION_POINTERS and transforms in a string that is put in the logging steam 174 | */ 175 | static int LogException(char* buffer, size_t max, LPEXCEPTION_POINTERS pException, bool bLogRegisters, bool bLogStack, bool bLogBacktrace) 176 | { 177 | ExceptionTracer trace(buffer, max, pException); 178 | trace.PrintUnhandledException(); 179 | trace.EnterScope(); 180 | if (bLogRegisters) trace.PrintRegisters(); 181 | if (bLogStack) trace.PrintStackdump(); 182 | if (bLogBacktrace) trace.PrintBacktrace(); 183 | trace.LeaveScope(); 184 | return 1; 185 | } 186 | 187 | /* 188 | * ExceptionTracer 189 | * Contructs a exception trace object, responssible for tracing informations about an exception 190 | */ 191 | ExceptionTracer::ExceptionTracer(char* buffer, size_t max, LPEXCEPTION_POINTERS pException) : 192 | buffer(buffer), exception(*pException), record(*pException->ExceptionRecord), context(*pException->ContextRecord) 193 | { 194 | this->buffer = buffer; 195 | this->buffer[this->len = 0] = 0; 196 | this->spc[this->nspc = 0] = 0; 197 | this->max = max; 198 | 199 | // Acquiere common information that we'll access 200 | this->module = GetModuleFromAddress(record.ExceptionAddress); 201 | } 202 | 203 | /* 204 | * Print 205 | * Prints some formated text into the logging buffer 206 | */ 207 | void ExceptionTracer::Print(const char* fmt, ...) 208 | { 209 | va_list va; 210 | va_start(va, fmt); 211 | if ((this->max - this->len) > max_chars_per_print) 212 | this->len += vsprintf(&this->buffer[len], fmt, va); 213 | va_end(va); 214 | } 215 | 216 | /* 217 | * EnterScope 218 | * Enters a new scope in the logging buffer (scope is related to indentation) 219 | * This also prints a new line 220 | */ 221 | void ExceptionTracer::EnterScope() 222 | { 223 | nspc += 4; 224 | spc[nspc - 4] = ' '; 225 | spc[nspc - 3] = ' '; 226 | spc[nspc - 2] = ' '; 227 | spc[nspc - 1] = ' '; 228 | spc[nspc - 0] = 0; 229 | NewLine(); 230 | } 231 | 232 | /* 233 | * LeaveScope 234 | * Leaves the scope 235 | */ 236 | void ExceptionTracer::LeaveScope() 237 | { 238 | assert(nspc > 0); 239 | nspc -= 4; 240 | spc[nspc] = 0; 241 | NewLine(); 242 | } 243 | 244 | /* 245 | * PrintUnhandledException 246 | * Prints the well known "Unhandled exception at ..." into the logging buffer 247 | */ 248 | void ExceptionTracer::PrintUnhandledException() 249 | { 250 | char module_name[MAX_PATH]; 251 | auto dwExceptionCode = record.ExceptionCode; 252 | uintptr_t address = (uintptr_t)record.ExceptionAddress; 253 | 254 | // Find out our module name for logging 255 | if (!this->module || !GetModuleFileNameA(this->module, module_name, sizeof(module_name))) 256 | strcpy(module_name, "unknown"); 257 | 258 | // Log the exception in a similar format similar to debuggers format 259 | Print("Unhandled exception at 0x%p in %s", address, FindModuleName(module, module_name, sizeof(module_name))); 260 | if (module) Print(" (+0x%x)", address - (uintptr_t)(module)); 261 | Print(": 0x%X: %s", dwExceptionCode, GetExceptionCodeString(dwExceptionCode)); 262 | 263 | // If exception is IN_PAGE_ERROR or ACCESS_VIOLATION, we have additional information such as an address 264 | if (dwExceptionCode == EXCEPTION_IN_PAGE_ERROR || dwExceptionCode == EXCEPTION_ACCESS_VIOLATION) 265 | { 266 | auto rw = (DWORD)record.ExceptionInformation[0]; // read or write? 267 | auto addr = (ULONG_PTR)record.ExceptionInformation[1]; // which address? 268 | 269 | Print(" %s 0x%p", 270 | rw == 0 ? "reading location" : rw == 1 ? "writing location" : rw == 8 ? "DEP at" : "", 271 | addr); 272 | 273 | // IN_PAGE_ERROR have another information... 274 | if (dwExceptionCode == EXCEPTION_IN_PAGE_ERROR) 275 | { 276 | NewLine(); 277 | Print("Underlying NTSTATUS code that resulted in the exception is 0x%p", 278 | record.ExceptionInformation[2]); 279 | } 280 | } 281 | 282 | Print("."); 283 | } 284 | 285 | /* 286 | * PrintRegisters 287 | * Prints the content of the assembly registers into the logging buffer 288 | */ 289 | void ExceptionTracer::PrintRegisters() 290 | { 291 | int regs_in_line = 0; // Amount of registers currently printed on this line 292 | 293 | // Prints a register, followed by spaces 294 | auto PrintRegister = [this, ®s_in_line](const char* reg_name, size_t reg_value, const char* spaces) 295 | { 296 | Print("%s: 0x%p%s", reg_name, reg_value, spaces); 297 | if (++regs_in_line >= 4) { this->NewLine(); regs_in_line = 0; } 298 | }; 299 | 300 | auto PrintFloatRegister = [this, ®s_in_line](const char* reg_name, int reg_num, uint32_t reg_value1, uint32_t reg_value2, uint32_t reg_value3, uint32_t reg_value4) 301 | { 302 | Print("%s%02d: 0x%08X 0x%08X 0x%08X 0x%08X [ %f %f %f %f ]", reg_name, reg_num, reg_value1, reg_value2, reg_value3, reg_value4, 303 | *(float*)®_value1, *(float*)®_value2, *(float*)®_value3, *(float*)®_value4); 304 | if (++regs_in_line >= 1) { this->NewLine(); regs_in_line = 0; } 305 | }; 306 | 307 | // Prints a general purposes register 308 | auto PrintIntRegister = [PrintRegister](const char* reg_name, size_t reg_value) 309 | { 310 | PrintRegister(reg_name, reg_value, " "); 311 | }; 312 | 313 | // Prints a segment register 314 | auto PrintSegRegister = [PrintRegister](const char* reg_name, size_t reg_value) 315 | { 316 | PrintRegister(reg_name, reg_value, " "); 317 | }; 318 | 319 | Print("Register dump:"); 320 | EnterScope(); 321 | { 322 | // Print main general purposes registers 323 | if (context.ContextFlags & CONTEXT_INTEGER) 324 | { 325 | #if !_M_X64 326 | PrintIntRegister("EAX", context.Eax); 327 | PrintIntRegister("EBX", context.Ebx); 328 | PrintIntRegister("ECX", context.Ecx); 329 | PrintIntRegister("EDX", context.Edx); 330 | PrintIntRegister("EDI", context.Edi); 331 | PrintIntRegister("ESI", context.Esi); 332 | #else 333 | PrintIntRegister("RAX", context.Rax); 334 | PrintIntRegister("RCX", context.Rcx); 335 | PrintIntRegister("RDX", context.Rdx); 336 | PrintIntRegister("RBX", context.Rbx); 337 | PrintIntRegister("RBP", context.Rbp); 338 | PrintIntRegister("RSI", context.Rsi); 339 | PrintIntRegister("RDI", context.Rdi); 340 | PrintIntRegister("R08", context.R8); 341 | PrintIntRegister("R09", context.R9); 342 | PrintIntRegister("R10", context.R10); 343 | PrintIntRegister("R11", context.R11); 344 | PrintIntRegister("R12", context.R12); 345 | PrintIntRegister("R13", context.R13); 346 | PrintIntRegister("R14", context.R14); 347 | PrintIntRegister("R15", context.R15); 348 | #endif 349 | } 350 | 351 | // Print control registers 352 | if (context.ContextFlags & CONTEXT_CONTROL) 353 | { 354 | #if !_M_X64 355 | PrintIntRegister("EBP", context.Ebp); 356 | PrintIntRegister("EIP", context.Eip); 357 | PrintIntRegister("ESP", context.Esp); 358 | PrintIntRegister("EFL", context.EFlags); 359 | this->NewLine(); this->NewLine(); regs_in_line = 0; 360 | PrintSegRegister("CS", context.SegCs); 361 | PrintSegRegister("SS", context.SegSs); 362 | #else 363 | PrintIntRegister("RIP", context.Rip); 364 | PrintIntRegister("RSP", context.Rsp); 365 | PrintIntRegister("EFL", context.EFlags); 366 | this->NewLine(); this->NewLine(); regs_in_line = 0; 367 | PrintSegRegister("CS", context.SegCs); 368 | PrintSegRegister("SS", context.SegSs); 369 | #endif 370 | } 371 | 372 | this->NewLine(); regs_in_line = 0; 373 | 374 | // Print segment registers 375 | if (context.ContextFlags & CONTEXT_SEGMENTS) 376 | { 377 | PrintSegRegister("GS", context.SegGs); 378 | PrintSegRegister("FS", context.SegFs); 379 | this->NewLine(); regs_in_line = 0; 380 | PrintSegRegister("ES", context.SegEs); 381 | PrintSegRegister("DS", context.SegDs); 382 | } 383 | 384 | this->NewLine(); this->NewLine(); regs_in_line = 0; 385 | 386 | // Print floating point registers 387 | if (context.ContextFlags & CONTEXT_FLOATING_POINT) 388 | { 389 | for (int i = 0; i < 8; i++) 390 | { 391 | #if !_M_X64 392 | auto f = *(M128A*)&(context.FloatSave.RegisterArea[i * 10]); 393 | PrintFloatRegister("ST", i, LODWORD(f.Low), HIDWORD(f.Low), LODWORD(f.High), HIDWORD(f.High)); 394 | #else 395 | PrintFloatRegister("ST", i, 396 | LODWORD(context.FltSave.FloatRegisters[i].Low), HIDWORD(context.FltSave.FloatRegisters[i].Low), 397 | LODWORD(context.FltSave.FloatRegisters[i].High), HIDWORD(context.FltSave.FloatRegisters[i].High)); 398 | #endif 399 | } 400 | 401 | this->NewLine(); 402 | 403 | for (int i = 0; i < 16; i++) 404 | { 405 | #if !_M_X64 406 | auto f = *(M128A*)&(context.ExtendedRegisters[(i + 10) * 16]); 407 | PrintFloatRegister("XMM", i, LODWORD(f.Low), HIDWORD(f.Low), LODWORD(f.High), HIDWORD(f.High)); 408 | 409 | if (i >= 7) 410 | break; 411 | #else 412 | PrintFloatRegister("XMM", i, 413 | LODWORD(context.FltSave.XmmRegisters[i].Low), HIDWORD(context.FltSave.XmmRegisters[i].Low), 414 | LODWORD(context.FltSave.XmmRegisters[i].High), HIDWORD(context.FltSave.XmmRegisters[i].High)); 415 | #endif 416 | } 417 | } 418 | } 419 | LeaveScope(); 420 | } 421 | 422 | /* 423 | * PrintStackdump 424 | * Prints the content of the stack into the logging buffer 425 | */ 426 | void ExceptionTracer::PrintStackdump() 427 | { 428 | // We need the ESP of the exception context to execute a stack dump, make sure we have access to it 429 | if ((context.ContextFlags & CONTEXT_CONTROL) == 0) 430 | return; 431 | 432 | static const auto align = sizeof_word; // Stack aligment 433 | static const auto max_words_in_line_magic = stackdump_words_per_line + 10; 434 | 435 | MEMORY_BASIC_INFORMATION mbi; 436 | #if !_M_X64 437 | uintptr_t base, bottom, top = (uintptr_t)context.Esp; 438 | #else 439 | uintptr_t base, bottom, top = (uintptr_t)context.Rsp; 440 | #endif 441 | auto words_in_line = max_words_in_line_magic; 442 | 443 | // Finds the bottom of the stack from it's base pointer 444 | // Note: mbi will get overriden on this function 445 | auto GetStackBottom = [&mbi](uintptr_t base) 446 | { 447 | VirtualQuery((void*)base, &mbi, sizeof(mbi)); // Find uncommited region of the stack 448 | VirtualQuery((char*)mbi.BaseAddress + mbi.RegionSize, &mbi, sizeof(mbi)); // Find guard page 449 | VirtualQuery((char*)mbi.BaseAddress + mbi.RegionSize, &mbi, sizeof(mbi)); // Find commited region of the stack 450 | auto last = (uintptr_t)mbi.BaseAddress; 451 | return (base + (last - base) + mbi.RegionSize); // base + distanceToLastRegion + lastRegionSize 452 | }; 453 | 454 | // Prints an CPU word at the specified stack address 455 | auto PrintWord = [this, &words_in_line](uintptr_t addr) 456 | { 457 | if (words_in_line++ >= stackdump_words_per_line) 458 | { 459 | // Print new line only if it's not the first time we enter here (i.e. words_in_line has magical value) 460 | if (words_in_line != max_words_in_line_magic + 1) NewLine(); 461 | words_in_line = 1; 462 | Print("0x%p: ", addr); 463 | } 464 | Print(" %p", *(size_t*)addr); 465 | }; 466 | 467 | Print("Stack dump:"); 468 | EnterScope(); 469 | { 470 | // Makes sure the pointer at top (ESP) is valid and readable memory 471 | if (VirtualQuery((void*)(top), &mbi, sizeof(mbi)) 472 | && (mbi.State & MEM_COMMIT) 473 | && (mbi.Protect & (PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_READWRITE | PAGE_READONLY)) != 0) 474 | { 475 | base = (uintptr_t)mbi.AllocationBase; // Base of the stack (uncommited) 476 | bottom = GetStackBottom(base); // Bottom of the stack (commited) 477 | 478 | // Align the stack top (esp) in a 4 bytes boundary 479 | auto remainder = top % align; 480 | uintptr_t current = remainder ? top + (align - remainder) : top; 481 | 482 | // on x86 stack grows downward! (i.e. from bottom to base) 483 | for (int n = 0; n < stackdump_max_words && current < bottom; ++n, current += align) 484 | PrintWord(current); 485 | 486 | NewLine(); 487 | Print("base: 0x%p top: 0x%p bottom: 0x%p", base, top, bottom); 488 | NewLine(); 489 | } 490 | } 491 | LeaveScope(); 492 | } 493 | 494 | /* 495 | * PrintBacktrace 496 | * Prints a call backtrace into the logging buffer 497 | */ 498 | void ExceptionTracer::PrintBacktrace() 499 | { 500 | StackTracer tracer(this->context); 501 | 502 | char module_name[MAX_PATH]; 503 | char sym_buffer[sizeof(SYMBOL_INFO) + symbol_max]; 504 | 505 | int backtrace_count = 0; // Num of frames traced 506 | bool has_symbol_api = false; // True if we have the symbol API available for use 507 | DWORD old_options; // Saves old symbol API options 508 | 509 | SYMBOL_INFO& symbol = *(SYMBOL_INFO*)sym_buffer; 510 | symbol.SizeOfStruct = sizeof(SYMBOL_INFO); 511 | symbol.MaxNameLen = symbol_max; 512 | 513 | // Tries to get the symbol api 514 | if (SymInitialize(GetCurrentProcess(), 0, TRUE)) 515 | { 516 | has_symbol_api = true; 517 | old_options = SymSetOptions(SYMOPT_DEFERRED_LOADS | SYMOPT_LOAD_LINES | SYMOPT_NO_PROMPTS | SYMOPT_FAIL_CRITICAL_ERRORS); 518 | } 519 | 520 | Print("Backtrace (may be wrong):"); 521 | EnterScope(); 522 | { 523 | // Walks on the stack until there's no frame to trace or we traced 'max_backtrace' frames 524 | while (auto trace = tracer.Walk()) 525 | { 526 | if (++backtrace_count >= max_backtrace) 527 | break; 528 | 529 | bool has_sym = false; // This EIP has a symbol associated with it? 530 | DWORD64 displacement; // EIP displacement relative to symbol 531 | 532 | // If we have access to the symbol api, try to get symbol name from pc (eip) 533 | if (has_symbol_api) 534 | has_sym = trace->pc ? !!SymFromAddr(GetCurrentProcess(), (DWORD64)trace->pc, &displacement, &symbol) : false; 535 | 536 | // Print everything up, this.... Ew, this looks awful! 537 | Print(backtrace_count == 1 ? "=>" : " "); // First line should have '=>' to specify where it crashed 538 | Print("0x%p ", trace->pc); // Print EIP at frame 539 | if (has_sym) Print("%s+0x%x ", symbol.Name, (DWORD)displacement); // Print frame func symbol 540 | Print("in %s (+0x%x) ", // Print module 541 | trace->module ? FindModuleName(trace->module, module_name, sizeof(module_name)) : "unknown", 542 | (uintptr_t)(trace->pc) - (uintptr_t)(trace->module) // Module displacement 543 | ); 544 | if (trace->frame) Print("(0x%p) ", trace->frame); // Print frame pointer 545 | 546 | NewLine(); 547 | } 548 | } 549 | LeaveScope(); 550 | 551 | // Cleanup the symbol api 552 | if (has_symbol_api) 553 | { 554 | SymSetOptions(old_options); 555 | SymCleanup(GetCurrentProcess()); 556 | } 557 | } 558 | 559 | /* 560 | * GetExceptionCodeString 561 | * Returns an description by an exception code 562 | */ 563 | static const char* GetExceptionCodeString(unsigned int code) 564 | { 565 | switch (code) 566 | { 567 | case EXCEPTION_ACCESS_VIOLATION: return "Access violation"; 568 | case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: return "Array bounds exceeded"; 569 | case EXCEPTION_BREAKPOINT: return "Breakpoint exception"; 570 | case EXCEPTION_DATATYPE_MISALIGNMENT: return "Data type misalignment exception"; 571 | case EXCEPTION_FLT_DENORMAL_OPERAND: return "Denormal float operand"; 572 | case EXCEPTION_FLT_DIVIDE_BY_ZERO: return "Floating-point division by zero"; 573 | case EXCEPTION_FLT_INEXACT_RESULT: return "Floating-point inexact result"; 574 | case EXCEPTION_FLT_INVALID_OPERATION: return "Floating-point invalid operation"; 575 | case EXCEPTION_FLT_OVERFLOW: return "Floating-point overflow"; 576 | case EXCEPTION_FLT_STACK_CHECK: return "Floating-point stack check"; 577 | case EXCEPTION_FLT_UNDERFLOW: return "Floating-point underflow"; 578 | case EXCEPTION_ILLEGAL_INSTRUCTION: return "Illegal instruction."; 579 | case EXCEPTION_IN_PAGE_ERROR: return "In page error"; 580 | case EXCEPTION_INT_DIVIDE_BY_ZERO: return "Integer division by zero"; 581 | case EXCEPTION_INT_OVERFLOW: return "Integer overflow"; 582 | case EXCEPTION_INVALID_DISPOSITION: return "Invalid disposition"; 583 | case EXCEPTION_NONCONTINUABLE_EXCEPTION: return "Non-continuable exception"; 584 | case EXCEPTION_PRIV_INSTRUCTION: return "Privileged instruction"; 585 | case EXCEPTION_SINGLE_STEP: return "Single step exception"; 586 | case EXCEPTION_STACK_OVERFLOW: return "Stack overflow"; 587 | default: return "NO_DESCRIPTION"; 588 | } 589 | } 590 | 591 | /* 592 | * FindModuleName 593 | * Finds module filename or "unknown" 594 | */ 595 | static const char* FindModuleName(HMODULE module, char* output, DWORD maxsize) 596 | { 597 | if (GetModuleFileNameA(module, output, maxsize)) 598 | { 599 | // Finds the filename part in the output string 600 | char* filename = strrchr(output, '\\'); 601 | if (!filename) filename = strrchr(output, '/'); 602 | 603 | // If filename found (i.e. output isn't already a filename but full path), make output be filename 604 | if (filename) 605 | { 606 | size_t size = strlen(++filename); 607 | memmove(output, filename, size); 608 | output[size] = 0; 609 | } 610 | } 611 | else 612 | { 613 | // Unknown module 614 | strcpy(output, "unknown"); 615 | } 616 | return output; 617 | } 618 | 619 | /* 620 | * GetModuleFromAddress 621 | * Finds module handle from some address inside it 622 | */ 623 | static HMODULE GetModuleFromAddress(LPVOID address) 624 | { 625 | HMODULE module; 626 | if (GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, 627 | (char*)address, &module)) 628 | return module; 629 | return nullptr; 630 | } 631 | 632 | /* 633 | * StackTracer 634 | * Constructs the tracer, we basically need to initialize the symbol api 635 | */ 636 | StackTracer::StackTracer(const CONTEXT& context) 637 | { 638 | // Initialise basic values 639 | memset(&this->frame, 0, sizeof(frame)); 640 | memcpy(&this->context, &context, sizeof(context)); 641 | 642 | // Setup the initial frame context 643 | #if !_M_X64 644 | frame.AddrPC.Mode = AddrModeFlat; 645 | frame.AddrPC.Offset = context.Eip; 646 | frame.AddrFrame.Mode = AddrModeFlat; 647 | frame.AddrFrame.Offset = context.Ebp; 648 | frame.AddrStack.Mode = AddrModeFlat; 649 | frame.AddrStack.Offset = context.Esp; 650 | #else 651 | frame.AddrPC.Mode = AddrModeFlat; 652 | frame.AddrPC.Offset = context.Rip; 653 | frame.AddrFrame.Mode = AddrModeFlat; 654 | frame.AddrFrame.Offset = context.Rbp; 655 | frame.AddrStack.Mode = AddrModeFlat; 656 | frame.AddrStack.Offset = context.Rsp; 657 | #endif 658 | } 659 | 660 | /* 661 | * StackTracer::Walk 662 | * Walks on the stack, each walk is one frame of backtrace 663 | * Returns a frame or null if the walk on the park is not possible anymore 664 | */ 665 | StackTracer::Trace* StackTracer::Walk() 666 | { 667 | if (StackWalk64(IMAGE_FILE_MACHINE_I386, GetCurrentProcess(), GetCurrentThread(), 668 | &frame, &context, NULL, NULL, NULL, NULL)) 669 | { 670 | trace.module = GetModuleFromAddress((void*)frame.AddrPC.Offset); 671 | trace.frame = (void*)frame.AddrFrame.Offset; 672 | trace.stack = (void*)frame.AddrStack.Offset; 673 | trace.pc = (void*)frame.AddrPC.Offset; 674 | trace.ret = (void*)frame.AddrReturn.Offset; 675 | return &trace; 676 | } 677 | return nullptr; 678 | } 679 | -------------------------------------------------------------------------------- /source/resources/UALx86.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/UALx86.rc -------------------------------------------------------------------------------- /source/resources/VersionInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/VersionInfo.h -------------------------------------------------------------------------------- /source/resources/Versioninfo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/Versioninfo.rc -------------------------------------------------------------------------------- /source/resources/binkw32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/binkw32.dll -------------------------------------------------------------------------------- /source/resources/vorbisfile.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/vorbisfile.dll -------------------------------------------------------------------------------- /source/resources/wndmode.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/resources/wndmode.dll -------------------------------------------------------------------------------- /source/resources/wndmode.ini: -------------------------------------------------------------------------------- 1 | [WINDOWMODE] 2 | UseWindowMode=1 3 | UseGDI=1 4 | UseDirect3D=1 5 | UseDirectInput=0 6 | UseDirectDraw=0 7 | UseDDrawColorEmulate=0 8 | UseDDrawFlipBlt=0 9 | UseDDrawColorConvert=0 10 | UseDDrawPrimaryBlt=0 11 | UseDDrawAutoBlt=0 12 | UseDDrawEmulate=0 13 | UseDDrawPrimaryLost=0 14 | UseCursorMsg=0 15 | UseCursorSet=0 16 | UseCursorGet=0 17 | UseSpeedHack=0 18 | SpeedHackMultiple=10 19 | UseBackgroundResize=0 20 | UseForegroundControl=0 21 | UseFGCGetActiveWindow=0 22 | UseFGCGetForegroundWindow=0 23 | UseFGCFixedWindowPosition=0 24 | EnableExtraKey=0 25 | ShowFps=0 26 | UseCursorClip=0 27 | UseBackgroundPriority=0 28 | DDrawBltWait=-1 29 | Border=0 -------------------------------------------------------------------------------- /source/x64.def: -------------------------------------------------------------------------------- 1 | LIBRARY "UAL" 2 | EXPORTS 3 | IsUltimateASILoader = IsUltimateASILoader 4 | GetOverloadedFilePathA = GetOverloadedFilePathA 5 | GetOverloadedFilePathW = GetOverloadedFilePathW 6 | GetOverloadPathA = GetOverloadPathA 7 | GetOverloadPathW = GetOverloadPathW 8 | GetMemoryModule = GetMemoryModule 9 | 10 | LIBRARY "dinput8" 11 | EXPORTS 12 | DirectInput8Create = _DirectInput8Create 13 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 14 | DllGetClassObject = _DllGetClassObject PRIVATE 15 | DllRegisterServer = _DllRegisterServer PRIVATE 16 | DllUnregisterServer = _DllUnregisterServer PRIVATE 17 | 18 | LIBRARY "dsound" 19 | EXPORTS 20 | DirectSoundCaptureCreate = _DirectSoundCaptureCreate 21 | DirectSoundCaptureCreate8 = _DirectSoundCaptureCreate8 22 | DirectSoundCaptureEnumerateA = _DirectSoundCaptureEnumerateA 23 | DirectSoundCaptureEnumerateW = _DirectSoundCaptureEnumerateW 24 | DirectSoundCreate = _DirectSoundCreate 25 | DirectSoundCreate8 = _DirectSoundCreate8 26 | DirectSoundEnumerateA = _DirectSoundEnumerateA 27 | DirectSoundEnumerateW = _DirectSoundEnumerateW 28 | DirectSoundFullDuplexCreate = _DirectSoundFullDuplexCreate 29 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 30 | DllGetClassObject = _DllGetClassObject PRIVATE 31 | GetDeviceID = _GetDeviceID 32 | 33 | LIBRARY "wininet" 34 | EXPORTS 35 | AppCacheCheckManifest = _AppCacheCheckManifest 36 | AppCacheCloseHandle = _AppCacheCloseHandle 37 | AppCacheCreateAndCommitFile = _AppCacheCreateAndCommitFile 38 | AppCacheDeleteGroup = _AppCacheDeleteGroup 39 | AppCacheDeleteIEGroup = _AppCacheDeleteIEGroup 40 | AppCacheDuplicateHandle = _AppCacheDuplicateHandle 41 | AppCacheFinalize = _AppCacheFinalize 42 | AppCacheFreeDownloadList = _AppCacheFreeDownloadList 43 | AppCacheFreeGroupList = _AppCacheFreeGroupList 44 | AppCacheFreeIESpace = _AppCacheFreeIESpace 45 | AppCacheFreeSpace = _AppCacheFreeSpace 46 | AppCacheGetDownloadList = _AppCacheGetDownloadList 47 | AppCacheGetFallbackUrl = _AppCacheGetFallbackUrl 48 | AppCacheGetGroupList = _AppCacheGetGroupList 49 | AppCacheGetIEGroupList = _AppCacheGetIEGroupList 50 | AppCacheGetInfo = _AppCacheGetInfo 51 | AppCacheGetManifestUrl = _AppCacheGetManifestUrl 52 | AppCacheLookup = _AppCacheLookup 53 | CommitUrlCacheEntryA = _CommitUrlCacheEntryA 54 | CommitUrlCacheEntryBinaryBlob = _CommitUrlCacheEntryBinaryBlob 55 | CommitUrlCacheEntryW = _CommitUrlCacheEntryW 56 | CreateMD5SSOHash = _CreateMD5SSOHash 57 | CreateUrlCacheContainerA = _CreateUrlCacheContainerA 58 | CreateUrlCacheContainerW = _CreateUrlCacheContainerW 59 | CreateUrlCacheEntryA = _CreateUrlCacheEntryA 60 | CreateUrlCacheEntryExW = _CreateUrlCacheEntryExW 61 | CreateUrlCacheEntryW = _CreateUrlCacheEntryW 62 | CreateUrlCacheGroup = _CreateUrlCacheGroup 63 | DeleteIE3Cache = _DeleteIE3Cache 64 | DeleteUrlCacheContainerA = _DeleteUrlCacheContainerA 65 | DeleteUrlCacheContainerW = _DeleteUrlCacheContainerW 66 | DeleteUrlCacheEntry = _DeleteUrlCacheEntry 67 | DeleteUrlCacheEntryA = _DeleteUrlCacheEntryA 68 | DeleteUrlCacheEntryW = _DeleteUrlCacheEntryW 69 | DeleteUrlCacheGroup = _DeleteUrlCacheGroup 70 | DeleteWpadCacheForNetworks = _DeleteWpadCacheForNetworks 71 | DetectAutoProxyUrl = _DetectAutoProxyUrl 72 | DispatchAPICall = _DispatchAPICall 73 | DllInstall = _DllInstall PRIVATE 74 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 75 | DllGetClassObject = _DllGetClassObject PRIVATE 76 | DllRegisterServer = _DllRegisterServer PRIVATE 77 | DllUnregisterServer = _DllUnregisterServer PRIVATE 78 | FindCloseUrlCache = _FindCloseUrlCache 79 | FindFirstUrlCacheContainerA = _FindFirstUrlCacheContainerA 80 | FindFirstUrlCacheContainerW = _FindFirstUrlCacheContainerW 81 | FindFirstUrlCacheEntryA = _FindFirstUrlCacheEntryA 82 | FindFirstUrlCacheEntryExA = _FindFirstUrlCacheEntryExA 83 | FindFirstUrlCacheEntryExW = _FindFirstUrlCacheEntryExW 84 | FindFirstUrlCacheEntryW = _FindFirstUrlCacheEntryW 85 | FindFirstUrlCacheGroup = _FindFirstUrlCacheGroup 86 | FindNextUrlCacheContainerA = _FindNextUrlCacheContainerA 87 | FindNextUrlCacheContainerW = _FindNextUrlCacheContainerW 88 | FindNextUrlCacheEntryA = _FindNextUrlCacheEntryA 89 | FindNextUrlCacheEntryExA = _FindNextUrlCacheEntryExA 90 | FindNextUrlCacheEntryExW = _FindNextUrlCacheEntryExW 91 | FindNextUrlCacheEntryW = _FindNextUrlCacheEntryW 92 | FindNextUrlCacheGroup = _FindNextUrlCacheGroup 93 | ForceNexusLookup = _ForceNexusLookup 94 | ForceNexusLookupExW = _ForceNexusLookupExW 95 | FreeUrlCacheSpaceA = _FreeUrlCacheSpaceA 96 | FreeUrlCacheSpaceW = _FreeUrlCacheSpaceW 97 | FtpCommandA = _FtpCommandA 98 | FtpCommandW = _FtpCommandW 99 | FtpCreateDirectoryA = _FtpCreateDirectoryA 100 | FtpCreateDirectoryW = _FtpCreateDirectoryW 101 | FtpDeleteFileA = _FtpDeleteFileA 102 | FtpDeleteFileW = _FtpDeleteFileW 103 | FtpFindFirstFileA = _FtpFindFirstFileA 104 | FtpFindFirstFileW = _FtpFindFirstFileW 105 | FtpGetCurrentDirectoryA = _FtpGetCurrentDirectoryA 106 | FtpGetCurrentDirectoryW = _FtpGetCurrentDirectoryW 107 | FtpGetFileA = _FtpGetFileA 108 | FtpGetFileEx = _FtpGetFileEx 109 | FtpGetFileSize = _FtpGetFileSize 110 | FtpGetFileW = _FtpGetFileW 111 | FtpOpenFileA = _FtpOpenFileA 112 | FtpOpenFileW = _FtpOpenFileW 113 | FtpPutFileA = _FtpPutFileA 114 | FtpPutFileEx = _FtpPutFileEx 115 | FtpPutFileW = _FtpPutFileW 116 | FtpRemoveDirectoryA = _FtpRemoveDirectoryA 117 | FtpRemoveDirectoryW = _FtpRemoveDirectoryW 118 | FtpRenameFileA = _FtpRenameFileA 119 | FtpRenameFileW = _FtpRenameFileW 120 | FtpSetCurrentDirectoryA = _FtpSetCurrentDirectoryA 121 | FtpSetCurrentDirectoryW = _FtpSetCurrentDirectoryW 122 | _GetFileExtensionFromUrl = __GetFileExtensionFromUrl 123 | GetProxyDllInfo = _GetProxyDllInfo 124 | GetUrlCacheConfigInfoA = _GetUrlCacheConfigInfoA 125 | GetUrlCacheConfigInfoW = _GetUrlCacheConfigInfoW 126 | GetUrlCacheEntryBinaryBlob = _GetUrlCacheEntryBinaryBlob 127 | GetUrlCacheEntryInfoA = _GetUrlCacheEntryInfoA 128 | GetUrlCacheEntryInfoExA = _GetUrlCacheEntryInfoExA 129 | GetUrlCacheEntryInfoExW = _GetUrlCacheEntryInfoExW 130 | GetUrlCacheEntryInfoW = _GetUrlCacheEntryInfoW 131 | GetUrlCacheGroupAttributeA = _GetUrlCacheGroupAttributeA 132 | GetUrlCacheGroupAttributeW = _GetUrlCacheGroupAttributeW 133 | GetUrlCacheHeaderData = _GetUrlCacheHeaderData 134 | GopherCreateLocatorA = _GopherCreateLocatorA 135 | GopherCreateLocatorW = _GopherCreateLocatorW 136 | GopherFindFirstFileA = _GopherFindFirstFileA 137 | GopherFindFirstFileW = _GopherFindFirstFileW 138 | GopherGetAttributeA = _GopherGetAttributeA 139 | GopherGetAttributeW = _GopherGetAttributeW 140 | GopherGetLocatorTypeA = _GopherGetLocatorTypeA 141 | GopherGetLocatorTypeW = _GopherGetLocatorTypeW 142 | GopherOpenFileA = _GopherOpenFileA 143 | GopherOpenFileW = _GopherOpenFileW 144 | HttpAddRequestHeadersA = _HttpAddRequestHeadersA 145 | HttpAddRequestHeadersW = _HttpAddRequestHeadersW 146 | HttpCheckDavCompliance = _HttpCheckDavCompliance 147 | HttpCloseDependencyHandle = _HttpCloseDependencyHandle 148 | HttpDuplicateDependencyHandle = _HttpDuplicateDependencyHandle 149 | HttpEndRequestA = _HttpEndRequestA 150 | HttpEndRequestW = _HttpEndRequestW 151 | HttpGetServerCredentials = _HttpGetServerCredentials 152 | HttpGetTunnelSocket = _HttpGetTunnelSocket 153 | HttpIsHostHstsEnabled = _HttpIsHostHstsEnabled 154 | HttpOpenDependencyHandle = _HttpOpenDependencyHandle 155 | HttpOpenRequestA = _HttpOpenRequestA 156 | HttpOpenRequestW = _HttpOpenRequestW 157 | HttpPushClose = _HttpPushClose 158 | HttpPushEnable = _HttpPushEnable 159 | HttpPushWait = _HttpPushWait 160 | HttpQueryInfoA = _HttpQueryInfoA 161 | HttpQueryInfoW = _HttpQueryInfoW 162 | HttpSendRequestA = _HttpSendRequestA 163 | HttpSendRequestExA = _HttpSendRequestExA 164 | HttpSendRequestExW = _HttpSendRequestExW 165 | HttpSendRequestW = _HttpSendRequestW 166 | HttpWebSocketClose = _HttpWebSocketClose 167 | HttpWebSocketCompleteUpgrade = _HttpWebSocketCompleteUpgrade 168 | HttpWebSocketQueryCloseStatus = _HttpWebSocketQueryCloseStatus 169 | HttpWebSocketReceive = _HttpWebSocketReceive 170 | HttpWebSocketSend = _HttpWebSocketSend 171 | HttpWebSocketShutdown = _HttpWebSocketShutdown 172 | IncrementUrlCacheHeaderData = _IncrementUrlCacheHeaderData 173 | InternetAlgIdToStringA = _InternetAlgIdToStringA 174 | InternetAlgIdToStringW = _InternetAlgIdToStringW 175 | InternetAttemptConnect = _InternetAttemptConnect 176 | InternetAutodial = _InternetAutodial 177 | InternetAutodialCallback = _InternetAutodialCallback 178 | InternetAutodialHangup = _InternetAutodialHangup 179 | InternetCanonicalizeUrlA = _InternetCanonicalizeUrlA 180 | InternetCanonicalizeUrlW = _InternetCanonicalizeUrlW 181 | InternetCheckConnectionA = _InternetCheckConnectionA 182 | InternetCheckConnectionW = _InternetCheckConnectionW 183 | InternetClearAllPerSiteCookieDecisions = _InternetClearAllPerSiteCookieDecisions 184 | InternetCloseHandle = _InternetCloseHandle 185 | InternetCombineUrlA = _InternetCombineUrlA 186 | InternetCombineUrlW = _InternetCombineUrlW 187 | InternetConfirmZoneCrossing = _InternetConfirmZoneCrossing 188 | InternetConfirmZoneCrossingA = _InternetConfirmZoneCrossingA 189 | InternetConfirmZoneCrossingW = _InternetConfirmZoneCrossingW 190 | InternetConnectA = _InternetConnectA 191 | InternetConnectW = _InternetConnectW 192 | InternetConvertUrlFromWireToWideChar = _InternetConvertUrlFromWireToWideChar 193 | InternetCrackUrlA = _InternetCrackUrlA 194 | InternetCrackUrlW = _InternetCrackUrlW 195 | InternetCreateUrlA = _InternetCreateUrlA 196 | InternetCreateUrlW = _InternetCreateUrlW 197 | InternetDial = _InternetDial 198 | InternetDialA = _InternetDialA 199 | InternetDialW = _InternetDialW 200 | InternetEnumPerSiteCookieDecisionA = _InternetEnumPerSiteCookieDecisionA 201 | InternetEnumPerSiteCookieDecisionW = _InternetEnumPerSiteCookieDecisionW 202 | InternetErrorDlg = _InternetErrorDlg 203 | InternetFindNextFileA = _InternetFindNextFileA 204 | InternetFindNextFileW = _InternetFindNextFileW 205 | InternetFortezzaCommand = _InternetFortezzaCommand 206 | InternetFreeCookies = _InternetFreeCookies 207 | InternetFreeProxyInfoList = _InternetFreeProxyInfoList 208 | InternetGetCertByURL = _InternetGetCertByURL 209 | InternetGetCertByURLA = _InternetGetCertByURLA 210 | InternetGetConnectedState = _InternetGetConnectedState 211 | InternetGetConnectedStateEx = _InternetGetConnectedStateEx 212 | InternetGetConnectedStateExA = _InternetGetConnectedStateExA 213 | InternetGetConnectedStateExW = _InternetGetConnectedStateExW 214 | InternetGetCookieA = _InternetGetCookieA 215 | InternetGetCookieEx2 = _InternetGetCookieEx2 216 | InternetGetCookieExA = _InternetGetCookieExA 217 | InternetGetCookieExW = _InternetGetCookieExW 218 | InternetGetCookieW = _InternetGetCookieW 219 | InternetGetLastResponseInfoA = _InternetGetLastResponseInfoA 220 | InternetGetLastResponseInfoW = _InternetGetLastResponseInfoW 221 | InternetGetPerSiteCookieDecisionA = _InternetGetPerSiteCookieDecisionA 222 | InternetGetPerSiteCookieDecisionW = _InternetGetPerSiteCookieDecisionW 223 | InternetGetProxyForUrl = _InternetGetProxyForUrl 224 | InternetGetSecurityInfoByURL = _InternetGetSecurityInfoByURL 225 | InternetGetSecurityInfoByURLA = _InternetGetSecurityInfoByURLA 226 | InternetGetSecurityInfoByURLW = _InternetGetSecurityInfoByURLW 227 | InternetGoOnline = _InternetGoOnline 228 | InternetGoOnlineA = _InternetGoOnlineA 229 | InternetGoOnlineW = _InternetGoOnlineW 230 | InternetHangUp = _InternetHangUp 231 | InternetInitializeAutoProxyDll = _InternetInitializeAutoProxyDll 232 | InternetLockRequestFile = _InternetLockRequestFile 233 | InternetOpenA = _InternetOpenA 234 | InternetOpenUrlA = _InternetOpenUrlA 235 | InternetOpenUrlW = _InternetOpenUrlW 236 | InternetOpenW = _InternetOpenW 237 | InternetQueryDataAvailable = _InternetQueryDataAvailable 238 | InternetQueryFortezzaStatus = _InternetQueryFortezzaStatus 239 | InternetQueryOptionA = _InternetQueryOptionA 240 | InternetQueryOptionW = _InternetQueryOptionW 241 | InternetReadFile = _InternetReadFile 242 | InternetReadFileExA = _InternetReadFileExA 243 | InternetReadFileExW = _InternetReadFileExW 244 | InternetSecurityProtocolToStringA = _InternetSecurityProtocolToStringA 245 | InternetSecurityProtocolToStringW = _InternetSecurityProtocolToStringW 246 | InternetSetCookieA = _InternetSetCookieA 247 | InternetSetCookieEx2 = _InternetSetCookieEx2 248 | InternetSetCookieExA = _InternetSetCookieExA 249 | InternetSetCookieExW = _InternetSetCookieExW 250 | InternetSetCookieW = _InternetSetCookieW 251 | InternetSetDialState = _InternetSetDialState 252 | InternetSetDialStateA = _InternetSetDialStateA 253 | InternetSetDialStateW = _InternetSetDialStateW 254 | InternetSetFilePointer = _InternetSetFilePointer 255 | InternetSetOptionA = _InternetSetOptionA 256 | InternetSetOptionExA = _InternetSetOptionExA 257 | InternetSetOptionExW = _InternetSetOptionExW 258 | InternetSetOptionW = _InternetSetOptionW 259 | InternetSetPerSiteCookieDecisionA = _InternetSetPerSiteCookieDecisionA 260 | InternetSetPerSiteCookieDecisionW = _InternetSetPerSiteCookieDecisionW 261 | InternetSetStatusCallback = _InternetSetStatusCallback 262 | InternetSetStatusCallbackA = _InternetSetStatusCallbackA 263 | InternetSetStatusCallbackW = _InternetSetStatusCallbackW 264 | InternetShowSecurityInfoByURL = _InternetShowSecurityInfoByURL 265 | InternetShowSecurityInfoByURLA = _InternetShowSecurityInfoByURLA 266 | InternetShowSecurityInfoByURLW = _InternetShowSecurityInfoByURLW 267 | InternetTimeFromSystemTime = _InternetTimeFromSystemTime 268 | InternetTimeFromSystemTimeA = _InternetTimeFromSystemTimeA 269 | InternetTimeFromSystemTimeW = _InternetTimeFromSystemTimeW 270 | InternetTimeToSystemTime = _InternetTimeToSystemTime 271 | InternetTimeToSystemTimeA = _InternetTimeToSystemTimeA 272 | InternetTimeToSystemTimeW = _InternetTimeToSystemTimeW 273 | InternetUnlockRequestFile = _InternetUnlockRequestFile 274 | InternetWriteFile = _InternetWriteFile 275 | InternetWriteFileExA = _InternetWriteFileExA 276 | InternetWriteFileExW = _InternetWriteFileExW 277 | IsHostInProxyBypassList = _IsHostInProxyBypassList 278 | IsUrlCacheEntryExpiredA = _IsUrlCacheEntryExpiredA 279 | IsUrlCacheEntryExpiredW = _IsUrlCacheEntryExpiredW 280 | LoadUrlCacheContent = _LoadUrlCacheContent 281 | ParseX509EncodedCertificateForListBoxEntry = _ParseX509EncodedCertificateForListBoxEntry 282 | PrivacyGetZonePreferenceW = _PrivacyGetZonePreferenceW 283 | PrivacySetZonePreferenceW = _PrivacySetZonePreferenceW 284 | ReadUrlCacheEntryStream = _ReadUrlCacheEntryStream 285 | ReadUrlCacheEntryStreamEx = _ReadUrlCacheEntryStreamEx 286 | RegisterUrlCacheNotification = _RegisterUrlCacheNotification 287 | ResumeSuspendedDownload = _ResumeSuspendedDownload 288 | RetrieveUrlCacheEntryFileA = _RetrieveUrlCacheEntryFileA 289 | RetrieveUrlCacheEntryFileW = _RetrieveUrlCacheEntryFileW 290 | RetrieveUrlCacheEntryStreamA = _RetrieveUrlCacheEntryStreamA 291 | RetrieveUrlCacheEntryStreamW = _RetrieveUrlCacheEntryStreamW 292 | RunOnceUrlCache = _RunOnceUrlCache 293 | SetUrlCacheConfigInfoA = _SetUrlCacheConfigInfoA 294 | SetUrlCacheConfigInfoW = _SetUrlCacheConfigInfoW 295 | SetUrlCacheEntryGroup = _SetUrlCacheEntryGroup 296 | SetUrlCacheEntryGroupA = _SetUrlCacheEntryGroupA 297 | SetUrlCacheEntryGroupW = _SetUrlCacheEntryGroupW 298 | SetUrlCacheEntryInfoA = _SetUrlCacheEntryInfoA 299 | SetUrlCacheEntryInfoW = _SetUrlCacheEntryInfoW 300 | SetUrlCacheGroupAttributeA = _SetUrlCacheGroupAttributeA 301 | SetUrlCacheGroupAttributeW = _SetUrlCacheGroupAttributeW 302 | SetUrlCacheHeaderData = _SetUrlCacheHeaderData 303 | ShowCertificate = _ShowCertificate 304 | ShowClientAuthCerts = _ShowClientAuthCerts 305 | ShowSecurityInfo = _ShowSecurityInfo 306 | ShowX509EncodedCertificate = _ShowX509EncodedCertificate 307 | UnlockUrlCacheEntryFile = _UnlockUrlCacheEntryFile 308 | UnlockUrlCacheEntryFileA = _UnlockUrlCacheEntryFileA 309 | UnlockUrlCacheEntryFileW = _UnlockUrlCacheEntryFileW 310 | UnlockUrlCacheEntryStream = _UnlockUrlCacheEntryStream 311 | UpdateUrlCacheContentPath = _UpdateUrlCacheContentPath 312 | UrlCacheCheckEntriesExist = _UrlCacheCheckEntriesExist 313 | UrlCacheCloseEntryHandle = _UrlCacheCloseEntryHandle 314 | UrlCacheContainerSetEntryMaximumAge = _UrlCacheContainerSetEntryMaximumAge 315 | UrlCacheCreateContainer = _UrlCacheCreateContainer 316 | UrlCacheFindFirstEntry = _UrlCacheFindFirstEntry 317 | UrlCacheFindNextEntry = _UrlCacheFindNextEntry 318 | UrlCacheFreeEntryInfo = _UrlCacheFreeEntryInfo 319 | UrlCacheFreeGlobalSpace = _UrlCacheFreeGlobalSpace 320 | UrlCacheGetContentPaths = _UrlCacheGetContentPaths 321 | UrlCacheGetEntryInfo = _UrlCacheGetEntryInfo 322 | UrlCacheGetGlobalCacheSize = _UrlCacheGetGlobalCacheSize 323 | UrlCacheGetGlobalLimit = _UrlCacheGetGlobalLimit 324 | UrlCacheReadEntryStream = _UrlCacheReadEntryStream 325 | UrlCacheReloadSettings = _UrlCacheReloadSettings 326 | UrlCacheRetrieveEntryFile = _UrlCacheRetrieveEntryFile 327 | UrlCacheRetrieveEntryStream = _UrlCacheRetrieveEntryStream 328 | UrlCacheServer = _UrlCacheServer 329 | UrlCacheSetGlobalLimit = _UrlCacheSetGlobalLimit 330 | UrlCacheUpdateEntryExtraData = _UrlCacheUpdateEntryExtraData 331 | UrlZonesDetach = _UrlZonesDetach 332 | 333 | LIBRARY "version" 334 | EXPORTS 335 | GetFileVersionInfoA = _GetFileVersionInfoA 336 | GetFileVersionInfoByHandle = _GetFileVersionInfoByHandle 337 | GetFileVersionInfoExA = _GetFileVersionInfoExA 338 | GetFileVersionInfoExW = _GetFileVersionInfoExW 339 | GetFileVersionInfoSizeA = _GetFileVersionInfoSizeA 340 | GetFileVersionInfoSizeExA = _GetFileVersionInfoSizeExA 341 | GetFileVersionInfoSizeExW = _GetFileVersionInfoSizeExW 342 | GetFileVersionInfoSizeW = _GetFileVersionInfoSizeW 343 | GetFileVersionInfoW = _GetFileVersionInfoW 344 | VerFindFileA = _VerFindFileA 345 | VerFindFileW = _VerFindFileW 346 | VerInstallFileA = _VerInstallFileA 347 | VerInstallFileW = _VerInstallFileW 348 | VerLanguageNameA = _VerLanguageNameA 349 | VerLanguageNameW = _VerLanguageNameW 350 | VerQueryValueA = _VerQueryValueA 351 | VerQueryValueW = _VerQueryValueW 352 | 353 | LIBRARY "d3d9" 354 | EXPORTS 355 | D3DPERF_BeginEvent = _D3DPERF_BeginEvent 356 | D3DPERF_EndEvent = _D3DPERF_EndEvent 357 | D3DPERF_GetStatus = _D3DPERF_GetStatus 358 | D3DPERF_QueryRepeatFrame = _D3DPERF_QueryRepeatFrame 359 | D3DPERF_SetMarker = _D3DPERF_SetMarker 360 | D3DPERF_SetOptions = _D3DPERF_SetOptions 361 | D3DPERF_SetRegion = _D3DPERF_SetRegion 362 | DebugSetLevel = _DebugSetLevel 363 | DebugSetMute = _DebugSetMute 364 | Direct3D9EnableMaximizedWindowedModeShim = _Direct3D9EnableMaximizedWindowedModeShim 365 | Direct3DCreate9 = _Direct3DCreate9 366 | Direct3DCreate9Ex = _Direct3DCreate9Ex 367 | Direct3DCreate9On12 = _Direct3DCreate9On12 368 | Direct3DCreate9On12Ex = _Direct3DCreate9On12Ex 369 | Direct3DShaderValidatorCreate9 = _Direct3DShaderValidatorCreate9 370 | PSGPError = _PSGPError 371 | PSGPSampleTexture = _PSGPSampleTexture 372 | 373 | LIBRARY "d3d10" 374 | EXPORTS 375 | D3D10CompileEffectFromMemory = _D3D10CompileEffectFromMemory 376 | D3D10CompileShader = _D3D10CompileShader 377 | D3D10CreateBlob = _D3D10CreateBlob 378 | D3D10CreateDevice = _D3D10CreateDevice 379 | D3D10CreateDeviceAndSwapChain = _D3D10CreateDeviceAndSwapChain 380 | D3D10CreateEffectFromMemory = _D3D10CreateEffectFromMemory 381 | D3D10CreateEffectPoolFromMemory = _D3D10CreateEffectPoolFromMemory 382 | D3D10CreateStateBlock = _D3D10CreateStateBlock 383 | D3D10DisassembleEffect = _D3D10DisassembleEffect 384 | D3D10DisassembleShader = _D3D10DisassembleShader 385 | D3D10GetGeometryShaderProfile = _D3D10GetGeometryShaderProfile 386 | D3D10GetInputAndOutputSignatureBlob = _D3D10GetInputAndOutputSignatureBlob 387 | D3D10GetInputSignatureBlob = _D3D10GetInputSignatureBlob 388 | D3D10GetOutputSignatureBlob = _D3D10GetOutputSignatureBlob 389 | D3D10GetPixelShaderProfile = _D3D10GetPixelShaderProfile 390 | D3D10GetShaderDebugInfo = _D3D10GetShaderDebugInfo 391 | D3D10GetVersion = _D3D10GetVersion 392 | D3D10GetVertexShaderProfile = _D3D10GetVertexShaderProfile 393 | D3D10PreprocessShader = _D3D10PreprocessShader 394 | D3D10ReflectShader = _D3D10ReflectShader 395 | D3D10RegisterLayers = _D3D10RegisterLayers 396 | D3D10StateBlockMaskDifference = _D3D10StateBlockMaskDifference 397 | D3D10StateBlockMaskDisableAll = _D3D10StateBlockMaskDisableAll 398 | D3D10StateBlockMaskDisableCapture = _D3D10StateBlockMaskDisableCapture 399 | D3D10StateBlockMaskEnableAll = _D3D10StateBlockMaskEnableAll 400 | D3D10StateBlockMaskEnableCapture = _D3D10StateBlockMaskEnableCapture 401 | D3D10StateBlockMaskGetSetting = _D3D10StateBlockMaskGetSetting 402 | D3D10StateBlockMaskIntersect = _D3D10StateBlockMaskIntersect 403 | D3D10StateBlockMaskUnion = _D3D10StateBlockMaskUnion 404 | 405 | LIBRARY "d3d11" 406 | EXPORTS 407 | CreateDirect3D11DeviceFromDXGIDevice = _CreateDirect3D11DeviceFromDXGIDevice 408 | CreateDirect3D11SurfaceFromDXGISurface = _CreateDirect3D11SurfaceFromDXGISurface 409 | D3D11CoreCreateDevice = _D3D11CoreCreateDevice 410 | D3D11CoreCreateLayeredDevice = _D3D11CoreCreateLayeredDevice 411 | D3D11CoreGetLayeredDeviceSize = _D3D11CoreGetLayeredDeviceSize 412 | D3D11CoreRegisterLayers = _D3D11CoreRegisterLayers 413 | D3D11CreateDevice = _D3D11CreateDevice 414 | D3D11CreateDeviceAndSwapChain = _D3D11CreateDeviceAndSwapChain 415 | D3D11CreateDeviceForD3D12 = _D3D11CreateDeviceForD3D12 416 | D3D11On12CreateDevice = _D3D11On12CreateDevice 417 | D3DKMTCloseAdapter = _D3DKMTCloseAdapter 418 | D3DKMTCreateAllocation = _D3DKMTCreateAllocation 419 | D3DKMTCreateContext = _D3DKMTCreateContext 420 | D3DKMTCreateDevice = _D3DKMTCreateDevice 421 | D3DKMTCreateSynchronizationObject = _D3DKMTCreateSynchronizationObject 422 | D3DKMTDestroyAllocation = _D3DKMTDestroyAllocation 423 | D3DKMTDestroyContext = _D3DKMTDestroyContext 424 | D3DKMTDestroyDevice = _D3DKMTDestroyDevice 425 | D3DKMTDestroySynchronizationObject = _D3DKMTDestroySynchronizationObject 426 | D3DKMTEscape = _D3DKMTEscape 427 | D3DKMTGetContextSchedulingPriority = _D3DKMTGetContextSchedulingPriority 428 | D3DKMTGetDeviceState = _D3DKMTGetDeviceState 429 | D3DKMTGetDisplayModeList = _D3DKMTGetDisplayModeList 430 | D3DKMTGetMultisampleMethodList = _D3DKMTGetMultisampleMethodList 431 | D3DKMTGetRuntimeData = _D3DKMTGetRuntimeData 432 | D3DKMTGetSharedPrimaryHandle = _D3DKMTGetSharedPrimaryHandle 433 | D3DKMTLock = _D3DKMTLock 434 | D3DKMTOpenAdapterFromHdc = _D3DKMTOpenAdapterFromHdc 435 | D3DKMTOpenResource = _D3DKMTOpenResource 436 | D3DKMTPresent = _D3DKMTPresent 437 | D3DKMTQueryAdapterInfo = _D3DKMTQueryAdapterInfo 438 | D3DKMTQueryAllocationResidency = _D3DKMTQueryAllocationResidency 439 | D3DKMTQueryResourceInfo = _D3DKMTQueryResourceInfo 440 | D3DKMTRender = _D3DKMTRender 441 | D3DKMTSetAllocationPriority = _D3DKMTSetAllocationPriority 442 | D3DKMTSetContextSchedulingPriority = _D3DKMTSetContextSchedulingPriority 443 | D3DKMTSetDisplayMode = _D3DKMTSetDisplayMode 444 | D3DKMTSetDisplayPrivateDriverFormat = _D3DKMTSetDisplayPrivateDriverFormat 445 | D3DKMTSetGammaRamp = _D3DKMTSetGammaRamp 446 | D3DKMTSetVidPnSourceOwner = _D3DKMTSetVidPnSourceOwner 447 | D3DKMTSignalSynchronizationObject = _D3DKMTSignalSynchronizationObject 448 | D3DKMTUnlock = _D3DKMTUnlock 449 | D3DKMTWaitForSynchronizationObject = _D3DKMTWaitForSynchronizationObject 450 | D3DKMTWaitForVerticalBlankEvent = _D3DKMTWaitForVerticalBlankEvent 451 | D3DPerformance_BeginEvent = _D3DPerformance_BeginEvent 452 | D3DPerformance_EndEvent = _D3DPerformance_EndEvent 453 | D3DPerformance_GetStatus = _D3DPerformance_GetStatus 454 | D3DPerformance_SetMarker = _D3DPerformance_SetMarker 455 | EnableFeatureLevelUpgrade = _EnableFeatureLevelUpgrade 456 | OpenAdapter10 = _OpenAdapter10 457 | OpenAdapter10_2 = _OpenAdapter10_2 458 | 459 | LIBRARY "d3d12" 460 | EXPORTS 461 | D3D12CoreCreateLayeredDevice = _D3D12CoreCreateLayeredDevice 462 | D3D12CoreGetLayeredDeviceSize = _D3D12CoreGetLayeredDeviceSize 463 | D3D12CoreRegisterLayers = _D3D12CoreRegisterLayers 464 | D3D12CreateDevice = _D3D12CreateDevice 465 | D3D12CreateRootSignatureDeserializer = _D3D12CreateRootSignatureDeserializer 466 | D3D12CreateVersionedRootSignatureDeserializer = _D3D12CreateVersionedRootSignatureDeserializer 467 | D3D12DeviceRemovedExtendedData = _D3D12DeviceRemovedExtendedData 468 | D3D12EnableExperimentalFeatures = _D3D12EnableExperimentalFeatures 469 | D3D12GetDebugInterface = _D3D12GetDebugInterface 470 | D3D12GetInterface = _D3D12GetInterface 471 | D3D12PIXEventsReplaceBlock = _D3D12PIXEventsReplaceBlock 472 | D3D12PIXGetThreadInfo = _D3D12PIXGetThreadInfo 473 | D3D12PIXNotifyWakeFromFenceSignal = _D3D12PIXNotifyWakeFromFenceSignal 474 | D3D12PIXReportCounter = _D3D12PIXReportCounter 475 | D3D12SerializeRootSignature = _D3D12SerializeRootSignature 476 | D3D12SerializeVersionedRootSignature = _D3D12SerializeVersionedRootSignature 477 | GetBehaviorValue = _GetBehaviorValue 478 | SetAppCompatStringPointer = _SetAppCompatStringPointer 479 | 480 | LIBRARY "bink2w64" 481 | EXPORTS 482 | BinkAllocateFrameBuffers = _BinkAllocateFrameBuffers 483 | BinkBufferBlit = _BinkBufferBlit 484 | BinkBufferCheckWinPos = _BinkBufferCheckWinPos 485 | BinkBufferClear = _BinkBufferClear 486 | BinkBufferClose = _BinkBufferClose 487 | BinkBufferGetDescription = _BinkBufferGetDescription 488 | BinkBufferGetError = _BinkBufferGetError 489 | BinkBufferLock = _BinkBufferLock 490 | BinkBufferOpen = _BinkBufferOpen 491 | BinkBufferSetDirectDraw = _BinkBufferSetDirectDraw 492 | BinkBufferSetHWND = _BinkBufferSetHWND 493 | BinkBufferSetOffset = _BinkBufferSetOffset 494 | BinkBufferSetResolution = _BinkBufferSetResolution 495 | BinkBufferSetScale = _BinkBufferSetScale 496 | BinkBufferUnlock = _BinkBufferUnlock 497 | BinkCheckCursor = _BinkCheckCursor 498 | BinkClose = _BinkClose 499 | BinkCloseTrack = _BinkCloseTrack 500 | BinkControlBackgroundIO = _BinkControlBackgroundIO 501 | BinkControlPlatformFeatures = _BinkControlPlatformFeatures 502 | BinkCopyToBuffer = _BinkCopyToBuffer 503 | BinkCopyToBufferRect = _BinkCopyToBufferRect 504 | BinkCurrentSubtitle = _BinkCurrentSubtitle 505 | BinkDDSurfaceType = _BinkDDSurfaceType 506 | BinkDX8SurfaceType = _BinkDX8SurfaceType 507 | BinkDX9SurfaceType = _BinkDX9SurfaceType 508 | BinkDoFrame = _BinkDoFrame 509 | BinkDoFrameAsync = _BinkDoFrameAsync 510 | BinkDoFrameAsyncMulti = _BinkDoFrameAsyncMulti 511 | BinkDoFrameAsyncWait = _BinkDoFrameAsyncWait 512 | BinkDoFramePlane = _BinkDoFramePlane 513 | BinkFindXAudio2WinDevice = _BinkFindXAudio2WinDevice 514 | BinkFreeGlobals = _BinkFreeGlobals 515 | BinkGetError = _BinkGetError 516 | BinkGetFrameBuffersInfo = _BinkGetFrameBuffersInfo 517 | BinkGetGPUDataBuffersInfo = _BinkGetGPUDataBuffersInfo 518 | BinkGetKeyFrame = _BinkGetKeyFrame 519 | BinkGetPalette = _BinkGetPalette 520 | BinkGetPlatformInfo = _BinkGetPlatformInfo 521 | BinkGetRealtime = _BinkGetRealtime 522 | BinkGetRects = _BinkGetRects 523 | BinkGetSubtitleByIndex = _BinkGetSubtitleByIndex 524 | BinkGetSummary = _BinkGetSummary 525 | BinkGetTrackData = _BinkGetTrackData 526 | BinkGetTrackID = _BinkGetTrackID 527 | BinkGetTrackMaxSize = _BinkGetTrackMaxSize 528 | BinkGetTrackType = _BinkGetTrackType 529 | BinkGoto = _BinkGoto 530 | BinkIsSoftwareCursor = _BinkIsSoftwareCursor 531 | BinkLoadSubtitles = _BinkLoadSubtitles 532 | BinkLogoAddress = _BinkLogoAddress 533 | BinkNextFrame = _BinkNextFrame 534 | BinkOpen = _BinkOpen 535 | BinkOpenDirectSound = _BinkOpenDirectSound 536 | BinkOpenMiles = _BinkOpenMiles 537 | BinkOpenTrack = _BinkOpenTrack 538 | BinkOpenWaveOut = _BinkOpenWaveOut 539 | BinkOpenWithOptions = _BinkOpenWithOptions 540 | BinkOpenXAudio2 = _BinkOpenXAudio2 541 | BinkOpenXAudio27 = _BinkOpenXAudio27 542 | BinkOpenXAudio28 = _BinkOpenXAudio28 543 | BinkOpenXAudio29 = _BinkOpenXAudio29 544 | BinkPause = _BinkPause 545 | BinkRegisterFrameBuffers = _BinkRegisterFrameBuffers 546 | BinkRegisterGPUDataBuffers = _BinkRegisterGPUDataBuffers 547 | BinkRequestStopAsyncThread = _BinkRequestStopAsyncThread 548 | BinkRequestStopAsyncThreadsMulti = _BinkRequestStopAsyncThreadsMulti 549 | BinkRestoreCursor = _BinkRestoreCursor 550 | BinkService = _BinkService 551 | BinkServiceSound = _BinkServiceSound 552 | BinkSetError = _BinkSetError 553 | BinkSetFileOffset = _BinkSetFileOffset 554 | BinkSetFrameRate = _BinkSetFrameRate 555 | BinkSetIO = _BinkSetIO 556 | BinkSetIOSize = _BinkSetIOSize 557 | BinkSetMemory = _BinkSetMemory 558 | BinkSetOSFileCallbacks = _BinkSetOSFileCallbacks 559 | BinkSetPan = _BinkSetPan 560 | BinkSetSimulate = _BinkSetSimulate 561 | BinkSetSoundOnOff = _BinkSetSoundOnOff 562 | BinkSetSoundSystem = _BinkSetSoundSystem 563 | BinkSetSoundSystem2 = _BinkSetSoundSystem2 564 | BinkSetSoundTrack = _BinkSetSoundTrack 565 | BinkSetSpeakerVolumes = _BinkSetSpeakerVolumes 566 | BinkSetVideoOnOff = _BinkSetVideoOnOff 567 | BinkSetVolume = _BinkSetVolume 568 | BinkSetWillLoop = _BinkSetWillLoop 569 | BinkShouldSkip = _BinkShouldSkip 570 | BinkStartAsyncThread = _BinkStartAsyncThread 571 | BinkUtilCPUs = _BinkUtilCPUs 572 | BinkUtilFree = _BinkUtilFree 573 | BinkUtilMalloc = _BinkUtilMalloc 574 | BinkUtilMutexCreate = _BinkUtilMutexCreate 575 | BinkUtilMutexDestroy = _BinkUtilMutexDestroy 576 | BinkUtilMutexLock = _BinkUtilMutexLock 577 | BinkUtilMutexLockTimeOut = _BinkUtilMutexLockTimeOut 578 | BinkUtilMutexUnlock = _BinkUtilMutexUnlock 579 | BinkUtilSoundGlobalLock = _BinkUtilSoundGlobalLock 580 | BinkUtilSoundGlobalUnlock = _BinkUtilSoundGlobalUnlock 581 | BinkWait = _BinkWait 582 | BinkWaitStopAsyncThread = _BinkWaitStopAsyncThread 583 | BinkWaitStopAsyncThreadsMulti = _BinkWaitStopAsyncThreadsMulti 584 | RADTimerRead = _RADTimerRead 585 | 586 | LIBRARY "winmm" 587 | EXPORTS 588 | CloseDriver = _CloseDriver 589 | DefDriverProc = _DefDriverProc 590 | DriverCallback = _DriverCallback 591 | DrvGetModuleHandle = _DrvGetModuleHandle 592 | GetDriverModuleHandle = _GetDriverModuleHandle 593 | NotifyCallbackData = _NotifyCallbackData 594 | OpenDriver = _OpenDriver 595 | PlaySound = _PlaySound 596 | PlaySoundA = _PlaySoundA 597 | PlaySoundW = _PlaySoundW 598 | SendDriverMessage = _SendDriverMessage 599 | WOW32DriverCallback = _WOW32DriverCallback 600 | WOW32ResolveMultiMediaHandle = _WOW32ResolveMultiMediaHandle 601 | WOWAppExit = _WOWAppExit 602 | aux32Message = _aux32Message 603 | auxGetDevCapsA = _auxGetDevCapsA 604 | auxGetDevCapsW = _auxGetDevCapsW 605 | auxGetNumDevs = _auxGetNumDevs 606 | auxGetVolume = _auxGetVolume 607 | auxOutMessage = _auxOutMessage 608 | auxSetVolume = _auxSetVolume 609 | joy32Message = _joy32Message 610 | joyConfigChanged = _joyConfigChanged 611 | joyGetDevCapsA = _joyGetDevCapsA 612 | joyGetDevCapsW = _joyGetDevCapsW 613 | joyGetNumDevs = _joyGetNumDevs 614 | joyGetPos = _joyGetPos 615 | joyGetPosEx = _joyGetPosEx 616 | joyGetThreshold = _joyGetThreshold 617 | joyReleaseCapture = _joyReleaseCapture 618 | joySetCapture = _joySetCapture 619 | joySetThreshold = _joySetThreshold 620 | mci32Message = _mci32Message 621 | mciDriverNotify = _mciDriverNotify 622 | mciDriverYield = _mciDriverYield 623 | mciExecute = _mciExecute 624 | mciFreeCommandResource = _mciFreeCommandResource 625 | mciGetCreatorTask = _mciGetCreatorTask 626 | mciGetDeviceIDA = _mciGetDeviceIDA 627 | mciGetDeviceIDFromElementIDA = _mciGetDeviceIDFromElementIDA 628 | mciGetDeviceIDFromElementIDW = _mciGetDeviceIDFromElementIDW 629 | mciGetDeviceIDW = _mciGetDeviceIDW 630 | mciGetDriverData = _mciGetDriverData 631 | mciGetErrorStringA = _mciGetErrorStringA 632 | mciGetErrorStringW = _mciGetErrorStringW 633 | mciGetYieldProc = _mciGetYieldProc 634 | mciLoadCommandResource = _mciLoadCommandResource 635 | mciSendCommandA = _mciSendCommandA 636 | mciSendCommandW = _mciSendCommandW 637 | mciSendStringA = _mciSendStringA 638 | mciSendStringW = _mciSendStringW 639 | mciSetDriverData = _mciSetDriverData 640 | mciSetYieldProc = _mciSetYieldProc 641 | mid32Message = _mid32Message 642 | midiConnect = _midiConnect 643 | midiDisconnect = _midiDisconnect 644 | midiInAddBuffer = _midiInAddBuffer 645 | midiInClose = _midiInClose 646 | midiInGetDevCapsA = _midiInGetDevCapsA 647 | midiInGetDevCapsW = _midiInGetDevCapsW 648 | midiInGetErrorTextA = _midiInGetErrorTextA 649 | midiInGetErrorTextW = _midiInGetErrorTextW 650 | midiInGetID = _midiInGetID 651 | midiInGetNumDevs = _midiInGetNumDevs 652 | midiInMessage = _midiInMessage 653 | midiInOpen = _midiInOpen 654 | midiInPrepareHeader = _midiInPrepareHeader 655 | midiInReset = _midiInReset 656 | midiInStart = _midiInStart 657 | midiInStop = _midiInStop 658 | midiInUnprepareHeader = _midiInUnprepareHeader 659 | midiOutCacheDrumPatches = _midiOutCacheDrumPatches 660 | midiOutCachePatches = _midiOutCachePatches 661 | midiOutClose = _midiOutClose 662 | midiOutGetDevCapsA = _midiOutGetDevCapsA 663 | midiOutGetDevCapsW = _midiOutGetDevCapsW 664 | midiOutGetErrorTextA = _midiOutGetErrorTextA 665 | midiOutGetErrorTextW = _midiOutGetErrorTextW 666 | midiOutGetID = _midiOutGetID 667 | midiOutGetNumDevs = _midiOutGetNumDevs 668 | midiOutGetVolume = _midiOutGetVolume 669 | midiOutLongMsg = _midiOutLongMsg 670 | midiOutMessage = _midiOutMessage 671 | midiOutOpen = _midiOutOpen 672 | midiOutPrepareHeader = _midiOutPrepareHeader 673 | midiOutReset = _midiOutReset 674 | midiOutSetVolume = _midiOutSetVolume 675 | midiOutShortMsg = _midiOutShortMsg 676 | midiOutUnprepareHeader = _midiOutUnprepareHeader 677 | midiStreamClose = _midiStreamClose 678 | midiStreamOpen = _midiStreamOpen 679 | midiStreamOut = _midiStreamOut 680 | midiStreamPause = _midiStreamPause 681 | midiStreamPosition = _midiStreamPosition 682 | midiStreamProperty = _midiStreamProperty 683 | midiStreamRestart = _midiStreamRestart 684 | midiStreamStop = _midiStreamStop 685 | mixerClose = _mixerClose 686 | mixerGetControlDetailsA = _mixerGetControlDetailsA 687 | mixerGetControlDetailsW = _mixerGetControlDetailsW 688 | mixerGetDevCapsA = _mixerGetDevCapsA 689 | mixerGetDevCapsW = _mixerGetDevCapsW 690 | mixerGetID = _mixerGetID 691 | mixerGetLineControlsA = _mixerGetLineControlsA 692 | mixerGetLineControlsW = _mixerGetLineControlsW 693 | mixerGetLineInfoA = _mixerGetLineInfoA 694 | mixerGetLineInfoW = _mixerGetLineInfoW 695 | mixerGetNumDevs = _mixerGetNumDevs 696 | mixerMessage = _mixerMessage 697 | mixerOpen = _mixerOpen 698 | mixerSetControlDetails = _mixerSetControlDetails 699 | mmDrvInstall = _mmDrvInstall 700 | mmGetCurrentTask = _mmGetCurrentTask 701 | mmTaskBlock = _mmTaskBlock 702 | mmTaskCreate = _mmTaskCreate 703 | mmTaskSignal = _mmTaskSignal 704 | mmTaskYield = _mmTaskYield 705 | mmioAdvance = _mmioAdvance 706 | mmioAscend = _mmioAscend 707 | mmioClose = _mmioClose 708 | mmioCreateChunk = _mmioCreateChunk 709 | mmioDescend = _mmioDescend 710 | mmioFlush = _mmioFlush 711 | mmioGetInfo = _mmioGetInfo 712 | mmioInstallIOProcA = _mmioInstallIOProcA 713 | mmioInstallIOProcW = _mmioInstallIOProcW 714 | mmioOpenA = _mmioOpenA 715 | mmioOpenW = _mmioOpenW 716 | mmioRead = _mmioRead 717 | mmioRenameA = _mmioRenameA 718 | mmioRenameW = _mmioRenameW 719 | mmioSeek = _mmioSeek 720 | mmioSendMessage = _mmioSendMessage 721 | mmioSetBuffer = _mmioSetBuffer 722 | mmioSetInfo = _mmioSetInfo 723 | mmioStringToFOURCCA = _mmioStringToFOURCCA 724 | mmioStringToFOURCCW = _mmioStringToFOURCCW 725 | mmioWrite = _mmioWrite 726 | mmsystemGetVersion = _mmsystemGetVersion 727 | mod32Message = _mod32Message 728 | mxd32Message = _mxd32Message 729 | sndPlaySoundA = _sndPlaySoundA 730 | sndPlaySoundW = _sndPlaySoundW 731 | tid32Message = _tid32Message 732 | timeBeginPeriod = _timeBeginPeriod 733 | timeEndPeriod = _timeEndPeriod 734 | timeGetDevCaps = _timeGetDevCaps 735 | timeGetSystemTime = _timeGetSystemTime 736 | timeGetTime = _timeGetTime 737 | timeKillEvent = _timeKillEvent 738 | timeSetEvent = _timeSetEvent 739 | waveInAddBuffer = _waveInAddBuffer 740 | waveInClose = _waveInClose 741 | waveInGetDevCapsA = _waveInGetDevCapsA 742 | waveInGetDevCapsW = _waveInGetDevCapsW 743 | waveInGetErrorTextA = _waveInGetErrorTextA 744 | waveInGetErrorTextW = _waveInGetErrorTextW 745 | waveInGetID = _waveInGetID 746 | waveInGetNumDevs = _waveInGetNumDevs 747 | waveInGetPosition = _waveInGetPosition 748 | waveInMessage = _waveInMessage 749 | waveInOpen = _waveInOpen 750 | waveInPrepareHeader = _waveInPrepareHeader 751 | waveInReset = _waveInReset 752 | waveInStart = _waveInStart 753 | waveInStop = _waveInStop 754 | waveInUnprepareHeader = _waveInUnprepareHeader 755 | waveOutBreakLoop = _waveOutBreakLoop 756 | waveOutClose = _waveOutClose 757 | waveOutGetDevCapsA = _waveOutGetDevCapsA 758 | waveOutGetDevCapsW = _waveOutGetDevCapsW 759 | waveOutGetErrorTextA = _waveOutGetErrorTextA 760 | waveOutGetErrorTextW = _waveOutGetErrorTextW 761 | waveOutGetID = _waveOutGetID 762 | waveOutGetNumDevs = _waveOutGetNumDevs 763 | waveOutGetPitch = _waveOutGetPitch 764 | waveOutGetPlaybackRate = _waveOutGetPlaybackRate 765 | waveOutGetPosition = _waveOutGetPosition 766 | waveOutGetVolume = _waveOutGetVolume 767 | waveOutMessage = _waveOutMessage 768 | waveOutOpen = _waveOutOpen 769 | waveOutPause = _waveOutPause 770 | waveOutPrepareHeader = _waveOutPrepareHeader 771 | waveOutReset = _waveOutReset 772 | waveOutRestart = _waveOutRestart 773 | waveOutSetPitch = _waveOutSetPitch 774 | waveOutSetPlaybackRate = _waveOutSetPlaybackRate 775 | waveOutSetVolume = _waveOutSetVolume 776 | waveOutUnprepareHeader = _waveOutUnprepareHeader 777 | waveOutWrite = _waveOutWrite 778 | wid32Message = _wid32Message 779 | wod32Message = _wod32Message 780 | 781 | LIBRARY "winhttp" 782 | EXPORTS 783 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 784 | DllGetClassObject = _DllGetClassObject PRIVATE 785 | Private1 = _Private1 786 | SvchostPushServiceGlobals = _SvchostPushServiceGlobals 787 | WinHttpAddRequestHeaders = _WinHttpAddRequestHeaders 788 | WinHttpAddRequestHeadersEx = _WinHttpAddRequestHeadersEx 789 | WinHttpAutoProxySvcMain = _WinHttpAutoProxySvcMain 790 | WinHttpCheckPlatform = _WinHttpCheckPlatform 791 | WinHttpCloseHandle = _WinHttpCloseHandle 792 | WinHttpConnect = _WinHttpConnect 793 | WinHttpConnectionDeletePolicyEntries = _WinHttpConnectionDeletePolicyEntries 794 | WinHttpConnectionDeleteProxyInfo = _WinHttpConnectionDeleteProxyInfo 795 | WinHttpConnectionFreeNameList = _WinHttpConnectionFreeNameList 796 | WinHttpConnectionFreeProxyInfo = _WinHttpConnectionFreeProxyInfo 797 | WinHttpConnectionFreeProxyList = _WinHttpConnectionFreeProxyList 798 | WinHttpConnectionGetNameList = _WinHttpConnectionGetNameList 799 | WinHttpConnectionGetProxyInfo = _WinHttpConnectionGetProxyInfo 800 | WinHttpConnectionGetProxyList = _WinHttpConnectionGetProxyList 801 | WinHttpConnectionOnlyConvert = _WinHttpConnectionOnlyConvert 802 | WinHttpConnectionOnlyReceive = _WinHttpConnectionOnlyReceive 803 | WinHttpConnectionOnlySend = _WinHttpConnectionOnlySend 804 | WinHttpConnectionSetPolicyEntries = _WinHttpConnectionSetPolicyEntries 805 | WinHttpConnectionSetProxyInfo = _WinHttpConnectionSetProxyInfo 806 | WinHttpConnectionUpdateIfIndexTable = _WinHttpConnectionUpdateIfIndexTable 807 | WinHttpCrackUrl = _WinHttpCrackUrl 808 | WinHttpCreateProxyResolver = _WinHttpCreateProxyResolver 809 | WinHttpCreateUrl = _WinHttpCreateUrl 810 | WinHttpDetectAutoProxyConfigUrl = _WinHttpDetectAutoProxyConfigUrl 811 | WinHttpFreeProxyResult = _WinHttpFreeProxyResult 812 | WinHttpFreeProxyResultEx = _WinHttpFreeProxyResultEx 813 | WinHttpFreeProxySettings = _WinHttpFreeProxySettings 814 | WinHttpFreeProxySettingsEx = _WinHttpFreeProxySettingsEx 815 | WinHttpFreeQueryConnectionGroupResult = _WinHttpFreeQueryConnectionGroupResult 816 | WinHttpGetDefaultProxyConfiguration = _WinHttpGetDefaultProxyConfiguration 817 | WinHttpGetIEProxyConfigForCurrentUser = _WinHttpGetIEProxyConfigForCurrentUser 818 | WinHttpGetProxyForUrl = _WinHttpGetProxyForUrl 819 | WinHttpGetProxyForUrlEx = _WinHttpGetProxyForUrlEx 820 | WinHttpGetProxyForUrlEx2 = _WinHttpGetProxyForUrlEx2 821 | WinHttpGetProxyForUrlHvsi = _WinHttpGetProxyForUrlHvsi 822 | WinHttpGetProxyResult = _WinHttpGetProxyResult 823 | WinHttpGetProxyResultEx = _WinHttpGetProxyResultEx 824 | WinHttpGetProxySettingsEx = _WinHttpGetProxySettingsEx 825 | WinHttpGetProxySettingsResultEx = _WinHttpGetProxySettingsResultEx 826 | WinHttpGetProxySettingsVersion = _WinHttpGetProxySettingsVersion 827 | WinHttpGetTunnelSocket = _WinHttpGetTunnelSocket 828 | WinHttpOpen = _WinHttpOpen 829 | WinHttpOpenRequest = _WinHttpOpenRequest 830 | WinHttpPacJsWorkerMain = _WinHttpPacJsWorkerMain 831 | WinHttpProbeConnectivity = _WinHttpProbeConnectivity 832 | WinHttpQueryAuthSchemes = _WinHttpQueryAuthSchemes 833 | WinHttpQueryConnectionGroup = _WinHttpQueryConnectionGroup 834 | WinHttpQueryDataAvailable = _WinHttpQueryDataAvailable 835 | WinHttpQueryHeaders = _WinHttpQueryHeaders 836 | WinHttpQueryHeadersEx = _WinHttpQueryHeadersEx 837 | WinHttpQueryOption = _WinHttpQueryOption 838 | WinHttpReadData = _WinHttpReadData 839 | WinHttpReadDataEx = _WinHttpReadDataEx 840 | WinHttpReadProxySettings = _WinHttpReadProxySettings 841 | WinHttpReadProxySettingsHvsi = _WinHttpReadProxySettingsHvsi 842 | WinHttpReceiveResponse = _WinHttpReceiveResponse 843 | WinHttpRegisterProxyChangeNotification = _WinHttpRegisterProxyChangeNotification 844 | WinHttpResetAutoProxy = _WinHttpResetAutoProxy 845 | WinHttpSaveProxyCredentials = _WinHttpSaveProxyCredentials 846 | WinHttpSendRequest = _WinHttpSendRequest 847 | WinHttpSetCredentials = _WinHttpSetCredentials 848 | WinHttpSetDefaultProxyConfiguration = _WinHttpSetDefaultProxyConfiguration 849 | WinHttpSetOption = _WinHttpSetOption 850 | WinHttpSetProxySettingsPerUser = _WinHttpSetProxySettingsPerUser 851 | WinHttpSetSecureLegacyServersAppCompat = _WinHttpSetSecureLegacyServersAppCompat 852 | WinHttpSetStatusCallback = _WinHttpSetStatusCallback 853 | WinHttpSetTimeouts = _WinHttpSetTimeouts 854 | WinHttpTimeFromSystemTime = _WinHttpTimeFromSystemTime 855 | WinHttpTimeToSystemTime = _WinHttpTimeToSystemTime 856 | WinHttpUnregisterProxyChangeNotification = _WinHttpUnregisterProxyChangeNotification 857 | WinHttpWebSocketClose = _WinHttpWebSocketClose 858 | WinHttpWebSocketCompleteUpgrade = _WinHttpWebSocketCompleteUpgrade 859 | WinHttpWebSocketQueryCloseStatus = _WinHttpWebSocketQueryCloseStatus 860 | WinHttpWebSocketReceive = _WinHttpWebSocketReceive 861 | WinHttpWebSocketSend = _WinHttpWebSocketSend 862 | WinHttpWebSocketShutdown = _WinHttpWebSocketShutdown 863 | WinHttpWriteData = _WinHttpWriteData 864 | WinHttpWriteProxySettings = _WinHttpWriteProxySettings 865 | 866 | LIBRARY "xinput" 867 | EXPORTS 868 | DllMain = _DllMain 869 | XInputEnable= _XInputEnable 870 | XInputGetCapabilities = _XInputGetCapabilities 871 | XInputGetDSoundAudioDeviceGuids = _XInputGetDSoundAudioDeviceGuids 872 | XInputGetState= _XInputGetState 873 | XInputSetState= _XInputSetState 874 | XInputGetBatteryInformation = _XInputGetBatteryInformation 875 | XInputGetKeystroke= _XInputGetKeystroke 876 | XInputGetStateEx= _XInputGetStateEx 877 | XInputWaitForGuideButton= _XInputWaitForGuideButton 878 | XInputCancelGuideButtonWait = _XInputCancelGuideButtonWait 879 | XInputPowerOffController= _XInputPowerOffController 880 | XInputGetAudioDeviceIds = _XInputGetAudioDeviceIds 881 | XInputGetBaseBusInformation = _XInputGetBaseBusInformation 882 | XInputGetCapabilitiesEx = _XInputGetCapabilitiesEx 883 | -------------------------------------------------------------------------------- /source/xlive/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/xlive/resource.h -------------------------------------------------------------------------------- /source/xlive/xliveless.h: -------------------------------------------------------------------------------- 1 | #ifndef XLIVELESS_H 2 | #define XLIVELESS_H 3 | 4 | #define XNET_STARTUP_BYPASS_SECURITY 0x01 5 | #define XNET_STARTUP_ALLOCATE_MAX_DGRAM_SOCKETS 0x02 6 | #define XNET_STARTUP_ALLOCATE_MAX_STREAM_SOCKETS 0x04 7 | #define XNET_STARTUP_DISABLE_PEER_ENCRYPTION 0x08 8 | 9 | typedef struct 10 | { 11 | BYTE cfgSizeOfStruct; 12 | BYTE cfgFlags; 13 | BYTE cfgSockMaxDgramSockets; 14 | BYTE cfgSockMaxStreamSockets; 15 | BYTE cfgSockDefaultRecvBufsizeInK; 16 | BYTE cfgSockDefaultSendBufsizeInK; 17 | BYTE cfgKeyRegMax; 18 | BYTE cfgSecRegMax; 19 | BYTE cfgQosDataLimitDiv4; 20 | BYTE cfgQosProbeTimeoutInSeconds; 21 | BYTE cfgQosProbeRetries; 22 | BYTE cfgQosSrvMaxSimultaneousResponses; 23 | BYTE cfgQosPairWaitTimeInSeconds; 24 | } XNetStartupParams; 25 | 26 | typedef struct 27 | { 28 | IN_ADDR ina; // IP address (zero if not static/DHCP) 29 | IN_ADDR inaOnline; // Online IP address (zero if not online) 30 | WORD wPortOnline; // Online port 31 | BYTE abEnet[6]; // Ethernet MAC address 32 | BYTE abOnline[20]; // Online identification 33 | } XNADDR; 34 | 35 | typedef struct 36 | { 37 | BYTE ab[8]; // xbox to xbox key identifier 38 | } XNKID; 39 | 40 | typedef XNADDR TSADDR; 41 | #define XNET_XNKID_MASK 0xF0 // Mask of flag bits in first byte of XNKID 42 | #define XNET_XNKID_SYSTEM_LINK 0x00 // Peer to peer system link session 43 | #define XNET_XNKID_SYSTEM_LINK_XPLAT 0x40 // Peer to peer system link session for cross-platform 44 | #define XNET_XNKID_ONLINE_PEER 0x80 // Peer to peer online session 45 | #define XNET_XNKID_ONLINE_SERVER 0xC0 // Client to server online session 46 | #define XNET_XNKID_ONLINE_TITLESERVER 0xE0 // Client to title server online session 47 | #define XNetXnKidIsSystemLinkXbox(pxnkid) (((pxnkid)->ab[0] & 0xE0) == XNET_XNKID_SYSTEM_LINK) 48 | #define XNetXnKidIsSystemLinkXPlat(pxnkid) (((pxnkid)->ab[0] & 0xE0) == XNET_XNKID_SYSTEM_LINK_XPLAT) 49 | #define XNetXnKidIsSystemLink(pxnkid) (XNetXnKidIsSystemLinkXbox(pxnkid) || XNetXnKidIsSystemLinkXPlat(pxnkid)) 50 | #define XNetXnKidIsOnlinePeer(pxnkid) (((pxnkid)->ab[0] & 0xE0) == XNET_XNKID_ONLINE_PEER) 51 | #define XNetXnKidIsOnlineServer(pxnkid) (((pxnkid)->ab[0] & 0xE0) == XNET_XNKID_ONLINE_SERVER) 52 | #define XNetXnKidIsOnlineTitleServer(pxnkid) (((pxnkid)->ab[0] & 0xE0) == XNET_XNKID_ONLINE_TITLESERVER) 53 | 54 | typedef struct 55 | { 56 | BYTE ab[16]; // xbox to xbox key exchange key 57 | } XNKEY; 58 | 59 | typedef struct 60 | { 61 | INT iStatus; // WSAEINPROGRESS if pending; 0 if success; error if failed 62 | UINT cina; // Count of IP addresses for the given host 63 | IN_ADDR aina[8]; // Vector of IP addresses for the given host 64 | } XNDNS; 65 | 66 | #define XNET_XNQOSINFO_COMPLETE 0x01 // Qos has finished processing this entry 67 | #define XNET_XNQOSINFO_TARGET_CONTACTED 0x02 // Target host was successfully contacted 68 | #define XNET_XNQOSINFO_TARGET_DISABLED 0x04 // Target host has disabled its Qos listener 69 | #define XNET_XNQOSINFO_DATA_RECEIVED 0x08 // Target host supplied Qos data 70 | #define XNET_XNQOSINFO_PARTIAL_COMPLETE 0x10 // Qos has unfinished estimates for this entry 71 | 72 | typedef struct 73 | { 74 | BYTE bFlags; // See XNET_XNQOSINFO_* 75 | BYTE bReserved; // Reserved 76 | WORD cProbesXmit; // Count of Qos probes transmitted 77 | WORD cProbesRecv; // Count of Qos probes successfully received 78 | WORD cbData; // Size of Qos data supplied by target (may be zero) 79 | BYTE *pbData; // Qos data supplied by target (may be NULL) 80 | WORD wRttMinInMsecs; // Minimum round-trip time in milliseconds 81 | WORD wRttMedInMsecs; // Median round-trip time in milliseconds 82 | DWORD dwUpBitsPerSec; // Upstream bandwidth in bits per second 83 | DWORD dwDnBitsPerSec; // Downstream bandwidth in bits per second 84 | } XNQOSINFO; 85 | 86 | typedef struct 87 | { 88 | UINT cxnqos; // Count of items in axnqosinfo[] array 89 | UINT cxnqosPending; // Count of items still pending 90 | XNQOSINFO axnqosinfo[1]; // Vector of Qos results 91 | } XNQOS; 92 | 93 | typedef struct 94 | { 95 | DWORD dwSizeOfStruct; // Structure size, must be set prior to calling XNetQosGetListenStats 96 | DWORD dwNumDataRequestsReceived; // Number of client data request probes received 97 | DWORD dwNumProbesReceived; // Number of client probe requests received 98 | DWORD dwNumSlotsFullDiscards; // Number of client requests discarded because all slots are full 99 | DWORD dwNumDataRepliesSent; // Number of data replies sent 100 | DWORD dwNumDataReplyBytesSent; // Number of data reply bytes sent 101 | DWORD dwNumProbeRepliesSent; // Number of probe replies sent 102 | } XNQOSLISTENSTATS; 103 | 104 | INT WINAPI XNetStartup(const XNetStartupParams *pxnsp); 105 | //INT WINAPI XNetCleanup(); 106 | INT WINAPI XNetRandom(BYTE *pb, UINT cb); 107 | INT WINAPI XNetCreateKey(XNKID *pxnkid, XNKEY *pxnkey); 108 | INT WINAPI XNetRegisterKey(const XNKID *pxnkid, const XNKEY *pxnkey); 109 | INT WINAPI XNetUnregisterKey(const XNKID *pxnkid); 110 | INT WINAPI XNetReplaceKey(const XNKID *pxnkidUnregister, const XNKID *pxnkidReplace); 111 | INT WINAPI XNetXnAddrToInAddr(const XNADDR *pxna, const XNKID *pxnkid, IN_ADDR *pina); 112 | INT WINAPI XNetServerToInAddr(const IN_ADDR ina, DWORD dwServiceId, IN_ADDR *pina); 113 | INT WINAPI XNetTsAddrToInAddr(const TSADDR *ptsa, DWORD dwServiceId, const XNKID *pxnkid, IN_ADDR *pina); 114 | INT WINAPI XNetInAddrToXnAddr(const IN_ADDR ina, XNADDR *pxna, XNKID *pxnkid); 115 | INT WINAPI XNetInAddrToServer(const IN_ADDR ina, IN_ADDR *pina); 116 | INT WINAPI XNetInAddrToString(const IN_ADDR ina, char *pchBuf, INT cchBuf); 117 | INT WINAPI XNetUnregisterInAddr(const IN_ADDR ina); 118 | INT WINAPI XNetXnAddrToMachineId(const XNADDR *pxnaddr, ULONGLONG *pqwMachineId); 119 | #define XNET_XNADDR_PLATFORM_XBOX1 0x00000000 // Platform type is original Xbox 120 | #define XNET_XNADDR_PLATFORM_XBOX360 0x00000001 // Platform type is Xbox 360 121 | #define XNET_XNADDR_PLATFORM_WINPC 0x00000002 // Platform type is Windows PC 122 | INT WINAPI XNetGetXnAddrPlatform(const XNADDR *pxnaddr, DWORD *pdwPlatform); 123 | #define XNET_CONNECT_STATUS_IDLE 0x00000000 // Connection not started; use XNetConnect or send packet 124 | #define XNET_CONNECT_STATUS_PENDING 0x00000001 // Connecting in progress; not complete yet 125 | #define XNET_CONNECT_STATUS_CONNECTED 0x00000002 // Connection is established 126 | #define XNET_CONNECT_STATUS_LOST 0x00000003 // Connection was lost 127 | INT WINAPI XNetConnect(const IN_ADDR ina); 128 | DWORD WINAPI XNetGetConnectStatus(const IN_ADDR ina); 129 | INT WINAPI XNetDnsLookup(const char *pszHost, WSAEVENT hEvent, XNDNS **ppxndns); 130 | INT WINAPI XNetDnsRelease(XNDNS *pxndns); 131 | #define XNET_QOS_LISTEN_ENABLE 0x00000001 // Responds to queries on the given XNKID 132 | #define XNET_QOS_LISTEN_DISABLE 0x00000002 // Rejects queries on the given XNKID 133 | #define XNET_QOS_LISTEN_SET_DATA 0x00000004 // Sets the block of data to send back to queriers 134 | #define XNET_QOS_LISTEN_SET_BITSPERSEC 0x00000008 // Sets max bandwidth that query reponses may consume 135 | #define XNET_QOS_LISTEN_RELEASE 0x00000010 // Stops listening on given XNKID and releases memory 136 | #define XNET_QOS_LOOKUP_RESERVED 0x00000000 // No flags defined yet for XNetQosLookup 137 | #define XNET_QOS_SERVICE_LOOKUP_RESERVED 0x00000000 // No flags defined yet for XNetQosServiceLookup 138 | INT WINAPI XNetQosListen(const XNKID *pxnkid, 139 | const BYTE *pb, 140 | UINT cb, 141 | DWORD dwBitsPerSec, DWORD dwFlags); 142 | INT WINAPI XNetQosLookup(UINT cxna, 143 | const XNADDR *apxna[], 144 | const XNKID *apxnkid[], 145 | const XNKEY *apxnkey[], 146 | UINT cina, 147 | const IN_ADDR aina[], 148 | const DWORD adwServiceId[], 149 | UINT cProbes, DWORD dwBitsPerSec, DWORD dwFlags, WSAEVENT hEvent, XNQOS **ppxnqos); 150 | INT WINAPI XNetQosServiceLookup(DWORD dwFlags, WSAEVENT hEvent, XNQOS **ppxnqos); 151 | INT WINAPI XNetQosRelease(XNQOS *pxnqos); 152 | INT WINAPI XNetQosGetListenStats(const XNKID *pxnkid, XNQOSLISTENSTATS *pQosListenStats); 153 | #define XNET_GET_XNADDR_PENDING 0x00000000 // Address acquisition is not yet complete 154 | #define XNET_GET_XNADDR_NONE 0x00000001 // XNet is uninitialized or no debugger found 155 | #define XNET_GET_XNADDR_ETHERNET 0x00000002 // Host has ethernet address (no IP address) 156 | #define XNET_GET_XNADDR_STATIC 0x00000004 // Host has statically assigned IP address 157 | #define XNET_GET_XNADDR_DHCP 0x00000008 // Host has DHCP assigned IP address 158 | #define XNET_GET_XNADDR_PPPOE 0x00000010 // Host has PPPoE assigned IP address 159 | #define XNET_GET_XNADDR_GATEWAY 0x00000020 // Host has one or more gateways configured 160 | #define XNET_GET_XNADDR_DNS 0x00000040 // Host has one or more DNS servers configured 161 | #define XNET_GET_XNADDR_ONLINE 0x00000080 // Host is currently connected to online service 162 | #define XNET_GET_XNADDR_TROUBLESHOOT 0x00008000 // Network configuration requires troubleshooting 163 | DWORD WINAPI XNetGetTitleXnAddr(XNADDR *pxna); 164 | DWORD WINAPI XNetGetDebugXnAddr(XNADDR *pxna); 165 | #define XNET_ETHERNET_LINK_ACTIVE 0x00000001 // Ethernet cable is connected and active 166 | #define XNET_ETHERNET_LINK_100MBPS 0x00000002 // Ethernet link is set to 100 Mbps 167 | #define XNET_ETHERNET_LINK_10MBPS 0x00000004 // Ethernet link is set to 10 Mbps 168 | #define XNET_ETHERNET_LINK_FULL_DUPLEX 0x00000008 // Ethernet link is in full duplex mode 169 | #define XNET_ETHERNET_LINK_HALF_DUPLEX 0x00000010 // Ethernet link is in half duplex mode 170 | #define XNET_ETHERNET_LINK_WIRELESS 0x00000020 // Ethernet link is wireless (802.11 based) 171 | //DWORD WINAPI XNetGetEthernetLinkStatus(); 172 | #define XNET_BROADCAST_VERSION_OLDER 0x00000001 // Got broadcast packet(s) from incompatible older version of title 173 | #define XNET_BROADCAST_VERSION_NEWER 0x00000002 // Got broadcast packet(s) from incompatible newer version of title 174 | DWORD WINAPI XNetGetBroadcastVersionStatus(BOOL fReset); 175 | #define XNET_OPTID_STARTUP_PARAMS 1 176 | #define XNET_OPTID_NIC_XMIT_BYTES 2 177 | #define XNET_OPTID_NIC_XMIT_FRAMES 3 178 | #define XNET_OPTID_NIC_RECV_BYTES 4 179 | #define XNET_OPTID_NIC_RECV_FRAMES 5 180 | #define XNET_OPTID_CALLER_XMIT_BYTES 6 181 | #define XNET_OPTID_CALLER_XMIT_FRAMES 7 182 | #define XNET_OPTID_CALLER_RECV_BYTES 8 183 | #define XNET_OPTID_CALLER_RECV_FRAMES 9 184 | 185 | INT WINAPI XNetGetOpt(DWORD dwOptId, BYTE *pbValue, DWORD *pdwValueSize); 186 | INT WINAPI XNetSetOpt(DWORD dwOptId, const BYTE *pbValue, DWORD dwValueSize); 187 | 188 | #define XNID(Version, Area, Index) (DWORD)((WORD)(Area) << 25 | (WORD)(Version) << 16 | (WORD)(Index)) 189 | #define XNID_VERSION(msgid) (((msgid) >> 16) & 0x1FF) 190 | #define XNID_AREA(msgid) (((msgid) >> 25) & 0x3F) 191 | #define XNID_INDEX(msgid) ((msgid)&0xFFFF) 192 | 193 | #define XNOTIFY_SYSTEM (0x00000001) 194 | #define XNOTIFY_LIVE (0x00000002) 195 | #define XNOTIFY_FRIENDS (0x00000004) 196 | #define XNOTIFY_CUSTOM (0x00000008) 197 | #define XNOTIFY_XMP (0x00000020) 198 | #define XNOTIFY_MSGR (0x00000040) 199 | #define XNOTIFY_PARTY (0x00000080) 200 | #define XNOTIFY_ALL (XNOTIFY_SYSTEM | XNOTIFY_LIVE | XNOTIFY_FRIENDS | XNOTIFY_CUSTOM | XNOTIFY_XMP | XNOTIFY_MSGR | XNOTIFY_PARTY) 201 | 202 | #define _XNAREA_SYSTEM (0) 203 | #define _XNAREA_LIVE (1) 204 | #define _XNAREA_FRIENDS (2) 205 | #define _XNAREA_CUSTOM (3) 206 | #define _XNAREA_XMP (5) 207 | #define _XNAREA_MSGR (6) 208 | #define _XNAREA_PARTY (7) 209 | 210 | #define XN_SYS_FIRST XNID(0, _XNAREA_SYSTEM, 0x0001) 211 | #define XN_SYS_UI XNID(0, _XNAREA_SYSTEM, 0x0009) 212 | #define XN_SYS_SIGNINCHANGED XNID(0, _XNAREA_SYSTEM, 0x000a) 213 | #define XN_SYS_STORAGEDEVICESCHANGED XNID(0, _XNAREA_SYSTEM, 0x000b) 214 | #define XN_SYS_PROFILESETTINGCHANGED XNID(0, _XNAREA_SYSTEM, 0x000e) 215 | #define XN_SYS_MUTELISTCHANGED XNID(0, _XNAREA_SYSTEM, 0x0011) 216 | #define XN_SYS_INPUTDEVICESCHANGED XNID(0, _XNAREA_SYSTEM, 0x0012) 217 | #define XN_SYS_INPUTDEVICECONFIGCHANGED XNID(1, _XNAREA_SYSTEM, 0x0013) 218 | #define XN_SYS_PLAYTIMERNOTICE XNID(3, _XNAREA_SYSTEM, 0x0015) 219 | #define XN_SYS_AVATARCHANGED XNID(4, _XNAREA_SYSTEM, 0x0017) 220 | #define XN_SYS_NUIHARDWARESTATUSCHANGED XNID(6, _XNAREA_SYSTEM, 0x0019) 221 | #define XN_SYS_NUIPAUSE XNID(6, _XNAREA_SYSTEM, 0x001a) 222 | #define XN_SYS_NUIUIAPPROACH XNID(6, _XNAREA_SYSTEM, 0x001b) 223 | #define XN_SYS_DEVICEREMAP XNID(6, _XNAREA_SYSTEM, 0x001c) 224 | #define XN_SYS_NUIBINDINGCHANGED XNID(6, _XNAREA_SYSTEM, 0x001d) 225 | #define XN_SYS_AUDIOLATENCYCHANGED XNID(8, _XNAREA_SYSTEM, 0x001e) 226 | #define XN_SYS_NUICHATBINDINGCHANGED XNID(8, _XNAREA_SYSTEM, 0x001f) 227 | #define XN_SYS_INPUTACTIVITYCHANGED XNID(9, _XNAREA_SYSTEM, 0x0020) 228 | #define XN_SYS_LAST XNID(0, _XNAREA_SYSTEM, 0x0023) 229 | 230 | #define XN_LIVE_FIRST XNID(0, _XNAREA_LIVE, 0x0001) 231 | #define XN_LIVE_CONNECTIONCHANGED XNID(0, _XNAREA_LIVE, 0x0001) 232 | #define XN_LIVE_INVITE_ACCEPTED XNID(0, _XNAREA_LIVE, 0x0002) 233 | #define XN_LIVE_LINK_STATE_CHANGED XNID(0, _XNAREA_LIVE, 0x0003) 234 | #define XN_LIVE_CONTENT_INSTALLED XNID(0, _XNAREA_LIVE, 0x0007) 235 | #define XN_LIVE_MEMBERSHIP_PURCHASED XNID(0, _XNAREA_LIVE, 0x0008) 236 | #define XN_LIVE_VOICECHAT_AWAY XNID(0, _XNAREA_LIVE, 0x0009) 237 | #define XN_LIVE_PRESENCE_CHANGED XNID(0, _XNAREA_LIVE, 0x000A) 238 | #define XN_LIVE_LAST XNID(XNID_CURRENTVERSION + 1, _XNAREA_LIVE, 0x0014) 239 | 240 | #define XN_FRIENDS_FIRST XNID(0, _XNAREA_FRIENDS, 0x0001) 241 | #define XN_FRIENDS_PRESENCE_CHANGED XNID(0, _XNAREA_FRIENDS, 0x0001) 242 | #define XN_FRIENDS_FRIEND_ADDED XNID(0, _XNAREA_FRIENDS, 0x0002) 243 | #define XN_FRIENDS_FRIEND_REMOVED XNID(0, _XNAREA_FRIENDS, 0x0003) 244 | #define XN_FRIENDS_LAST XNID(XNID_CURRENTVERSION + 1, _XNAREA_FRIENDS, 0x0009) 245 | 246 | #define XN_CUSTOM_FIRST XNID(0, _XNAREA_CUSTOM, 0x0001) 247 | #define XN_CUSTOM_ACTIONPRESSED XNID(0, _XNAREA_CUSTOM, 0x0003) 248 | #define XN_CUSTOM_GAMERCARD XNID(1, _XNAREA_CUSTOM, 0x0004) 249 | #define XN_CUSTOM_LAST XNID(XNID_CURRENTVERSION + 1, _XNAREA_CUSTOM, 0x0005) 250 | 251 | #define XN_XMP_FIRST XNID(0, _XNAREA_XMP, 0x0001) 252 | #define XN_XMP_STATECHANGED XNID(0, _XNAREA_XMP, 0x0001) 253 | #define XN_XMP_PLAYBACKBEHAVIORCHANGED XNID(0, _XNAREA_XMP, 0x0002) 254 | #define XN_XMP_PLAYBACKCONTROLLERCHANGED XNID(0, _XNAREA_XMP, 0x0003) 255 | #define XN_XMP_LAST XNID(XNID_CURRENTVERSION + 1, _XNAREA_XMP, 0x000D) 256 | 257 | #define XN_PARTY_FIRST XNID(0, _XNAREA_PARTY, 0x0001) 258 | #define XN_PARTY_MEMBERS_CHANGED XNID(4, _XNAREA_PARTY, 0x0002) 259 | #define XN_PARTY_LAST XNID(XNID_CURRENTVERSION + 1, _XNAREA_PARTY, 0x0006) 260 | typedef ULONGLONG XUID; 261 | typedef XUID *PXUID; 262 | #define INVALID_XUID ((XUID)0) 263 | #define XUSER_NAME_SIZE 16 264 | #define XUSER_MAX_NAME_LENGTH (XUSER_NAME_SIZE - 1) 265 | #define XUSER_PASSWORD_SIZE 25 266 | #define XUSER_MAX_PASSWORD_LENGTH (XUSER_PASSWORD_SIZE - 1) 267 | #define XUSER_GET_SIGNIN_INFO_ONLINE_XUID_ONLY 0x00000002 268 | #define XUSER_GET_SIGNIN_INFO_OFFLINE_XUID_ONLY 0x00000001 269 | #define XUSER_INFO_FLAG_LIVE_ENABLED 0x00000001 270 | #define XUSER_INFO_FLAG_GUEST 0x00000002 271 | 272 | typedef enum _XUSER_SIGNIN_STATE 273 | { 274 | eXUserSigninState_NotSignedIn, 275 | eXUserSigninState_SignedInLocally, 276 | eXUserSigninState_SignedInToLive 277 | } XUSER_SIGNIN_STATE; 278 | 279 | typedef struct _XUSER_SIGNIN_INFO 280 | { 281 | XUID xuid; 282 | DWORD dwInfoFlags; 283 | XUSER_SIGNIN_STATE UserSigninState; 284 | DWORD dwGuestNumber; 285 | DWORD dwSponsorUserIndex; 286 | CHAR szUserName[XUSER_NAME_SIZE]; 287 | } XUSER_SIGNIN_INFO, *PXUSER_SIGNIN_INFO; 288 | 289 | // Xbox-specific Overlapped 290 | typedef struct _XOVERLAPPED XOVERLAPPED, *PXOVERLAPPED; 291 | typedef VOID(WINAPI *PXOVERLAPPED_COMPLETION_ROUTINE)( 292 | DWORD dwErrorCode, 293 | DWORD dwNumberOfBytesTransfered, 294 | DWORD pOverlapped); 295 | 296 | typedef struct _XOVERLAPPED 297 | { 298 | ULONG_PTR InternalLow; 299 | ULONG_PTR InternalHigh; 300 | ULONG_PTR InternalContext; 301 | HANDLE hEvent; 302 | PXOVERLAPPED_COMPLETION_ROUTINE pCompletionRoutine; 303 | DWORD_PTR dwCompletionContext; 304 | DWORD dwExtendedError; 305 | } XOVERLAPPED, *PXOVERLAPPED; 306 | 307 | typedef enum _XUSER_PROFILE_SOURCE 308 | { 309 | XSOURCE_NO_VALUE = 0, 310 | XSOURCE_DEFAULT, 311 | XSOURCE_TITLE, 312 | XSOURCE_PERMISSION_DENIED 313 | } XUSER_PROFILE_SOURCE; 314 | 315 | typedef struct 316 | { 317 | BYTE type; 318 | union 319 | { 320 | LONG nData; 321 | LONGLONG i64Data; 322 | double dblData; 323 | struct 324 | { 325 | DWORD cbData; 326 | LPWSTR pwszData; 327 | } string; 328 | float fData; 329 | struct 330 | { 331 | DWORD cbData; 332 | LPBYTE pbData; 333 | } binary; 334 | FILETIME ftData; 335 | }; 336 | } XUSER_DATA, *PXUSER_DATA; 337 | 338 | typedef struct _XUSER_PROFILE_SETTING 339 | { 340 | XUSER_PROFILE_SOURCE source; 341 | union 342 | { 343 | DWORD dwUserIndex; 344 | XUID xuid; 345 | } user; 346 | DWORD dwSettingId; 347 | XUSER_DATA data; 348 | } XUSER_PROFILE_SETTING, *PXUSER_PROFILE_SETTING; 349 | 350 | typedef struct _XUSER_READ_PROFILE_SETTING_RESULT 351 | { 352 | DWORD dwSettingsLen; 353 | XUSER_PROFILE_SETTING *pSettings; 354 | } XUSER_READ_PROFILE_SETTING_RESULT, *PXUSER_READ_PROFILE_SETTING_RESULT; 355 | 356 | #define XCONTENTTYPE_SAVEDGAME 0x00000001 357 | #define XCONTENTTYPE_MARKETPLACE 0x00000002 358 | #define XCONTENTTYPE_PUBLISHER 0x00000003 359 | #define XCONTENTTYPE_GAMEDEMO 0x00080000 360 | #define XCONTENTTYPE_ARCADE 0x000D0000 361 | #define XCONTENTFLAG_NONE 0x00000000 362 | #define XCONTENTFLAG_CREATENEW CREATE_NEW 363 | #define XCONTENTFLAG_CREATEALWAYS CREATE_ALWAYS 364 | #define XCONTENTFLAG_OPENEXISTING OPEN_EXISTING 365 | #define XCONTENTFLAG_OPENALWAYS OPEN_ALWAYS 366 | #define XCONTENTFLAG_TRUNCATEEXISTING TRUNCATE_EXISTING 367 | #define XCONTENTFLAG_NOPROFILE_TRANSFER 0x00000010 368 | #define XCONTENTFLAG_NODEVICE_TRANSFER 0x00000020 369 | #define XCONTENTFLAG_STRONG_SIGNED 0x00000040 370 | #define XCONTENTFLAG_ALLOWPROFILE_TRANSFER 0x00000080 371 | #define XCONTENTFLAG_MOVEONLY_TRANSFER 0x00000800 372 | #define XCONTENTFLAG_MANAGESTORAGE 0x00000100 373 | #define XCONTENTFLAG_FORCE_SHOW_UI 0x00000200 374 | #define XCONTENTFLAG_ENUM_EXCLUDECOMMON 0x00001000 375 | #define XCONTENT_MAX_DISPLAYNAME_LENGTH 128 376 | #define XCONTENT_MAX_FILENAME_LENGTH 42 377 | #define XCONTENTDEVICE_MAX_NAME_LENGTH 27 378 | 379 | typedef DWORD XCONTENTDEVICEID, *PXCONTENTDEVICEID; 380 | typedef struct _XCONTENT_DATA 381 | { 382 | DWORD ContentNum; 383 | DWORD TitleId; 384 | DWORD ContentPackageType; 385 | BYTE ContentId[20]; 386 | } XCONTENT_DATA, *PXCONTENT_DATA; 387 | 388 | typedef struct _XUSER_ACHIEVEMENT 389 | { 390 | DWORD dwUserIndex; 391 | DWORD dwAchievementId; 392 | } XUSER_ACHIEVEMENT, *PXUSER_ACHIEVEMENT; 393 | 394 | typedef struct 395 | { 396 | XNKID sessionID; 397 | XNADDR hostAddress; 398 | XNKEY keyExchangeKey; 399 | } XSESSION_INFO, *PXSESSION_INFO; 400 | 401 | typedef enum _XSESSION_STATE 402 | { 403 | XSESSION_STATE_LOBBY = 0, 404 | XSESSION_STATE_REGISTRATION, 405 | XSESSION_STATE_INGAME, 406 | XSESSION_STATE_REPORTING, 407 | XSESSION_STATE_DELETED 408 | } XSESSION_STATE; 409 | 410 | typedef struct 411 | { 412 | XUID xuidOnline; 413 | DWORD dwUserIndex; 414 | DWORD dwFlags; 415 | } XSESSION_MEMBER; 416 | 417 | typedef struct 418 | { 419 | DWORD dwUserIndexHost; 420 | DWORD dwGameType; 421 | DWORD dwGameMode; 422 | DWORD dwFlags; 423 | DWORD dwMaxPublicSlots; 424 | DWORD dwMaxPrivateSlots; 425 | DWORD dwAvailablePublicSlots; 426 | DWORD dwAvailablePrivateSlots; 427 | DWORD dwActualMemberCount; 428 | DWORD dwReturnedMemberCount; 429 | XSESSION_STATE eState; 430 | ULONGLONG qwNonce; 431 | XSESSION_INFO sessionInfo; 432 | XNKID xnkidArbitration; 433 | XSESSION_MEMBER *pSessionMembers; 434 | } XSESSION_LOCAL_DETAILS, *PXSESSION_LOCAL_DETAILS; 435 | 436 | typedef enum 437 | { 438 | XONLINE_NAT_OPEN = 1, 439 | XONLINE_NAT_MODERATE, 440 | XONLINE_NAT_STRICT 441 | } XONLINE_NAT_TYPE; 442 | 443 | typedef struct _XUSER_PROPERTY 444 | { 445 | DWORD dwPropertyId; 446 | XUSER_DATA value; 447 | } XUSER_PROPERTY, *PXUSER_PROPERTY; 448 | 449 | typedef struct _XUSER_CONTEXT 450 | { 451 | DWORD dwContextId; 452 | DWORD dwValue; 453 | } XUSER_CONTEXT, *PXUSER_CONTEXT; 454 | 455 | typedef struct _XSESSION_SEARCHRESULT 456 | { 457 | XSESSION_INFO info; 458 | DWORD dwOpenPublicSlots; 459 | DWORD dwOpenPrivateSlots; 460 | DWORD dwFilledPublicSlots; 461 | DWORD dwFilledPrivateSlots; 462 | DWORD cProperties; 463 | DWORD cContexts; 464 | PXUSER_PROPERTY pProperties; 465 | PXUSER_CONTEXT pContexts; 466 | } XSESSION_SEARCHRESULT, *PXSESSION_SEARCHRESULT; 467 | 468 | typedef struct _XSESSION_SEARCHRESULT_HEADER 469 | { 470 | DWORD dwSearchResults; 471 | XSESSION_SEARCHRESULT *pResults; 472 | } XSESSION_SEARCHRESULT_HEADER, *PXSESSION_SEARCHRESULT_HEADER; 473 | 474 | typedef struct _XSESSION_REGISTRANT 475 | { 476 | ULONGLONG qwMachineID; 477 | DWORD bTrustworthiness; 478 | DWORD bNumUsers; 479 | XUID *rgUsers; 480 | } XSESSION_REGISTRANT; 481 | 482 | typedef struct _XSESSION_REGISTRATION_RESULTS 483 | { 484 | DWORD wNumRegistrants; 485 | XSESSION_REGISTRANT *rgRegistrants; 486 | } XSESSION_REGISTRATION_RESULTS, *PXSESSION_REGISTRATION_RESULTS; 487 | 488 | #define X_CONTEXT_PRESENCE 0x00008001 // ?? 489 | #define X_CONTEXT_GAME_TYPE 0x0000800A // DR2 490 | #define X_CONTEXT_GAME_MODE 0x0000800B 491 | #define X_CONTEXT_GAME_TYPE_RANKED 0 492 | #define X_CONTEXT_GAME_TYPE_STANDARD 1 493 | 494 | typedef enum _XPRIVILEGE_TYPE 495 | { 496 | XPRIVILEGE_MULTIPLAYER_SESSIONS = 254, 497 | XPRIVILEGE_COMMUNICATIONS = 252, 498 | XPRIVILEGE_COMMUNICATIONS_FRIENDS_ONLY = 251, 499 | XPRIVILEGE_PROFILE_VIEWING = 249, 500 | XPRIVILEGE_PROFILE_VIEWING_FRIENDS_ONLY = 248, 501 | XPRIVILEGE_USER_CREATED_CONTENT = 247, 502 | XPRIVILEGE_USER_CREATED_CONTENT_FRIENDS_ONLY = 246, 503 | XPRIVILEGE_PURCHASE_CONTENT = 245, 504 | XPRIVILEGE_PRESENCE = 244, 505 | XPRIVILEGE_PRESENCE_FRIENDS_ONLY = 243, 506 | XPRIVILEGE_SHARE_CONTENT_OUTSIDE_LIVE = 211, 507 | XPRIVILEGE_TRADE_CONTENT = 238, 508 | XPRIVILEGE_VIDEO_COMMUNICATIONS = 235, 509 | XPRIVILEGE_VIDEO_COMMUNICATIONS_FRIENDS_ONLY = 234, 510 | XPRIVILEGE_CONTENT_AUTHOR = 222 511 | } XPRIVILEGE_TYPE; 512 | 513 | typedef enum 514 | { 515 | XMARKETPLACE_OFFERING_TYPE_CONTENT = 0x00000002, 516 | XMARKETPLACE_OFFERING_TYPE_GAME_DEMO = 0x00000020, 517 | XMARKETPLACE_OFFERING_TYPE_GAME_TRAILER = 0x00000040, 518 | XMARKETPLACE_OFFERING_TYPE_THEME = 0x00000080, 519 | XMARKETPLACE_OFFERING_TYPE_TILE = 0x00000800, 520 | XMARKETPLACE_OFFERING_TYPE_ARCADE = 0x00002000, 521 | XMARKETPLACE_OFFERING_TYPE_VIDEO = 0x00004000, 522 | XMARKETPLACE_OFFERING_TYPE_CONSUMABLE = 0x00010000, 523 | XMARKETPLACE_OFFERING_TYPE_AVATARITEM = 0x00100000 524 | } XMARKETPLACE_OFFERING_TYPE; 525 | 526 | #define MAX_RICHPRESENCE_SIZE 100 527 | 528 | typedef struct _XONLINE_FRIEND 529 | { 530 | XUID xuid; 531 | CHAR szGamertag[XUSER_NAME_SIZE]; 532 | DWORD dwFriendState; 533 | XNKID sessionID; 534 | DWORD dwTitleID; 535 | FILETIME ftUserTime; 536 | XNKID xnkidInvite; 537 | FILETIME gameinviteTime; 538 | DWORD cchRichPresence; 539 | WCHAR wszRichPresence[MAX_RICHPRESENCE_SIZE]; 540 | } XONLINE_FRIEND, *PXONLINE_FRIEND; 541 | 542 | class IXHV2ENGINE 543 | { 544 | public: 545 | IXHV2ENGINE(); 546 | // 2F0 bytes = actual size 547 | // - note: check all INT return values - may not be true 548 | INT Dummy1(VOID *pThis); // 00 549 | INT Dummy2(VOID *pThis); // 04 550 | HRESULT Dummy3(VOID *pThis, int a); // 08 551 | HRESULT StartLocalProcessingModes(VOID *pThis, DWORD dwUserIndex, /* CONST PXHV_PROCESSING_MODE*/ VOID *processingModes, DWORD dwNumProcessingModes); 552 | HRESULT StopLocalProcessingModes(VOID *pThis, DWORD dwUserIndex, /*CONST PXHV_PROCESSING_MODE*/ VOID *processingModes, DWORD dwNumProcessingModes); 553 | HRESULT StartRemoteProcessingModes(VOID *pThis, int a1, int a2, int a3, int a4); 554 | HRESULT Dummy7(VOID *pThis, int a1, int a2, int a3, int a4); // 18 555 | HRESULT Dummy8(VOID *pThis, int a1); // 1C 556 | HRESULT RegisterLocalTalker(VOID *pThis, DWORD dwUserIndex); 557 | HRESULT UnregisterLocalTalker(VOID *pThis, DWORD dwUserIndex); 558 | HRESULT Dummy11(VOID *pThis, int a1, int a2, int a3, int a4, int a5); // 28 559 | HRESULT UnregisterRemoteTalker(VOID *pThis, int a1, int a2); 560 | HRESULT Dummy13(VOID *pThis, int a1, int a2); // 30 561 | INT Dummy14(VOID *pThis, int a1); // 34 562 | INT Dummy15(VOID *pThis, int a1); // 38 563 | HRESULT Dummy16(VOID *pThis, int a1, int a2); // 3C 564 | DWORD GetDataReadyFlags(VOID *pThis); 565 | HRESULT GetLocalChatData(VOID *pThis, DWORD dwUserIndex, PBYTE pbData, PDWORD pdwSize, PDWORD pdwPackets); 566 | HRESULT SetPlaybackPriority(VOID *pThis, int a1, int a2, int a3, int a4); 567 | HRESULT Dummy20(VOID *pThis, int a1, int a2, int a3, int a4); // 4C 568 | // possible does not exist 569 | HRESULT Dummy21(VOID *pThis); // 54 570 | HRESULT Dummy22(VOID *pThis); // 58 571 | HRESULT Dummy23(VOID *pThis); // 5C 572 | HRESULT Dummy24(VOID *pThis); // 60 573 | HRESULT Dummy25(VOID *pThis); // 64 574 | HRESULT Dummy26(VOID *pThis); // 68 575 | HRESULT Dummy27(VOID *pThis); // 6C 576 | HRESULT Dummy28(VOID *pThis); // 70 577 | HRESULT Dummy29(VOID *pThis); // 74 578 | HRESULT Dummy30(VOID *pThis); // 78 579 | HRESULT Dummy31(VOID *pThis); // 7C 580 | HRESULT Dummy32(VOID *pThis); // 80 581 | typedef void (IXHV2ENGINE::*HV2FUNCPTR)(void); 582 | // ugly, low-skilled hackaround 583 | HV2FUNCPTR *funcTablePtr; 584 | HV2FUNCPTR funcPtr[100]; 585 | HV2FUNCPTR func2; 586 | }; 587 | typedef IXHV2ENGINE *PIXHV2ENGINE; 588 | typedef struct 589 | { 590 | DWORD dwId; 591 | LPWSTR pwszLabel; 592 | LPWSTR pwszDescription; 593 | LPWSTR pwszUnachieved; 594 | DWORD dwImageId; 595 | DWORD dwCred; 596 | FILETIME ftAchieved; 597 | DWORD dwFlags; 598 | } XACHIEVEMENT_DETAILS, *PXACHIEVEMENT_DETAILS; 599 | 600 | #define XACHIEVEMENT_DETAILS_ACHIEVED_ONLINE 0x10000 601 | #define XACHIEVEMENT_DETAILS_ACHIEVED 0x20000 602 | 603 | typedef struct _MESSAGEBOX_RESULT 604 | { 605 | union 606 | { 607 | DWORD dwButtonPressed; 608 | WORD rgwPasscode[4]; 609 | }; 610 | } MESSAGEBOX_RESULT, *PMESSAGEBOX_RESULT; 611 | 612 | typedef enum _XSTORAGE_FACILITY 613 | { 614 | XSTORAGE_FACILITY_GAME_CLIP = 1, 615 | XSTORAGE_FACILITY_PER_TITLE = 2, 616 | XSTORAGE_FACILITY_PER_USER_TITLE = 3 617 | } XSTORAGE_FACILITY; 618 | 619 | typedef struct _XSTORAGE_DOWNLOAD_TO_MEMORY_RESULTS 620 | { 621 | DWORD dwBytesTotal; 622 | XUID xuidOwner; 623 | FILETIME ftCreated; 624 | } XSTORAGE_DOWNLOAD_TO_MEMORY_RESULTS; 625 | 626 | typedef struct 627 | { 628 | DWORD dwNewOffers; 629 | DWORD dwTotalOffers; 630 | } XOFFERING_CONTENTAVAILABLE_RESULT; 631 | 632 | #define XMARKETPLACE_CONTENT_ID_LEN 20 633 | 634 | typedef struct 635 | { 636 | ULONGLONG qwOfferID; 637 | ULONGLONG qwPreviewOfferID; 638 | DWORD dwOfferNameLength; 639 | WCHAR *wszOfferName; 640 | DWORD dwOfferType; 641 | BYTE contentId[XMARKETPLACE_CONTENT_ID_LEN]; 642 | BOOL fIsUnrestrictedLicense; 643 | DWORD dwLicenseMask; 644 | DWORD dwTitleID; 645 | DWORD dwContentCategory; 646 | DWORD dwTitleNameLength; 647 | WCHAR *wszTitleName; 648 | BOOL fUserHasPurchased; 649 | DWORD dwPackageSize; 650 | DWORD dwInstallSize; 651 | DWORD dwSellTextLength; 652 | WCHAR *wszSellText; 653 | DWORD dwAssetID; 654 | DWORD dwPurchaseQuantity; 655 | DWORD dwPointsPrice; 656 | } XMARKETPLACE_CONTENTOFFER_INFO, *PXMARKETPLACE_CONTENTOFFER_INFO; 657 | 658 | typedef struct 659 | { 660 | IN_ADDR inaServer; 661 | DWORD dwFlags; 662 | CHAR szServerInfo[200]; 663 | } XTITLESERVER_INFO, *PXTITLESERVER_INFO; 664 | 665 | typedef struct _STRING_DATA 666 | { 667 | WORD wStringSize; 668 | WCHAR *pszString; 669 | } STRING_DATA; 670 | 671 | #pragma pack(push, 1) 672 | typedef struct _STRING_VERIFY_RESPONSE 673 | { 674 | WORD wNumStrings; 675 | HRESULT *pStringResult; 676 | } STRING_VERIFY_RESPONSE; 677 | #pragma pack(pop) 678 | 679 | #define GAMEPACKETHEADERSIZE 17 680 | #define TRACE(...) 681 | #define TRACE2(...) 682 | 683 | #endif 684 | -------------------------------------------------------------------------------- /source/xlive/xliveless.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/2317e9e9da086ff83332a4dc586d87dbb77c6a27/source/xlive/xliveless.rc --------------------------------------------------------------------------------