├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE ├── premake5.cmd ├── premake5.exe ├── premake5.lua ├── readme.md └── source ├── dllmain.cpp ├── dllmain.h ├── x64.def ├── x86.def └── xliveless.h /.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 | -------------------------------------------------------------------------------- /.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 | [submodule "external/MemoryModule"] 5 | path = external/MemoryModule 6 | url = https://github.com/fancycode/MemoryModule 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 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.cmd: -------------------------------------------------------------------------------- 1 | premake5 vs2015 -------------------------------------------------------------------------------- /premake5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aap/simpledllloader/c477a43da6fd9c7051cc332f45a76b2365ccd960/premake5.exe -------------------------------------------------------------------------------- /premake5.lua: -------------------------------------------------------------------------------- 1 | -- x86 2 | workspace "Simple-DLL-Loader-x86" 3 | configurations { "Release", "Debug" } 4 | architecture "x86" 5 | location "build" 6 | 7 | project "Simple-DLL-Loader-x86" 8 | kind "SharedLib" 9 | language "C++" 10 | targetdir "bin/x86/%{cfg.buildcfg}" 11 | targetname "dinput8" 12 | targetextension ".dll" 13 | 14 | includedirs { "source" } 15 | includedirs { "external" } 16 | 17 | files { "source/dllmain.h", "source/dllmain.cpp" } 18 | files { "source/x86.def" } 19 | 20 | characterset ("MBCS") 21 | 22 | filter "configurations:Debug" 23 | defines { "DEBUG" } 24 | symbols "On" 25 | 26 | filter "configurations:Release" 27 | defines { "NDEBUG" } 28 | optimize "On" 29 | flags { "StaticRuntime" } 30 | 31 | -- x64 32 | workspace "Simple-DLL-Loader-x64" 33 | configurations { "Release", "Debug" } 34 | architecture "x86_64" 35 | location "build" 36 | 37 | defines { "X64" } 38 | 39 | project "Simple-DLL-Loader-x64" 40 | kind "SharedLib" 41 | language "C++" 42 | targetdir "bin/x64/%{cfg.buildcfg}" 43 | targetname "dinput8" 44 | targetextension ".dll" 45 | 46 | includedirs { "source" } 47 | includedirs { "external" } 48 | 49 | files { "source/dllmain.h", "source/dllmain.cpp" } 50 | files { "source/x64.def" } 51 | 52 | characterset ("MBCS") 53 | 54 | filter "configurations:Debug" 55 | defines { "DEBUG" } 56 | symbols "On" 57 | 58 | filter "configurations:Release" 59 | defines { "NDEBUG" } 60 | optimize "On" 61 | flags { "StaticRuntime" } 62 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Simple DLL Loader 2 | =================== 3 | fork of the Ultimate ASI Loader 4 | 5 | DESCRIPTION 6 | ------------------------ 7 | This is a DLL file which adds DLL plugin loading functionality to any game which uses any of the following libraries: 8 | * d3d8.dll 9 | * d3d9.dll 10 | * d3d11.dll 11 | * ddraw.dll 12 | * dinput.dll 13 | * dinput8.dll (x86 and x64) 14 | * dsound.dll (x86 and x64) 15 | * msacm32.dll 16 | * msvfw32.dll 17 | * vorbisFile.dll 18 | * winmmbase.dll 19 | * xlive.dll 20 | 21 | 22 | INSTALLATION 23 | ------------------------ 24 | In 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). 25 | In the case of vorbisFile.dll, rename the original vorbisFile.dll to vorbisFileHooked.dll first. 26 | 27 | 28 | USAGE 29 | ------------------------ 30 | create a file "dlls.cfg" in the same directory as the DLLloader dll with one file name per line to load as a dll. 31 | The filenames are relative to the dll. 32 | A # character at the beginning of the line will make the DLLloader ignore it. 33 | -------------------------------------------------------------------------------- /source/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "dllmain.h" 2 | 3 | HMODULE hm; 4 | bool bLoadedPluginsYet, bOriginalLibraryLoaded; 5 | char iniPath[MAX_PATH]; 6 | 7 | enum Kernel32ExportsNames 8 | { 9 | eGetStartupInfoA, 10 | eGetStartupInfoW, 11 | eGetModuleHandleA, 12 | eGetModuleHandleW, 13 | eGetProcAddress, 14 | eGetShortPathNameA, 15 | eFindNextFileA, 16 | eFindNextFileW, 17 | eLoadLibraryA, 18 | eLoadLibraryW, 19 | eFreeLibrary, 20 | 21 | Kernel32ExportsNamesCount 22 | }; 23 | 24 | enum Kernel32ExportsData 25 | { 26 | IATPtr, 27 | ProcAddress, 28 | 29 | Kernel32ExportsDataCount 30 | }; 31 | 32 | size_t Kernel32Data[Kernel32ExportsNamesCount][Kernel32ExportsDataCount]; 33 | 34 | void LoadOriginalLibrary() 35 | { 36 | bOriginalLibraryLoaded = true; 37 | 38 | char SelfPath[MAX_PATH]; 39 | char szSystemPath[MAX_PATH]; 40 | GetModuleFileName(hm, SelfPath, MAX_PATH); 41 | auto SelfName = strrchr(SelfPath, '\\'); 42 | SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, szSystemPath); 43 | strcat_s(szSystemPath, SelfName); 44 | 45 | #if !X64 46 | if(_stricmp(SelfName + 1, "vorbisFile.dll") == 0){ 47 | strcpy(SelfName+1, "vorbisFileHooked.dll"); 48 | HMODULE module = LoadLibrary(SelfPath); 49 | if(module == 0){ 50 | MessageBox(0, "Could not load library vorbisFileHooked.dll", "DLL Loader", MB_ICONERROR); 51 | ExitProcess(0); 52 | } 53 | vorbisfile.LoadOriginalLibrary(module); 54 | 55 | // Unprotect the module NOW (CLEO 4.1.1.30f crash fix) 56 | auto hExecutableInstance = (size_t)GetModuleHandle(NULL); 57 | IMAGE_NT_HEADERS* ntHeader = (IMAGE_NT_HEADERS*)(hExecutableInstance + ((IMAGE_DOS_HEADER*)hExecutableInstance)->e_lfanew); 58 | SIZE_T size = ntHeader->OptionalHeader.SizeOfImage; 59 | DWORD oldProtect; 60 | VirtualProtect((VOID*)hExecutableInstance, size, PAGE_EXECUTE_READWRITE, &oldProtect); 61 | }else if (_stricmp(SelfName + 1, "dsound.dll") == 0) 62 | dsound.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 63 | else if (_stricmp(SelfName + 1, "dinput8.dll") == 0) 64 | dinput8.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 65 | else if (_stricmp(SelfName + 1, "ddraw.dll") == 0) 66 | ddraw.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 67 | else if (_stricmp(SelfName + 1, "d3d8.dll") == 0) 68 | d3d8.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 69 | else if (_stricmp(SelfName + 1, "d3d9.dll") == 0) 70 | d3d9.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 71 | else if (_stricmp(SelfName + 1, "d3d11.dll") == 0) 72 | d3d11.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 73 | else if (_stricmp(SelfName + 1, "winmmbase.dll") == 0) 74 | winmmbase.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 75 | else if (_stricmp(SelfName + 1, "msacm32.dll") == 0) 76 | msacm32.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 77 | else if (_stricmp(SelfName + 1, "dinput.dll") == 0) 78 | dinput.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 79 | else if (_stricmp(SelfName + 1, "msvfw32.dll") == 0) 80 | msvfw32.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 81 | else if (_stricmp(SelfName + 1, "xlive.dll") == 0){ 82 | // Unprotect image - make .text and .rdata section writeable 83 | // get load address of the exe 84 | size_t dwLoadOffset = (size_t)GetModuleHandle(NULL); 85 | BYTE * pImageBase = reinterpret_cast(dwLoadOffset); 86 | PIMAGE_DOS_HEADER pDosHeader = reinterpret_cast(dwLoadOffset); 87 | PIMAGE_NT_HEADERS pNtHeader = reinterpret_cast(pImageBase + pDosHeader->e_lfanew); 88 | PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pNtHeader); 89 | 90 | for (int iSection = 0; iSection < pNtHeader->FileHeader.NumberOfSections; ++iSection, ++pSection) { 91 | char * pszSectionName = reinterpret_cast(pSection->Name); 92 | if (!strcmp(pszSectionName, ".text") || !strcmp(pszSectionName, ".rdata")) { 93 | DWORD dwPhysSize = (pSection->Misc.VirtualSize + 4095) & ~4095; 94 | DWORD oldProtect; 95 | DWORD newProtect = (pSection->Characteristics & IMAGE_SCN_MEM_EXECUTE) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; 96 | if (!VirtualProtect(reinterpret_cast (dwLoadOffset + pSection->VirtualAddress), dwPhysSize, newProtect, &oldProtect)) { 97 | ExitProcess(0); 98 | } 99 | } 100 | } 101 | }else{ 102 | MessageBox(0, "This library isn't supported. Try to rename it to d3d8.dll, d3d9.dll, d3d11.dll, winmmbase.dll, msacm32.dll, dinput.dll, dinput8.dll, dsound.dll, vorbisFile.dll, msvfw32.dll, xlive.dll or ddraw.dll.", "DLL Loader", MB_ICONERROR); 103 | ExitProcess(0); 104 | } 105 | #else 106 | if (_stricmp(SelfName + 1, "dsound.dll") == 0) 107 | dsound.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 108 | else if (_stricmp(SelfName + 1, "dinput8.dll") == 0) 109 | dinput8.LoadOriginalLibrary(LoadLibrary(szSystemPath)); 110 | else{ 111 | MessageBox(0, "This library isn't supported. Try to rename it to dsound.dll or dinput8.dll.", "DLL Loader", MB_ICONERROR); 112 | ExitProcess(0); 113 | } 114 | #endif 115 | } 116 | 117 | #if !X64 118 | void Direct3D8DisableMaximizedWindowedModeShim() 119 | { 120 | auto nDirect3D8DisableMaximizedWindowedModeShim = GetPrivateProfileInt("globalsets", "Direct3D8DisableMaximizedWindowedModeShim", FALSE, iniPath); 121 | if (nDirect3D8DisableMaximizedWindowedModeShim) 122 | { 123 | HMODULE pd3d8 = NULL; 124 | if (d3d8.dll) 125 | { 126 | pd3d8 = d3d8.dll; 127 | } 128 | else 129 | { 130 | pd3d8 = LoadLibrary("d3d8.dll"); 131 | if (!pd3d8) 132 | { 133 | TCHAR szSystemPath[MAX_PATH]; 134 | SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, szSystemPath); 135 | strcat_s(szSystemPath, "\\d3d8.dll"); 136 | pd3d8 = LoadLibrary(szSystemPath); 137 | } 138 | } 139 | 140 | if (pd3d8) 141 | { 142 | auto addr = (uintptr_t)GetProcAddress(pd3d8, "Direct3D8EnableMaximizedWindowedModeShim"); 143 | if (addr) 144 | { 145 | DWORD Protect; 146 | VirtualProtect((LPVOID)(addr + 6), 4, PAGE_EXECUTE_READWRITE, &Protect); 147 | *(uint32_t*)(addr + 6) = 0; 148 | *(uint32_t*)(*(uint32_t*)(addr + 2)) = 0; 149 | VirtualProtect((LPVOID)(addr + 6), 4, Protect, &Protect); 150 | } 151 | } 152 | } 153 | } 154 | #endif 155 | 156 | void LoadPlugins() 157 | { 158 | char oldDir[MAX_PATH]; // store the current directory 159 | GetCurrentDirectory(MAX_PATH, oldDir); 160 | 161 | char selfPath[MAX_PATH]; 162 | GetModuleFileName(hm, selfPath, MAX_PATH); 163 | *strrchr(selfPath, '\\') = '\0'; 164 | SetCurrentDirectory(selfPath); 165 | 166 | char path[MAX_PATH], *p, *q; 167 | FILE *f = fopen("plugins.cfg", "r"); 168 | if(f == NULL) 169 | f = fopen("dlls.cfg", "r"); 170 | if(f == NULL) 171 | return; 172 | while(fgets(path, MAX_PATH, f)){ 173 | p = path; 174 | while(*p && isspace(*p)) p++; 175 | if(*p == '\0' || *p == '#') 176 | continue; 177 | q = p; 178 | while(*q) q++; 179 | q--; 180 | while(isspace(*q)) q--; 181 | q[1] = '\0'; 182 | LoadLibrary(p); 183 | } 184 | fclose(f); 185 | getchar(); 186 | 187 | SetCurrentDirectory(oldDir); // Reset the current directory 188 | } 189 | 190 | void LoadEverything() 191 | { 192 | if (!bLoadedPluginsYet) 193 | { 194 | if (!bOriginalLibraryLoaded) 195 | LoadOriginalLibrary(); 196 | #if !X64 197 | Direct3D8DisableMaximizedWindowedModeShim(); 198 | #endif 199 | LoadPlugins(); 200 | bLoadedPluginsYet = true; 201 | } 202 | } 203 | 204 | void LoadPluginsAndRestoreIAT() 205 | { 206 | LoadEverything(); 207 | 208 | for (size_t i = 0; i < Kernel32ExportsNamesCount; i++) 209 | { 210 | if (Kernel32Data[i][IATPtr] && Kernel32Data[i][ProcAddress]) 211 | { 212 | auto ptr = (size_t*)Kernel32Data[i][IATPtr]; 213 | DWORD dwProtect[2]; 214 | VirtualProtect(ptr, sizeof(size_t), PAGE_EXECUTE_READWRITE, &dwProtect[0]); 215 | *ptr = Kernel32Data[i][ProcAddress]; 216 | VirtualProtect(ptr, sizeof(size_t), dwProtect[0], &dwProtect[1]); 217 | } 218 | } 219 | } 220 | 221 | void WINAPI CustomGetStartupInfoA(LPSTARTUPINFOA lpStartupInfo) 222 | { 223 | LoadPluginsAndRestoreIAT(); 224 | return GetStartupInfoA(lpStartupInfo); 225 | } 226 | 227 | void WINAPI CustomGetStartupInfoW(LPSTARTUPINFOW lpStartupInfo) 228 | { 229 | LoadPluginsAndRestoreIAT(); 230 | return GetStartupInfoW(lpStartupInfo); 231 | } 232 | 233 | HMODULE WINAPI CustomGetModuleHandleA(LPCSTR lpModuleName) 234 | { 235 | LoadPluginsAndRestoreIAT(); 236 | return GetModuleHandleA(lpModuleName); 237 | } 238 | 239 | HMODULE WINAPI CustomGetModuleHandleW(LPCWSTR lpModuleName) 240 | { 241 | LoadPluginsAndRestoreIAT(); 242 | return GetModuleHandleW(lpModuleName); 243 | } 244 | 245 | FARPROC WINAPI CustomGetProcAddress(HMODULE hModule, LPCSTR lpProcName) 246 | { 247 | LoadPluginsAndRestoreIAT(); 248 | return GetProcAddress(hModule, lpProcName); 249 | } 250 | 251 | DWORD WINAPI CustomGetShortPathNameA(LPCSTR lpszLongPath, LPSTR lpszShortPath, DWORD cchBuffer) 252 | { 253 | LoadPluginsAndRestoreIAT(); 254 | return GetShortPathNameA(lpszLongPath, lpszShortPath, cchBuffer); 255 | } 256 | 257 | BOOL WINAPI CustomFindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) 258 | { 259 | LoadPluginsAndRestoreIAT(); 260 | return FindNextFileA(hFindFile, lpFindFileData); 261 | } 262 | 263 | BOOL WINAPI CustomFindNextFileW(HANDLE hFindFile, LPWIN32_FIND_DATAW lpFindFileData) 264 | { 265 | LoadPluginsAndRestoreIAT(); 266 | return FindNextFileW(hFindFile, lpFindFileData); 267 | } 268 | 269 | HMODULE WINAPI CustomLoadLibraryA(LPCSTR lpLibFileName) 270 | { 271 | if (!bOriginalLibraryLoaded) 272 | LoadOriginalLibrary(); 273 | 274 | return LoadLibraryA(lpLibFileName); 275 | } 276 | 277 | HMODULE WINAPI CustomLoadLibraryW(LPCWSTR lpLibFileName) 278 | { 279 | if (!bOriginalLibraryLoaded) 280 | LoadOriginalLibrary(); 281 | 282 | return LoadLibraryW(lpLibFileName); 283 | } 284 | 285 | BOOL WINAPI CustomFreeLibrary(HMODULE hLibModule) 286 | { 287 | if (hLibModule != hm) 288 | return FreeLibrary(hLibModule); 289 | else 290 | return !NULL; 291 | } 292 | 293 | void HookKernel32IAT() 294 | { 295 | auto hExecutableInstance = (size_t)GetModuleHandle(NULL); 296 | IMAGE_NT_HEADERS* ntHeader = (IMAGE_NT_HEADERS*)(hExecutableInstance + ((IMAGE_DOS_HEADER*)hExecutableInstance)->e_lfanew); 297 | IMAGE_IMPORT_DESCRIPTOR* pImports = (IMAGE_IMPORT_DESCRIPTOR*)(hExecutableInstance + ntHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); 298 | size_t nNumImports = ntHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size / sizeof(IMAGE_IMPORT_DESCRIPTOR) - 1; 299 | 300 | Kernel32Data[eGetStartupInfoA] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetStartupInfoA"); 301 | Kernel32Data[eGetStartupInfoW] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetStartupInfoW"); 302 | Kernel32Data[eGetModuleHandleA] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetModuleHandleA"); 303 | Kernel32Data[eGetModuleHandleW] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetModuleHandleW"); 304 | Kernel32Data[eGetProcAddress] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetProcAddress"); 305 | Kernel32Data[eGetShortPathNameA][ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "GetShortPathNameA"); 306 | Kernel32Data[eFindNextFileA] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "FindNextFileA"); 307 | Kernel32Data[eFindNextFileW] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "FindNextFileW"); 308 | Kernel32Data[eLoadLibraryA] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "LoadLibraryA"); 309 | Kernel32Data[eLoadLibraryW] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "LoadLibraryW"); 310 | Kernel32Data[eFreeLibrary] [ProcAddress] = (size_t)GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "FreeLibrary"); 311 | 312 | auto PatchIAT = [&nNumImports, &hExecutableInstance, &pImports](size_t start, size_t end, size_t exe_end) 313 | { 314 | for (size_t i = 0; i < nNumImports; i++) 315 | { 316 | if (hExecutableInstance + (pImports + i)->FirstThunk > start && !(end && hExecutableInstance + (pImports + i)->FirstThunk > end)) 317 | end = hExecutableInstance + (pImports + i)->FirstThunk; 318 | } 319 | 320 | if (!end) { end = start + 0x100; } 321 | if (end > exe_end) //for very broken exes 322 | { 323 | start = hExecutableInstance; 324 | end = exe_end; 325 | } 326 | 327 | for (auto i = start; i < end; i += sizeof(size_t)) 328 | { 329 | DWORD dwProtect[2]; 330 | VirtualProtect((size_t*)i, sizeof(size_t), PAGE_EXECUTE_READWRITE, &dwProtect[0]); 331 | 332 | auto ptr = *(size_t*)i; 333 | 334 | if (ptr == Kernel32Data[eGetStartupInfoA][ProcAddress]) 335 | { 336 | Kernel32Data[eGetStartupInfoA][IATPtr] = i; 337 | *(size_t*)i = (size_t)CustomGetStartupInfoA; 338 | } 339 | else if (ptr == Kernel32Data[eGetStartupInfoW][ProcAddress]) 340 | { 341 | Kernel32Data[eGetStartupInfoW][IATPtr] = i; 342 | *(size_t*)i = (size_t)CustomGetStartupInfoW; 343 | } 344 | else if (ptr == Kernel32Data[eGetModuleHandleA][ProcAddress]) 345 | { 346 | Kernel32Data[eGetModuleHandleA][IATPtr] = i; 347 | *(size_t*)i = (size_t)CustomGetModuleHandleA; 348 | } 349 | else if (ptr == Kernel32Data[eGetModuleHandleW][ProcAddress]) 350 | { 351 | Kernel32Data[eGetModuleHandleW][IATPtr] = i; 352 | *(size_t*)i = (size_t)CustomGetModuleHandleW; 353 | } 354 | else if (ptr == Kernel32Data[eGetProcAddress][ProcAddress]) 355 | { 356 | Kernel32Data[eGetProcAddress][IATPtr] = i; 357 | *(size_t*)i = (size_t)CustomGetProcAddress; 358 | } 359 | else if (ptr == Kernel32Data[eGetShortPathNameA][ProcAddress]) 360 | { 361 | Kernel32Data[eGetShortPathNameA][IATPtr] = i; 362 | *(size_t*)i = (size_t)CustomGetShortPathNameA; 363 | } 364 | else if (ptr == Kernel32Data[eFindNextFileA][ProcAddress]) 365 | { 366 | Kernel32Data[eFindNextFileA][IATPtr] = i; 367 | *(size_t*)i = (size_t)CustomFindNextFileA; 368 | } 369 | else if (ptr == Kernel32Data[eFindNextFileW][ProcAddress]) 370 | { 371 | Kernel32Data[eFindNextFileW][IATPtr] = i; 372 | *(size_t*)i = (size_t)CustomFindNextFileW; 373 | } 374 | else if (ptr == Kernel32Data[eLoadLibraryA][ProcAddress]) 375 | { 376 | Kernel32Data[eLoadLibraryA][IATPtr] = i; 377 | *(size_t*)i = (size_t)CustomLoadLibraryA; 378 | } 379 | else if (ptr == Kernel32Data[eLoadLibraryW][ProcAddress]) 380 | { 381 | Kernel32Data[eLoadLibraryW][IATPtr] = i; 382 | *(size_t*)i = (size_t)CustomLoadLibraryW; 383 | } 384 | else if (ptr == Kernel32Data[eFreeLibrary][ProcAddress]) 385 | { 386 | Kernel32Data[eFreeLibrary][IATPtr] = i; 387 | *(size_t*)i = (size_t)CustomFreeLibrary; 388 | } 389 | 390 | VirtualProtect((size_t*)i, sizeof(size_t), dwProtect[0], &dwProtect[1]); 391 | } 392 | }; 393 | 394 | static auto getSection = [](const PIMAGE_NT_HEADERS nt_headers, unsigned section) -> PIMAGE_SECTION_HEADER 395 | { 396 | return reinterpret_cast( 397 | (UCHAR*)nt_headers->OptionalHeader.DataDirectory + 398 | nt_headers->OptionalHeader.NumberOfRvaAndSizes * sizeof(IMAGE_DATA_DIRECTORY) + 399 | section * sizeof(IMAGE_SECTION_HEADER)); 400 | }; 401 | 402 | auto sec = getSection(ntHeader, ntHeader->FileHeader.NumberOfSections - 1); 403 | auto secSize = max(sec->SizeOfRawData, sec->Misc.VirtualSize); 404 | auto hExecutableInstance_end = hExecutableInstance + max(sec->PointerToRawData, sec->VirtualAddress) + secSize; 405 | 406 | char SelfPath[MAX_PATH]; 407 | GetModuleFileName(hm, SelfPath, MAX_PATH); 408 | auto SelfName = strrchr(SelfPath, '\\') + 1; 409 | 410 | // Find kernel32.dll 411 | for (size_t i = 0; i < nNumImports; i++) 412 | { 413 | if ((size_t)(hExecutableInstance + (pImports + i)->Name) < hExecutableInstance_end) 414 | { 415 | if (!_stricmp((const char*)(hExecutableInstance + (pImports + i)->Name), "KERNEL32.DLL")) 416 | PatchIAT(hExecutableInstance + (pImports + i)->FirstThunk, 0, hExecutableInstance_end); 417 | 418 | //Checking for ordinals 419 | if (!_stricmp((const char*)(hExecutableInstance + (pImports + i)->Name), SelfName)) 420 | { 421 | PIMAGE_THUNK_DATA thunk = (PIMAGE_THUNK_DATA)(hExecutableInstance + (pImports + i)->OriginalFirstThunk); 422 | size_t j = 0; 423 | while (thunk->u1.Function) 424 | { 425 | if (thunk->u1.Ordinal & IMAGE_ORDINAL_FLAG) 426 | { 427 | PIMAGE_IMPORT_BY_NAME import = (PIMAGE_IMPORT_BY_NAME)(hExecutableInstance + thunk->u1.AddressOfData); 428 | void** p = (void**)(hExecutableInstance + (pImports + i)->FirstThunk); 429 | if (!_stricmp(SelfName, "DSOUND.DLL")) 430 | { 431 | DWORD Protect; 432 | VirtualProtect(&p[j], 4, PAGE_EXECUTE_READWRITE, &Protect); 433 | 434 | const enum edsound 435 | { 436 | DirectSoundCaptureCreate = 6, 437 | DirectSoundCaptureCreate8 = 12, 438 | DirectSoundCaptureEnumerateA = 7, 439 | DirectSoundCaptureEnumerateW = 8, 440 | DirectSoundCreate = 1, 441 | DirectSoundCreate8 = 11, 442 | DirectSoundEnumerateA = 2, 443 | DirectSoundEnumerateW = 3, 444 | DirectSoundFullDuplexCreate = 10, 445 | GetDeviceID = 9 446 | }; 447 | 448 | switch (IMAGE_ORDINAL(thunk->u1.Ordinal)) 449 | { 450 | case edsound::DirectSoundCaptureCreate: 451 | p[j] = _DirectSoundCaptureCreate; 452 | break; 453 | case edsound::DirectSoundCaptureCreate8: 454 | p[j] = _DirectSoundCaptureCreate8; 455 | break; 456 | case edsound::DirectSoundCaptureEnumerateA: 457 | p[j] = _DirectSoundCaptureEnumerateA; 458 | break; 459 | case edsound::DirectSoundCaptureEnumerateW: 460 | p[j] = _DirectSoundCaptureEnumerateW; 461 | break; 462 | case edsound::DirectSoundCreate: 463 | p[j] = _DirectSoundCreate; 464 | break; 465 | case edsound::DirectSoundCreate8: 466 | p[j] = _DirectSoundCreate8; 467 | break; 468 | case edsound::DirectSoundEnumerateA: 469 | p[j] = _DirectSoundEnumerateA; 470 | break; 471 | case edsound::DirectSoundEnumerateW: 472 | p[j] = _DirectSoundEnumerateW; 473 | break; 474 | case edsound::DirectSoundFullDuplexCreate: 475 | p[j] = _DirectSoundFullDuplexCreate; 476 | break; 477 | case edsound::GetDeviceID: 478 | p[j] = _GetDeviceID; 479 | break; 480 | default: 481 | break; 482 | } 483 | } 484 | else if (!_stricmp(SelfName, "DINPUT8.DLL")) 485 | { 486 | DWORD Protect; 487 | VirtualProtect(&p[j], 4, PAGE_EXECUTE_READWRITE, &Protect); 488 | 489 | if ((IMAGE_ORDINAL(thunk->u1.Ordinal)) == 1) 490 | p[j] = _DirectInput8Create; 491 | } 492 | } 493 | ++thunk; 494 | } 495 | } 496 | } 497 | } 498 | } 499 | 500 | void Init() 501 | { 502 | GetModuleFileName(hm, iniPath, MAX_PATH); 503 | *strrchr(iniPath, '\\') = '\0'; 504 | strcat_s(iniPath, "\\dllloader.ini"); 505 | 506 | auto nForceEPHook = GetPrivateProfileInt("globalsets", "forceentrypointhook", TRUE, iniPath); 507 | 508 | if (GetModuleHandle(NULL) && nForceEPHook != FALSE) 509 | { 510 | HookKernel32IAT(); 511 | } 512 | else 513 | { 514 | LoadEverything(); 515 | } 516 | } 517 | 518 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID /*lpReserved*/) 519 | { 520 | if (reason == DLL_PROCESS_ATTACH) 521 | { 522 | hm = hModule; 523 | Init(); 524 | } 525 | return TRUE; 526 | } 527 | -------------------------------------------------------------------------------- /source/dllmain.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #if X64 7 | #include 8 | #endif 9 | #if !X64 10 | #include 11 | #pragma comment(lib, "d3d9.lib") 12 | //#pragma comment(lib, "d3dx9.lib") 13 | 14 | struct vorbisfile_dll 15 | { 16 | HMODULE dll; 17 | FARPROC ov_bitrate; 18 | FARPROC ov_bitrate_instant; 19 | FARPROC ov_clear; 20 | FARPROC ov_comment; 21 | FARPROC ov_crosslap; 22 | FARPROC ov_halfrate; 23 | FARPROC ov_halfrate_p; 24 | FARPROC ov_info; 25 | FARPROC ov_open; 26 | FARPROC ov_open_callbacks; 27 | FARPROC ov_pcm_seek; 28 | FARPROC ov_pcm_seek_lap; 29 | FARPROC ov_pcm_seek_page; 30 | FARPROC ov_pcm_seek_page_lap; 31 | FARPROC ov_pcm_tell; 32 | FARPROC ov_pcm_total; 33 | FARPROC ov_raw_seek; 34 | FARPROC ov_raw_seek_lap; 35 | FARPROC ov_raw_tell; 36 | FARPROC ov_raw_total; 37 | FARPROC ov_read; 38 | FARPROC ov_read_float; 39 | FARPROC ov_seekable; 40 | FARPROC ov_serialnumber; 41 | FARPROC ov_streams; 42 | FARPROC ov_test; 43 | FARPROC ov_test_callbacks; 44 | FARPROC ov_test_open; 45 | FARPROC ov_time_seek; 46 | FARPROC ov_time_seek_lap; 47 | FARPROC ov_time_seek_page; 48 | FARPROC ov_time_seek_page_lap; 49 | FARPROC ov_time_tell; 50 | FARPROC ov_time_total; 51 | 52 | void LoadOriginalLibrary(HMODULE module) 53 | { 54 | dll = module; 55 | ov_bitrate = GetProcAddress(dll, "ov_bitrate"); 56 | ov_bitrate_instant = GetProcAddress(dll, "ov_bitrate_instant"); 57 | ov_clear = GetProcAddress(dll, "ov_clear"); 58 | ov_comment = GetProcAddress(dll, "ov_comment"); 59 | ov_crosslap = GetProcAddress(dll, "ov_crosslap"); 60 | ov_halfrate = GetProcAddress(dll, "ov_halfrate"); 61 | ov_halfrate_p = GetProcAddress(dll, "ov_halfrate_p"); 62 | ov_info = GetProcAddress(dll, "ov_info"); 63 | ov_open = GetProcAddress(dll, "ov_open"); 64 | ov_open_callbacks = GetProcAddress(dll, "ov_open_callbacks"); 65 | ov_pcm_seek = GetProcAddress(dll, "ov_pcm_seek"); 66 | ov_pcm_seek_lap = GetProcAddress(dll, "ov_pcm_seek_lap"); 67 | ov_pcm_seek_page = GetProcAddress(dll, "ov_pcm_seek_page"); 68 | ov_pcm_seek_page_lap = GetProcAddress(dll, "ov_pcm_seek_page_lap"); 69 | ov_pcm_tell = GetProcAddress(dll, "ov_pcm_tell"); 70 | ov_pcm_total = GetProcAddress(dll, "ov_pcm_total"); 71 | ov_raw_seek = GetProcAddress(dll, "ov_raw_seek"); 72 | ov_raw_seek_lap = GetProcAddress(dll, "ov_raw_seek_lap"); 73 | ov_raw_tell = GetProcAddress(dll, "ov_raw_tell"); 74 | ov_raw_total = GetProcAddress(dll, "ov_raw_total"); 75 | ov_read = GetProcAddress(dll, "ov_read"); 76 | ov_read_float = GetProcAddress(dll, "ov_read_float"); 77 | ov_seekable = GetProcAddress(dll, "ov_seekable"); 78 | ov_serialnumber = GetProcAddress(dll, "ov_serialnumber"); 79 | ov_streams = GetProcAddress(dll, "ov_streams"); 80 | ov_test = GetProcAddress(dll, "ov_test"); 81 | ov_test_callbacks = GetProcAddress(dll, "ov_test_callbacks"); 82 | ov_test_open = GetProcAddress(dll, "ov_test_open"); 83 | ov_time_seek = GetProcAddress(dll, "ov_time_seek"); 84 | ov_time_seek_lap = GetProcAddress(dll, "ov_time_seek_lap"); 85 | ov_time_seek_page = GetProcAddress(dll, "ov_time_seek_page"); 86 | ov_time_seek_page_lap = GetProcAddress(dll, "ov_time_seek_page_lap"); 87 | ov_time_tell = GetProcAddress(dll, "ov_time_tell"); 88 | ov_time_total = GetProcAddress(dll, "ov_time_total"); 89 | } 90 | } vorbisfile; 91 | #endif 92 | 93 | struct dinput8_dll 94 | { 95 | HMODULE dll; 96 | FARPROC DirectInput8Create; 97 | FARPROC DllCanUnloadNow; 98 | FARPROC DllGetClassObject; 99 | FARPROC DllRegisterServer; 100 | FARPROC DllUnregisterServer; 101 | 102 | void LoadOriginalLibrary(HMODULE module) 103 | { 104 | dll = module; 105 | DirectInput8Create = GetProcAddress(dll, "DirectInput8Create"); 106 | DllCanUnloadNow = GetProcAddress(dll, "DllCanUnloadNow"); 107 | DllGetClassObject = GetProcAddress(dll, "DllGetClassObject"); 108 | DllRegisterServer = GetProcAddress(dll, "DllRegisterServer"); 109 | DllUnregisterServer = GetProcAddress(dll, "DllUnregisterServer"); 110 | } 111 | } dinput8; 112 | 113 | struct dsound_dll 114 | { 115 | HMODULE dll; 116 | FARPROC DirectSoundCaptureCreate; 117 | FARPROC DirectSoundCaptureCreate8; 118 | FARPROC DirectSoundCaptureEnumerateA; 119 | FARPROC DirectSoundCaptureEnumerateW; 120 | FARPROC DirectSoundCreate; 121 | FARPROC DirectSoundCreate8; 122 | FARPROC DirectSoundEnumerateA; 123 | FARPROC DirectSoundEnumerateW; 124 | FARPROC DirectSoundFullDuplexCreate; 125 | FARPROC DllCanUnloadNow; 126 | FARPROC DllGetClassObject; 127 | FARPROC GetDeviceID; 128 | 129 | void LoadOriginalLibrary(HMODULE module) 130 | { 131 | dll = module; 132 | DirectSoundCaptureCreate = GetProcAddress(dll, "DirectSoundCaptureCreate"); 133 | DirectSoundCaptureCreate8 = GetProcAddress(dll, "DirectSoundCaptureCreate8"); 134 | DirectSoundCaptureEnumerateA = GetProcAddress(dll, "DirectSoundCaptureEnumerateA"); 135 | DirectSoundCaptureEnumerateW = GetProcAddress(dll, "DirectSoundCaptureEnumerateW"); 136 | DirectSoundCreate = GetProcAddress(dll, "DirectSoundCreate"); 137 | DirectSoundCreate8 = GetProcAddress(dll, "DirectSoundCreate8"); 138 | DirectSoundEnumerateA = GetProcAddress(dll, "DirectSoundEnumerateA"); 139 | DirectSoundEnumerateW = GetProcAddress(dll, "DirectSoundEnumerateW"); 140 | DirectSoundFullDuplexCreate = GetProcAddress(dll, "DirectSoundFullDuplexCreate"); 141 | DllCanUnloadNow = GetProcAddress(dll, "DllCanUnloadNow"); 142 | DllGetClassObject = GetProcAddress(dll, "DllGetClassObject"); 143 | GetDeviceID = GetProcAddress(dll, "GetDeviceID"); 144 | } 145 | } dsound; 146 | 147 | #if !X64 148 | struct dinput_dll 149 | { 150 | HMODULE dll; 151 | FARPROC DirectInputCreateA; 152 | FARPROC DirectInputCreateEx; 153 | FARPROC DirectInputCreateW; 154 | FARPROC DllCanUnloadNow; 155 | FARPROC DllGetClassObject; 156 | FARPROC DllRegisterServer; 157 | FARPROC DllUnregisterServer; 158 | 159 | void LoadOriginalLibrary(HMODULE module) 160 | { 161 | dll = module; 162 | DirectInputCreateA = GetProcAddress(dll, "DirectInputCreateA"); 163 | DirectInputCreateEx = GetProcAddress(dll, "DirectInputCreateEx"); 164 | DirectInputCreateW = GetProcAddress(dll, "DirectInputCreateW"); 165 | DllCanUnloadNow = GetProcAddress(dll, "DllCanUnloadNow"); 166 | DllGetClassObject = GetProcAddress(dll, "DllGetClassObject"); 167 | DllRegisterServer = GetProcAddress(dll, "DllRegisterServer"); 168 | DllUnregisterServer = GetProcAddress(dll, "DllUnregisterServer"); 169 | } 170 | } dinput; 171 | 172 | struct d3d8_dll 173 | { 174 | HMODULE dll; 175 | FARPROC DebugSetMute; 176 | FARPROC Direct3D8EnableMaximizedWindowedModeShim; 177 | FARPROC Direct3DCreate8; 178 | FARPROC ValidatePixelShader; 179 | FARPROC ValidateVertexShader; 180 | 181 | void LoadOriginalLibrary(HMODULE module) 182 | { 183 | dll = module; 184 | DebugSetMute = GetProcAddress(dll, "DebugSetMute"); 185 | Direct3D8EnableMaximizedWindowedModeShim = GetProcAddress(dll, "Direct3D8EnableMaximizedWindowedModeShim"); 186 | Direct3DCreate8 = GetProcAddress(dll, "Direct3DCreate8"); 187 | ValidatePixelShader = GetProcAddress(dll, "ValidatePixelShader"); 188 | ValidateVertexShader = GetProcAddress(dll, "ValidateVertexShader"); 189 | } 190 | } d3d8; 191 | 192 | struct d3d9_dll 193 | { 194 | HMODULE dll; 195 | FARPROC D3DPERF_BeginEvent; 196 | FARPROC D3DPERF_EndEvent; 197 | FARPROC D3DPERF_GetStatus; 198 | FARPROC D3DPERF_QueryRepeatFrame; 199 | FARPROC D3DPERF_SetMarker; 200 | FARPROC D3DPERF_SetOptions; 201 | FARPROC D3DPERF_SetRegion; 202 | FARPROC DebugSetLevel; 203 | FARPROC DebugSetMute; 204 | FARPROC Direct3D9EnableMaximizedWindowedModeShim; 205 | FARPROC Direct3DCreate9; 206 | FARPROC Direct3DCreate9Ex; 207 | FARPROC Direct3DShaderValidatorCreate9; 208 | FARPROC PSGPError; 209 | FARPROC PSGPSampleTexture; 210 | 211 | void LoadOriginalLibrary(HMODULE module) 212 | { 213 | dll = module; 214 | D3DPERF_BeginEvent = GetProcAddress(dll, "D3DPERF_BeginEvent"); 215 | D3DPERF_EndEvent = GetProcAddress(dll, "D3DPERF_EndEvent"); 216 | D3DPERF_GetStatus = GetProcAddress(dll, "D3DPERF_GetStatus"); 217 | D3DPERF_QueryRepeatFrame = GetProcAddress(dll, "D3DPERF_QueryRepeatFrame"); 218 | D3DPERF_SetMarker = GetProcAddress(dll, "D3DPERF_SetMarker"); 219 | D3DPERF_SetOptions = GetProcAddress(dll, "D3DPERF_SetOptions"); 220 | D3DPERF_SetRegion = GetProcAddress(dll, "D3DPERF_SetRegion"); 221 | DebugSetLevel = GetProcAddress(dll, "DebugSetLevel"); 222 | DebugSetMute = GetProcAddress(dll, "DebugSetMute"); 223 | Direct3D9EnableMaximizedWindowedModeShim = GetProcAddress(dll, "Direct3D9EnableMaximizedWindowedModeShim"); 224 | Direct3DCreate9 = GetProcAddress(dll, "Direct3DCreate9"); 225 | Direct3DCreate9Ex = GetProcAddress(dll, "Direct3DCreate9Ex"); 226 | Direct3DShaderValidatorCreate9 = GetProcAddress(dll, "Direct3DShaderValidatorCreate9"); 227 | PSGPError = GetProcAddress(dll, "PSGPError"); 228 | PSGPSampleTexture = GetProcAddress(dll, "PSGPSampleTexture"); 229 | } 230 | } d3d9; 231 | 232 | struct d3d11_dll 233 | { 234 | HMODULE dll; 235 | FARPROC D3D11CoreCreateDevice; 236 | FARPROC D3D11CoreCreateLayeredDevice; 237 | FARPROC D3D11CoreGetLayeredDeviceSize; 238 | FARPROC D3D11CoreRegisterLayers; 239 | FARPROC D3D11CreateDevice; 240 | FARPROC D3D11CreateDeviceAndSwapChain; 241 | FARPROC D3DKMTCloseAdapter; 242 | FARPROC D3DKMTCreateAllocation; 243 | FARPROC D3DKMTCreateContext; 244 | FARPROC D3DKMTCreateDevice; 245 | FARPROC D3DKMTCreateSynchronizationObject; 246 | FARPROC D3DKMTDestroyAllocation; 247 | FARPROC D3DKMTDestroyContext; 248 | FARPROC D3DKMTDestroyDevice; 249 | FARPROC D3DKMTDestroySynchronizationObject; 250 | FARPROC D3DKMTEscape; 251 | FARPROC D3DKMTGetContextSchedulingPriority; 252 | FARPROC D3DKMTGetDeviceState; 253 | FARPROC D3DKMTGetDisplayModeList; 254 | FARPROC D3DKMTGetMultisampleMethodList; 255 | FARPROC D3DKMTGetRuntimeData; 256 | FARPROC D3DKMTGetSharedPrimaryHandle; 257 | FARPROC D3DKMTLock; 258 | FARPROC D3DKMTOpenAdapterFromHdc; 259 | FARPROC D3DKMTOpenResource; 260 | FARPROC D3DKMTPresent; 261 | FARPROC D3DKMTQueryAdapterInfo; 262 | FARPROC D3DKMTQueryAllocationResidency; 263 | FARPROC D3DKMTQueryResourceInfo; 264 | FARPROC D3DKMTRender; 265 | FARPROC D3DKMTSetAllocationPriority; 266 | FARPROC D3DKMTSetContextSchedulingPriority; 267 | FARPROC D3DKMTSetDisplayMode; 268 | FARPROC D3DKMTSetDisplayPrivateDriverFormat; 269 | FARPROC D3DKMTSetGammaRamp; 270 | FARPROC D3DKMTSetVidPnSourceOwner; 271 | FARPROC D3DKMTSignalSynchronizationObject; 272 | FARPROC D3DKMTUnlock; 273 | FARPROC D3DKMTWaitForSynchronizationObject; 274 | FARPROC D3DKMTWaitForVerticalBlankEvent; 275 | FARPROC D3DPerformance_BeginEvent; 276 | FARPROC D3DPerformance_EndEvent; 277 | FARPROC D3DPerformance_GetStatus; 278 | FARPROC D3DPerformance_SetMarker; 279 | FARPROC EnableFeatureLevelUpgrade; 280 | FARPROC OpenAdapter10; 281 | FARPROC OpenAdapter10_2; 282 | 283 | void LoadOriginalLibrary(HMODULE module) 284 | { 285 | dll = module; 286 | D3D11CoreCreateDevice = GetProcAddress(dll, "D3D11CoreCreateDevice"); 287 | D3D11CoreCreateLayeredDevice = GetProcAddress(dll, "D3D11CoreCreateLayeredDevice"); 288 | D3D11CoreGetLayeredDeviceSize = GetProcAddress(dll, "D3D11CoreGetLayeredDeviceSize"); 289 | D3D11CoreRegisterLayers = GetProcAddress(dll, "D3D11CoreRegisterLayers"); 290 | D3D11CreateDevice = GetProcAddress(dll, "D3D11CreateDevice"); 291 | D3D11CreateDeviceAndSwapChain = GetProcAddress(dll, "D3D11CreateDeviceAndSwapChain"); 292 | D3DKMTCloseAdapter = GetProcAddress(dll, "D3DKMTCloseAdapter"); 293 | D3DKMTCreateAllocation = GetProcAddress(dll, "D3DKMTCreateAllocation"); 294 | D3DKMTCreateContext = GetProcAddress(dll, "D3DKMTCreateContext"); 295 | D3DKMTCreateDevice = GetProcAddress(dll, "D3DKMTCreateDevice"); 296 | D3DKMTCreateSynchronizationObject = GetProcAddress(dll, "D3DKMTCreateSynchronizationObject"); 297 | D3DKMTDestroyAllocation = GetProcAddress(dll, "D3DKMTDestroyAllocation"); 298 | D3DKMTDestroyContext = GetProcAddress(dll, "D3DKMTDestroyContext"); 299 | D3DKMTDestroyDevice = GetProcAddress(dll, "D3DKMTDestroyDevice"); 300 | D3DKMTDestroySynchronizationObject = GetProcAddress(dll, "D3DKMTDestroySynchronizationObject"); 301 | D3DKMTEscape = GetProcAddress(dll, "D3DKMTEscape"); 302 | D3DKMTGetContextSchedulingPriority = GetProcAddress(dll, "D3DKMTGetContextSchedulingPriority"); 303 | D3DKMTGetDeviceState = GetProcAddress(dll, "D3DKMTGetDeviceState"); 304 | D3DKMTGetDisplayModeList = GetProcAddress(dll, "D3DKMTGetDisplayModeList"); 305 | D3DKMTGetMultisampleMethodList = GetProcAddress(dll, "D3DKMTGetMultisampleMethodList"); 306 | D3DKMTGetRuntimeData = GetProcAddress(dll, "D3DKMTGetRuntimeData"); 307 | D3DKMTGetSharedPrimaryHandle = GetProcAddress(dll, "D3DKMTGetSharedPrimaryHandle"); 308 | D3DKMTLock = GetProcAddress(dll, "D3DKMTLock"); 309 | D3DKMTOpenAdapterFromHdc = GetProcAddress(dll, "D3DKMTOpenAdapterFromHdc"); 310 | D3DKMTOpenResource = GetProcAddress(dll, "D3DKMTOpenResource"); 311 | D3DKMTPresent = GetProcAddress(dll, "D3DKMTPresent"); 312 | D3DKMTQueryAdapterInfo = GetProcAddress(dll, "D3DKMTQueryAdapterInfo"); 313 | D3DKMTQueryAllocationResidency = GetProcAddress(dll, "D3DKMTQueryAllocationResidency"); 314 | D3DKMTQueryResourceInfo = GetProcAddress(dll, "D3DKMTQueryResourceInfo"); 315 | D3DKMTRender = GetProcAddress(dll, "D3DKMTRender"); 316 | D3DKMTSetAllocationPriority = GetProcAddress(dll, "D3DKMTSetAllocationPriority"); 317 | D3DKMTSetContextSchedulingPriority = GetProcAddress(dll, "D3DKMTSetContextSchedulingPriority"); 318 | D3DKMTSetDisplayMode = GetProcAddress(dll, "D3DKMTSetDisplayMode"); 319 | D3DKMTSetDisplayPrivateDriverFormat = GetProcAddress(dll, "D3DKMTSetDisplayPrivateDriverFormat"); 320 | D3DKMTSetGammaRamp = GetProcAddress(dll, "D3DKMTSetGammaRamp"); 321 | D3DKMTSetVidPnSourceOwner = GetProcAddress(dll, "D3DKMTSetVidPnSourceOwner"); 322 | D3DKMTSignalSynchronizationObject = GetProcAddress(dll, "D3DKMTSignalSynchronizationObject"); 323 | D3DKMTUnlock = GetProcAddress(dll, "D3DKMTUnlock"); 324 | D3DKMTWaitForSynchronizationObject = GetProcAddress(dll, "D3DKMTWaitForSynchronizationObject"); 325 | D3DKMTWaitForVerticalBlankEvent = GetProcAddress(dll, "D3DKMTWaitForVerticalBlankEvent"); 326 | D3DPerformance_BeginEvent = GetProcAddress(dll, "D3DPerformance_BeginEvent"); 327 | D3DPerformance_EndEvent = GetProcAddress(dll, "D3DPerformance_EndEvent"); 328 | D3DPerformance_GetStatus = GetProcAddress(dll, "D3DPerformance_GetStatus"); 329 | D3DPerformance_SetMarker = GetProcAddress(dll, "D3DPerformance_SetMarker"); 330 | EnableFeatureLevelUpgrade = GetProcAddress(dll, "EnableFeatureLevelUpgrade"); 331 | OpenAdapter10 = GetProcAddress(dll, "OpenAdapter10"); 332 | OpenAdapter10_2 = GetProcAddress(dll, "OpenAdapter10_2"); 333 | } 334 | } d3d11; 335 | 336 | struct ddraw_dll 337 | { 338 | HMODULE dll; 339 | FARPROC AcquireDDThreadLock; 340 | FARPROC CompleteCreateSysmemSurface; 341 | FARPROC D3DParseUnknownCommand; 342 | FARPROC DDGetAttachedSurfaceLcl; 343 | FARPROC DDInternalLock; 344 | FARPROC DDInternalUnlock; 345 | FARPROC DSoundHelp; 346 | FARPROC DirectDrawCreate; 347 | FARPROC DirectDrawCreateClipper; 348 | FARPROC DirectDrawCreateEx; 349 | FARPROC DirectDrawEnumerateA; 350 | FARPROC DirectDrawEnumerateExA; 351 | FARPROC DirectDrawEnumerateExW; 352 | FARPROC DirectDrawEnumerateW; 353 | FARPROC DllCanUnloadNow; 354 | FARPROC DllGetClassObject; 355 | FARPROC GetDDSurfaceLocal; 356 | FARPROC GetOLEThunkData; 357 | FARPROC GetSurfaceFromDC; 358 | FARPROC RegisterSpecialCase; 359 | FARPROC ReleaseDDThreadLock; 360 | FARPROC SetAppCompatData; 361 | 362 | void LoadOriginalLibrary(HMODULE module) 363 | { 364 | dll = module; 365 | AcquireDDThreadLock = GetProcAddress(dll, "AcquireDDThreadLock"); 366 | CompleteCreateSysmemSurface = GetProcAddress(dll, "CompleteCreateSysmemSurface"); 367 | D3DParseUnknownCommand = GetProcAddress(dll, "D3DParseUnknownCommand"); 368 | DDGetAttachedSurfaceLcl = GetProcAddress(dll, "DDGetAttachedSurfaceLcl"); 369 | DDInternalLock = GetProcAddress(dll, "DDInternalLock"); 370 | DDInternalUnlock = GetProcAddress(dll, "DDInternalUnlock"); 371 | DSoundHelp = GetProcAddress(dll, "DSoundHelp"); 372 | DirectDrawCreate = GetProcAddress(dll, "DirectDrawCreate"); 373 | DirectDrawCreateClipper = GetProcAddress(dll, "DirectDrawCreateClipper"); 374 | DirectDrawCreateEx = GetProcAddress(dll, "DirectDrawCreateEx"); 375 | DirectDrawEnumerateA = GetProcAddress(dll, "DirectDrawEnumerateA"); 376 | DirectDrawEnumerateExA = GetProcAddress(dll, "DirectDrawEnumerateExA"); 377 | DirectDrawEnumerateExW = GetProcAddress(dll, "DirectDrawEnumerateExW"); 378 | DirectDrawEnumerateW = GetProcAddress(dll, "DirectDrawEnumerateW"); 379 | DllCanUnloadNow = GetProcAddress(dll, "DllCanUnloadNow"); 380 | DllGetClassObject = GetProcAddress(dll, "DllGetClassObject"); 381 | GetDDSurfaceLocal = GetProcAddress(dll, "GetDDSurfaceLocal"); 382 | GetOLEThunkData = GetProcAddress(dll, "GetOLEThunkData"); 383 | GetSurfaceFromDC = GetProcAddress(dll, "GetSurfaceFromDC"); 384 | RegisterSpecialCase = GetProcAddress(dll, "RegisterSpecialCase"); 385 | ReleaseDDThreadLock = GetProcAddress(dll, "ReleaseDDThreadLock"); 386 | SetAppCompatData = GetProcAddress(dll, "SetAppCompatData"); 387 | } 388 | } ddraw; 389 | 390 | struct winmmbase_dll 391 | { 392 | HMODULE dll; 393 | FARPROC CloseDriver; 394 | FARPROC DefDriverProc; 395 | FARPROC DriverCallback; 396 | FARPROC DrvGetModuleHandle; 397 | FARPROC GetDriverModuleHandle; 398 | FARPROC OpenDriver; 399 | FARPROC SendDriverMessage; 400 | FARPROC auxGetDevCapsA; 401 | FARPROC auxGetDevCapsW; 402 | FARPROC auxGetNumDevs; 403 | FARPROC auxGetVolume; 404 | FARPROC auxOutMessage; 405 | FARPROC auxSetVolume; 406 | FARPROC joyConfigChanged; 407 | FARPROC joyGetDevCapsA; 408 | FARPROC joyGetDevCapsW; 409 | FARPROC joyGetNumDevs; 410 | FARPROC joyGetPos; 411 | FARPROC joyGetPosEx; 412 | FARPROC joyGetThreshold; 413 | FARPROC joyReleaseCapture; 414 | FARPROC joySetCapture; 415 | FARPROC joySetThreshold; 416 | FARPROC midiConnect; 417 | FARPROC midiDisconnect; 418 | FARPROC midiInAddBuffer; 419 | FARPROC midiInClose; 420 | FARPROC midiInGetDevCapsA; 421 | FARPROC midiInGetDevCapsW; 422 | FARPROC midiInGetErrorTextA; 423 | FARPROC midiInGetErrorTextW; 424 | FARPROC midiInGetID; 425 | FARPROC midiInGetNumDevs; 426 | FARPROC midiInMessage; 427 | FARPROC midiInOpen; 428 | FARPROC midiInPrepareHeader; 429 | FARPROC midiInReset; 430 | FARPROC midiInStart; 431 | FARPROC midiInStop; 432 | FARPROC midiInUnprepareHeader; 433 | FARPROC midiOutCacheDrumPatches; 434 | FARPROC midiOutCachePatches; 435 | FARPROC midiOutClose; 436 | FARPROC midiOutGetDevCapsA; 437 | FARPROC midiOutGetDevCapsW; 438 | FARPROC midiOutGetErrorTextA; 439 | FARPROC midiOutGetErrorTextW; 440 | FARPROC midiOutGetID; 441 | FARPROC midiOutGetNumDevs; 442 | FARPROC midiOutGetVolume; 443 | FARPROC midiOutLongMsg; 444 | FARPROC midiOutMessage; 445 | FARPROC midiOutOpen; 446 | FARPROC midiOutPrepareHeader; 447 | FARPROC midiOutReset; 448 | FARPROC midiOutSetVolume; 449 | FARPROC midiOutShortMsg; 450 | FARPROC midiOutUnprepareHeader; 451 | FARPROC midiStreamClose; 452 | FARPROC midiStreamOpen; 453 | FARPROC midiStreamOut; 454 | FARPROC midiStreamPause; 455 | FARPROC midiStreamPosition; 456 | FARPROC midiStreamProperty; 457 | FARPROC midiStreamRestart; 458 | FARPROC midiStreamStop; 459 | FARPROC mixerClose; 460 | FARPROC mixerGetControlDetailsA; 461 | FARPROC mixerGetControlDetailsW; 462 | FARPROC mixerGetDevCapsA; 463 | FARPROC mixerGetDevCapsW; 464 | FARPROC mixerGetID; 465 | FARPROC mixerGetLineControlsA; 466 | FARPROC mixerGetLineControlsW; 467 | FARPROC mixerGetLineInfoA; 468 | FARPROC mixerGetLineInfoW; 469 | FARPROC mixerGetNumDevs; 470 | FARPROC mixerMessage; 471 | FARPROC mixerOpen; 472 | FARPROC mixerSetControlDetails; 473 | FARPROC mmDrvInstall; 474 | FARPROC mmGetCurrentTask; 475 | FARPROC mmTaskBlock; 476 | FARPROC mmTaskCreate; 477 | FARPROC mmTaskSignal; 478 | FARPROC mmTaskYield; 479 | FARPROC mmioAdvance; 480 | FARPROC mmioAscend; 481 | FARPROC mmioClose; 482 | FARPROC mmioCreateChunk; 483 | FARPROC mmioDescend; 484 | FARPROC mmioFlush; 485 | FARPROC mmioGetInfo; 486 | FARPROC mmioInstallIOProcA; 487 | FARPROC mmioInstallIOProcW; 488 | FARPROC mmioOpenA; 489 | FARPROC mmioOpenW; 490 | FARPROC mmioRead; 491 | FARPROC mmioRenameA; 492 | FARPROC mmioRenameW; 493 | FARPROC mmioSeek; 494 | FARPROC mmioSendMessage; 495 | FARPROC mmioSetBuffer; 496 | FARPROC mmioSetInfo; 497 | FARPROC mmioStringToFOURCCA; 498 | FARPROC mmioStringToFOURCCW; 499 | FARPROC mmioWrite; 500 | FARPROC sndOpenSound; 501 | FARPROC waveInAddBuffer; 502 | FARPROC waveInClose; 503 | FARPROC waveInGetDevCapsA; 504 | FARPROC waveInGetDevCapsW; 505 | FARPROC waveInGetErrorTextA; 506 | FARPROC waveInGetErrorTextW; 507 | FARPROC waveInGetID; 508 | FARPROC waveInGetNumDevs; 509 | FARPROC waveInGetPosition; 510 | FARPROC waveInMessage; 511 | FARPROC waveInOpen; 512 | FARPROC waveInPrepareHeader; 513 | FARPROC waveInReset; 514 | FARPROC waveInStart; 515 | FARPROC waveInStop; 516 | FARPROC waveInUnprepareHeader; 517 | FARPROC waveOutBreakLoop; 518 | FARPROC waveOutClose; 519 | FARPROC waveOutGetDevCapsA; 520 | FARPROC waveOutGetDevCapsW; 521 | FARPROC waveOutGetErrorTextA; 522 | FARPROC waveOutGetErrorTextW; 523 | FARPROC waveOutGetID; 524 | FARPROC waveOutGetNumDevs; 525 | FARPROC waveOutGetPitch; 526 | FARPROC waveOutGetPlaybackRate; 527 | FARPROC waveOutGetPosition; 528 | FARPROC waveOutGetVolume; 529 | FARPROC waveOutMessage; 530 | FARPROC waveOutOpen; 531 | FARPROC waveOutPause; 532 | FARPROC waveOutPrepareHeader; 533 | FARPROC waveOutReset; 534 | FARPROC waveOutRestart; 535 | FARPROC waveOutSetPitch; 536 | FARPROC waveOutSetPlaybackRate; 537 | FARPROC waveOutSetVolume; 538 | FARPROC waveOutUnprepareHeader; 539 | FARPROC waveOutWrite; 540 | FARPROC winmmbaseFreeMMEHandles; 541 | FARPROC winmmbaseGetWOWHandle; 542 | FARPROC winmmbaseHandle32FromHandle16; 543 | FARPROC winmmbaseSetWOWHandle; 544 | 545 | void LoadOriginalLibrary(HMODULE module) 546 | { 547 | dll = module; 548 | CloseDriver = GetProcAddress(dll, "CloseDriver"); 549 | DefDriverProc = GetProcAddress(dll, "DefDriverProc"); 550 | DriverCallback = GetProcAddress(dll, "DriverCallback"); 551 | DrvGetModuleHandle = GetProcAddress(dll, "DrvGetModuleHandle"); 552 | GetDriverModuleHandle = GetProcAddress(dll, "GetDriverModuleHandle"); 553 | OpenDriver = GetProcAddress(dll, "OpenDriver"); 554 | SendDriverMessage = GetProcAddress(dll, "SendDriverMessage"); 555 | auxGetDevCapsA = GetProcAddress(dll, "auxGetDevCapsA"); 556 | auxGetDevCapsW = GetProcAddress(dll, "auxGetDevCapsW"); 557 | auxGetNumDevs = GetProcAddress(dll, "auxGetNumDevs"); 558 | auxGetVolume = GetProcAddress(dll, "auxGetVolume"); 559 | auxOutMessage = GetProcAddress(dll, "auxOutMessage"); 560 | auxSetVolume = GetProcAddress(dll, "auxSetVolume"); 561 | joyConfigChanged = GetProcAddress(dll, "joyConfigChanged"); 562 | joyGetDevCapsA = GetProcAddress(dll, "joyGetDevCapsA"); 563 | joyGetDevCapsW = GetProcAddress(dll, "joyGetDevCapsW"); 564 | joyGetNumDevs = GetProcAddress(dll, "joyGetNumDevs"); 565 | joyGetPos = GetProcAddress(dll, "joyGetPos"); 566 | joyGetPosEx = GetProcAddress(dll, "joyGetPosEx"); 567 | joyGetThreshold = GetProcAddress(dll, "joyGetThreshold"); 568 | joyReleaseCapture = GetProcAddress(dll, "joyReleaseCapture"); 569 | joySetCapture = GetProcAddress(dll, "joySetCapture"); 570 | joySetThreshold = GetProcAddress(dll, "joySetThreshold"); 571 | midiConnect = GetProcAddress(dll, "midiConnect"); 572 | midiDisconnect = GetProcAddress(dll, "midiDisconnect"); 573 | midiInAddBuffer = GetProcAddress(dll, "midiInAddBuffer"); 574 | midiInClose = GetProcAddress(dll, "midiInClose"); 575 | midiInGetDevCapsA = GetProcAddress(dll, "midiInGetDevCapsA"); 576 | midiInGetDevCapsW = GetProcAddress(dll, "midiInGetDevCapsW"); 577 | midiInGetErrorTextA = GetProcAddress(dll, "midiInGetErrorTextA"); 578 | midiInGetErrorTextW = GetProcAddress(dll, "midiInGetErrorTextW"); 579 | midiInGetID = GetProcAddress(dll, "midiInGetID"); 580 | midiInGetNumDevs = GetProcAddress(dll, "midiInGetNumDevs"); 581 | midiInMessage = GetProcAddress(dll, "midiInMessage"); 582 | midiInOpen = GetProcAddress(dll, "midiInOpen"); 583 | midiInPrepareHeader = GetProcAddress(dll, "midiInPrepareHeader"); 584 | midiInReset = GetProcAddress(dll, "midiInReset"); 585 | midiInStart = GetProcAddress(dll, "midiInStart"); 586 | midiInStop = GetProcAddress(dll, "midiInStop"); 587 | midiInUnprepareHeader = GetProcAddress(dll, "midiInUnprepareHeader"); 588 | midiOutCacheDrumPatches = GetProcAddress(dll, "midiOutCacheDrumPatches"); 589 | midiOutCachePatches = GetProcAddress(dll, "midiOutCachePatches"); 590 | midiOutClose = GetProcAddress(dll, "midiOutClose"); 591 | midiOutGetDevCapsA = GetProcAddress(dll, "midiOutGetDevCapsA"); 592 | midiOutGetDevCapsW = GetProcAddress(dll, "midiOutGetDevCapsW"); 593 | midiOutGetErrorTextA = GetProcAddress(dll, "midiOutGetErrorTextA"); 594 | midiOutGetErrorTextW = GetProcAddress(dll, "midiOutGetErrorTextW"); 595 | midiOutGetID = GetProcAddress(dll, "midiOutGetID"); 596 | midiOutGetNumDevs = GetProcAddress(dll, "midiOutGetNumDevs"); 597 | midiOutGetVolume = GetProcAddress(dll, "midiOutGetVolume"); 598 | midiOutLongMsg = GetProcAddress(dll, "midiOutLongMsg"); 599 | midiOutMessage = GetProcAddress(dll, "midiOutMessage"); 600 | midiOutOpen = GetProcAddress(dll, "midiOutOpen"); 601 | midiOutPrepareHeader = GetProcAddress(dll, "midiOutPrepareHeader"); 602 | midiOutReset = GetProcAddress(dll, "midiOutReset"); 603 | midiOutSetVolume = GetProcAddress(dll, "midiOutSetVolume"); 604 | midiOutShortMsg = GetProcAddress(dll, "midiOutShortMsg"); 605 | midiOutUnprepareHeader = GetProcAddress(dll, "midiOutUnprepareHeader"); 606 | midiStreamClose = GetProcAddress(dll, "midiStreamClose"); 607 | midiStreamOpen = GetProcAddress(dll, "midiStreamOpen"); 608 | midiStreamOut = GetProcAddress(dll, "midiStreamOut"); 609 | midiStreamPause = GetProcAddress(dll, "midiStreamPause"); 610 | midiStreamPosition = GetProcAddress(dll, "midiStreamPosition"); 611 | midiStreamProperty = GetProcAddress(dll, "midiStreamProperty"); 612 | midiStreamRestart = GetProcAddress(dll, "midiStreamRestart"); 613 | midiStreamStop = GetProcAddress(dll, "midiStreamStop"); 614 | mixerClose = GetProcAddress(dll, "mixerClose"); 615 | mixerGetControlDetailsA = GetProcAddress(dll, "mixerGetControlDetailsA"); 616 | mixerGetControlDetailsW = GetProcAddress(dll, "mixerGetControlDetailsW"); 617 | mixerGetDevCapsA = GetProcAddress(dll, "mixerGetDevCapsA"); 618 | mixerGetDevCapsW = GetProcAddress(dll, "mixerGetDevCapsW"); 619 | mixerGetID = GetProcAddress(dll, "mixerGetID"); 620 | mixerGetLineControlsA = GetProcAddress(dll, "mixerGetLineControlsA"); 621 | mixerGetLineControlsW = GetProcAddress(dll, "mixerGetLineControlsW"); 622 | mixerGetLineInfoA = GetProcAddress(dll, "mixerGetLineInfoA"); 623 | mixerGetLineInfoW = GetProcAddress(dll, "mixerGetLineInfoW"); 624 | mixerGetNumDevs = GetProcAddress(dll, "mixerGetNumDevs"); 625 | mixerMessage = GetProcAddress(dll, "mixerMessage"); 626 | mixerOpen = GetProcAddress(dll, "mixerOpen"); 627 | mixerSetControlDetails = GetProcAddress(dll, "mixerSetControlDetails"); 628 | mmDrvInstall = GetProcAddress(dll, "mmDrvInstall"); 629 | mmGetCurrentTask = GetProcAddress(dll, "mmGetCurrentTask"); 630 | mmTaskBlock = GetProcAddress(dll, "mmTaskBlock"); 631 | mmTaskCreate = GetProcAddress(dll, "mmTaskCreate"); 632 | mmTaskSignal = GetProcAddress(dll, "mmTaskSignal"); 633 | mmTaskYield = GetProcAddress(dll, "mmTaskYield"); 634 | mmioAdvance = GetProcAddress(dll, "mmioAdvance"); 635 | mmioAscend = GetProcAddress(dll, "mmioAscend"); 636 | mmioClose = GetProcAddress(dll, "mmioClose"); 637 | mmioCreateChunk = GetProcAddress(dll, "mmioCreateChunk"); 638 | mmioDescend = GetProcAddress(dll, "mmioDescend"); 639 | mmioFlush = GetProcAddress(dll, "mmioFlush"); 640 | mmioGetInfo = GetProcAddress(dll, "mmioGetInfo"); 641 | mmioInstallIOProcA = GetProcAddress(dll, "mmioInstallIOProcA"); 642 | mmioInstallIOProcW = GetProcAddress(dll, "mmioInstallIOProcW"); 643 | mmioOpenA = GetProcAddress(dll, "mmioOpenA"); 644 | mmioOpenW = GetProcAddress(dll, "mmioOpenW"); 645 | mmioRead = GetProcAddress(dll, "mmioRead"); 646 | mmioRenameA = GetProcAddress(dll, "mmioRenameA"); 647 | mmioRenameW = GetProcAddress(dll, "mmioRenameW"); 648 | mmioSeek = GetProcAddress(dll, "mmioSeek"); 649 | mmioSendMessage = GetProcAddress(dll, "mmioSendMessage"); 650 | mmioSetBuffer = GetProcAddress(dll, "mmioSetBuffer"); 651 | mmioSetInfo = GetProcAddress(dll, "mmioSetInfo"); 652 | mmioStringToFOURCCA = GetProcAddress(dll, "mmioStringToFOURCCA"); 653 | mmioStringToFOURCCW = GetProcAddress(dll, "mmioStringToFOURCCW"); 654 | mmioWrite = GetProcAddress(dll, "mmioWrite"); 655 | sndOpenSound = GetProcAddress(dll, "sndOpenSound"); 656 | waveInAddBuffer = GetProcAddress(dll, "waveInAddBuffer"); 657 | waveInClose = GetProcAddress(dll, "waveInClose"); 658 | waveInGetDevCapsA = GetProcAddress(dll, "waveInGetDevCapsA"); 659 | waveInGetDevCapsW = GetProcAddress(dll, "waveInGetDevCapsW"); 660 | waveInGetErrorTextA = GetProcAddress(dll, "waveInGetErrorTextA"); 661 | waveInGetErrorTextW = GetProcAddress(dll, "waveInGetErrorTextW"); 662 | waveInGetID = GetProcAddress(dll, "waveInGetID"); 663 | waveInGetNumDevs = GetProcAddress(dll, "waveInGetNumDevs"); 664 | waveInGetPosition = GetProcAddress(dll, "waveInGetPosition"); 665 | waveInMessage = GetProcAddress(dll, "waveInMessage"); 666 | waveInOpen = GetProcAddress(dll, "waveInOpen"); 667 | waveInPrepareHeader = GetProcAddress(dll, "waveInPrepareHeader"); 668 | waveInReset = GetProcAddress(dll, "waveInReset"); 669 | waveInStart = GetProcAddress(dll, "waveInStart"); 670 | waveInStop = GetProcAddress(dll, "waveInStop"); 671 | waveInUnprepareHeader = GetProcAddress(dll, "waveInUnprepareHeader"); 672 | waveOutBreakLoop = GetProcAddress(dll, "waveOutBreakLoop"); 673 | waveOutClose = GetProcAddress(dll, "waveOutClose"); 674 | waveOutGetDevCapsA = GetProcAddress(dll, "waveOutGetDevCapsA"); 675 | waveOutGetDevCapsW = GetProcAddress(dll, "waveOutGetDevCapsW"); 676 | waveOutGetErrorTextA = GetProcAddress(dll, "waveOutGetErrorTextA"); 677 | waveOutGetErrorTextW = GetProcAddress(dll, "waveOutGetErrorTextW"); 678 | waveOutGetID = GetProcAddress(dll, "waveOutGetID"); 679 | waveOutGetNumDevs = GetProcAddress(dll, "waveOutGetNumDevs"); 680 | waveOutGetPitch = GetProcAddress(dll, "waveOutGetPitch"); 681 | waveOutGetPlaybackRate = GetProcAddress(dll, "waveOutGetPlaybackRate"); 682 | waveOutGetPosition = GetProcAddress(dll, "waveOutGetPosition"); 683 | waveOutGetVolume = GetProcAddress(dll, "waveOutGetVolume"); 684 | waveOutMessage = GetProcAddress(dll, "waveOutMessage"); 685 | waveOutOpen = GetProcAddress(dll, "waveOutOpen"); 686 | waveOutPause = GetProcAddress(dll, "waveOutPause"); 687 | waveOutPrepareHeader = GetProcAddress(dll, "waveOutPrepareHeader"); 688 | waveOutReset = GetProcAddress(dll, "waveOutReset"); 689 | waveOutRestart = GetProcAddress(dll, "waveOutRestart"); 690 | waveOutSetPitch = GetProcAddress(dll, "waveOutSetPitch"); 691 | waveOutSetPlaybackRate = GetProcAddress(dll, "waveOutSetPlaybackRate"); 692 | waveOutSetVolume = GetProcAddress(dll, "waveOutSetVolume"); 693 | waveOutUnprepareHeader = GetProcAddress(dll, "waveOutUnprepareHeader"); 694 | waveOutWrite = GetProcAddress(dll, "waveOutWrite"); 695 | winmmbaseFreeMMEHandles = GetProcAddress(dll, "winmmbaseFreeMMEHandles"); 696 | winmmbaseGetWOWHandle = GetProcAddress(dll, "winmmbaseGetWOWHandle"); 697 | winmmbaseHandle32FromHandle16 = GetProcAddress(dll, "winmmbaseHandle32FromHandle16"); 698 | winmmbaseSetWOWHandle = GetProcAddress(dll, "winmmbaseSetWOWHandle"); 699 | } 700 | } winmmbase; 701 | 702 | struct msacm32_dll 703 | { 704 | HMODULE dll; 705 | FARPROC acmDriverAddA; 706 | FARPROC acmDriverAddW; 707 | FARPROC acmDriverClose; 708 | FARPROC acmDriverDetailsA; 709 | FARPROC acmDriverDetailsW; 710 | FARPROC acmDriverEnum; 711 | FARPROC acmDriverID; 712 | FARPROC acmDriverMessage; 713 | FARPROC acmDriverOpen; 714 | FARPROC acmDriverPriority; 715 | FARPROC acmDriverRemove; 716 | FARPROC acmFilterChooseA; 717 | FARPROC acmFilterChooseW; 718 | FARPROC acmFilterDetailsA; 719 | FARPROC acmFilterDetailsW; 720 | FARPROC acmFilterEnumA; 721 | FARPROC acmFilterEnumW; 722 | FARPROC acmFilterTagDetailsA; 723 | FARPROC acmFilterTagDetailsW; 724 | FARPROC acmFilterTagEnumA; 725 | FARPROC acmFilterTagEnumW; 726 | FARPROC acmFormatChooseA; 727 | FARPROC acmFormatChooseW; 728 | FARPROC acmFormatDetailsA; 729 | FARPROC acmFormatDetailsW; 730 | FARPROC acmFormatEnumA; 731 | FARPROC acmFormatEnumW; 732 | FARPROC acmFormatSuggest; 733 | FARPROC acmFormatTagDetailsA; 734 | FARPROC acmFormatTagDetailsW; 735 | FARPROC acmFormatTagEnumA; 736 | FARPROC acmFormatTagEnumW; 737 | FARPROC acmGetVersion; 738 | FARPROC acmMetrics; 739 | FARPROC acmStreamClose; 740 | FARPROC acmStreamConvert; 741 | FARPROC acmStreamMessage; 742 | FARPROC acmStreamOpen; 743 | FARPROC acmStreamPrepareHeader; 744 | FARPROC acmStreamReset; 745 | FARPROC acmStreamSize; 746 | FARPROC acmStreamUnprepareHeader; 747 | 748 | void LoadOriginalLibrary(HMODULE module) 749 | { 750 | dll = module; 751 | acmDriverAddA = GetProcAddress(dll, "acmDriverAddA"); 752 | acmDriverAddW = GetProcAddress(dll, "acmDriverAddW"); 753 | acmDriverClose = GetProcAddress(dll, "acmDriverClose"); 754 | acmDriverDetailsA = GetProcAddress(dll, "acmDriverDetailsA"); 755 | acmDriverDetailsW = GetProcAddress(dll, "acmDriverDetailsW"); 756 | acmDriverEnum = GetProcAddress(dll, "acmDriverEnum"); 757 | acmDriverID = GetProcAddress(dll, "acmDriverID"); 758 | acmDriverMessage = GetProcAddress(dll, "acmDriverMessage"); 759 | acmDriverOpen = GetProcAddress(dll, "acmDriverOpen"); 760 | acmDriverPriority = GetProcAddress(dll, "acmDriverPriority"); 761 | acmDriverRemove = GetProcAddress(dll, "acmDriverRemove"); 762 | acmFilterChooseA = GetProcAddress(dll, "acmFilterChooseA"); 763 | acmFilterChooseW = GetProcAddress(dll, "acmFilterChooseW"); 764 | acmFilterDetailsA = GetProcAddress(dll, "acmFilterDetailsA"); 765 | acmFilterDetailsW = GetProcAddress(dll, "acmFilterDetailsW"); 766 | acmFilterEnumA = GetProcAddress(dll, "acmFilterEnumA"); 767 | acmFilterEnumW = GetProcAddress(dll, "acmFilterEnumW"); 768 | acmFilterTagDetailsA = GetProcAddress(dll, "acmFilterTagDetailsA"); 769 | acmFilterTagDetailsW = GetProcAddress(dll, "acmFilterTagDetailsW"); 770 | acmFilterTagEnumA = GetProcAddress(dll, "acmFilterTagEnumA"); 771 | acmFilterTagEnumW = GetProcAddress(dll, "acmFilterTagEnumW"); 772 | acmFormatChooseA = GetProcAddress(dll, "acmFormatChooseA"); 773 | acmFormatChooseW = GetProcAddress(dll, "acmFormatChooseW"); 774 | acmFormatDetailsA = GetProcAddress(dll, "acmFormatDetailsA"); 775 | acmFormatDetailsW = GetProcAddress(dll, "acmFormatDetailsW"); 776 | acmFormatEnumA = GetProcAddress(dll, "acmFormatEnumA"); 777 | acmFormatEnumW = GetProcAddress(dll, "acmFormatEnumW"); 778 | acmFormatSuggest = GetProcAddress(dll, "acmFormatSuggest"); 779 | acmFormatTagDetailsA = GetProcAddress(dll, "acmFormatTagDetailsA"); 780 | acmFormatTagDetailsW = GetProcAddress(dll, "acmFormatTagDetailsW"); 781 | acmFormatTagEnumA = GetProcAddress(dll, "acmFormatTagEnumA"); 782 | acmFormatTagEnumW = GetProcAddress(dll, "acmFormatTagEnumW"); 783 | acmGetVersion = GetProcAddress(dll, "acmGetVersion"); 784 | acmMetrics = GetProcAddress(dll, "acmMetrics"); 785 | acmStreamClose = GetProcAddress(dll, "acmStreamClose"); 786 | acmStreamConvert = GetProcAddress(dll, "acmStreamConvert"); 787 | acmStreamMessage = GetProcAddress(dll, "acmStreamMessage"); 788 | acmStreamOpen = GetProcAddress(dll, "acmStreamOpen"); 789 | acmStreamPrepareHeader = GetProcAddress(dll, "acmStreamPrepareHeader"); 790 | acmStreamReset = GetProcAddress(dll, "acmStreamReset"); 791 | acmStreamSize = GetProcAddress(dll, "acmStreamSize"); 792 | acmStreamUnprepareHeader = GetProcAddress(dll, "acmStreamUnprepareHeader"); 793 | } 794 | } msacm32; 795 | 796 | struct msvfw32_dll 797 | { 798 | HMODULE dll; 799 | FARPROC DrawDibBegin; 800 | FARPROC DrawDibChangePalette; 801 | FARPROC DrawDibClose; 802 | FARPROC DrawDibDraw; 803 | FARPROC DrawDibEnd; 804 | FARPROC DrawDibGetBuffer; 805 | FARPROC DrawDibGetPalette; 806 | FARPROC DrawDibOpen; 807 | FARPROC DrawDibProfileDisplay; 808 | FARPROC DrawDibRealize; 809 | FARPROC DrawDibSetPalette; 810 | FARPROC DrawDibStart; 811 | FARPROC DrawDibStop; 812 | FARPROC DrawDibTime; 813 | FARPROC GetOpenFileNamePreview; 814 | FARPROC GetOpenFileNamePreviewA; 815 | FARPROC GetOpenFileNamePreviewW; 816 | FARPROC GetSaveFileNamePreviewA; 817 | FARPROC GetSaveFileNamePreviewW; 818 | FARPROC ICClose; 819 | FARPROC ICCompress; 820 | FARPROC ICCompressorChoose; 821 | FARPROC ICCompressorFree; 822 | FARPROC ICDecompress; 823 | FARPROC ICDraw; 824 | FARPROC ICDrawBegin; 825 | FARPROC ICGetDisplayFormat; 826 | FARPROC ICGetInfo; 827 | FARPROC ICImageCompress; 828 | FARPROC ICImageDecompress; 829 | FARPROC ICInfo; 830 | FARPROC ICInstall; 831 | FARPROC ICLocate; 832 | FARPROC ICMThunk32; 833 | FARPROC ICOpen; 834 | FARPROC ICOpenFunction; 835 | FARPROC ICRemove; 836 | FARPROC ICSendMessage; 837 | FARPROC ICSeqCompressFrame; 838 | FARPROC ICSeqCompressFrameEnd; 839 | FARPROC ICSeqCompressFrameStart; 840 | FARPROC MCIWndCreate; 841 | FARPROC MCIWndCreateA; 842 | FARPROC MCIWndCreateW; 843 | FARPROC MCIWndRegisterClass; 844 | FARPROC StretchDIB; 845 | FARPROC VideoForWindowsVersion; 846 | 847 | void LoadOriginalLibrary(HMODULE module) 848 | { 849 | dll = module; 850 | DrawDibBegin = GetProcAddress(dll, "DrawDibBegin"); 851 | DrawDibChangePalette = GetProcAddress(dll, "DrawDibChangePalette"); 852 | DrawDibClose = GetProcAddress(dll, "DrawDibClose"); 853 | DrawDibDraw = GetProcAddress(dll, "DrawDibDraw"); 854 | DrawDibEnd = GetProcAddress(dll, "DrawDibEnd"); 855 | DrawDibGetBuffer = GetProcAddress(dll, "DrawDibGetBuffer"); 856 | DrawDibGetPalette = GetProcAddress(dll, "DrawDibGetPalette"); 857 | DrawDibOpen = GetProcAddress(dll, "DrawDibOpen"); 858 | DrawDibProfileDisplay = GetProcAddress(dll, "DrawDibProfileDisplay"); 859 | DrawDibRealize = GetProcAddress(dll, "DrawDibRealize"); 860 | DrawDibSetPalette = GetProcAddress(dll, "DrawDibSetPalette"); 861 | DrawDibStart = GetProcAddress(dll, "DrawDibStart"); 862 | DrawDibStop = GetProcAddress(dll, "DrawDibStop"); 863 | DrawDibTime = GetProcAddress(dll, "DrawDibTime"); 864 | GetOpenFileNamePreview = GetProcAddress(dll, "GetOpenFileNamePreview"); 865 | GetOpenFileNamePreviewA = GetProcAddress(dll, "GetOpenFileNamePreviewA"); 866 | GetOpenFileNamePreviewW = GetProcAddress(dll, "GetOpenFileNamePreviewW"); 867 | GetSaveFileNamePreviewA = GetProcAddress(dll, "GetSaveFileNamePreviewA"); 868 | GetSaveFileNamePreviewW = GetProcAddress(dll, "GetSaveFileNamePreviewW"); 869 | ICClose = GetProcAddress(dll, "ICClose"); 870 | ICCompress = GetProcAddress(dll, "ICCompress"); 871 | ICCompressorChoose = GetProcAddress(dll, "ICCompressorChoose"); 872 | ICCompressorFree = GetProcAddress(dll, "ICCompressorFree"); 873 | ICDecompress = GetProcAddress(dll, "ICDecompress"); 874 | ICDraw = GetProcAddress(dll, "ICDraw"); 875 | ICDrawBegin = GetProcAddress(dll, "ICDrawBegin"); 876 | ICGetDisplayFormat = GetProcAddress(dll, "ICGetDisplayFormat"); 877 | ICGetInfo = GetProcAddress(dll, "ICGetInfo"); 878 | ICImageCompress = GetProcAddress(dll, "ICImageCompress"); 879 | ICImageDecompress = GetProcAddress(dll, "ICImageDecompress"); 880 | ICInfo = GetProcAddress(dll, "ICInfo"); 881 | ICInstall = GetProcAddress(dll, "ICInstall"); 882 | ICLocate = GetProcAddress(dll, "ICLocate"); 883 | ICMThunk32 = GetProcAddress(dll, "ICMThunk32"); 884 | ICOpen = GetProcAddress(dll, "ICOpen"); 885 | ICOpenFunction = GetProcAddress(dll, "ICOpenFunction"); 886 | ICRemove = GetProcAddress(dll, "ICRemove"); 887 | ICSendMessage = GetProcAddress(dll, "ICSendMessage"); 888 | ICSeqCompressFrame = GetProcAddress(dll, "ICSeqCompressFrame"); 889 | ICSeqCompressFrameEnd = GetProcAddress(dll, "ICSeqCompressFrameEnd"); 890 | ICSeqCompressFrameStart = GetProcAddress(dll, "ICSeqCompressFrameStart"); 891 | MCIWndCreate = GetProcAddress(dll, "MCIWndCreate"); 892 | MCIWndCreateA = GetProcAddress(dll, "MCIWndCreateA"); 893 | MCIWndCreateW = GetProcAddress(dll, "MCIWndCreateW"); 894 | MCIWndRegisterClass = GetProcAddress(dll, "MCIWndRegisterClass"); 895 | StretchDIB = GetProcAddress(dll, "StretchDIB"); 896 | VideoForWindowsVersion = GetProcAddress(dll, "VideoForWindowsVersion"); 897 | } 898 | } msvfw32; 899 | 900 | 901 | __declspec(naked) void _ov_bitrate() { _asm { jmp[vorbisfile.ov_bitrate] } } 902 | __declspec(naked) void _ov_bitrate_instant() { _asm { jmp[vorbisfile.ov_bitrate_instant] } } 903 | __declspec(naked) void _ov_clear() { _asm { jmp[vorbisfile.ov_clear] } } 904 | __declspec(naked) void _ov_comment() { _asm { jmp[vorbisfile.ov_comment] } } 905 | __declspec(naked) void _ov_crosslap() { _asm { jmp[vorbisfile.ov_crosslap] } } 906 | __declspec(naked) void _ov_halfrate() { _asm { jmp[vorbisfile.ov_halfrate] } } 907 | __declspec(naked) void _ov_halfrate_p() { _asm { jmp[vorbisfile.ov_halfrate_p] } } 908 | __declspec(naked) void _ov_info() { _asm { jmp[vorbisfile.ov_info] } } 909 | __declspec(naked) void _ov_open() { _asm { jmp[vorbisfile.ov_open] } } 910 | __declspec(naked) void _ov_open_callbacks() { _asm { jmp[vorbisfile.ov_open_callbacks] } } 911 | __declspec(naked) void _ov_pcm_seek() { _asm { jmp[vorbisfile.ov_pcm_seek] } } 912 | __declspec(naked) void _ov_pcm_seek_lap() { _asm { jmp[vorbisfile.ov_pcm_seek_lap] } } 913 | __declspec(naked) void _ov_pcm_seek_page() { _asm { jmp[vorbisfile.ov_pcm_seek_page] } } 914 | __declspec(naked) void _ov_pcm_seek_page_lap() { _asm { jmp[vorbisfile.ov_pcm_seek_page_lap] } } 915 | __declspec(naked) void _ov_pcm_tell() { _asm { jmp[vorbisfile.ov_pcm_tell] } } 916 | __declspec(naked) void _ov_pcm_total() { _asm { jmp[vorbisfile.ov_pcm_total] } } 917 | __declspec(naked) void _ov_raw_seek() { _asm { jmp[vorbisfile.ov_raw_seek] } } 918 | __declspec(naked) void _ov_raw_seek_lap() { _asm { jmp[vorbisfile.ov_raw_seek_lap] } } 919 | __declspec(naked) void _ov_raw_tell() { _asm { jmp[vorbisfile.ov_raw_tell] } } 920 | __declspec(naked) void _ov_raw_total() { _asm { jmp[vorbisfile.ov_raw_total] } } 921 | __declspec(naked) void _ov_read() { _asm { jmp[vorbisfile.ov_read] } } 922 | __declspec(naked) void _ov_read_float() { _asm { jmp[vorbisfile.ov_read_float] } } 923 | __declspec(naked) void _ov_seekable() { _asm { jmp[vorbisfile.ov_seekable] } } 924 | __declspec(naked) void _ov_serialnumber() { _asm { jmp[vorbisfile.ov_serialnumber] } } 925 | __declspec(naked) void _ov_streams() { _asm { jmp[vorbisfile.ov_streams] } } 926 | __declspec(naked) void _ov_test() { _asm { jmp[vorbisfile.ov_test] } } 927 | __declspec(naked) void _ov_test_callbacks() { _asm { jmp[vorbisfile.ov_test_callbacks] } } 928 | __declspec(naked) void _ov_test_open() { _asm { jmp[vorbisfile.ov_test_open] } } 929 | __declspec(naked) void _ov_time_seek() { _asm { jmp[vorbisfile.ov_time_seek] } } 930 | __declspec(naked) void _ov_time_seek_lap() { _asm { jmp[vorbisfile.ov_time_seek_lap] } } 931 | __declspec(naked) void _ov_time_seek_page() { _asm { jmp[vorbisfile.ov_time_seek_page] } } 932 | __declspec(naked) void _ov_time_seek_page_lap() { _asm { jmp[vorbisfile.ov_time_seek_page_lap] } } 933 | __declspec(naked) void _ov_time_tell() { _asm { jmp[vorbisfile.ov_time_tell] } } 934 | __declspec(naked) void _ov_time_total() { _asm { jmp[vorbisfile.ov_time_total] } } 935 | 936 | __declspec(naked) void _DirectInput8Create() { _asm { jmp[dinput8.DirectInput8Create] } } 937 | 938 | __declspec(naked) void _DirectInputCreateA() { _asm { jmp[dinput.DirectInputCreateA] } } 939 | __declspec(naked) void _DirectInputCreateEx() { _asm { jmp[dinput.DirectInputCreateEx] } } 940 | __declspec(naked) void _DirectInputCreateW() { _asm { jmp[dinput.DirectInputCreateW] } } 941 | 942 | __declspec(naked) void _DllCanUnloadNow() 943 | { 944 | if (dinput8.DllCanUnloadNow) 945 | _asm { jmp[dinput8.DllCanUnloadNow] } 946 | else 947 | if (dsound.DllCanUnloadNow) 948 | _asm { jmp[dsound.DllCanUnloadNow] } 949 | else 950 | if (ddraw.DllCanUnloadNow) 951 | _asm { jmp[ddraw.DllCanUnloadNow] } 952 | } 953 | __declspec(naked) void _DllGetClassObject() 954 | { 955 | if (dinput8.DllGetClassObject) 956 | _asm { jmp[dinput8.DllGetClassObject] } 957 | else 958 | if (dsound.DllGetClassObject) 959 | _asm { jmp[dsound.DllGetClassObject] } 960 | else 961 | if (ddraw.DllGetClassObject) 962 | _asm { jmp[ddraw.DllGetClassObject] } 963 | } 964 | 965 | __declspec(naked) void _DllRegisterServer() 966 | { 967 | if (dinput8.DllRegisterServer) 968 | _asm { jmp[dinput8.DllRegisterServer] } 969 | else 970 | if (dinput.DllRegisterServer) 971 | _asm { jmp[dinput8.DllRegisterServer] } 972 | } 973 | 974 | __declspec(naked) void _DllUnregisterServer() 975 | { 976 | if (dinput8.DllUnregisterServer) 977 | _asm { jmp[dinput8.DllUnregisterServer] } 978 | else 979 | if (dinput.DllUnregisterServer) 980 | _asm { jmp[dinput8.DllUnregisterServer] } 981 | } 982 | 983 | __declspec(naked) void _DirectSoundCaptureCreate() { _asm { jmp[dsound.DirectSoundCaptureCreate] } } 984 | __declspec(naked) void _DirectSoundCaptureCreate8() { _asm { jmp[dsound.DirectSoundCaptureCreate8] } } 985 | __declspec(naked) void _DirectSoundCaptureEnumerateA() { _asm { jmp[dsound.DirectSoundCaptureEnumerateA] } } 986 | __declspec(naked) void _DirectSoundCaptureEnumerateW() { _asm { jmp[dsound.DirectSoundCaptureEnumerateW] } } 987 | __declspec(naked) void _DirectSoundCreate() { _asm { jmp[dsound.DirectSoundCreate] } } 988 | __declspec(naked) void _DirectSoundCreate8() { _asm { jmp[dsound.DirectSoundCreate8] } } 989 | __declspec(naked) void _DirectSoundEnumerateA() { _asm { jmp[dsound.DirectSoundEnumerateA] } } 990 | __declspec(naked) void _DirectSoundEnumerateW() { _asm { jmp[dsound.DirectSoundEnumerateW] } } 991 | __declspec(naked) void _DirectSoundFullDuplexCreate() { _asm { jmp[dsound.DirectSoundFullDuplexCreate] } } 992 | //__declspec(naked) void _DllCanUnloadNow() { _asm { jmp[dsound.DllCanUnloadNow] } } 993 | //__declspec(naked) void _DllGetClassObject() { _asm { jmp[dsound.DllGetClassObject] } } 994 | __declspec(naked) void _GetDeviceID() { _asm { jmp[dsound.GetDeviceID] } } 995 | 996 | __declspec(naked) void _DebugSetMute() 997 | { 998 | if (d3d8.DebugSetMute) 999 | _asm { jmp[d3d8.DebugSetMute] } 1000 | else 1001 | if (d3d9.DebugSetMute) 1002 | _asm { jmp[d3d9.DebugSetMute] } 1003 | } 1004 | __declspec(naked) void _Direct3D8EnableMaximizedWindowedModeShim() { _asm { jmp[d3d8.Direct3D8EnableMaximizedWindowedModeShim] } } 1005 | __declspec(naked) void _Direct3DCreate8() { _asm { jmp[d3d8.Direct3DCreate8] } } 1006 | __declspec(naked) void _ValidatePixelShader() { _asm { jmp[d3d8.ValidatePixelShader] } } 1007 | __declspec(naked) void _ValidateVertexShader() { _asm { jmp[d3d8.ValidateVertexShader] } } 1008 | 1009 | __declspec(naked) void _D3DPERF_BeginEvent() { _asm { jmp[d3d9.D3DPERF_BeginEvent] } } 1010 | __declspec(naked) void _D3DPERF_EndEvent() { _asm { jmp[d3d9.D3DPERF_EndEvent] } } 1011 | __declspec(naked) void _D3DPERF_GetStatus() { _asm { jmp[d3d9.D3DPERF_GetStatus] } } 1012 | __declspec(naked) void _D3DPERF_QueryRepeatFrame() { _asm { jmp[d3d9.D3DPERF_QueryRepeatFrame] } } 1013 | __declspec(naked) void _D3DPERF_SetMarker() { _asm { jmp[d3d9.D3DPERF_SetMarker] } } 1014 | __declspec(naked) void _D3DPERF_SetOptions() { _asm { jmp[d3d9.D3DPERF_SetOptions] } } 1015 | __declspec(naked) void _D3DPERF_SetRegion() { _asm { jmp[d3d9.D3DPERF_SetRegion] } } 1016 | __declspec(naked) void _DebugSetLevel() { _asm { jmp[d3d9.DebugSetLevel] } } 1017 | //__declspec(naked) void _DebugSetMute() { _asm { jmp[d3d9.DebugSetMute] } } 1018 | __declspec(naked) void _Direct3D9EnableMaximizedWindowedModeShim() { _asm { jmp[d3d9.Direct3D9EnableMaximizedWindowedModeShim] } } 1019 | __declspec(naked) void _Direct3DCreate9() { _asm { jmp[d3d9.Direct3DCreate9] } } 1020 | __declspec(naked) void _Direct3DCreate9Ex() { _asm { jmp[d3d9.Direct3DCreate9Ex] } } 1021 | __declspec(naked) void _Direct3DShaderValidatorCreate9() { _asm { jmp[d3d9.Direct3DShaderValidatorCreate9] } } 1022 | __declspec(naked) void _PSGPError() { _asm { jmp[d3d9.PSGPError] } } 1023 | __declspec(naked) void _PSGPSampleTexture() { _asm { jmp[d3d9.PSGPSampleTexture] } } 1024 | 1025 | __declspec(naked) void _D3D11CoreCreateDevice() { _asm { jmp[d3d11.D3D11CoreCreateDevice] } } 1026 | __declspec(naked) void _D3D11CoreCreateLayeredDevice() { _asm { jmp[d3d11.D3D11CoreCreateLayeredDevice] } } 1027 | __declspec(naked) void _D3D11CoreGetLayeredDeviceSize() { _asm { jmp[d3d11.D3D11CoreGetLayeredDeviceSize] } } 1028 | __declspec(naked) void _D3D11CoreRegisterLayers() { _asm { jmp[d3d11.D3D11CoreRegisterLayers] } } 1029 | __declspec(naked) void _D3D11CreateDevice() { _asm { jmp[d3d11.D3D11CreateDevice] } } 1030 | __declspec(naked) void _D3D11CreateDeviceAndSwapChain() { _asm { jmp[d3d11.D3D11CreateDeviceAndSwapChain] } } 1031 | __declspec(naked) void _D3DKMTCloseAdapter() { _asm { jmp[d3d11.D3DKMTCloseAdapter] } } 1032 | __declspec(naked) void _D3DKMTCreateAllocation() { _asm { jmp[d3d11.D3DKMTCreateAllocation] } } 1033 | __declspec(naked) void _D3DKMTCreateContext() { _asm { jmp[d3d11.D3DKMTCreateContext] } } 1034 | __declspec(naked) void _D3DKMTCreateDevice() { _asm { jmp[d3d11.D3DKMTCreateDevice] } } 1035 | __declspec(naked) void _D3DKMTCreateSynchronizationObject() { _asm { jmp[d3d11.D3DKMTCreateSynchronizationObject] } } 1036 | __declspec(naked) void _D3DKMTDestroyAllocation() { _asm { jmp[d3d11.D3DKMTDestroyAllocation] } } 1037 | __declspec(naked) void _D3DKMTDestroyContext() { _asm { jmp[d3d11.D3DKMTDestroyContext] } } 1038 | __declspec(naked) void _D3DKMTDestroyDevice() { _asm { jmp[d3d11.D3DKMTDestroyDevice] } } 1039 | __declspec(naked) void _D3DKMTDestroySynchronizationObject() { _asm { jmp[d3d11.D3DKMTDestroySynchronizationObject] } } 1040 | __declspec(naked) void _D3DKMTEscape() { _asm { jmp[d3d11.D3DKMTEscape] } } 1041 | __declspec(naked) void _D3DKMTGetContextSchedulingPriority() { _asm { jmp[d3d11.D3DKMTGetContextSchedulingPriority] } } 1042 | __declspec(naked) void _D3DKMTGetDeviceState() { _asm { jmp[d3d11.D3DKMTGetDeviceState] } } 1043 | __declspec(naked) void _D3DKMTGetDisplayModeList() { _asm { jmp[d3d11.D3DKMTGetDisplayModeList] } } 1044 | __declspec(naked) void _D3DKMTGetMultisampleMethodList() { _asm { jmp[d3d11.D3DKMTGetMultisampleMethodList] } } 1045 | __declspec(naked) void _D3DKMTGetRuntimeData() { _asm { jmp[d3d11.D3DKMTGetRuntimeData] } } 1046 | __declspec(naked) void _D3DKMTGetSharedPrimaryHandle() { _asm { jmp[d3d11.D3DKMTGetSharedPrimaryHandle] } } 1047 | __declspec(naked) void _D3DKMTLock() { _asm { jmp[d3d11.D3DKMTLock] } } 1048 | __declspec(naked) void _D3DKMTOpenAdapterFromHdc() { _asm { jmp[d3d11.D3DKMTOpenAdapterFromHdc] } } 1049 | __declspec(naked) void _D3DKMTOpenResource() { _asm { jmp[d3d11.D3DKMTOpenResource] } } 1050 | __declspec(naked) void _D3DKMTPresent() { _asm { jmp[d3d11.D3DKMTPresent] } } 1051 | __declspec(naked) void _D3DKMTQueryAdapterInfo() { _asm { jmp[d3d11.D3DKMTQueryAdapterInfo] } } 1052 | __declspec(naked) void _D3DKMTQueryAllocationResidency() { _asm { jmp[d3d11.D3DKMTQueryAllocationResidency] } } 1053 | __declspec(naked) void _D3DKMTQueryResourceInfo() { _asm { jmp[d3d11.D3DKMTQueryResourceInfo] } } 1054 | __declspec(naked) void _D3DKMTRender() { _asm { jmp[d3d11.D3DKMTRender] } } 1055 | __declspec(naked) void _D3DKMTSetAllocationPriority() { _asm { jmp[d3d11.D3DKMTSetAllocationPriority] } } 1056 | __declspec(naked) void _D3DKMTSetContextSchedulingPriority() { _asm { jmp[d3d11.D3DKMTSetContextSchedulingPriority] } } 1057 | __declspec(naked) void _D3DKMTSetDisplayMode() { _asm { jmp[d3d11.D3DKMTSetDisplayMode] } } 1058 | __declspec(naked) void _D3DKMTSetDisplayPrivateDriverFormat() { _asm { jmp[d3d11.D3DKMTSetDisplayPrivateDriverFormat] } } 1059 | __declspec(naked) void _D3DKMTSetGammaRamp() { _asm { jmp[d3d11.D3DKMTSetGammaRamp] } } 1060 | __declspec(naked) void _D3DKMTSetVidPnSourceOwner() { _asm { jmp[d3d11.D3DKMTSetVidPnSourceOwner] } } 1061 | __declspec(naked) void _D3DKMTSignalSynchronizationObject() { _asm { jmp[d3d11.D3DKMTSignalSynchronizationObject] } } 1062 | __declspec(naked) void _D3DKMTUnlock() { _asm { jmp[d3d11.D3DKMTUnlock] } } 1063 | __declspec(naked) void _D3DKMTWaitForSynchronizationObject() { _asm { jmp[d3d11.D3DKMTWaitForSynchronizationObject] } } 1064 | __declspec(naked) void _D3DKMTWaitForVerticalBlankEvent() { _asm { jmp[d3d11.D3DKMTWaitForVerticalBlankEvent] } } 1065 | __declspec(naked) void _D3DPerformance_BeginEvent() { _asm { jmp[d3d11.D3DPerformance_BeginEvent] } } 1066 | __declspec(naked) void _D3DPerformance_EndEvent() { _asm { jmp[d3d11.D3DPerformance_EndEvent] } } 1067 | __declspec(naked) void _D3DPerformance_GetStatus() { _asm { jmp[d3d11.D3DPerformance_GetStatus] } } 1068 | __declspec(naked) void _D3DPerformance_SetMarker() { _asm { jmp[d3d11.D3DPerformance_SetMarker] } } 1069 | __declspec(naked) void _EnableFeatureLevelUpgrade() { _asm { jmp[d3d11.EnableFeatureLevelUpgrade] } } 1070 | __declspec(naked) void _OpenAdapter10() { _asm { jmp[d3d11.OpenAdapter10] } } 1071 | __declspec(naked) void _OpenAdapter10_2() { _asm { jmp[d3d11.OpenAdapter10_2] } } 1072 | 1073 | __declspec(naked) void _AcquireDDThreadLock() { _asm { jmp[ddraw.AcquireDDThreadLock] } } 1074 | __declspec(naked) void _CompleteCreateSysmemSurface() { _asm { jmp[ddraw.CompleteCreateSysmemSurface] } } 1075 | __declspec(naked) void _D3DParseUnknownCommand() { _asm { jmp[ddraw.D3DParseUnknownCommand] } } 1076 | __declspec(naked) void _DDGetAttachedSurfaceLcl() { _asm { jmp[ddraw.DDGetAttachedSurfaceLcl] } } 1077 | __declspec(naked) void _DDInternalLock() { _asm { jmp[ddraw.DDInternalLock] } } 1078 | __declspec(naked) void _DDInternalUnlock() { _asm { jmp[ddraw.DDInternalUnlock] } } 1079 | __declspec(naked) void _DSoundHelp() { _asm { jmp[ddraw.DSoundHelp] } } 1080 | __declspec(naked) void _DirectDrawCreate() { _asm { jmp[ddraw.DirectDrawCreate] } } 1081 | __declspec(naked) void _DirectDrawCreateClipper() { _asm { jmp[ddraw.DirectDrawCreateClipper] } } 1082 | __declspec(naked) void _DirectDrawCreateEx() { _asm { jmp[ddraw.DirectDrawCreateEx] } } 1083 | __declspec(naked) void _DirectDrawEnumerateA() { _asm { jmp[ddraw.DirectDrawEnumerateA] } } 1084 | __declspec(naked) void _DirectDrawEnumerateExA() { _asm { jmp[ddraw.DirectDrawEnumerateExA] } } 1085 | __declspec(naked) void _DirectDrawEnumerateExW() { _asm { jmp[ddraw.DirectDrawEnumerateExW] } } 1086 | __declspec(naked) void _DirectDrawEnumerateW() { _asm { jmp[ddraw.DirectDrawEnumerateW] } } 1087 | //__declspec(naked) void _DllCanUnloadNow() { _asm { jmp[ddraw.DllCanUnloadNow] } } 1088 | //__declspec(naked) void _DllGetClassObject() { _asm { jmp[ddraw.DllGetClassObject] } } 1089 | __declspec(naked) void _GetDDSurfaceLocal() { _asm { jmp[ddraw.GetDDSurfaceLocal] } } 1090 | __declspec(naked) void _GetOLEThunkData() { _asm { jmp[ddraw.GetOLEThunkData] } } 1091 | __declspec(naked) void _GetSurfaceFromDC() { _asm { jmp[ddraw.GetSurfaceFromDC] } } 1092 | __declspec(naked) void _RegisterSpecialCase() { _asm { jmp[ddraw.RegisterSpecialCase] } } 1093 | __declspec(naked) void _ReleaseDDThreadLock() { _asm { jmp[ddraw.ReleaseDDThreadLock] } } 1094 | __declspec(naked) void _SetAppCompatData() { _asm { jmp[ddraw.SetAppCompatData] } } 1095 | 1096 | __declspec(naked) void _CloseDriver() { _asm { jmp[winmmbase.CloseDriver] } } 1097 | __declspec(naked) void _DefDriverProc() { _asm { jmp[winmmbase.DefDriverProc] } } 1098 | __declspec(naked) void _DriverCallback() { _asm { jmp[winmmbase.DriverCallback] } } 1099 | __declspec(naked) void _DrvGetModuleHandle() { _asm { jmp[winmmbase.DrvGetModuleHandle] } } 1100 | __declspec(naked) void _GetDriverModuleHandle() { _asm { jmp[winmmbase.GetDriverModuleHandle] } } 1101 | __declspec(naked) void _OpenDriver() { _asm { jmp[winmmbase.OpenDriver] } } 1102 | __declspec(naked) void _SendDriverMessage() { _asm { jmp[winmmbase.SendDriverMessage] } } 1103 | __declspec(naked) void _auxGetDevCapsA() { _asm { jmp[winmmbase.auxGetDevCapsA] } } 1104 | __declspec(naked) void _auxGetDevCapsW() { _asm { jmp[winmmbase.auxGetDevCapsW] } } 1105 | __declspec(naked) void _auxGetNumDevs() { _asm { jmp[winmmbase.auxGetNumDevs] } } 1106 | __declspec(naked) void _auxGetVolume() { _asm { jmp[winmmbase.auxGetVolume] } } 1107 | __declspec(naked) void _auxOutMessage() { _asm { jmp[winmmbase.auxOutMessage] } } 1108 | __declspec(naked) void _auxSetVolume() { _asm { jmp[winmmbase.auxSetVolume] } } 1109 | __declspec(naked) void _joyConfigChanged() { _asm { jmp[winmmbase.joyConfigChanged] } } 1110 | __declspec(naked) void _joyGetDevCapsA() { _asm { jmp[winmmbase.joyGetDevCapsA] } } 1111 | __declspec(naked) void _joyGetDevCapsW() { _asm { jmp[winmmbase.joyGetDevCapsW] } } 1112 | __declspec(naked) void _joyGetNumDevs() { _asm { jmp[winmmbase.joyGetNumDevs] } } 1113 | __declspec(naked) void _joyGetPos() { _asm { jmp[winmmbase.joyGetPos] } } 1114 | __declspec(naked) void _joyGetPosEx() { _asm { jmp[winmmbase.joyGetPosEx] } } 1115 | __declspec(naked) void _joyGetThreshold() { _asm { jmp[winmmbase.joyGetThreshold] } } 1116 | __declspec(naked) void _joyReleaseCapture() { _asm { jmp[winmmbase.joyReleaseCapture] } } 1117 | __declspec(naked) void _joySetCapture() { _asm { jmp[winmmbase.joySetCapture] } } 1118 | __declspec(naked) void _joySetThreshold() { _asm { jmp[winmmbase.joySetThreshold] } } 1119 | __declspec(naked) void _midiConnect() { _asm { jmp[winmmbase.midiConnect] } } 1120 | __declspec(naked) void _midiDisconnect() { _asm { jmp[winmmbase.midiDisconnect] } } 1121 | __declspec(naked) void _midiInAddBuffer() { _asm { jmp[winmmbase.midiInAddBuffer] } } 1122 | __declspec(naked) void _midiInClose() { _asm { jmp[winmmbase.midiInClose] } } 1123 | __declspec(naked) void _midiInGetDevCapsA() { _asm { jmp[winmmbase.midiInGetDevCapsA] } } 1124 | __declspec(naked) void _midiInGetDevCapsW() { _asm { jmp[winmmbase.midiInGetDevCapsW] } } 1125 | __declspec(naked) void _midiInGetErrorTextA() { _asm { jmp[winmmbase.midiInGetErrorTextA] } } 1126 | __declspec(naked) void _midiInGetErrorTextW() { _asm { jmp[winmmbase.midiInGetErrorTextW] } } 1127 | __declspec(naked) void _midiInGetID() { _asm { jmp[winmmbase.midiInGetID] } } 1128 | __declspec(naked) void _midiInGetNumDevs() { _asm { jmp[winmmbase.midiInGetNumDevs] } } 1129 | __declspec(naked) void _midiInMessage() { _asm { jmp[winmmbase.midiInMessage] } } 1130 | __declspec(naked) void _midiInOpen() { _asm { jmp[winmmbase.midiInOpen] } } 1131 | __declspec(naked) void _midiInPrepareHeader() { _asm { jmp[winmmbase.midiInPrepareHeader] } } 1132 | __declspec(naked) void _midiInReset() { _asm { jmp[winmmbase.midiInReset] } } 1133 | __declspec(naked) void _midiInStart() { _asm { jmp[winmmbase.midiInStart] } } 1134 | __declspec(naked) void _midiInStop() { _asm { jmp[winmmbase.midiInStop] } } 1135 | __declspec(naked) void _midiInUnprepareHeader() { _asm { jmp[winmmbase.midiInUnprepareHeader] } } 1136 | __declspec(naked) void _midiOutCacheDrumPatches() { _asm { jmp[winmmbase.midiOutCacheDrumPatches] } } 1137 | __declspec(naked) void _midiOutCachePatches() { _asm { jmp[winmmbase.midiOutCachePatches] } } 1138 | __declspec(naked) void _midiOutClose() { _asm { jmp[winmmbase.midiOutClose] } } 1139 | __declspec(naked) void _midiOutGetDevCapsA() { _asm { jmp[winmmbase.midiOutGetDevCapsA] } } 1140 | __declspec(naked) void _midiOutGetDevCapsW() { _asm { jmp[winmmbase.midiOutGetDevCapsW] } } 1141 | __declspec(naked) void _midiOutGetErrorTextA() { _asm { jmp[winmmbase.midiOutGetErrorTextA] } } 1142 | __declspec(naked) void _midiOutGetErrorTextW() { _asm { jmp[winmmbase.midiOutGetErrorTextW] } } 1143 | __declspec(naked) void _midiOutGetID() { _asm { jmp[winmmbase.midiOutGetID] } } 1144 | __declspec(naked) void _midiOutGetNumDevs() { _asm { jmp[winmmbase.midiOutGetNumDevs] } } 1145 | __declspec(naked) void _midiOutGetVolume() { _asm { jmp[winmmbase.midiOutGetVolume] } } 1146 | __declspec(naked) void _midiOutLongMsg() { _asm { jmp[winmmbase.midiOutLongMsg] } } 1147 | __declspec(naked) void _midiOutMessage() { _asm { jmp[winmmbase.midiOutMessage] } } 1148 | __declspec(naked) void _midiOutOpen() { _asm { jmp[winmmbase.midiOutOpen] } } 1149 | __declspec(naked) void _midiOutPrepareHeader() { _asm { jmp[winmmbase.midiOutPrepareHeader] } } 1150 | __declspec(naked) void _midiOutReset() { _asm { jmp[winmmbase.midiOutReset] } } 1151 | __declspec(naked) void _midiOutSetVolume() { _asm { jmp[winmmbase.midiOutSetVolume] } } 1152 | __declspec(naked) void _midiOutShortMsg() { _asm { jmp[winmmbase.midiOutShortMsg] } } 1153 | __declspec(naked) void _midiOutUnprepareHeader() { _asm { jmp[winmmbase.midiOutUnprepareHeader] } } 1154 | __declspec(naked) void _midiStreamClose() { _asm { jmp[winmmbase.midiStreamClose] } } 1155 | __declspec(naked) void _midiStreamOpen() { _asm { jmp[winmmbase.midiStreamOpen] } } 1156 | __declspec(naked) void _midiStreamOut() { _asm { jmp[winmmbase.midiStreamOut] } } 1157 | __declspec(naked) void _midiStreamPause() { _asm { jmp[winmmbase.midiStreamPause] } } 1158 | __declspec(naked) void _midiStreamPosition() { _asm { jmp[winmmbase.midiStreamPosition] } } 1159 | __declspec(naked) void _midiStreamProperty() { _asm { jmp[winmmbase.midiStreamProperty] } } 1160 | __declspec(naked) void _midiStreamRestart() { _asm { jmp[winmmbase.midiStreamRestart] } } 1161 | __declspec(naked) void _midiStreamStop() { _asm { jmp[winmmbase.midiStreamStop] } } 1162 | __declspec(naked) void _mixerClose() { _asm { jmp[winmmbase.mixerClose] } } 1163 | __declspec(naked) void _mixerGetControlDetailsA() { _asm { jmp[winmmbase.mixerGetControlDetailsA] } } 1164 | __declspec(naked) void _mixerGetControlDetailsW() { _asm { jmp[winmmbase.mixerGetControlDetailsW] } } 1165 | __declspec(naked) void _mixerGetDevCapsA() { _asm { jmp[winmmbase.mixerGetDevCapsA] } } 1166 | __declspec(naked) void _mixerGetDevCapsW() { _asm { jmp[winmmbase.mixerGetDevCapsW] } } 1167 | __declspec(naked) void _mixerGetID() { _asm { jmp[winmmbase.mixerGetID] } } 1168 | __declspec(naked) void _mixerGetLineControlsA() { _asm { jmp[winmmbase.mixerGetLineControlsA] } } 1169 | __declspec(naked) void _mixerGetLineControlsW() { _asm { jmp[winmmbase.mixerGetLineControlsW] } } 1170 | __declspec(naked) void _mixerGetLineInfoA() { _asm { jmp[winmmbase.mixerGetLineInfoA] } } 1171 | __declspec(naked) void _mixerGetLineInfoW() { _asm { jmp[winmmbase.mixerGetLineInfoW] } } 1172 | __declspec(naked) void _mixerGetNumDevs() { _asm { jmp[winmmbase.mixerGetNumDevs] } } 1173 | __declspec(naked) void _mixerMessage() { _asm { jmp[winmmbase.mixerMessage] } } 1174 | __declspec(naked) void _mixerOpen() { _asm { jmp[winmmbase.mixerOpen] } } 1175 | __declspec(naked) void _mixerSetControlDetails() { _asm { jmp[winmmbase.mixerSetControlDetails] } } 1176 | __declspec(naked) void _mmDrvInstall() { _asm { jmp[winmmbase.mmDrvInstall] } } 1177 | __declspec(naked) void _mmGetCurrentTask() { _asm { jmp[winmmbase.mmGetCurrentTask] } } 1178 | __declspec(naked) void _mmTaskBlock() { _asm { jmp[winmmbase.mmTaskBlock] } } 1179 | __declspec(naked) void _mmTaskCreate() { _asm { jmp[winmmbase.mmTaskCreate] } } 1180 | __declspec(naked) void _mmTaskSignal() { _asm { jmp[winmmbase.mmTaskSignal] } } 1181 | __declspec(naked) void _mmTaskYield() { _asm { jmp[winmmbase.mmTaskYield] } } 1182 | __declspec(naked) void _mmioAdvance() { _asm { jmp[winmmbase.mmioAdvance] } } 1183 | __declspec(naked) void _mmioAscend() { _asm { jmp[winmmbase.mmioAscend] } } 1184 | __declspec(naked) void _mmioClose() { _asm { jmp[winmmbase.mmioClose] } } 1185 | __declspec(naked) void _mmioCreateChunk() { _asm { jmp[winmmbase.mmioCreateChunk] } } 1186 | __declspec(naked) void _mmioDescend() { _asm { jmp[winmmbase.mmioDescend] } } 1187 | __declspec(naked) void _mmioFlush() { _asm { jmp[winmmbase.mmioFlush] } } 1188 | __declspec(naked) void _mmioGetInfo() { _asm { jmp[winmmbase.mmioGetInfo] } } 1189 | __declspec(naked) void _mmioInstallIOProcA() { _asm { jmp[winmmbase.mmioInstallIOProcA] } } 1190 | __declspec(naked) void _mmioInstallIOProcW() { _asm { jmp[winmmbase.mmioInstallIOProcW] } } 1191 | __declspec(naked) void _mmioOpenA() { _asm { jmp[winmmbase.mmioOpenA] } } 1192 | __declspec(naked) void _mmioOpenW() { _asm { jmp[winmmbase.mmioOpenW] } } 1193 | __declspec(naked) void _mmioRead() { _asm { jmp[winmmbase.mmioRead] } } 1194 | __declspec(naked) void _mmioRenameA() { _asm { jmp[winmmbase.mmioRenameA] } } 1195 | __declspec(naked) void _mmioRenameW() { _asm { jmp[winmmbase.mmioRenameW] } } 1196 | __declspec(naked) void _mmioSeek() { _asm { jmp[winmmbase.mmioSeek] } } 1197 | __declspec(naked) void _mmioSendMessage() { _asm { jmp[winmmbase.mmioSendMessage] } } 1198 | __declspec(naked) void _mmioSetBuffer() { _asm { jmp[winmmbase.mmioSetBuffer] } } 1199 | __declspec(naked) void _mmioSetInfo() { _asm { jmp[winmmbase.mmioSetInfo] } } 1200 | __declspec(naked) void _mmioStringToFOURCCA() { _asm { jmp[winmmbase.mmioStringToFOURCCA] } } 1201 | __declspec(naked) void _mmioStringToFOURCCW() { _asm { jmp[winmmbase.mmioStringToFOURCCW] } } 1202 | __declspec(naked) void _mmioWrite() { _asm { jmp[winmmbase.mmioWrite] } } 1203 | __declspec(naked) void _sndOpenSound() { _asm { jmp[winmmbase.sndOpenSound] } } 1204 | __declspec(naked) void _waveInAddBuffer() { _asm { jmp[winmmbase.waveInAddBuffer] } } 1205 | __declspec(naked) void _waveInClose() { _asm { jmp[winmmbase.waveInClose] } } 1206 | __declspec(naked) void _waveInGetDevCapsA() { _asm { jmp[winmmbase.waveInGetDevCapsA] } } 1207 | __declspec(naked) void _waveInGetDevCapsW() { _asm { jmp[winmmbase.waveInGetDevCapsW] } } 1208 | __declspec(naked) void _waveInGetErrorTextA() { _asm { jmp[winmmbase.waveInGetErrorTextA] } } 1209 | __declspec(naked) void _waveInGetErrorTextW() { _asm { jmp[winmmbase.waveInGetErrorTextW] } } 1210 | __declspec(naked) void _waveInGetID() { _asm { jmp[winmmbase.waveInGetID] } } 1211 | __declspec(naked) void _waveInGetNumDevs() { _asm { jmp[winmmbase.waveInGetNumDevs] } } 1212 | __declspec(naked) void _waveInGetPosition() { _asm { jmp[winmmbase.waveInGetPosition] } } 1213 | __declspec(naked) void _waveInMessage() { _asm { jmp[winmmbase.waveInMessage] } } 1214 | __declspec(naked) void _waveInOpen() { _asm { jmp[winmmbase.waveInOpen] } } 1215 | __declspec(naked) void _waveInPrepareHeader() { _asm { jmp[winmmbase.waveInPrepareHeader] } } 1216 | __declspec(naked) void _waveInReset() { _asm { jmp[winmmbase.waveInReset] } } 1217 | __declspec(naked) void _waveInStart() { _asm { jmp[winmmbase.waveInStart] } } 1218 | __declspec(naked) void _waveInStop() { _asm { jmp[winmmbase.waveInStop] } } 1219 | __declspec(naked) void _waveInUnprepareHeader() { _asm { jmp[winmmbase.waveInUnprepareHeader] } } 1220 | __declspec(naked) void _waveOutBreakLoop() { _asm { jmp[winmmbase.waveOutBreakLoop] } } 1221 | __declspec(naked) void _waveOutClose() { _asm { jmp[winmmbase.waveOutClose] } } 1222 | __declspec(naked) void _waveOutGetDevCapsA() { _asm { jmp[winmmbase.waveOutGetDevCapsA] } } 1223 | __declspec(naked) void _waveOutGetDevCapsW() { _asm { jmp[winmmbase.waveOutGetDevCapsW] } } 1224 | __declspec(naked) void _waveOutGetErrorTextA() { _asm { jmp[winmmbase.waveOutGetErrorTextA] } } 1225 | __declspec(naked) void _waveOutGetErrorTextW() { _asm { jmp[winmmbase.waveOutGetErrorTextW] } } 1226 | __declspec(naked) void _waveOutGetID() { _asm { jmp[winmmbase.waveOutGetID] } } 1227 | __declspec(naked) void _waveOutGetNumDevs() { _asm { jmp[winmmbase.waveOutGetNumDevs] } } 1228 | __declspec(naked) void _waveOutGetPitch() { _asm { jmp[winmmbase.waveOutGetPitch] } } 1229 | __declspec(naked) void _waveOutGetPlaybackRate() { _asm { jmp[winmmbase.waveOutGetPlaybackRate] } } 1230 | __declspec(naked) void _waveOutGetPosition() { _asm { jmp[winmmbase.waveOutGetPosition] } } 1231 | __declspec(naked) void _waveOutGetVolume() { _asm { jmp[winmmbase.waveOutGetVolume] } } 1232 | __declspec(naked) void _waveOutMessage() { _asm { jmp[winmmbase.waveOutMessage] } } 1233 | __declspec(naked) void _waveOutOpen() { _asm { jmp[winmmbase.waveOutOpen] } } 1234 | __declspec(naked) void _waveOutPause() { _asm { jmp[winmmbase.waveOutPause] } } 1235 | __declspec(naked) void _waveOutPrepareHeader() { _asm { jmp[winmmbase.waveOutPrepareHeader] } } 1236 | __declspec(naked) void _waveOutReset() { _asm { jmp[winmmbase.waveOutReset] } } 1237 | __declspec(naked) void _waveOutRestart() { _asm { jmp[winmmbase.waveOutRestart] } } 1238 | __declspec(naked) void _waveOutSetPitch() { _asm { jmp[winmmbase.waveOutSetPitch] } } 1239 | __declspec(naked) void _waveOutSetPlaybackRate() { _asm { jmp[winmmbase.waveOutSetPlaybackRate] } } 1240 | __declspec(naked) void _waveOutSetVolume() { _asm { jmp[winmmbase.waveOutSetVolume] } } 1241 | __declspec(naked) void _waveOutUnprepareHeader() { _asm { jmp[winmmbase.waveOutUnprepareHeader] } } 1242 | __declspec(naked) void _waveOutWrite() { _asm { jmp[winmmbase.waveOutWrite] } } 1243 | __declspec(naked) void _winmmbaseFreeMMEHandles() { _asm { jmp[winmmbase.winmmbaseFreeMMEHandles] } } 1244 | __declspec(naked) void _winmmbaseGetWOWHandle() { _asm { jmp[winmmbase.winmmbaseGetWOWHandle] } } 1245 | __declspec(naked) void _winmmbaseHandle32FromHandle16() { _asm { jmp[winmmbase.winmmbaseHandle32FromHandle16] } } 1246 | __declspec(naked) void _winmmbaseSetWOWHandle() { _asm { jmp[winmmbase.winmmbaseSetWOWHandle] } } 1247 | 1248 | __declspec(naked) void _acmDriverAddA() { _asm { jmp[msacm32.acmDriverAddA] } } 1249 | __declspec(naked) void _acmDriverAddW() { _asm { jmp[msacm32.acmDriverAddW] } } 1250 | __declspec(naked) void _acmDriverClose() { _asm { jmp[msacm32.acmDriverClose] } } 1251 | __declspec(naked) void _acmDriverDetailsA() { _asm { jmp[msacm32.acmDriverDetailsA] } } 1252 | __declspec(naked) void _acmDriverDetailsW() { _asm { jmp[msacm32.acmDriverDetailsW] } } 1253 | __declspec(naked) void _acmDriverEnum() { _asm { jmp[msacm32.acmDriverEnum] } } 1254 | __declspec(naked) void _acmDriverID() { _asm { jmp[msacm32.acmDriverID] } } 1255 | __declspec(naked) void _acmDriverMessage() { _asm { jmp[msacm32.acmDriverMessage] } } 1256 | __declspec(naked) void _acmDriverOpen() { _asm { jmp[msacm32.acmDriverOpen] } } 1257 | __declspec(naked) void _acmDriverPriority() { _asm { jmp[msacm32.acmDriverPriority] } } 1258 | __declspec(naked) void _acmDriverRemove() { _asm { jmp[msacm32.acmDriverRemove] } } 1259 | __declspec(naked) void _acmFilterChooseA() { _asm { jmp[msacm32.acmFilterChooseA] } } 1260 | __declspec(naked) void _acmFilterChooseW() { _asm { jmp[msacm32.acmFilterChooseW] } } 1261 | __declspec(naked) void _acmFilterDetailsA() { _asm { jmp[msacm32.acmFilterDetailsA] } } 1262 | __declspec(naked) void _acmFilterDetailsW() { _asm { jmp[msacm32.acmFilterDetailsW] } } 1263 | __declspec(naked) void _acmFilterEnumA() { _asm { jmp[msacm32.acmFilterEnumA] } } 1264 | __declspec(naked) void _acmFilterEnumW() { _asm { jmp[msacm32.acmFilterEnumW] } } 1265 | __declspec(naked) void _acmFilterTagDetailsA() { _asm { jmp[msacm32.acmFilterTagDetailsA] } } 1266 | __declspec(naked) void _acmFilterTagDetailsW() { _asm { jmp[msacm32.acmFilterTagDetailsW] } } 1267 | __declspec(naked) void _acmFilterTagEnumA() { _asm { jmp[msacm32.acmFilterTagEnumA] } } 1268 | __declspec(naked) void _acmFilterTagEnumW() { _asm { jmp[msacm32.acmFilterTagEnumW] } } 1269 | __declspec(naked) void _acmFormatChooseA() { _asm { jmp[msacm32.acmFormatChooseA] } } 1270 | __declspec(naked) void _acmFormatChooseW() { _asm { jmp[msacm32.acmFormatChooseW] } } 1271 | __declspec(naked) void _acmFormatDetailsA() { _asm { jmp[msacm32.acmFormatDetailsA] } } 1272 | __declspec(naked) void _acmFormatDetailsW() { _asm { jmp[msacm32.acmFormatDetailsW] } } 1273 | __declspec(naked) void _acmFormatEnumA() { _asm { jmp[msacm32.acmFormatEnumA] } } 1274 | __declspec(naked) void _acmFormatEnumW() { _asm { jmp[msacm32.acmFormatEnumW] } } 1275 | __declspec(naked) void _acmFormatSuggest() { _asm { jmp[msacm32.acmFormatSuggest] } } 1276 | __declspec(naked) void _acmFormatTagDetailsA() { _asm { jmp[msacm32.acmFormatTagDetailsA] } } 1277 | __declspec(naked) void _acmFormatTagDetailsW() { _asm { jmp[msacm32.acmFormatTagDetailsW] } } 1278 | __declspec(naked) void _acmFormatTagEnumA() { _asm { jmp[msacm32.acmFormatTagEnumA] } } 1279 | __declspec(naked) void _acmFormatTagEnumW() { _asm { jmp[msacm32.acmFormatTagEnumW] } } 1280 | __declspec(naked) void _acmGetVersion() { _asm { jmp[msacm32.acmGetVersion] } } 1281 | __declspec(naked) void _acmMetrics() { _asm { jmp[msacm32.acmMetrics] } } 1282 | __declspec(naked) void _acmStreamClose() { _asm { jmp[msacm32.acmStreamClose] } } 1283 | __declspec(naked) void _acmStreamConvert() { _asm { jmp[msacm32.acmStreamConvert] } } 1284 | __declspec(naked) void _acmStreamMessage() { _asm { jmp[msacm32.acmStreamMessage] } } 1285 | __declspec(naked) void _acmStreamOpen() { _asm { jmp[msacm32.acmStreamOpen] } } 1286 | __declspec(naked) void _acmStreamPrepareHeader() { _asm { jmp[msacm32.acmStreamPrepareHeader] } } 1287 | __declspec(naked) void _acmStreamReset() { _asm { jmp[msacm32.acmStreamReset] } } 1288 | __declspec(naked) void _acmStreamSize() { _asm { jmp[msacm32.acmStreamSize] } } 1289 | __declspec(naked) void _acmStreamUnprepareHeader() { _asm { jmp[msacm32.acmStreamUnprepareHeader] } } 1290 | 1291 | __declspec(naked) void _DrawDibBegin() { _asm { jmp[msvfw32.DrawDibBegin] } } 1292 | __declspec(naked) void _DrawDibChangePalette() { _asm { jmp[msvfw32.DrawDibChangePalette] } } 1293 | __declspec(naked) void _DrawDibClose() { _asm { jmp[msvfw32.DrawDibClose] } } 1294 | __declspec(naked) void _DrawDibDraw() { _asm { jmp[msvfw32.DrawDibDraw] } } 1295 | __declspec(naked) void _DrawDibEnd() { _asm { jmp[msvfw32.DrawDibEnd] } } 1296 | __declspec(naked) void _DrawDibGetBuffer() { _asm { jmp[msvfw32.DrawDibGetBuffer] } } 1297 | __declspec(naked) void _DrawDibGetPalette() { _asm { jmp[msvfw32.DrawDibGetPalette] } } 1298 | __declspec(naked) void _DrawDibOpen() { _asm { jmp[msvfw32.DrawDibOpen] } } 1299 | __declspec(naked) void _DrawDibProfileDisplay() { _asm { jmp[msvfw32.DrawDibProfileDisplay] } } 1300 | __declspec(naked) void _DrawDibRealize() { _asm { jmp[msvfw32.DrawDibRealize] } } 1301 | __declspec(naked) void _DrawDibSetPalette() { _asm { jmp[msvfw32.DrawDibSetPalette] } } 1302 | __declspec(naked) void _DrawDibStart() { _asm { jmp[msvfw32.DrawDibStart] } } 1303 | __declspec(naked) void _DrawDibStop() { _asm { jmp[msvfw32.DrawDibStop] } } 1304 | __declspec(naked) void _DrawDibTime() { _asm { jmp[msvfw32.DrawDibTime] } } 1305 | __declspec(naked) void _GetOpenFileNamePreview() { _asm { jmp[msvfw32.GetOpenFileNamePreview] } } 1306 | __declspec(naked) void _GetOpenFileNamePreviewA() { _asm { jmp[msvfw32.GetOpenFileNamePreviewA] } } 1307 | __declspec(naked) void _GetOpenFileNamePreviewW() { _asm { jmp[msvfw32.GetOpenFileNamePreviewW] } } 1308 | __declspec(naked) void _GetSaveFileNamePreviewA() { _asm { jmp[msvfw32.GetSaveFileNamePreviewA] } } 1309 | __declspec(naked) void _GetSaveFileNamePreviewW() { _asm { jmp[msvfw32.GetSaveFileNamePreviewW] } } 1310 | __declspec(naked) void _ICClose() { _asm { jmp[msvfw32.ICClose] } } 1311 | __declspec(naked) void _ICCompress() { _asm { jmp[msvfw32.ICCompress] } } 1312 | __declspec(naked) void _ICCompressorChoose() { _asm { jmp[msvfw32.ICCompressorChoose] } } 1313 | __declspec(naked) void _ICCompressorFree() { _asm { jmp[msvfw32.ICCompressorFree] } } 1314 | __declspec(naked) void _ICDecompress() { _asm { jmp[msvfw32.ICDecompress] } } 1315 | __declspec(naked) void _ICDraw() { _asm { jmp[msvfw32.ICDraw] } } 1316 | __declspec(naked) void _ICDrawBegin() { _asm { jmp[msvfw32.ICDrawBegin] } } 1317 | __declspec(naked) void _ICGetDisplayFormat() { _asm { jmp[msvfw32.ICGetDisplayFormat] } } 1318 | __declspec(naked) void _ICGetInfo() { _asm { jmp[msvfw32.ICGetInfo] } } 1319 | __declspec(naked) void _ICImageCompress() { _asm { jmp[msvfw32.ICImageCompress] } } 1320 | __declspec(naked) void _ICImageDecompress() { _asm { jmp[msvfw32.ICImageDecompress] } } 1321 | __declspec(naked) void _ICInfo() { _asm { jmp[msvfw32.ICInfo] } } 1322 | __declspec(naked) void _ICInstall() { _asm { jmp[msvfw32.ICInstall] } } 1323 | __declspec(naked) void _ICLocate() { _asm { jmp[msvfw32.ICLocate] } } 1324 | __declspec(naked) void _ICMThunk32() { _asm { jmp[msvfw32.ICMThunk32] } } 1325 | __declspec(naked) void _ICOpen() { _asm { jmp[msvfw32.ICOpen] } } 1326 | __declspec(naked) void _ICOpenFunction() { _asm { jmp[msvfw32.ICOpenFunction] } } 1327 | __declspec(naked) void _ICRemove() { _asm { jmp[msvfw32.ICRemove] } } 1328 | __declspec(naked) void _ICSendMessage() { _asm { jmp[msvfw32.ICSendMessage] } } 1329 | __declspec(naked) void _ICSeqCompressFrame() { _asm { jmp[msvfw32.ICSeqCompressFrame] } } 1330 | __declspec(naked) void _ICSeqCompressFrameEnd() { _asm { jmp[msvfw32.ICSeqCompressFrameEnd] } } 1331 | __declspec(naked) void _ICSeqCompressFrameStart() { _asm { jmp[msvfw32.ICSeqCompressFrameStart] } } 1332 | __declspec(naked) void _MCIWndCreate() { _asm { jmp[msvfw32.MCIWndCreate] } } 1333 | __declspec(naked) void _MCIWndCreateA() { _asm { jmp[msvfw32.MCIWndCreateA] } } 1334 | __declspec(naked) void _MCIWndCreateW() { _asm { jmp[msvfw32.MCIWndCreateW] } } 1335 | __declspec(naked) void _MCIWndRegisterClass() { _asm { jmp[msvfw32.MCIWndRegisterClass] } } 1336 | __declspec(naked) void _StretchDIB() { _asm { jmp[msvfw32.StretchDIB] } } 1337 | __declspec(naked) void _VideoForWindowsVersion() { _asm { jmp[msvfw32.VideoForWindowsVersion] } } 1338 | #endif 1339 | 1340 | #if X64 1341 | typedef HRESULT(*fn_DirectSoundCaptureCreate)(LPGUID lpGUID, LPDIRECTSOUNDCAPTURE *lplpDSC, LPUNKNOWN pUnkOuter); 1342 | void _DirectSoundCaptureCreate() { (fn_DirectSoundCaptureCreate)dsound.DirectSoundCaptureCreate(); } 1343 | 1344 | typedef HRESULT(*fn_DirectSoundCaptureCreate8)(LPCGUID lpcGUID, LPDIRECTSOUNDCAPTURE8 * lplpDSC, LPUNKNOWN pUnkOuter); 1345 | void _DirectSoundCaptureCreate8() { (fn_DirectSoundCaptureCreate8)dsound.DirectSoundCaptureCreate8(); } 1346 | 1347 | typedef HRESULT(*fn_DirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext); 1348 | void _DirectSoundCaptureEnumerateA() { (fn_DirectSoundCaptureEnumerateA)dsound.DirectSoundCaptureEnumerateA(); } 1349 | 1350 | typedef HRESULT(*fn_DirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext); 1351 | void _DirectSoundCaptureEnumerateW() { (fn_DirectSoundCaptureEnumerateW)dsound.DirectSoundCaptureEnumerateW(); } 1352 | 1353 | typedef HRESULT(*fn_DirectSoundCreate)(LPCGUID lpcGUID, LPDIRECTSOUND* ppDS, IUnknown* pUnkOuter); 1354 | void _DirectSoundCreate() { (fn_DirectSoundCreate)dsound.DirectSoundCreate(); } 1355 | 1356 | typedef HRESULT(*fn_DirectSoundCreate8)(LPCGUID lpcGUID, LPDIRECTSOUND8* ppDS, IUnknown* pUnkOuter); 1357 | void _DirectSoundCreate8() { (fn_DirectSoundCreate8)dsound.DirectSoundCreate8(); } 1358 | 1359 | typedef HRESULT(*fn_DirectSoundEnumerateA)(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext); 1360 | void _DirectSoundEnumerateA() { (fn_DirectSoundEnumerateA)dsound.DirectSoundEnumerateA(); } 1361 | 1362 | typedef HRESULT(*fn_DirectSoundEnumerateW)(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext); 1363 | void _DirectSoundEnumerateW() { (fn_DirectSoundEnumerateW)dsound.DirectSoundEnumerateW(); } 1364 | 1365 | typedef HRESULT(*fn_DirectSoundFullDuplexCreate)(const GUID* capture_dev, const GUID* render_dev, const DSCBUFFERDESC* cbufdesc, const DSBUFFERDESC* bufdesc, HWND hwnd, DWORD level, IDirectSoundFullDuplex** dsfd, IDirectSoundCaptureBuffer8** dscb8, IDirectSoundBuffer8** dsb8, IUnknown* outer_unk); 1366 | void _DirectSoundFullDuplexCreate() { (fn_DirectSoundFullDuplexCreate)dsound.DirectSoundFullDuplexCreate(); } 1367 | 1368 | typedef HRESULT(*fn_GetDeviceID)(LPCGUID pGuidSrc, LPGUID pGuidDest); 1369 | void _GetDeviceID() { (fn_GetDeviceID)dsound.GetDeviceID(); } 1370 | 1371 | 1372 | typedef HRESULT(*fn_DirectInput8Create)(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID * ppvOut, LPUNKNOWN punkOuter); 1373 | void _DirectInput8Create() { (fn_DirectInput8Create)dinput8.DirectInput8Create(); } 1374 | 1375 | typedef HRESULT(*fn_DllRegisterServer)(); 1376 | void _DllRegisterServer() { (fn_DllRegisterServer)dinput8.DllRegisterServer(); } 1377 | 1378 | typedef HRESULT(*fn_DllUnregisterServer)(); 1379 | void _DllUnregisterServer() { (fn_DllUnregisterServer)dinput8.DllUnregisterServer(); } 1380 | 1381 | 1382 | typedef HRESULT(*fn_DllCanUnloadNow)(); 1383 | void _DllCanUnloadNow() 1384 | { 1385 | if (dinput8.DllCanUnloadNow) 1386 | (fn_DllCanUnloadNow)dinput8.DllCanUnloadNow(); 1387 | else 1388 | (fn_DllCanUnloadNow)dsound.DllCanUnloadNow(); 1389 | } 1390 | 1391 | typedef HRESULT(*fn_DllGetClassObject)(REFCLSID rclsid, REFIID riid, LPVOID *ppv); 1392 | void _DllGetClassObject() 1393 | { 1394 | if (dinput8.DllGetClassObject) 1395 | (fn_DllGetClassObject)dinput8.DllGetClassObject(); 1396 | else 1397 | (fn_DllGetClassObject)dsound.DllGetClassObject(); 1398 | } 1399 | #endif -------------------------------------------------------------------------------- /source/x64.def: -------------------------------------------------------------------------------- 1 | LIBRARY "dinput8" 2 | EXPORTS 3 | DirectInput8Create = _DirectInput8Create 4 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 5 | DllGetClassObject = _DllGetClassObject PRIVATE 6 | DllRegisterServer = _DllRegisterServer PRIVATE 7 | DllUnregisterServer = _DllUnregisterServer PRIVATE 8 | 9 | LIBRARY "dsound" 10 | EXPORTS 11 | DirectSoundCaptureCreate = _DirectSoundCaptureCreate 12 | DirectSoundCaptureCreate8 = _DirectSoundCaptureCreate8 13 | DirectSoundCaptureEnumerateA = _DirectSoundCaptureEnumerateA 14 | DirectSoundCaptureEnumerateW = _DirectSoundCaptureEnumerateW 15 | DirectSoundCreate = _DirectSoundCreate 16 | DirectSoundCreate8 = _DirectSoundCreate8 17 | DirectSoundEnumerateA = _DirectSoundEnumerateA 18 | DirectSoundEnumerateW = _DirectSoundEnumerateW 19 | DirectSoundFullDuplexCreate = _DirectSoundFullDuplexCreate 20 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 21 | DllGetClassObject = _DllGetClassObject PRIVATE 22 | GetDeviceID = _GetDeviceID -------------------------------------------------------------------------------- /source/x86.def: -------------------------------------------------------------------------------- 1 | LIBRARY "vorbisfile" 2 | EXPORTS 3 | ov_bitrate = _ov_bitrate 4 | ov_bitrate_instant = _ov_bitrate_instant 5 | ov_clear = _ov_clear 6 | ov_comment = _ov_comment 7 | ov_crosslap = _ov_crosslap 8 | ov_halfrate = _ov_halfrate 9 | ov_halfrate_p = _ov_halfrate_p 10 | ov_info = _ov_info 11 | ov_open = _ov_open 12 | ov_open_callbacks = _ov_open_callbacks 13 | ov_pcm_seek = _ov_pcm_seek 14 | ov_pcm_seek_lap = _ov_pcm_seek_lap 15 | ov_pcm_seek_page = _ov_pcm_seek_page 16 | ov_pcm_seek_page_lap = _ov_pcm_seek_page_lap 17 | ov_pcm_tell = _ov_pcm_tell 18 | ov_pcm_total = _ov_pcm_total 19 | ov_raw_seek = _ov_raw_seek 20 | ov_raw_seek_lap = _ov_raw_seek_lap 21 | ov_raw_tell = _ov_raw_tell 22 | ov_raw_total = _ov_raw_total 23 | ov_read = _ov_read 24 | ov_read_float = _ov_read_float 25 | ov_seekable = _ov_seekable 26 | ov_serialnumber = _ov_serialnumber 27 | ov_streams = _ov_streams 28 | ov_test = _ov_test 29 | ov_test_callbacks = _ov_test_callbacks 30 | ov_test_open = _ov_test_open 31 | ov_time_seek = _ov_time_seek 32 | ov_time_seek_lap = _ov_time_seek_lap 33 | ov_time_seek_page = _ov_time_seek_page 34 | ov_time_seek_page_lap = _ov_time_seek_page_lap 35 | ov_time_tell = _ov_time_tell 36 | ov_time_total = _ov_time_total 37 | 38 | LIBRARY "dinput8" 39 | EXPORTS 40 | DirectInput8Create = _DirectInput8Create 41 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 42 | DllGetClassObject = _DllGetClassObject PRIVATE 43 | DllRegisterServer = _DllRegisterServer PRIVATE 44 | DllUnregisterServer = _DllUnregisterServer PRIVATE 45 | 46 | LIBRARY "dinput" 47 | EXPORTS 48 | DirectInputCreateA = _DirectInputCreateA 49 | DirectInputCreateEx = _DirectInputCreateEx 50 | DirectInputCreateW = _DirectInputCreateW 51 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 52 | DllGetClassObject = _DllGetClassObject PRIVATE 53 | DllRegisterServer = _DllRegisterServer PRIVATE 54 | DllUnregisterServer = _DllUnregisterServer PRIVATE 55 | 56 | LIBRARY "dsound" 57 | EXPORTS 58 | DirectSoundCaptureCreate = _DirectSoundCaptureCreate 59 | DirectSoundCaptureCreate8 = _DirectSoundCaptureCreate8 60 | DirectSoundCaptureEnumerateA = _DirectSoundCaptureEnumerateA 61 | DirectSoundCaptureEnumerateW = _DirectSoundCaptureEnumerateW 62 | DirectSoundCreate = _DirectSoundCreate 63 | DirectSoundCreate8 = _DirectSoundCreate8 64 | DirectSoundEnumerateA = _DirectSoundEnumerateA 65 | DirectSoundEnumerateW = _DirectSoundEnumerateW 66 | DirectSoundFullDuplexCreate = _DirectSoundFullDuplexCreate 67 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 68 | DllGetClassObject = _DllGetClassObject PRIVATE 69 | GetDeviceID = _GetDeviceID 70 | 71 | LIBRARY "d3d8" 72 | EXPORTS 73 | DebugSetMute = _DebugSetMute 74 | ;Direct3D8EnableMaximizedWindowedModeShim = _Direct3D8EnableMaximizedWindowedModeShim 75 | Direct3DCreate8 = _Direct3DCreate8 76 | ValidatePixelShader = _ValidatePixelShader 77 | ValidateVertexShader = _ValidateVertexShader 78 | 79 | LIBRARY "d3d9" 80 | EXPORTS 81 | D3DPERF_BeginEvent = _D3DPERF_BeginEvent 82 | D3DPERF_EndEvent = _D3DPERF_EndEvent 83 | D3DPERF_GetStatus = _D3DPERF_GetStatus 84 | D3DPERF_QueryRepeatFrame = _D3DPERF_QueryRepeatFrame 85 | D3DPERF_SetMarker = _D3DPERF_SetMarker 86 | D3DPERF_SetOptions = _D3DPERF_SetOptions 87 | D3DPERF_SetRegion = _D3DPERF_SetRegion 88 | DebugSetLevel = _DebugSetLevel 89 | DebugSetMute = _DebugSetMute 90 | Direct3D9EnableMaximizedWindowedModeShim = _Direct3D9EnableMaximizedWindowedModeShim 91 | Direct3DCreate9 = _Direct3DCreate9 92 | Direct3DCreate9Ex = _Direct3DCreate9Ex 93 | Direct3DShaderValidatorCreate9 = _Direct3DShaderValidatorCreate9 94 | PSGPError = _PSGPError 95 | PSGPSampleTexture = _PSGPSampleTexture 96 | 97 | LIBRARY "d3d11" 98 | EXPORTS 99 | D3D11CoreCreateDevice = _D3D11CoreCreateDevice 100 | D3D11CoreCreateLayeredDevice = _D3D11CoreCreateLayeredDevice 101 | D3D11CoreGetLayeredDeviceSize = _D3D11CoreGetLayeredDeviceSize 102 | D3D11CoreRegisterLayers = _D3D11CoreRegisterLayers 103 | D3D11CreateDevice = _D3D11CreateDevice 104 | D3D11CreateDeviceAndSwapChain = _D3D11CreateDeviceAndSwapChain 105 | D3DKMTCloseAdapter = _D3DKMTCloseAdapter 106 | D3DKMTCreateAllocation = _D3DKMTCreateAllocation 107 | D3DKMTCreateContext = _D3DKMTCreateContext 108 | D3DKMTCreateDevice = _D3DKMTCreateDevice 109 | D3DKMTCreateSynchronizationObject = _D3DKMTCreateSynchronizationObject 110 | D3DKMTDestroyAllocation = _D3DKMTDestroyAllocation 111 | D3DKMTDestroyContext = _D3DKMTDestroyContext 112 | D3DKMTDestroyDevice = _D3DKMTDestroyDevice 113 | D3DKMTDestroySynchronizationObject = _D3DKMTDestroySynchronizationObject 114 | D3DKMTEscape = _D3DKMTEscape 115 | D3DKMTGetContextSchedulingPriority = _D3DKMTGetContextSchedulingPriority 116 | D3DKMTGetDeviceState = _D3DKMTGetDeviceState 117 | D3DKMTGetDisplayModeList = _D3DKMTGetDisplayModeList 118 | D3DKMTGetMultisampleMethodList = _D3DKMTGetMultisampleMethodList 119 | D3DKMTGetRuntimeData = _D3DKMTGetRuntimeData 120 | D3DKMTGetSharedPrimaryHandle = _D3DKMTGetSharedPrimaryHandle 121 | D3DKMTLock = _D3DKMTLock 122 | D3DKMTOpenAdapterFromHdc = _D3DKMTOpenAdapterFromHdc 123 | D3DKMTOpenResource = _D3DKMTOpenResource 124 | D3DKMTPresent = _D3DKMTPresent 125 | D3DKMTQueryAdapterInfo = _D3DKMTQueryAdapterInfo 126 | D3DKMTQueryAllocationResidency = _D3DKMTQueryAllocationResidency 127 | D3DKMTQueryResourceInfo = _D3DKMTQueryResourceInfo 128 | D3DKMTRender = _D3DKMTRender 129 | D3DKMTSetAllocationPriority = _D3DKMTSetAllocationPriority 130 | D3DKMTSetContextSchedulingPriority = _D3DKMTSetContextSchedulingPriority 131 | D3DKMTSetDisplayMode = _D3DKMTSetDisplayMode 132 | D3DKMTSetDisplayPrivateDriverFormat = _D3DKMTSetDisplayPrivateDriverFormat 133 | D3DKMTSetGammaRamp = _D3DKMTSetGammaRamp 134 | D3DKMTSetVidPnSourceOwner = _D3DKMTSetVidPnSourceOwner 135 | D3DKMTSignalSynchronizationObject = _D3DKMTSignalSynchronizationObject 136 | D3DKMTUnlock = _D3DKMTUnlock 137 | D3DKMTWaitForSynchronizationObject = _D3DKMTWaitForSynchronizationObject 138 | D3DKMTWaitForVerticalBlankEvent = _D3DKMTWaitForVerticalBlankEvent 139 | D3DPerformance_BeginEvent = _D3DPerformance_BeginEvent 140 | D3DPerformance_EndEvent = _D3DPerformance_EndEvent 141 | D3DPerformance_GetStatus = _D3DPerformance_GetStatus 142 | D3DPerformance_SetMarker = _D3DPerformance_SetMarker 143 | EnableFeatureLevelUpgrade = _EnableFeatureLevelUpgrade 144 | OpenAdapter10 = _OpenAdapter10 145 | OpenAdapter10_2 = _OpenAdapter10_2 146 | 147 | LIBRARY "ddraw" 148 | EXPORTS 149 | AcquireDDThreadLock = _AcquireDDThreadLock 150 | CompleteCreateSysmemSurface = _CompleteCreateSysmemSurface 151 | D3DParseUnknownCommand = _D3DParseUnknownCommand 152 | DDGetAttachedSurfaceLcl = _DDGetAttachedSurfaceLcl 153 | DDInternalLock = _DDInternalLock 154 | DDInternalUnlock = _DDInternalUnlock 155 | DSoundHelp = _DSoundHelp 156 | DirectDrawCreate = _DirectDrawCreate 157 | DirectDrawCreateClipper = _DirectDrawCreateClipper 158 | DirectDrawCreateEx = _DirectDrawCreateEx 159 | DirectDrawEnumerateA = _DirectDrawEnumerateA 160 | DirectDrawEnumerateExA = _DirectDrawEnumerateExA 161 | DirectDrawEnumerateExW = _DirectDrawEnumerateExW 162 | DirectDrawEnumerateW = _DirectDrawEnumerateW 163 | DllCanUnloadNow = _DllCanUnloadNow PRIVATE 164 | DllGetClassObject = _DllGetClassObject PRIVATE 165 | GetDDSurfaceLocal = _GetDDSurfaceLocal 166 | GetOLEThunkData = _GetOLEThunkData 167 | GetSurfaceFromDC = _GetSurfaceFromDC 168 | RegisterSpecialCase = _RegisterSpecialCase 169 | ReleaseDDThreadLock = _ReleaseDDThreadLock 170 | SetAppCompatData = _SetAppCompatData 171 | 172 | LIBRARY "winmmbase" 173 | EXPORTS 174 | CloseDriver = _CloseDriver 175 | DefDriverProc = _DefDriverProc 176 | DriverCallback = _DriverCallback 177 | DrvGetModuleHandle = _DrvGetModuleHandle 178 | GetDriverModuleHandle = _GetDriverModuleHandle 179 | OpenDriver = _OpenDriver 180 | SendDriverMessage = _SendDriverMessage 181 | auxGetDevCapsA = _auxGetDevCapsA 182 | auxGetDevCapsW = _auxGetDevCapsW 183 | auxGetNumDevs = _auxGetNumDevs 184 | auxGetVolume = _auxGetVolume 185 | auxOutMessage = _auxOutMessage 186 | auxSetVolume = _auxSetVolume 187 | joyConfigChanged = _joyConfigChanged 188 | joyGetDevCapsA = _joyGetDevCapsA 189 | joyGetDevCapsW = _joyGetDevCapsW 190 | joyGetNumDevs = _joyGetNumDevs 191 | joyGetPos = _joyGetPos 192 | joyGetPosEx = _joyGetPosEx 193 | joyGetThreshold = _joyGetThreshold 194 | joyReleaseCapture = _joyReleaseCapture 195 | joySetCapture = _joySetCapture 196 | joySetThreshold = _joySetThreshold 197 | midiConnect = _midiConnect 198 | midiDisconnect = _midiDisconnect 199 | midiInAddBuffer = _midiInAddBuffer 200 | midiInClose = _midiInClose 201 | midiInGetDevCapsA = _midiInGetDevCapsA 202 | midiInGetDevCapsW = _midiInGetDevCapsW 203 | midiInGetErrorTextA = _midiInGetErrorTextA 204 | midiInGetErrorTextW = _midiInGetErrorTextW 205 | midiInGetID = _midiInGetID 206 | midiInGetNumDevs = _midiInGetNumDevs 207 | midiInMessage = _midiInMessage 208 | midiInOpen = _midiInOpen 209 | midiInPrepareHeader = _midiInPrepareHeader 210 | midiInReset = _midiInReset 211 | midiInStart = _midiInStart 212 | midiInStop = _midiInStop 213 | midiInUnprepareHeader = _midiInUnprepareHeader 214 | midiOutCacheDrumPatches = _midiOutCacheDrumPatches 215 | midiOutCachePatches = _midiOutCachePatches 216 | midiOutClose = _midiOutClose 217 | midiOutGetDevCapsA = _midiOutGetDevCapsA 218 | midiOutGetDevCapsW = _midiOutGetDevCapsW 219 | midiOutGetErrorTextA = _midiOutGetErrorTextA 220 | midiOutGetErrorTextW = _midiOutGetErrorTextW 221 | midiOutGetID = _midiOutGetID 222 | midiOutGetNumDevs = _midiOutGetNumDevs 223 | midiOutGetVolume = _midiOutGetVolume 224 | midiOutLongMsg = _midiOutLongMsg 225 | midiOutMessage = _midiOutMessage 226 | midiOutOpen = _midiOutOpen 227 | midiOutPrepareHeader = _midiOutPrepareHeader 228 | midiOutReset = _midiOutReset 229 | midiOutSetVolume = _midiOutSetVolume 230 | midiOutShortMsg = _midiOutShortMsg 231 | midiOutUnprepareHeader = _midiOutUnprepareHeader 232 | midiStreamClose = _midiStreamClose 233 | midiStreamOpen = _midiStreamOpen 234 | midiStreamOut = _midiStreamOut 235 | midiStreamPause = _midiStreamPause 236 | midiStreamPosition = _midiStreamPosition 237 | midiStreamProperty = _midiStreamProperty 238 | midiStreamRestart = _midiStreamRestart 239 | midiStreamStop = _midiStreamStop 240 | mixerClose = _mixerClose 241 | mixerGetControlDetailsA = _mixerGetControlDetailsA 242 | mixerGetControlDetailsW = _mixerGetControlDetailsW 243 | mixerGetDevCapsA = _mixerGetDevCapsA 244 | mixerGetDevCapsW = _mixerGetDevCapsW 245 | mixerGetID = _mixerGetID 246 | mixerGetLineControlsA = _mixerGetLineControlsA 247 | mixerGetLineControlsW = _mixerGetLineControlsW 248 | mixerGetLineInfoA = _mixerGetLineInfoA 249 | mixerGetLineInfoW = _mixerGetLineInfoW 250 | mixerGetNumDevs = _mixerGetNumDevs 251 | mixerMessage = _mixerMessage 252 | mixerOpen = _mixerOpen 253 | mixerSetControlDetails = _mixerSetControlDetails 254 | mmDrvInstall = _mmDrvInstall 255 | mmGetCurrentTask = _mmGetCurrentTask 256 | mmTaskBlock = _mmTaskBlock 257 | mmTaskCreate = _mmTaskCreate 258 | mmTaskSignal = _mmTaskSignal 259 | mmTaskYield = _mmTaskYield 260 | mmioAdvance = _mmioAdvance 261 | mmioAscend = _mmioAscend 262 | mmioClose = _mmioClose 263 | mmioCreateChunk = _mmioCreateChunk 264 | mmioDescend = _mmioDescend 265 | mmioFlush = _mmioFlush 266 | mmioGetInfo = _mmioGetInfo 267 | mmioInstallIOProcA = _mmioInstallIOProcA 268 | mmioInstallIOProcW = _mmioInstallIOProcW 269 | mmioOpenA = _mmioOpenA 270 | mmioOpenW = _mmioOpenW 271 | mmioRead = _mmioRead 272 | mmioRenameA = _mmioRenameA 273 | mmioRenameW = _mmioRenameW 274 | mmioSeek = _mmioSeek 275 | mmioSendMessage = _mmioSendMessage 276 | mmioSetBuffer = _mmioSetBuffer 277 | mmioSetInfo = _mmioSetInfo 278 | mmioStringToFOURCCA = _mmioStringToFOURCCA 279 | mmioStringToFOURCCW = _mmioStringToFOURCCW 280 | mmioWrite = _mmioWrite 281 | sndOpenSound = _sndOpenSound 282 | waveInAddBuffer = _waveInAddBuffer 283 | waveInClose = _waveInClose 284 | waveInGetDevCapsA = _waveInGetDevCapsA 285 | waveInGetDevCapsW = _waveInGetDevCapsW 286 | waveInGetErrorTextA = _waveInGetErrorTextA 287 | waveInGetErrorTextW = _waveInGetErrorTextW 288 | waveInGetID = _waveInGetID 289 | waveInGetNumDevs = _waveInGetNumDevs 290 | waveInGetPosition = _waveInGetPosition 291 | waveInMessage = _waveInMessage 292 | waveInOpen = _waveInOpen 293 | waveInPrepareHeader = _waveInPrepareHeader 294 | waveInReset = _waveInReset 295 | waveInStart = _waveInStart 296 | waveInStop = _waveInStop 297 | waveInUnprepareHeader = _waveInUnprepareHeader 298 | waveOutBreakLoop = _waveOutBreakLoop 299 | waveOutClose = _waveOutClose 300 | waveOutGetDevCapsA = _waveOutGetDevCapsA 301 | waveOutGetDevCapsW = _waveOutGetDevCapsW 302 | waveOutGetErrorTextA = _waveOutGetErrorTextA 303 | waveOutGetErrorTextW = _waveOutGetErrorTextW 304 | waveOutGetID = _waveOutGetID 305 | waveOutGetNumDevs = _waveOutGetNumDevs 306 | waveOutGetPitch = _waveOutGetPitch 307 | waveOutGetPlaybackRate = _waveOutGetPlaybackRate 308 | waveOutGetPosition = _waveOutGetPosition 309 | waveOutGetVolume = _waveOutGetVolume 310 | waveOutMessage = _waveOutMessage 311 | waveOutOpen = _waveOutOpen 312 | waveOutPause = _waveOutPause 313 | waveOutPrepareHeader = _waveOutPrepareHeader 314 | waveOutReset = _waveOutReset 315 | waveOutRestart = _waveOutRestart 316 | waveOutSetPitch = _waveOutSetPitch 317 | waveOutSetPlaybackRate = _waveOutSetPlaybackRate 318 | waveOutSetVolume = _waveOutSetVolume 319 | waveOutUnprepareHeader = _waveOutUnprepareHeader 320 | waveOutWrite = _waveOutWrite 321 | winmmbaseFreeMMEHandles = _winmmbaseFreeMMEHandles 322 | winmmbaseGetWOWHandle = _winmmbaseGetWOWHandle 323 | winmmbaseHandle32FromHandle16 = _winmmbaseHandle32FromHandle16 324 | winmmbaseSetWOWHandle = _winmmbaseSetWOWHandle 325 | 326 | LIBRARY "msacm32" 327 | EXPORTS 328 | acmDriverAddA = _acmDriverAddA 329 | acmDriverAddW = _acmDriverAddW 330 | acmDriverClose = _acmDriverClose 331 | acmDriverDetailsA = _acmDriverDetailsA 332 | acmDriverDetailsW = _acmDriverDetailsW 333 | acmDriverEnum = _acmDriverEnum 334 | acmDriverID = _acmDriverID 335 | acmDriverMessage = _acmDriverMessage 336 | acmDriverOpen = _acmDriverOpen 337 | acmDriverPriority = _acmDriverPriority 338 | acmDriverRemove = _acmDriverRemove 339 | acmFilterChooseA = _acmFilterChooseA 340 | acmFilterChooseW = _acmFilterChooseW 341 | acmFilterDetailsA = _acmFilterDetailsA 342 | acmFilterDetailsW = _acmFilterDetailsW 343 | acmFilterEnumA = _acmFilterEnumA 344 | acmFilterEnumW = _acmFilterEnumW 345 | acmFilterTagDetailsA = _acmFilterTagDetailsA 346 | acmFilterTagDetailsW = _acmFilterTagDetailsW 347 | acmFilterTagEnumA = _acmFilterTagEnumA 348 | acmFilterTagEnumW = _acmFilterTagEnumW 349 | acmFormatChooseA = _acmFormatChooseA 350 | acmFormatChooseW = _acmFormatChooseW 351 | acmFormatDetailsA = _acmFormatDetailsA 352 | acmFormatDetailsW = _acmFormatDetailsW 353 | acmFormatEnumA = _acmFormatEnumA 354 | acmFormatEnumW = _acmFormatEnumW 355 | acmFormatSuggest = _acmFormatSuggest 356 | acmFormatTagDetailsA = _acmFormatTagDetailsA 357 | acmFormatTagDetailsW = _acmFormatTagDetailsW 358 | acmFormatTagEnumA = _acmFormatTagEnumA 359 | acmFormatTagEnumW = _acmFormatTagEnumW 360 | acmGetVersion = _acmGetVersion 361 | acmMetrics = _acmMetrics 362 | acmStreamClose = _acmStreamClose 363 | acmStreamConvert = _acmStreamConvert 364 | acmStreamMessage = _acmStreamMessage 365 | acmStreamOpen = _acmStreamOpen 366 | acmStreamPrepareHeader = _acmStreamPrepareHeader 367 | acmStreamReset = _acmStreamReset 368 | acmStreamSize = _acmStreamSize 369 | acmStreamUnprepareHeader = _acmStreamUnprepareHeader 370 | 371 | LIBRARY "msvfw32" 372 | EXPORTS 373 | DrawDibBegin = _DrawDibBegin 374 | DrawDibChangePalette = _DrawDibChangePalette 375 | DrawDibClose = _DrawDibClose 376 | DrawDibDraw = _DrawDibDraw 377 | DrawDibEnd = _DrawDibEnd 378 | DrawDibGetBuffer = _DrawDibGetBuffer 379 | DrawDibGetPalette = _DrawDibGetPalette 380 | DrawDibOpen = _DrawDibOpen 381 | DrawDibProfileDisplay = _DrawDibProfileDisplay 382 | DrawDibRealize = _DrawDibRealize 383 | DrawDibSetPalette = _DrawDibSetPalette 384 | DrawDibStart = _DrawDibStart 385 | DrawDibStop = _DrawDibStop 386 | DrawDibTime = _DrawDibTime 387 | GetOpenFileNamePreview = _GetOpenFileNamePreview 388 | GetOpenFileNamePreviewA = _GetOpenFileNamePreviewA 389 | GetOpenFileNamePreviewW = _GetOpenFileNamePreviewW 390 | GetSaveFileNamePreviewA = _GetSaveFileNamePreviewA 391 | GetSaveFileNamePreviewW = _GetSaveFileNamePreviewW 392 | ICClose = _ICClose 393 | ICCompress = _ICCompress 394 | ICCompressorChoose = _ICCompressorChoose 395 | ICCompressorFree = _ICCompressorFree 396 | ICDecompress = _ICDecompress 397 | ICDraw = _ICDraw 398 | ICDrawBegin = _ICDrawBegin 399 | ICGetDisplayFormat = _ICGetDisplayFormat 400 | ICGetInfo = _ICGetInfo 401 | ICImageCompress = _ICImageCompress 402 | ICImageDecompress = _ICImageDecompress 403 | ICInfo = _ICInfo 404 | ICInstall = _ICInstall 405 | ICLocate = _ICLocate 406 | ICMThunk32 = _ICMThunk32 407 | ICOpen = _ICOpen 408 | ICOpenFunction = _ICOpenFunction 409 | ICRemove = _ICRemove 410 | ICSendMessage = _ICSendMessage 411 | ICSeqCompressFrame = _ICSeqCompressFrame 412 | ICSeqCompressFrameEnd = _ICSeqCompressFrameEnd 413 | ICSeqCompressFrameStart = _ICSeqCompressFrameStart 414 | MCIWndCreate = _MCIWndCreate 415 | MCIWndCreateA = _MCIWndCreateA 416 | MCIWndCreateW = _MCIWndCreateW 417 | MCIWndRegisterClass = _MCIWndRegisterClass 418 | StretchDIB = _StretchDIB 419 | VideoForWindowsVersion = _VideoForWindowsVersion 420 | 421 | LIBRARY "xlive" 422 | EXPORTS 423 | _XWSAStartup@8 @1 424 | _XGetOverlappedExtendedError@4 @1082 425 | _XGetOverlappedResult@12 @1083 426 | _XSocketBind@12 @11 427 | _XSocketConnect@12 @12 428 | _XSocketListen@8 @13 429 | _XSocketAccept@12 @14 430 | _XSocketSelect@20 @15 431 | _XSocketRecv@16 @18 432 | _XWSACleanup@0 @2 433 | _XSocketRecvFrom@24 @20 434 | _XSocketSend@16 @22 435 | _XSocketSendTo@24 @24 436 | _XSocketInet_Addr@4 @26 437 | _XWSAGetLastError@0 @27 438 | _XCreateSocket@12 @3 439 | _XSocketNTOHS@4 @38 440 | _XSocketNTOHL@4 @39 441 | _XSockeClose@4 @4 442 | _XCustomGetLastActionPress@12 @473 443 | _XSocketShutdown@8 @5 444 | _XLiveInitialize@4 @5000 445 | _XLiveInput@4 @5001 446 | _XLiveRender@0 @5002 447 | _XLiveUninitialize@0 @5003 448 | _XLiveOnCreateDevice@8 @5005 449 | _XLiveOnResetDevice@4 @5007 450 | _XHVCreateEngine@12 @5008 451 | _XLivePBufferAllocate@8 @5016 452 | _XLivePBufferFree@4 @5017 453 | _XLivePBufferGetByte@12 @5018 454 | _XLivePBufferSetByte@12 @5019 455 | _XLivePBufferGetDWORD@12 @5020 456 | _XLivePBufferSetDWORD@12 @5021 457 | _XLiveGetUpdateInformation@4 @5022 458 | _XLiveUpdateSystem@4 @5024 459 | _XLiveSetSponsorToken@8 @5026 460 | _XLivePreTranslateMessage@4 @5030 461 | _XLiveSetDebugLevel@8 @5031 462 | _XLiveProtectData@20 @5034 463 | _XLiveUnprotectData@20 @5035 464 | _XLiveCreateProtectedDataContext@8 @5036 465 | _XLiveQueryProtectedDataInformation@8 @5037 466 | _XLiveCloseProtectedDataContext@4 @5038 467 | _XNetStartup@4 @51 468 | _XNetCleanup@0 @52 469 | _XShowPlayerReviewUI@12 @5214 470 | _XShowGuideUI@4 @5215 471 | _XShowKeyboardUI@32 @5216 472 | _XCloseHandle@4 @5251 473 | _XShowGamerCardUI@12 @5252 474 | _XCancelOverlapped@4 @5254 475 | _XEnumerate@20 @5256 476 | _XShowSigninUI@8 @5260 477 | _XUserGetXUID@8 @5261 478 | _XUserGetSigninState@4 @5262 479 | _XUserGetName@12 @5263 480 | _XUserAreUsersFriends@20 @5264 481 | _XUserCheckPrivilege@12 @5265 482 | _XUserGetSigninInfo@12 @5267 483 | _XNotifyCreateListener@8 @5270 484 | _XUserReadGamerpictureByKey@24 @5273 485 | _XShowFriendsUI@4 @5275 486 | _XUserSetProperty@16 @5276 487 | _XUserSetContext@12 @5277 488 | _XUserWriteAchievements@12 @5278 489 | _XUserCreateAchievementEnumerator@36 @5280 490 | _XUserReadStats@32 @5281 491 | _XUserCreateStatsEnumeratorByRank@28 @5284 492 | _XUserCreateStatsEnumeratorByXuid@32 @5286 493 | _XUserSetContextEx@16 @5292 494 | _XUserSetPropertyEx@20 @5293 495 | _XLivePBufferGetByteArray@16 @5294 496 | _XLivePBufferSetByteArray@16 @5295 497 | _XLiveInitializeEx@8 @5297 498 | _XSessionCreate@32 @5300 499 | _XStringVerify@28 @5303 500 | _XStorageUploadFromMemory@20 @5305 501 | _XStorageEnumerate@28 @5306 502 | _XOnlineStartup@0 @5310 503 | _XOnlineCleanup@0 @5311 504 | _XFriendsCreateEnumerator@20 @5312 505 | _XUserMuteListQuery@16 @5314 506 | _XInviteGetAcceptedInfo@8 @5315 507 | _XInviteSend@20 @5316 508 | _XSessionWriteStats@24 @5317 509 | _XSessionStart@12 @5318 510 | _XSessionSearchEx@44 @5319 511 | _XSessionModify@20 @5322 512 | _XSessionMigrateHost@16 @5323 513 | _XOnlineGetNatType@0 @5324 514 | _XSessionLeaveLocal@16 @5325 515 | _XSessionJoinRemote@20 @5326 516 | _XSessionJoinLocal@20 @5327 517 | _XSessionGetDetails@16 @5328 518 | _XSessionFlushStats@8 @5329 519 | _XSessionDelete@8 @5330 520 | _XUserReadProfileSettings@28 @5331 521 | _XSessionEnd@8 @5332 522 | _XSessionArbitrationRegister@28 @5333 523 | _XTitleServerCreateEnumerator@16 @5335 524 | _XSessionLeaveRemote@16 @5336 525 | _XUserWriteProfileSettings@16 @5337 526 | _XUserReadProfileSettingsByXuid@36 @5339 527 | _XLiveCalculateSkill@20 @5343 528 | _XStorageBuildServerPath@28 @5344 529 | _XStorageDownloadToMemory@28 @5345 530 | _XLiveProtectedVerifyFile@12 @5349 531 | _XLiveContentCreateAccessHandle@28 @5350 532 | _XLiveContentUninstall@12 @5352 533 | _XLiveContentGetPath@16 @5355 534 | _XLiveContentCreateEnumerator@16 @5360 535 | _XLiveContentRetrieveOffersByDate@24 @5361 536 | _XShowMarketplaceUI@20 @5365 537 | _xlive_5367@20 @5367 538 | _xlive_5372@24 @5372 539 | _XNetCreateKey@8 @54 540 | _XNetRegisterKey@8 @55 541 | _XNetUnregisterKey@4 @56 542 | _XNetXnAddrToInAddr@12 @57 543 | _XNetServerToInAddr@12 @58 544 | _XSocketIOCTLSocket@12 @6 545 | _XNetInAddrToXnAddr@12 @60 546 | _XNetUnregisterInAddr@4 @63 547 | _XNetConnect@4 @65 548 | _XNotifyGetNext@16 @651 549 | _XNotifyPositionUI@4 @652 550 | _XNetGetConnectStatus@4 @66 551 | _XNetQosListen@20 @69 552 | _XSocketSetSockOpt@20 @7 553 | _XNetQosLookup@48 @70 554 | _XNetQosServiceLookup@12 @71 555 | _XNetQosRelease@4 @72 556 | _XNetGetTitleXnAddr@4 @73 557 | _XNetGetEthernetLinkStatus@0 @75 558 | _XNetSetSystemLinkPort@4 @84 559 | _XSocketGetSockName@12 @9 -------------------------------------------------------------------------------- /source/xliveless.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct XUSER_SIGNIN_INFO { 4 | DWORD xuidL; 5 | DWORD xuidH; 6 | DWORD dwInfoFlags; 7 | DWORD UserSigninState; 8 | DWORD dwGuestNumber; 9 | DWORD dwSponsorUserIndex; 10 | CHAR szUserName[16]; 11 | }; 12 | 13 | struct XUSER_READ_PROFILE_SETTINGS { 14 | DWORD dwLength; 15 | BYTE * pSettings; 16 | }; 17 | 18 | struct FakeProtectedBuffer { 19 | DWORD dwMagick; 20 | DWORD dwSize; 21 | DWORD __fill[2]; // To match buffer size in Rick's wrapper 22 | BYTE bData[4]; 23 | }; 24 | 25 | void trace(char * message, ...) {} 26 | 27 | // === Start of xlive functions === 28 | // #1: XWSAStartup 29 | extern "C" int __stdcall XWSAStartup (WORD wVersionRequested, LPWSADATA lpWsaData) { 30 | lpWsaData->wVersion = 2; 31 | trace ("XWSAStartup \n"); 32 | return 0; 33 | } 34 | 35 | // #2: XWSACleanup 36 | extern "C" void __stdcall XWSACleanup () { // XWSACleanup 37 | trace ("XWSACleanup\n"); 38 | } 39 | 40 | // #3: XCreateSocket 41 | extern "C" SOCKET __stdcall XCreateSocket (int af, int type, int protocol) { 42 | trace ("XCreateSocket (%d, %d, %d)\n", af, type, protocol); 43 | return INVALID_SOCKET; 44 | } 45 | 46 | // #4: XSockeClose 47 | extern "C" int __stdcall XSockeClose (SOCKET s) { 48 | trace ("XSockeClose)\n"); 49 | return 0; 50 | } 51 | 52 | // #5: XSocketShutdown 53 | extern "C" int __stdcall XSocketShutdown (SOCKET s, int how) { 54 | trace ("XSocketShutdown\n"); 55 | return 0; 56 | } 57 | 58 | // #6: XSocketIOCTLSocket 59 | extern "C" int __stdcall XSocketIOCTLSocket (SOCKET s, long cmd, long * argp) { 60 | trace ("XSocketIOCTLSocket\n"); 61 | return 0; 62 | } 63 | 64 | // #7: XSocketSetSockOpt 65 | extern "C" int __stdcall XSocketSetSockOpt (SOCKET s, DWORD, DWORD, DWORD, DWORD) { 66 | trace ("XSocketSetSockOpt\n"); 67 | return 0; 68 | } 69 | 70 | // #9: XSocketGetSockName 71 | extern "C" int __stdcall XSocketGetSockName (SOCKET s, sockaddr_in * name, int * namelen) { 72 | trace ("XSocketGetSockName\n"); 73 | if (namelen && name && *namelen == sizeof (sockaddr_in)) 74 | memset (name, 0, sizeof (sockaddr_in)); 75 | return 0; 76 | } 77 | 78 | // #11: XSocketBind 79 | extern "C" SOCKET __stdcall XSocketBind (SOCKET s, sockaddr_in * addr, int * addrlen) { 80 | trace ("XSocketBind\n"); 81 | return INVALID_SOCKET; 82 | } 83 | 84 | // #12: XSocketConnect 85 | extern "C" int __stdcall XSocketConnect (SOCKET s, sockaddr_in * addr, int * addrlen) { 86 | trace ("XSocketConnect\n"); 87 | return 0; 88 | } 89 | 90 | // #13: XSocketListen 91 | extern "C" int __stdcall XSocketListen (SOCKET s, int backlog) { 92 | trace ("XSocketListen\n"); 93 | return 0; 94 | } 95 | 96 | // #14: XSocketAccept 97 | extern "C" SOCKET __stdcall XSocketAccept (SOCKET s, sockaddr_in * addr, int * addrlen) { 98 | trace ("XSocketAccept\n"); 99 | return INVALID_SOCKET; 100 | } 101 | 102 | // #15: XSocketSelect 103 | extern "C" int __stdcall XSocketSelect (int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, const struct timeval * timeout) { 104 | trace ("XSocketSelect\n"); 105 | return 0; 106 | } 107 | 108 | // #18: XSocketRecv 109 | extern "C" int __stdcall XSocketRecv (SOCKET s, char * buf, int len, int flags) { 110 | return 0; 111 | } 112 | 113 | // #20: XSocketRecvFrom 114 | extern "C" int __stdcall XSocketRecvFrom (SOCKET s, char * buf, int len, int flags, sockaddr_in * from, int fromlen) { 115 | return 0; 116 | } 117 | 118 | // #22: XSocketSend 119 | extern "C" int __stdcall XSocketSend (SOCKET s, char * buf, int len, int flags) { 120 | return 0; 121 | } 122 | 123 | // #24: XSocketSendTo 124 | extern "C" int __stdcall XSocketSendTo (SOCKET s, char * buf, int len, int flags, sockaddr_in * to, int tolen) { 125 | return 0; 126 | } 127 | 128 | // #26: XSocketInet_Addr 129 | extern "C" int __stdcall XSocketInet_Addr (char *) { 130 | trace ("XSocketInet_Addr\n"); 131 | return 0; 132 | } 133 | 134 | // #27: XWSAGetLastError 135 | extern "C" int __stdcall XWSAGetLastError () { 136 | return WSAENETDOWN; // 0 ? 137 | } 138 | 139 | // #38: XSocketNTOHS 140 | extern "C" WORD __stdcall XSocketNTOHS (WORD n) { 141 | return ((n&0xFF00) >> 8)|((n&0xFF) << 8); 142 | } 143 | 144 | // #39: XSocketNTOHL 145 | extern "C" DWORD __stdcall XSocketNTOHL (DWORD n) { 146 | return ((n&0xFF000000) >> 24)|((n & 0x00FF0000) >> 8)|((n&0x0000FF00) << 8)|((n & 0x000000FF) << 24); 147 | } 148 | 149 | // #51: XNetStartup 150 | extern "C" int __stdcall XNetStartup (void *) { // XNetStartup(XNetStartupParams *) 151 | trace ("XNetStartup\n"); 152 | return 0; 153 | } 154 | 155 | // #52: XNetCleanup 156 | extern "C" int __stdcall XNetCleanup () { 157 | trace ("xlive_52: XNetCleanup\n"); 158 | return 0; 159 | } 160 | 161 | // #54: XNetCreateKey 162 | extern "C" int __stdcall XNetCreateKey (void * pxnkid, void * pxnkey) { 163 | trace ("XNetCreateKey\n"); 164 | return 0; 165 | } 166 | 167 | // #55: XNetRegisterKey 168 | extern "C" int __stdcall XNetRegisterKey (DWORD, DWORD) { 169 | return 0; 170 | } 171 | 172 | // #56: XNetUnregisterKey 173 | extern "C" int __stdcall XNetUnregisterKey (DWORD) { 174 | return 0; 175 | } 176 | 177 | // #57: XNetXnAddrToInAddr 178 | extern "C" int __stdcall XNetXnAddrToInAddr (DWORD, DWORD, DWORD * p) { 179 | *p = 0; 180 | return 0; 181 | } 182 | 183 | // #58: XNetServerToInAddr 184 | extern "C" DWORD __stdcall XNetServerToInAddr (DWORD, DWORD, DWORD) { 185 | return 0; 186 | } 187 | 188 | // #60: XNetInAddrToXnAddr 189 | extern "C" DWORD __stdcall XNetInAddrToXnAddr (DWORD, DWORD, DWORD) { 190 | return 0; 191 | } 192 | 193 | // #63: XNetUnregisterInAddr 194 | extern "C" int __stdcall XNetUnregisterInAddr (DWORD) { 195 | return 0; 196 | } 197 | 198 | // #65: XNetConnect 199 | extern "C" int __stdcall XNetConnect (DWORD) { 200 | return 0; 201 | } 202 | 203 | // #66: XNetGetConnectStatus 204 | extern "C" int __stdcall XNetGetConnectStatus (DWORD) { 205 | trace ("XNetGetConnectStatus\n"); 206 | return 0; 207 | } 208 | 209 | // #69: XNetQosListen 210 | extern "C" DWORD __stdcall XNetQosListen (DWORD, DWORD, DWORD, DWORD, DWORD) { 211 | return 0; 212 | } 213 | 214 | // #70: XNetQosLookup 215 | extern "C" DWORD __stdcall XNetQosLookup (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 216 | return 0; 217 | } 218 | 219 | // #71: XNetQosServiceLookup 220 | extern "C" DWORD __stdcall XNetQosServiceLookup (DWORD, DWORD, DWORD) { 221 | return 0; 222 | } 223 | 224 | // #72: XNetQosRelease 225 | extern "C" DWORD __stdcall XNetQosRelease (DWORD) { 226 | return 0; 227 | } 228 | 229 | // #73: XNetGetTitleXnAddr 230 | extern "C" DWORD __stdcall XNetGetTitleXnAddr (DWORD * pAddr) { 231 | *pAddr = 0x0100007F; // 127.0.0.1 232 | return 4; 233 | } 234 | 235 | // #75: XNetGetEthernetLinkStatus 236 | extern "C" DWORD __stdcall XNetGetEthernetLinkStatus () { 237 | return 1; 238 | } 239 | 240 | // #84: XNetSetSystemLinkPort 241 | extern "C" DWORD __stdcall XNetSetSystemLinkPort (DWORD) { 242 | return 0; 243 | } 244 | 245 | // #473: XCustomGetLastActionPress 246 | extern "C" int __stdcall XCustomGetLastActionPress (DWORD, DWORD, DWORD) { 247 | trace ("XCustomGetLastActionPress\n"); 248 | return 0; 249 | } 250 | 251 | // #651: XNotifyGetNext 252 | extern "C" int __stdcall XNotifyGetNext (HANDLE hNotification, DWORD dwMsgFilter, DWORD * pdwId, void * pParam) { 253 | return 0; // no notifications 254 | } 255 | 256 | // #652: XNotifyPositionUI 257 | extern "C" DWORD __stdcall XNotifyPositionUI (DWORD dwPosition) { 258 | trace ("XNotifyPositionUI (%d)\n", dwPosition); 259 | return 0; 260 | } 261 | 262 | // #1082: XGetOverlappedExtendedError 263 | extern "C" DWORD __stdcall XGetOverlappedExtendedError (void *) { 264 | trace ("XGetOverlappedExtendedError\n"); 265 | return 0; 266 | } 267 | 268 | // #1083: XGetOverlappedResult 269 | extern "C" DWORD __stdcall XGetOverlappedResult (void *, DWORD * pResult, DWORD bWait) { 270 | if (pResult) 271 | *pResult = 0; // 0 elements enumerated 272 | trace ("XGetOverlappedResult\n"); 273 | return 0; 274 | } 275 | 276 | // #5000: XLiveInitialize 277 | extern "C" int __stdcall XLiveInitialize (DWORD) { // XLiveInitialize(struct _XLIVE_INITIALIZE_INFO *) 278 | trace ("XLiveInitialize\n"); 279 | return 0; 280 | } 281 | 282 | // #5001: XLiveInput 283 | extern "C" int __stdcall XLiveInput (DWORD * p) { 284 | // trace ("XLiveInput\n"); 285 | p[5] = 0; 286 | return 1; // -1 ? 287 | } 288 | 289 | 290 | // #5002: XLiveRender 291 | extern "C" int __stdcall XLiveRender () { 292 | // trace ("XLiveRender\n"); 293 | return 0; 294 | } 295 | 296 | // #5003: XLiveUninitialize 297 | extern "C" int __stdcall XLiveUninitialize () { 298 | trace ("XLiveUninitialize\n"); 299 | return 0; 300 | } 301 | 302 | // #5005: XLiveOnCreateDevice 303 | extern "C" int __stdcall XLiveOnCreateDevice (DWORD, DWORD) { 304 | trace ("XLiveOnCreateDevice\n"); 305 | return 0; 306 | } 307 | 308 | // #5007: XLiveOnResetDevice 309 | extern "C" int __stdcall XLiveOnResetDevice (DWORD) { 310 | trace ("XLiveOnResetDevice\n"); 311 | return 0; 312 | } 313 | 314 | // #5008: XHVCreateEngine 315 | extern "C" int __stdcall XHVCreateEngine (DWORD, DWORD, void ** ppEngine) { 316 | trace ("XHVCreateEngine\n"); 317 | if (ppEngine) 318 | *ppEngine = NULL; 319 | return -1; // disable live voice 320 | } 321 | 322 | // #5022: XLiveGetUpdateInformation 323 | extern "C" int __stdcall XLiveGetUpdateInformation (DWORD) { 324 | trace ("XLiveGetUpdateInformation\n"); 325 | return -1; // no update 326 | } 327 | 328 | // #5024: XLiveUpdateSystem 329 | extern "C" int __stdcall XLiveUpdateSystem (DWORD) { 330 | trace ("XLiveUpdateSystem\n"); 331 | return -1; // no update 332 | } 333 | 334 | // #5030: XLivePreTranslateMessage 335 | extern "C" int __stdcall XLivePreTranslateMessage (DWORD) { 336 | return 0; 337 | } 338 | 339 | // #5031 XLiveSetDebugLevel 340 | extern "C" int __stdcall XLiveSetDebugLevel (DWORD xdlLevel, DWORD * pxdlOldLevel) { 341 | trace ("XLiveSetDebugLevel (%d)\n", xdlLevel); 342 | return 0; 343 | } 344 | 345 | // #5214: XShowPlayerReviewUI 346 | extern "C" int __stdcall XShowPlayerReviewUI (DWORD, DWORD, DWORD) { 347 | trace ("XShowPlayerReviewUI\n"); 348 | return 0; 349 | } 350 | 351 | // #5215: XShowGuideUI 352 | extern "C" int __stdcall XShowGuideUI (DWORD) { 353 | trace ("XShowGuideUI\n"); 354 | return 1; 355 | } 356 | 357 | // #5216: XShowKeyboardUI 358 | extern "C" int __stdcall XShowKeyboardUI (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 359 | trace ("XShowKeyboardUI\n"); 360 | return 0; 361 | } 362 | 363 | // #5251: XCloseHandle 364 | extern "C" int __stdcall XCloseHandle (DWORD) { 365 | trace ("XCloseHandle\n"); 366 | return 0; 367 | } 368 | 369 | // #5252: XShowGamerCardUI 370 | extern "C" int __stdcall XShowGamerCardUI (DWORD, DWORD, DWORD) { 371 | trace ("XShowGamerCardUI\n"); 372 | return 0; 373 | } 374 | 375 | // #5254: XCancelOverlapped 376 | extern "C" int __stdcall XCancelOverlapped (DWORD) { 377 | trace ("XCancelOverlapped\n"); 378 | return 0; 379 | } 380 | 381 | // #5256: XEnumerate 382 | extern "C" int __stdcall XEnumerate (HANDLE hEnum, void * pvBuffer, DWORD cbBuffer, DWORD * pcItemsReturned, void * pOverlapped) { // XEnumerate 383 | trace ("XEnumerate (buffer=> %p[%d])\n", pvBuffer, cbBuffer); 384 | // if (pvBuffer && cbBuffer) 385 | // memset (pvBuffer, 0, cbBuffer); 386 | if (pcItemsReturned) 387 | *pcItemsReturned = 0; 388 | return 0; // some error ? 389 | } 390 | 391 | // #5260: XShowSigninUI 392 | extern "C" int __stdcall XShowSigninUI (DWORD, DWORD) { 393 | trace ("XShowSigninUI\n"); 394 | return 0; 395 | } 396 | 397 | // #5261: XUserGetXUID 398 | extern "C" int __stdcall XUserGetXUID (DWORD, DWORD * pXuid) { 399 | pXuid[0] = pXuid[1] = 0x10001000; 400 | return 0; // ??? 401 | } 402 | 403 | 404 | // #5262: XUserGetSigninState 405 | extern "C" int __stdcall XUserGetSigninState (DWORD dwUserIndex) { 406 | // trace ("xlive_5262: XUserGetSigninState (%d)\n", dwUserIndex); 407 | return 1; // eXUserSigninState_SignedInLocally 408 | } 409 | 410 | // #5263: XUserGetName 411 | extern "C" int __stdcall XUserGetName (DWORD dwUserId, char * pBuffer, DWORD dwBufLen) { 412 | trace ("xlive_5263: XUserGetName (%d, .. , %d)\n", dwUserId, dwBufLen); 413 | if (dwBufLen < 8) 414 | return 1; 415 | memcpy (pBuffer, "Player1", 8); 416 | return 0; 417 | } 418 | 419 | // #5264: XUserAreUsersFriends 420 | extern "C" int __stdcall XUserAreUsersFriends(DWORD dwUserIndex, DWORD * pXuids, DWORD dwXuidCount, DWORD * pResult, void * pOverlapped) { 421 | trace ("XUserAreUsersFriends\n"); 422 | return ERROR_NOT_LOGGED_ON; 423 | } 424 | 425 | // #5265: XUserCheckPrivilege 426 | extern "C" int __stdcall XUserCheckPrivilege (DWORD user, DWORD priv, PBOOL b) { 427 | trace ("XUserCheckPrivilege (%d, %d, ..)\n", user, priv); 428 | *b = false; 429 | return ERROR_NOT_LOGGED_ON; 430 | } 431 | 432 | 433 | 434 | // #5267: XUserGetSigninInfo 435 | extern "C" int __stdcall XUserGetSigninInfo (DWORD dwUser, DWORD dwFlags, XUSER_SIGNIN_INFO * pInfo) { 436 | // trace ("XUserGetSigninInfo (%d, %d, ...)\n", dwUser, dwFlags); 437 | pInfo->xuidL = pInfo->xuidH = dwFlags != 1 ? (dwUser+1)*0x10001000 : 0; // some arbitrary id for offline user, INVALID_XUID for online user 438 | if (dwFlags != 1) { 439 | pInfo->dwInfoFlags = 1; 440 | pInfo->UserSigninState = 1; // eXUserSigninState_SignedInLocally 441 | // strcpy (pInfo->szUserName, "Player"); 442 | } 443 | return 0; 444 | } 445 | 446 | // #5270: XNotifyCreateListener 447 | extern "C" HANDLE __stdcall XNotifyCreateListener (DWORD l, DWORD h) { 448 | trace ("xlive_5270: XNotifyCreateListener (0x%08x%08x)\n", h, l); 449 | return (HANDLE)1; // any non-zero value. (zero treated as fatal error) 450 | } 451 | 452 | // #5273: XUserReadGamerpictureByKey 453 | extern "C" int __stdcall XUserReadGamerpictureByKey (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 454 | trace ("XUserReadGamerpictureByKey\n"); 455 | return 0; 456 | } 457 | 458 | // #5275: XShowFriendsUI 459 | extern "C" int __stdcall XShowFriendsUI (DWORD) { 460 | trace ("XShowFriendsUI\n"); 461 | return 0; 462 | } 463 | 464 | // #5276: XUserSetProperty 465 | extern "C" int __stdcall XUserSetProperty (DWORD, DWORD, DWORD, DWORD) { 466 | trace ("XUserSetProperty\n"); 467 | return 0; 468 | } 469 | 470 | // #5277: XUserSetContext 471 | extern "C" int __stdcall XUserSetContext (DWORD, DWORD, DWORD) { 472 | trace ("XUserSetContext\n"); 473 | return 0; 474 | } 475 | 476 | // #5278: XUserWriteAchievements 477 | extern "C" DWORD __stdcall XUserWriteAchievements (DWORD, DWORD, DWORD) { 478 | trace ("XUserWriteAchievements\n"); 479 | return 0; 480 | } 481 | 482 | // #5280: XUserCreateAchievementEnumerator 483 | extern "C" DWORD __stdcall XUserCreateAchievementEnumerator (DWORD dwTitleId, DWORD dwUserIndex, DWORD xuidL, DWORD xuidHi, DWORD dwDetailFlags, DWORD dwStartingIndex, DWORD cItem, DWORD * pcbBuffer, HANDLE * phEnum) { 484 | trace ("XUserCreateAchievementEnumerator (dwStartingIndex=>%d, cItem=>%d \n", dwStartingIndex, cItem); 485 | if (pcbBuffer) 486 | *pcbBuffer = 0; 487 | if (phEnum) 488 | *phEnum = INVALID_HANDLE_VALUE; 489 | return 1; // return error (otherwise, 0-size buffer will be allocated) 490 | } 491 | 492 | // #5281: XUserReadStats 493 | extern "C" DWORD __stdcall XUserReadStats (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD * pcbResults, DWORD * pResults, void *) { 494 | trace ("XUserReadStats\n"); 495 | if (pcbResults) 496 | *pcbResults = 4; 497 | if (pResults) 498 | *pResults = 0; 499 | return 0; 500 | } 501 | 502 | // #5284: XUserCreateStatsEnumeratorByRank 503 | extern "C" DWORD __stdcall XUserCreateStatsEnumeratorByRank (DWORD dwTitleId, DWORD dwRankStart, DWORD dwNumRows, DWORD dwNuStatSpec, void * pSpecs, DWORD * pcbBuffer, PHANDLE phEnum) { 504 | trace ("XUserCreateStatsEnumeratorByRank\n"); 505 | if (pcbBuffer) 506 | *pcbBuffer = 0; 507 | *phEnum = INVALID_HANDLE_VALUE; 508 | return 1; 509 | } 510 | 511 | // #5286: XUserCreateStatsEnumeratorByXuid 512 | extern "C" DWORD __stdcall XUserCreateStatsEnumeratorByXuid (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD * pcbBuffer, PHANDLE phEnum) { 513 | trace ("XUserCreateStatsEnumeratorByXuid\n"); 514 | if (pcbBuffer) 515 | pcbBuffer = 0; 516 | *phEnum = INVALID_HANDLE_VALUE; 517 | return 1; 518 | } 519 | 520 | // #5292: XUserSetContextEx 521 | extern "C" int __stdcall XUserSetContextEx (DWORD dwUserIndex, DWORD dwContextId, DWORD dwContextValue, void * pOverlapped) { 522 | trace ("XUserSetContextEx\n"); 523 | return 0; 524 | } 525 | 526 | // #5293: XUserSetPropertyEx 527 | extern "C" int __stdcall XUserSetPropertyEx (DWORD dwUserIndex, DWORD dwPropertyId, DWORD cbValue, void * pvValue, void * pOverlapped) { 528 | trace ("XUserSetPropertyEx (%d, 0x%x, ...)\n", dwUserIndex, dwPropertyId); 529 | return 0; 530 | } 531 | 532 | // #5297: XLiveInitializeEx 533 | extern "C" int __stdcall XLiveInitializeEx (void * pXii, DWORD dwVersion) { 534 | trace ("XLiveInitializeEx\n"); 535 | return 0; 536 | } 537 | 538 | // #5300: XSessionCreate 539 | extern "C" DWORD __stdcall XSessionCreate (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 540 | trace ("XSessionCreate\n"); 541 | return -1; 542 | } 543 | 544 | // #5303: XStringVerify 545 | extern "C" DWORD __stdcall XStringVerify (DWORD, DWORD, DWORD, DWORD, DWORD, WORD * pResult, DWORD) { // XStringVerify 546 | trace ("XStringVerify\n"); 547 | *pResult = 0; 548 | return 0; 549 | } 550 | 551 | // #5305: XStorageUploadFromMemory 552 | extern "C" DWORD __stdcall XStorageUploadFromMemory (DWORD, DWORD, DWORD, DWORD, DWORD) { 553 | trace ("XStorageUploadFromMemory\n"); 554 | return 0; 555 | } 556 | 557 | // #5306: XStorageEnumerate 558 | extern "C" int __stdcall XStorageEnumerate (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { // XStorageEnumerate 559 | trace ("XStorageEnumerate\n"); 560 | return 0; 561 | } 562 | 563 | // #5310: XOnlineStartup 564 | extern "C" int __stdcall XOnlineStartup () { 565 | trace ("XOnlineStartup\n"); 566 | return 0; 567 | } 568 | 569 | // #5311: XOnlineCleanup 570 | extern "C" int __stdcall XOnlineCleanup () { 571 | trace ("XOnlineCleanup\n"); 572 | return 0; 573 | } 574 | 575 | // #5312: XFriendsCreateEnumerator 576 | extern "C" DWORD __stdcall XFriendsCreateEnumerator (DWORD, DWORD, DWORD, DWORD, HANDLE * phEnum) { 577 | trace ("XFriendsCreateEnumerator\n"); 578 | *phEnum = INVALID_HANDLE_VALUE; 579 | return 0; 580 | } 581 | 582 | // #5314: XUserMuteListQuery 583 | extern "C" int __stdcall XUserMuteListQuery (DWORD, DWORD, DWORD, DWORD) { 584 | trace ("XUserMuteListQuery\n"); 585 | return 0; 586 | } 587 | 588 | // #5315: XInviteGetAcceptedInfo 589 | extern "C" int __stdcall XInviteGetAcceptedInfo (DWORD, DWORD) { 590 | trace ("XInviteGetAcceptedInfo\n"); 591 | return 1; 592 | } 593 | 594 | // #5316: XInviteSend 595 | extern "C" int __stdcall XInviteSend (DWORD, DWORD, DWORD, DWORD, DWORD) { 596 | trace ("XInviteSend\n"); 597 | return 0; 598 | } 599 | 600 | // #5317: XSessionWriteStats 601 | extern "C" DWORD __stdcall XSessionWriteStats (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 602 | trace ("XSessionWriteStats\n"); 603 | return 0; 604 | } 605 | 606 | // #5318 607 | extern "C" int __stdcall XSessionStart (DWORD, DWORD, DWORD) { 608 | trace ("XSessionStart\n"); 609 | return 0; 610 | } 611 | 612 | // #5319: XSessionSearchEx 613 | extern "C" DWORD __stdcall XSessionSearchEx (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 614 | trace ("XSessionSearchEx\n"); 615 | return 0; 616 | } 617 | 618 | // #5322: XSessionModify 619 | extern "C" DWORD __stdcall XSessionModify (DWORD, DWORD, DWORD, DWORD, DWORD) { 620 | trace ("XSessionModify\n"); 621 | return 0; 622 | } 623 | 624 | // #5323: XSessionMigrateHost 625 | extern "C" DWORD __stdcall XSessionMigrateHost (DWORD, DWORD, DWORD, DWORD) { 626 | trace ("XSessionMigrateHost\n"); 627 | return 0; 628 | } 629 | 630 | // #5324: XOnlineGetNatType 631 | extern "C" int __stdcall XOnlineGetNatType () { 632 | trace ("XOnlineGetNatType\n"); 633 | return 0; 634 | } 635 | 636 | // #5325: XSessionLeaveLocal 637 | extern "C" DWORD __stdcall XSessionLeaveLocal (DWORD, DWORD, DWORD, DWORD) { 638 | trace ("XSessionLeaveLocal\n"); 639 | return 0; 640 | } 641 | 642 | // #5326: XSessionJoinRemote 643 | extern "C" DWORD __stdcall XSessionJoinRemote (DWORD, DWORD, DWORD, DWORD, DWORD) { 644 | trace ("XSessionJoinRemote\n"); 645 | return 0; 646 | } 647 | 648 | // #5327: XSessionJoinLocal 649 | extern "C" DWORD __stdcall XSessionJoinLocal (DWORD, DWORD, DWORD, DWORD, DWORD) { 650 | trace ("XSessionJoinLocal\n"); 651 | return 0; 652 | } 653 | 654 | // #5328: XSessionGetDetails 655 | extern "C" DWORD __stdcall XSessionGetDetails (DWORD, DWORD, DWORD, DWORD) { 656 | trace ("XSessionGetDetails\n"); 657 | return 0; 658 | } 659 | 660 | // #5329: XSessionFlushStats 661 | extern "C" int __stdcall XSessionFlushStats (DWORD, DWORD) { 662 | trace ("XSessionFlushStats\n"); 663 | return 0; 664 | } 665 | 666 | // #5330: XSessionDelete 667 | extern "C" DWORD __stdcall XSessionDelete (DWORD, DWORD) { 668 | trace ("XSessionDelete\n"); 669 | return 0; 670 | } 671 | 672 | 673 | 674 | // #5331: XUserReadProfileSettings 675 | extern "C" DWORD __stdcall XUserReadProfileSettings (DWORD dwTitleId, DWORD dwUserIndex, DWORD dwNumSettingIds, 676 | DWORD * pdwSettingIds, DWORD * pcbResults, XUSER_READ_PROFILE_SETTINGS * pResults, DWORD pOverlapped) { 677 | trace ("XUserReadProfileSettings (%d, %d, %d, ..., %d, ...)\n", dwTitleId, dwUserIndex, dwNumSettingIds, *pcbResults); 678 | if (*pcbResults < 1036) { 679 | *pcbResults = 1036; // TODO: make correct calculation by IDs. 680 | return ERROR_INSUFFICIENT_BUFFER; 681 | } 682 | memset (pResults, 0, *pcbResults); 683 | pResults->dwLength = *pcbResults-sizeof (XUSER_READ_PROFILE_SETTINGS); 684 | pResults->pSettings = (BYTE *)pResults+sizeof (XUSER_READ_PROFILE_SETTINGS); 685 | return 0; 686 | } 687 | 688 | // #5332: XSessionEnd 689 | extern "C" int __stdcall XSessionEnd (DWORD, DWORD) { 690 | trace ("XSessionEnd\n"); 691 | return 0; 692 | } 693 | 694 | // #5333: XSessionArbitrationRegister 695 | extern "C" DWORD __stdcall XSessionArbitrationRegister (DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD) { 696 | trace ("XSessionArbitrationRegister\n"); 697 | return 0; 698 | } 699 | 700 | // #5335: XTitleServerCreateEnumerator 701 | extern "C" DWORD __stdcall XTitleServerCreateEnumerator (LPCSTR pszServerInfo, DWORD cItem, DWORD * pcbBuffer, PHANDLE phEnum) { 702 | trace ("XTitleServerCreateEnumerator (cItem=> %d)\n", cItem); 703 | *phEnum = INVALID_HANDLE_VALUE; 704 | return 1; 705 | } 706 | 707 | // #5336: XSessionLeaveRemote 708 | extern "C" DWORD __stdcall XSessionLeaveRemote (DWORD, DWORD, DWORD, DWORD) { 709 | trace ("XSessionLeaveRemote\n"); 710 | return 0; 711 | } 712 | 713 | // #5337: XUserWriteProfileSettings 714 | extern "C" DWORD __stdcall XUserWriteProfileSettings (DWORD, DWORD, DWORD, DWORD) { 715 | trace ("XUserWriteProfileSettings\n"); 716 | return 0; 717 | } 718 | 719 | // #5339: XUserReadProfileSettingsByXuid 720 | extern "C" DWORD __stdcall XUserReadProfileSettingsByXuid (DWORD, DWORD, DWORD, DWORD,DWORD, DWORD,DWORD, DWORD,DWORD) { 721 | trace ("XUserReadProfileSettingsByXuid\n"); 722 | return 0; 723 | } 724 | 725 | // #5343: XLiveCalculateSkill 726 | extern "C" DWORD __stdcall XLiveCalculateSkill (DWORD, DWORD, DWORD, DWORD, DWORD) { 727 | trace ("XLiveCalculateSkill\n"); 728 | return 0; 729 | } 730 | 731 | // #5344: XStorageBuildServerPath 732 | extern "C" DWORD __stdcall XStorageBuildServerPath (DWORD dwUserIndex, DWORD StorageFacility, 733 | void * pvStorageFacilityInfo, DWORD dwStorageFacilityInfoSize, 734 | void * pwszItemName, void * pwszServerPath, DWORD * pdwServerPathLength) { 735 | trace ("XStorageBuildServerPath\n"); 736 | return 0; 737 | } 738 | 739 | // #5345: XStorageDownloadToMemory 740 | extern "C" DWORD __stdcall XStorageDownloadToMemory (DWORD dwUserIndex, DWORD, DWORD, DWORD, DWORD, DWORD, void * ) { 741 | trace ("XStorageDownloadToMemory\n"); 742 | return 0; 743 | } 744 | 745 | // #5349: XLiveProtectedVerifyFile 746 | extern "C" DWORD __stdcall XLiveProtectedVerifyFile (HANDLE hContentAccess, VOID * pvReserved, PCWSTR pszFilePath) { 747 | trace ("XLiveProtectedVerifyFile\n"); 748 | return 0; 749 | } 750 | 751 | // #5350: XLiveContentCreateAccessHandle 752 | extern "C" DWORD __stdcall XLiveContentCreateAccessHandle (DWORD dwTitleId, void * pContentInfo, 753 | DWORD dwLicenseInfoVersion, void * xebBuffer, DWORD dwOffset, HANDLE * phAccess, void * pOverlapped) { 754 | trace ("XLiveContentCreateAccessHandle\n"); 755 | if (phAccess) 756 | *phAccess = INVALID_HANDLE_VALUE; 757 | return E_OUTOFMEMORY; // TODO: fix it 758 | } 759 | 760 | // #5352: XLiveContentUninstall 761 | extern "C" DWORD __stdcall XLiveContentUninstall (void * pContentInfo, void * pxuidFor, void * pInstallCallbackParams) { 762 | trace ("XLiveContentUninstall\n"); 763 | return 0; 764 | } 765 | 766 | // #5355: XLiveContentGetPath 767 | extern "C" DWORD __stdcall XLiveContentGetPath (DWORD dwUserIndex, void * pContentInfo, wchar_t * pszPath, DWORD * pcchPath) { 768 | trace ("XLiveContentGetPath\n"); 769 | if (pcchPath) 770 | *pcchPath = 0; 771 | if (pszPath) 772 | *pszPath = 0; 773 | return 0; 774 | } 775 | 776 | // #5360: XLiveContentCreateEnumerator 777 | extern "C" DWORD __stdcall XLiveContentCreateEnumerator (DWORD, void *, DWORD *pchBuffer, HANDLE * phContent) { 778 | trace ("XLiveContentCreateEnumerator\n"); 779 | if (phContent) 780 | *phContent = INVALID_HANDLE_VALUE; 781 | return 0; 782 | } 783 | 784 | // #5361: XLiveContentRetrieveOffersByDate 785 | extern "C" DWORD __stdcall XLiveContentRetrieveOffersByDate (DWORD dwUserIndex, DWORD dwOffserInfoVersion, 786 | SYSTEMTIME * pstStartDate, void * pOffserInfoArray, DWORD * pcOfferInfo, void * pOverlapped) { 787 | trace ("XLiveContentRetrieveOffersByDate\n"); 788 | if (pcOfferInfo) 789 | *pcOfferInfo = 0; 790 | return 0; 791 | } 792 | 793 | // #5365: XShowMarketplaceUI 794 | extern "C" DWORD __stdcall XShowMarketplaceUI (DWORD dwUserIndex, DWORD dwEntryPoint, ULONGLONG dwOfferId, DWORD dwContentCategories) { 795 | return 1; 796 | } 797 | 798 | // === replacements === 799 | 800 | 801 | // #5016: XLivePBufferAllocate 802 | extern "C" DWORD __stdcall XLivePBufferAllocate (int size, FakeProtectedBuffer ** pBuffer) { 803 | // trace ("xlive_5016: XLivePBufferAllocate (%d)\n", size); 804 | *pBuffer = (FakeProtectedBuffer *)malloc (size+16); 805 | if (!*pBuffer) { 806 | trace ("ERROR: XLivePBufferAllocate unable to allocate %d bytes\n", size); 807 | return E_OUTOFMEMORY; 808 | } 809 | 810 | (*pBuffer)->dwMagick = 0xDEADDEAD; // some arbitrary number 811 | (*pBuffer)->dwSize = size; 812 | return 0; 813 | } 814 | 815 | // #5017: XLivePBufferFree 816 | extern "C" DWORD __stdcall XLivePBufferFree (FakeProtectedBuffer * pBuffer) { 817 | // trace ("xlive_5017: XLivePBufferFree\n"); 818 | if (pBuffer && pBuffer->dwMagick == 0xDEADDEAD) 819 | free (pBuffer); 820 | return 0; 821 | } 822 | 823 | // #5295: XLivePBufferSetByteArray 824 | extern "C" DWORD __stdcall XLivePBufferSetByteArray (FakeProtectedBuffer * pBuffer, DWORD offset, BYTE * source, DWORD size) { 825 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || !source || offset < 0 || offset+size > pBuffer->dwSize) 826 | return 0; 827 | memcpy (pBuffer->bData+offset, source, size); 828 | return 0; 829 | } 830 | 831 | // #5294: XLivePBufferGetByteArray 832 | extern "C" DWORD __stdcall XLivePBufferGetByteArray (FakeProtectedBuffer * pBuffer, DWORD offset, BYTE * destination, DWORD size) { 833 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || !destination || offset < 0 || offset+size > pBuffer->dwSize) 834 | return 0; 835 | memcpy (destination, pBuffer->bData+offset, size); 836 | return 0; 837 | } 838 | 839 | // #5019: XLivePBufferSetByte 840 | extern "C" DWORD __stdcall XLivePBufferSetByte (FakeProtectedBuffer * pBuffer, DWORD offset, BYTE value) { 841 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || offset < 0 || offset > pBuffer->dwSize) 842 | return 0; 843 | pBuffer->bData[offset] = value; 844 | return 0; 845 | } 846 | 847 | // #5018: XLivePBufferGetByte 848 | extern "C" DWORD __stdcall XLivePBufferGetByte (FakeProtectedBuffer * pBuffer, DWORD offset, BYTE * value) { 849 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || !value || offset < 0 || offset > pBuffer->dwSize) 850 | return 0; 851 | *value = pBuffer->bData[offset]; 852 | return 0; 853 | } 854 | 855 | // #5020: XLivePBufferGetDWORD 856 | extern "C" DWORD __stdcall XLivePBufferGetDWORD (FakeProtectedBuffer * pBuffer, DWORD dwOffset, DWORD * pdwValue) { 857 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || dwOffset < 0 || dwOffset > pBuffer->dwSize-4 || !pdwValue) 858 | return 0; 859 | *pdwValue = *(DWORD *)(pBuffer->bData+dwOffset); 860 | return 0; 861 | } 862 | 863 | // #5021: XLivePBufferSetDWORD 864 | extern "C" DWORD __stdcall XLivePBufferSetDWORD (FakeProtectedBuffer * pBuffer, DWORD dwOffset, DWORD dwValue ) { 865 | if (!pBuffer || pBuffer->dwMagick != 0xDEADDEAD || dwOffset < 0 || dwOffset > pBuffer->dwSize-4) 866 | return 0; 867 | *(DWORD *)(pBuffer->bData+dwOffset) = dwValue; 868 | return 0; 869 | } 870 | 871 | // #5026: XLiveSetSponsorToken 872 | extern "C" DWORD __stdcall XLiveSetSponsorToken (LPCWSTR pwszToken, DWORD dwTitleId) { 873 | trace ("XLiveSetSponsorToken (, 0x%08x)\n", dwTitleId); 874 | return S_OK; 875 | } 876 | 877 | 878 | // #5036: XLiveCreateProtectedDataContext 879 | extern "C" DWORD __stdcall XLiveCreateProtectedDataContext (DWORD * dwType, PHANDLE pHandle) { 880 | trace ("XLiveCreateProtectedDataContext\n"); 881 | if (pHandle) 882 | *pHandle = (HANDLE)1; 883 | return 0; 884 | } 885 | 886 | // #5037: XLiveQueryProtectedDataInformation 887 | extern "C" DWORD __stdcall XLiveQueryProtectedDataInformation (HANDLE h, DWORD * p) { 888 | trace ("XLiveQueryProtectedDataInformation\n"); 889 | return 0; 890 | } 891 | 892 | // #5038: XLiveCloseProtectedDataContext 893 | extern "C" DWORD __stdcall XLiveCloseProtectedDataContext (HANDLE h) { 894 | trace ("XLiveCloseProtectedDataContext\n"); 895 | return 0; 896 | } 897 | 898 | // #5035: XLiveUnprotectData 899 | extern "C" DWORD __stdcall XLiveUnprotectData (BYTE * pInBuffer, DWORD dwInDataSize, BYTE * pOutBuffer, DWORD * pDataSize, HANDLE * ph) { 900 | trace ("XLiveUnprotectData (..., %d, ..., %d, %d)\n", dwInDataSize, *pDataSize, *(DWORD*)ph); 901 | if (!pDataSize || !ph) // invalid parameter 902 | return E_FAIL; 903 | *ph = (HANDLE)1; 904 | if (dwInDataSize > 12) 905 | dwInDataSize = 12; // RF:G workaround 906 | if (!pOutBuffer || *pDataSize < dwInDataSize) { 907 | *pDataSize = dwInDataSize; 908 | return ERROR_INSUFFICIENT_BUFFER; 909 | } 910 | *pDataSize = dwInDataSize; 911 | memcpy (pOutBuffer, pInBuffer, dwInDataSize); 912 | return 0; 913 | } 914 | 915 | // #5034: XLiveProtectData 916 | extern "C" DWORD __stdcall XLiveProtectData (BYTE * pInBuffer, DWORD dwInDataSize, BYTE * pOutBuffer, DWORD * pDataSize, HANDLE h) { 917 | trace ("XLiveProtectData (..., %d, ..., %d, %d)\n", dwInDataSize, *pDataSize, (DWORD)h); 918 | *pDataSize = dwInDataSize; 919 | if (*pDataSize >= dwInDataSize && pOutBuffer) 920 | memcpy (pOutBuffer, pInBuffer, dwInDataSize); 921 | return 0; 922 | } 923 | 924 | // #5367 925 | extern "C" DWORD __stdcall xlive_5367 (HANDLE, DWORD, DWORD, BYTE *, DWORD) { 926 | trace ("xlive_5367\n"); 927 | return 1; 928 | } 929 | 930 | // #5372 931 | extern "C" DWORD __stdcall xlive_5372 (HANDLE, DWORD, DWORD, DWORD, BYTE *, HANDLE) { 932 | trace ("xlive_5372\n"); 933 | return 1; 934 | } 935 | 936 | // === end of xlive functions === --------------------------------------------------------------------------------