├── KrkrPatch ├── pch.cpp ├── framework.h ├── pch.h ├── KrkrInjector.h ├── KrkrPatchStream.h ├── dllmain.cpp ├── KrkrInjector.cpp ├── KrkrPatcher.h ├── KrkrPatchStream.cpp ├── KrkrPatch.vcxproj.filters ├── KrkrDefinitions.h ├── KrkrPatch.vcxproj ├── KrkrPatcher.cpp └── KrkrPlugin │ └── tp_stub.cpp ├── WafflePatch ├── pch.cpp ├── framework.h ├── WaffleInjector.h ├── pch.h ├── WaffleInjector.cpp ├── WafflePatcher.h ├── dllmain.cpp ├── WafflePatch.vcxproj.filters ├── WafflePatcher.cpp └── WafflePatch.vcxproj ├── .gitignore ├── vcpkg.json ├── Compiler ├── CompilerType.h ├── CompilerHelper.cpp ├── Compiler.vcxitems ├── CallingConvention │ ├── ThiscallToCdeclAdapter.h │ ├── CdeclToThiscallAdapter.h │ ├── BorlandToCdeclAdapter.h │ ├── ThiscallToBorlandAdapter.h │ └── CdeclToBorlandAdapter.h └── CompilerHelper.h ├── Hijacker ├── Hijacker.h ├── Core │ ├── Core.h │ └── Core.cpp ├── Version │ ├── Version.h │ └── Version.cpp ├── Hijacker.vcxitems └── Winmm │ ├── Winmm.h │ └── Winmm.cpp ├── Common ├── Log.h ├── FileStream.h ├── PathUtil.h ├── FileStream.cpp ├── MemoryUtil.h ├── Common.vcxitems └── StringUtil.h ├── Pe ├── Pe.vcxitems ├── Pe.h └── Pe.cpp ├── Detours ├── Detours.vcxitems ├── DetoursHelper.h └── DetoursHelper.cpp ├── LoadLib ├── LoadLib.vcxitems ├── LoadLibHooker.h └── LoadLibHooker.cpp ├── README.md └── GalPatch.sln /KrkrPatch/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /WafflePatch/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | Build 3 | vcpkg_installed 4 | */*.user -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | "detours" 4 | ] 5 | } -------------------------------------------------------------------------------- /KrkrPatch/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /WafflePatch/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /Compiler/CompilerType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class CompilerType : uint8_t 4 | { 5 | Borland, 6 | Msvc, 7 | Unknown 8 | }; 9 | -------------------------------------------------------------------------------- /Hijacker/Hijacker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef VERSION 4 | #include "Version/Version.h" 5 | #endif 6 | 7 | #ifdef WINMM 8 | #include "Winmm/Winmm.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /Common/Log.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef _DEBUG 6 | #define LOG(fmt, ...) OutputDebugString(std::format(fmt, __VA_ARGS__).c_str()) 7 | #else 8 | #define LOG(fmt, ...) 9 | #endif 10 | -------------------------------------------------------------------------------- /WafflePatch/WaffleInjector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class WaffleInjector 4 | { 5 | public: 6 | static void Inject (const std::function& callback); 7 | static void Eject (); 8 | 9 | private: 10 | static void LoadLibCallback (HMODULE hModule); 11 | 12 | static inline std::function Callback; 13 | }; 14 | -------------------------------------------------------------------------------- /Compiler/CompilerHelper.cpp: -------------------------------------------------------------------------------- 1 | #include "CompilerHelper.h" 2 | #include "Pe.h" 3 | 4 | void CompilerHelper::Analyze() 5 | { 6 | if (static constexpr auto PATTERN_BORLAND = "Borland"; Pe::FindData(PATTERN_BORLAND, strlen(PATTERN_BORLAND), TRUE)) 7 | CompilerType = CompilerType::Borland; 8 | else 9 | CompilerType = CompilerType::Msvc; 10 | } 11 | -------------------------------------------------------------------------------- /WafflePatch/pch.h: -------------------------------------------------------------------------------- 1 | #ifndef PCH_H 2 | #define PCH_H 3 | 4 | //#define PROTECTED_EXE 5 | 6 | #include "framework.h" 7 | #include "Hijacker.h" 8 | #include "DetoursHelper.h" 9 | #include "LoadLibHooker.h" 10 | #ifdef PROTECTED_EXE 11 | #include "Pe.h" 12 | #endif 13 | 14 | #include "Log.h" 15 | #ifdef PROTECTED_EXE 16 | #include "MemoryUtil.h" 17 | #endif 18 | 19 | #include "WaffleInjector.h" 20 | #include "WafflePatcher.h" 21 | 22 | #endif //PCH_H 23 | -------------------------------------------------------------------------------- /WafflePatch/WaffleInjector.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | void WaffleInjector::Inject(const std::function& callback) 4 | { 5 | LoadLibHooker::Hook(LoadLibCallback); 6 | Callback = callback; 7 | } 8 | 9 | void WaffleInjector::Eject() 10 | { 11 | Callback = nullptr; 12 | LoadLibHooker::Unhook(LoadLibCallback); 13 | } 14 | 15 | void WaffleInjector::LoadLibCallback(HMODULE hModule) 16 | { 17 | if (Callback != nullptr) 18 | Callback(); 19 | } 20 | -------------------------------------------------------------------------------- /KrkrPatch/pch.h: -------------------------------------------------------------------------------- 1 | #ifndef PCH_H 2 | #define PCH_H 3 | 4 | #include "framework.h" 5 | #include "Hijacker.h" 6 | #include "DetoursHelper.h" 7 | #include "LoadLibHooker.h" 8 | #include "Pe.h" 9 | #include "CompilerHelper.h" 10 | 11 | #include "FileStream.h" 12 | #include "Log.h" 13 | #include "PathUtil.h" 14 | 15 | #include "KrkrPlugin/tp_stub.h" 16 | #include "KrkrInjector.h" 17 | #include "KrkrDefinitions.h" 18 | #include "KrkrPatchStream.h" 19 | #include "KrkrPatcher.h" 20 | 21 | #endif //PCH_H 22 | -------------------------------------------------------------------------------- /WafflePatch/WafflePatcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class WafflePatcher 4 | { 5 | public: 6 | #ifdef PROTECTED_EXE 7 | static void PatchProtectedExeEncoding(); 8 | #endif // PROTECTED_EXE 9 | static void PatchGetTextCrash (); 10 | static void Unpatch (); 11 | 12 | private: 13 | static BOOL APIENTRY PatchGetTextExtentPoint32A (HDC hdc, LPCSTR lpString, int c, LPSIZE lpsz); 14 | 15 | static inline decltype(GetTextExtentPoint32A)* OriginalGetTextExtentPoint32A; 16 | }; 17 | -------------------------------------------------------------------------------- /Common/FileStream.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | 8 | class FileStream final 9 | { 10 | public: 11 | FileStream (const std::string& path, const char* mode); 12 | FileStream (const std::wstring& path, const wchar_t* mode); 13 | 14 | ~FileStream (); 15 | 16 | void Seek (INT64 offset) const; 17 | void SetPos (INT64 pos) const; 18 | INT64 GetPos () const; 19 | void ReadBytes (PVOID pBuffer, size_t size) const; 20 | void WriteBytes (PVOID pBuffer, size_t size) const; 21 | 22 | private: 23 | FILE* pFile{}; 24 | }; 25 | -------------------------------------------------------------------------------- /Hijacker/Core/Core.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | 7 | class Core 8 | { 9 | protected: 10 | static void Hijack (LPCTSTR lpDllName, LPCTSTR lpSrc); 11 | static void Release (); 12 | 13 | static inline HMODULE RealDll; 14 | 15 | #define DECLARE_ORIGINAL_FUNC(fn) static inline PVOID Original##fn; 16 | #define RESOLVE_ORIGINAL_FUNC(fn) Original##fn = GetProcAddress(RealDll, #fn); 17 | 18 | #define DECLARE_FAKE_FUNC(fn, cls) EXTERN_C __declspec(naked) void Fake##fn() { __asm { jmp [##cls::Original##fn] } } 19 | #define EXPORT_FAKE_FUNC(fn, idx) __pragma(comment(linker, "/EXPORT:" #fn "=_Fake" #fn ",@" #idx)) 20 | }; 21 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrInjector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KrkrInjector 4 | { 5 | public: 6 | static void Inject (const std::function& foundV2Callback, const std::function& injectV2Callback); 7 | static void Eject (); 8 | 9 | private: 10 | static void LoadLibCallback (HMODULE hModule); 11 | 12 | static HRESULT WINAPI InjectV2Link (iTVPFunctionExporter* pExporter); 13 | 14 | static inline decltype(InjectV2Link)* OriginalV2Link; 15 | 16 | static inline std::function FoundV2Callback; 17 | static inline std::function InjectV2Callback; 18 | }; 19 | -------------------------------------------------------------------------------- /Common/PathUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | class PathUtil final 10 | { 11 | public: 12 | template 13 | requires std::is_same_v || std::is_same_v 14 | static T GetAppPathTpl() 15 | { 16 | TCHAR pathBuffer[MAX_PATH]; 17 | GetModuleFileName(nullptr, pathBuffer, MAX_PATH); 18 | T pathStr(pathBuffer); 19 | 20 | return pathStr.substr(0, pathStr.find_last_of(_T('\\')) + 1); 21 | } 22 | 23 | #ifdef UNICODE 24 | #define GetAppPath GetAppPathTpl 25 | #else 26 | #define GetAppPath GetAppPathTpl 27 | #endif 28 | }; 29 | -------------------------------------------------------------------------------- /WafflePatch/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | switch (ul_reason_for_call) 6 | { 7 | case DLL_PROCESS_ATTACH: 8 | Hijacker::Hijack(L"Waffle"); 9 | LoadLibHooker::Hook(); 10 | WaffleInjector::Inject 11 | ( 12 | [] 13 | { 14 | #ifdef PROTECTED_EXE 15 | WafflePatcher::PatchProtectedExeEncoding(); 16 | #endif 17 | WafflePatcher::PatchGetTextCrash(); 18 | } 19 | ); 20 | break; 21 | case DLL_PROCESS_DETACH: 22 | WafflePatcher::Unpatch(); 23 | WaffleInjector::Eject(); 24 | LoadLibHooker::Unhook(); 25 | Hijacker::Release(); 26 | break; 27 | default: 28 | break; 29 | } 30 | 31 | return TRUE; 32 | } 33 | -------------------------------------------------------------------------------- /Hijacker/Core/Core.cpp: -------------------------------------------------------------------------------- 1 | #include "Core.h" 2 | 3 | #include 4 | 5 | void Core::Hijack(LPCTSTR lpDllName, LPCTSTR lpSrc) 6 | { 7 | if (RealDll != nullptr) 8 | return; 9 | 10 | TCHAR realDllPath[MAX_PATH]; 11 | GetSystemDirectory(realDllPath, MAX_PATH); 12 | _tcscat_s(realDllPath, _T("\\")); 13 | _tcscat_s(realDllPath, lpDllName); 14 | 15 | RealDll = LoadLibrary(realDllPath); 16 | if (RealDll == nullptr) 17 | { 18 | TCHAR errorMessage[256] = _T(""); 19 | _stprintf_s(errorMessage, _T("Cannot load Original %s library!"), lpDllName); 20 | 21 | MessageBox(nullptr, errorMessage, lpSrc, MB_ICONERROR); 22 | ExitProcess(0); 23 | } 24 | } 25 | 26 | void Core::Release() 27 | { 28 | if (RealDll == nullptr) 29 | return; 30 | 31 | FreeLibrary(RealDll); 32 | RealDll = nullptr; 33 | } 34 | -------------------------------------------------------------------------------- /Common/FileStream.cpp: -------------------------------------------------------------------------------- 1 | #include "FileStream.h" 2 | 3 | FileStream::FileStream(const std::string& path, const char* mode) 4 | { 5 | fopen_s(&pFile, path.c_str(), mode); 6 | } 7 | 8 | FileStream::FileStream(const std::wstring& path, const wchar_t* mode) 9 | { 10 | _wfopen_s(&pFile, path.c_str(), mode); 11 | } 12 | 13 | FileStream::~FileStream() 14 | { 15 | fclose(pFile); 16 | } 17 | 18 | void FileStream::Seek(INT64 offset) const 19 | { 20 | _fseeki64(pFile, offset, SEEK_CUR); 21 | } 22 | 23 | void FileStream::SetPos(INT64 pos) const 24 | { 25 | _fseeki64(pFile, pos, SEEK_SET); 26 | } 27 | 28 | INT64 FileStream::GetPos() const 29 | { 30 | return _ftelli64(pFile); 31 | } 32 | 33 | void FileStream::ReadBytes(PVOID pBuffer, size_t size) const 34 | { 35 | fread(pBuffer, 1, size, pFile); 36 | } 37 | 38 | void FileStream::WriteBytes(PVOID pBuffer, size_t size) const 39 | { 40 | fwrite(pBuffer, 1, size, pFile); 41 | } 42 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatchStream.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KrkrPatchStream : public tTJSBinaryStream 4 | { 5 | public: 6 | ~KrkrPatchStream() override = default; 7 | 8 | tjs_uint64 TJS_INTF_METHOD Seek (tjs_int64 offset, tjs_int whence) final; 9 | tjs_uint TJS_INTF_METHOD Read ( void* buffer, tjs_uint read_size) final; 10 | tjs_uint TJS_INTF_METHOD Write (const void* buffer, tjs_uint write_size) final; 11 | void TJS_INTF_METHOD SetEndOfStorage () final; 12 | tjs_uint64 TJS_INTF_METHOD GetSize () final; 13 | 14 | protected: 15 | std::vector data; 16 | 17 | private: 18 | tjs_uint64 pos = 0; 19 | }; 20 | 21 | class KrkrPatchSigStream final : public KrkrPatchStream 22 | { 23 | public: 24 | KrkrPatchSigStream(); 25 | }; 26 | 27 | class KrkrPatchArcStream final : public KrkrPatchStream 28 | { 29 | public: 30 | KrkrPatchArcStream(const std::wstring& patchArc, const XP3ArchiveSegment* segment); 31 | }; 32 | -------------------------------------------------------------------------------- /Common/MemoryUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | 8 | class MemoryUtil 9 | { 10 | public: 11 | template 12 | static void Write(PVOID addr, const std::vector& val) 13 | { 14 | const auto size = val.size() * sizeof(T); 15 | 16 | PageUnprotector unprotector{addr, size}; 17 | memcpy(addr, val.data(), size); 18 | } 19 | 20 | private: 21 | class PageUnprotector 22 | { 23 | public: 24 | PageUnprotector(LPVOID addr, SIZE_T size) 25 | : addr(addr), size(size) 26 | { 27 | VirtualProtect(addr, size, PAGE_READWRITE, &originalProtect); 28 | } 29 | 30 | ~PageUnprotector() 31 | { 32 | DWORD dummy; 33 | VirtualProtect(addr, size, originalProtect, &dummy); 34 | } 35 | 36 | private: 37 | LPVOID addr; 38 | SIZE_T size; 39 | DWORD originalProtect; 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /Pe/Pe.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {c760fb7a-de55-4578-9b29-4abd2bf9770d} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Detours/Detours.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {aa355a01-4e65-420d-96dc-2497033c5fe2} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /LoadLib/LoadLib.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {a59b30bd-a94d-4f62-8c81-52d8fdfcde91} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /KrkrPatch/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | switch (ul_reason_for_call) 6 | { 7 | case DLL_PROCESS_ATTACH: 8 | Hijacker::Hijack(L"Krkr"); 9 | LoadLibHooker::Hook(); 10 | CompilerHelper::Analyze(); 11 | 12 | LOG(L"KrkrPatch: CompilerType {}.", CompilerHelper::CompilerType == CompilerType::Borland ? L"Borland" : L"Msvc"); 13 | 14 | KrkrInjector::Inject 15 | ( 16 | [](HMODULE lhModule) 17 | { 18 | return KrkrPatcher::PatchSignVerify(lhModule); 19 | }, 20 | [] 21 | { 22 | KrkrPatcher::PatchCreateStream(); 23 | } 24 | ); 25 | break; 26 | case DLL_PROCESS_DETACH: 27 | KrkrPatcher::Unpatch(); 28 | KrkrInjector::Eject(); 29 | LoadLibHooker::Unhook(); 30 | Hijacker::Release(); 31 | break; 32 | default: 33 | break; 34 | } 35 | 36 | return TRUE; 37 | } 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KrkrPatch 2 | 3 | Auto load patch for krkr game. 4 | 5 | ### Usage 6 | - Rename **`krkr-version.dll`** to **`version.dll`** then put into game root dir. 7 | 8 | - Put patch files into **`unencrypted`** folder without directory structure. 9 | 10 | - Multiple patches supported: **`unencrypted, unencrypted2~9 (larger seq, higher priority)`**. 11 | 12 | - Picontinuous sequences are not necessary, sample : **`unencrypted3, unencrypted7`**. 13 | 14 | - (Optional) Pack **`unencrypted`** folder to **`unencrypted.xp3`** archive **`(priority : folder > archive)`**. 15 | 16 | - use [**`GARbro`**](https://github.com/morkt/GARbro) or [**`Xp3Pack`**](https://github.com/arcusmaximus/KirikiriTools) 17 | 18 | ### Credits 19 | 20 | * [**`KirikiriTools`**](https://github.com/arcusmaximus/KirikiriTools) 21 | 22 | # WafflePatch 23 | 24 | Patch for waffle game to prevent crashes. 25 | 26 | ### Usage 27 | 28 | - Rename **`waffle-version.dll`** to **`version.dll`** then put into game root dir. 29 | 30 | # Merged 31 | - [**`KrkrPatch`**](https://github.com/bynejake/KrkrPatch) 32 | - [**`WafflePatch`**](https://github.com/bynejake/WafflePatch) 33 | -------------------------------------------------------------------------------- /Pe/Pe.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | 8 | class Pe final 9 | { 10 | public: 11 | static PIMAGE_DOS_HEADER GetDosHeader (HMODULE hModule = GetModuleHandle(nullptr)); 12 | static PIMAGE_NT_HEADERS GetNtHeaders (HMODULE hModule = GetModuleHandle(nullptr)); 13 | static PIMAGE_OPTIONAL_HEADER GetOptionalHeader (HMODULE hModule = GetModuleHandle(nullptr)); 14 | 15 | static PVOID FindData ( LPCSTR lpPattern, size_t patternLen, BOOL onlyOnce = FALSE); 16 | static PVOID FindData (HMODULE hModule, LPCSTR lpPattern, size_t patternLen, BOOL onlyOnce = FALSE); 17 | 18 | private: 19 | struct Section 20 | { 21 | BYTE name[IMAGE_SIZEOF_SHORT_NAME]; 22 | DWORD address; 23 | DWORD size; 24 | DWORD characteristics; 25 | }; 26 | 27 | static std::vector
GetSections (HMODULE hModule); 28 | static PVOID FindData (const Section& section, LPCSTR lpPattern, size_t patternLen); 29 | }; 30 | -------------------------------------------------------------------------------- /Hijacker/Version/Version.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef VERSION 4 | 5 | #define WIN32_LEAN_AND_MEAN 6 | 7 | #include 8 | 9 | #include "Core/Core.h" 10 | 11 | class Hijacker final : Core 12 | { 13 | public: 14 | static void Hijack (LPCTSTR lpSrc); 15 | static void Release (); 16 | 17 | private: 18 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoA) 19 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoByHandle) 20 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoExA) 21 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoExW) 22 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoSizeA) 23 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoSizeExA) 24 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoSizeExW) 25 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoSizeW) 26 | DECLARE_ORIGINAL_FUNC(GetFileVersionInfoW) 27 | DECLARE_ORIGINAL_FUNC(VerFindFileA) 28 | DECLARE_ORIGINAL_FUNC(VerFindFileW) 29 | DECLARE_ORIGINAL_FUNC(VerInstallFileA) 30 | DECLARE_ORIGINAL_FUNC(VerInstallFileW) 31 | DECLARE_ORIGINAL_FUNC(VerLanguageNameA) 32 | DECLARE_ORIGINAL_FUNC(VerLanguageNameW) 33 | DECLARE_ORIGINAL_FUNC(VerQueryValueA) 34 | DECLARE_ORIGINAL_FUNC(VerQueryValueW) 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Common/Common.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {bf6dd8ef-c0ab-449c-b58e-a66bf73e300c} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LoadLib/LoadLibHooker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | 8 | class LoadLibHooker final 9 | { 10 | public: 11 | static void Hook (const std::function& callback = nullptr); 12 | static void Unhook (const std::function& callback = nullptr); 13 | 14 | private: 15 | static HMODULE WINAPI HookLoadLibraryA (LPCSTR lpLibFileName); 16 | static HMODULE WINAPI HookLoadLibraryW (LPCWSTR lpLibFileName); 17 | static HMODULE WINAPI HookLoadLibraryExA (LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); 18 | static HMODULE WINAPI HookLoadLibraryExW (LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags); 19 | 20 | static void InvokeCallbacks (HMODULE hModule); 21 | 22 | static inline decltype(LoadLibraryA)* OriginalLoadLibraryA; 23 | static inline decltype(LoadLibraryW)* OriginalLoadLibraryW; 24 | static inline decltype(LoadLibraryExA)* OriginalLoadLibraryExA; 25 | static inline decltype(LoadLibraryExW)* OriginalLoadLibraryExW; 26 | 27 | static inline std::vector> Callbacks; 28 | }; 29 | -------------------------------------------------------------------------------- /Common/StringUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class StringUtil final 4 | { 5 | public: 6 | template 7 | static void EraseToLastOf (std::basic_string& str, const T& pattern) 8 | { 9 | const auto pos = str.find_last_of(pattern); 10 | if (pos != std::string::npos) 11 | str.erase(0, pos + 1); 12 | } 13 | 14 | template 15 | static BOOL StartsWith (const std::basic_string& str, const std::vector& patterns) 16 | { 17 | for (auto pattern : patterns) 18 | { 19 | if (str.starts_with(pattern)) 20 | return TRUE; 21 | } 22 | return FALSE; 23 | } 24 | 25 | template 26 | static BOOL Contains (const std::basic_string& str, const std::vector& patterns) 27 | { 28 | for (auto pattern : patterns) 29 | { 30 | if (str.contains(pattern)) 31 | return TRUE; 32 | } 33 | return FALSE; 34 | } 35 | 36 | template 37 | static BOOL EndsWith (const std::basic_string& str, const std::vector& patterns) 38 | { 39 | for (auto pattern : patterns) 40 | { 41 | if (str.ends_with(pattern)) 42 | return TRUE; 43 | } 44 | return FALSE; 45 | } 46 | }; 47 | -------------------------------------------------------------------------------- /Hijacker/Hijacker.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {d5f916dc-4659-44bb-82b5-4e1227c04ac7} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | NotUsing 22 | 23 | 24 | NotUsing 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Compiler/Compiler.vcxitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {6d23e64f-7611-47d8-94b3-7f00c252c953} 7 | 8 | 9 | 10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | NotUsing 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrInjector.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | void KrkrInjector::Inject(const std::function& foundV2Callback, const std::function& injectV2Callback) 4 | { 5 | LoadLibHooker::Hook(LoadLibCallback); 6 | 7 | FoundV2Callback = foundV2Callback; 8 | InjectV2Callback = injectV2Callback; 9 | } 10 | 11 | void KrkrInjector::Eject() 12 | { 13 | FoundV2Callback = nullptr; 14 | InjectV2Callback = nullptr; 15 | 16 | LoadLibHooker::Unhook(LoadLibCallback); 17 | } 18 | 19 | void KrkrInjector::LoadLibCallback(HMODULE hModule) 20 | { 21 | if (FoundV2Callback == nullptr && InjectV2Callback == nullptr) 22 | return; 23 | 24 | if (const auto pV2Link = DetoursHelper::FindExportEx(hModule, "V2Link"); pV2Link != nullptr) 25 | { 26 | // find ImageUnload before find V2Link? 27 | if (DetoursHelper::FindImport(hModule, "ImageUnload")) 28 | { 29 | LOG(L"KrkrPatch: Found ImageUnload, postpone Inject!"); 30 | return; 31 | } 32 | 33 | if (FoundV2Callback != nullptr && FoundV2Callback(hModule)) 34 | FoundV2Callback = nullptr; 35 | 36 | if (InjectV2Callback != nullptr) 37 | { 38 | OriginalV2Link = reinterpret_cast(pV2Link); 39 | DetoursHelper::Hook(std::pair(&OriginalV2Link, InjectV2Link)); 40 | } 41 | } 42 | } 43 | 44 | HRESULT KrkrInjector::InjectV2Link(iTVPFunctionExporter* pExporter) 45 | { 46 | LOG(L"KrkrPatch: InjectV2Link!"); 47 | 48 | DetoursHelper::Unhook(std::pair(&OriginalV2Link, InjectV2Link)); 49 | 50 | TVPInitImportStub(pExporter); 51 | 52 | InjectV2Callback(); 53 | InjectV2Callback = nullptr; 54 | 55 | return OriginalV2Link(pExporter); 56 | } 57 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KrkrPatcher 4 | { 5 | public: 6 | static BOOL PatchSignVerify (HMODULE hModule); 7 | static void PatchCreateStream (); 8 | static void Unpatch (); 9 | 10 | private: 11 | static BOOL __fastcall PatchSignVerifyMsvc (HMODULE hModule); 12 | static tTJSBinaryStream* PatchCreateStreamBorland(const ttstr& name, tjs_uint32 flags); 13 | static tTJSBinaryStream* __fastcall PatchCreateStreamMsvc (const ttstr& name, tjs_uint32 flags); 14 | 15 | template 16 | static tTJSBinaryStream* PatchCreateStream (const ttstr& name, tjs_uint32 flags); 17 | 18 | static std::pair PatchUrl (const ttstr& name, tjs_uint32 flags); 19 | static std::wstring PatchName (const ttstr& name); 20 | 21 | static std::tuple, std::vector> ListPatches (); 22 | 23 | // temp for test 24 | //static void decrypt(tTJSBinaryStream* stream, std::vector& output); 25 | 26 | static inline decltype(PatchSignVerifyMsvc)* OriginalSignVerifyMsvc; 27 | static inline decltype(PatchCreateStreamBorland)* OriginalCreateStreamBorland; 28 | static inline decltype(PatchCreateStreamMsvc)* OriginalCreateStreamMsvc; 29 | }; 30 | -------------------------------------------------------------------------------- /WafflePatch/WafflePatch.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | -------------------------------------------------------------------------------- /Detours/DetoursHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | class DetoursHelper final 10 | { 11 | public: 12 | template 13 | static void Hook (const std::pair... pairFucs) 14 | { 15 | InvokeDetourFunc(DetourAttach, pairFucs...); 16 | } 17 | 18 | template 19 | static void Unhook (const std::pair... pairFucs) 20 | { 21 | InvokeDetourFunc(DetourDetach, pairFucs...); 22 | } 23 | 24 | static BOOL FindExport (HMODULE hModule, LPCSTR pszName); 25 | static PVOID FindExportEx (HMODULE hModule, LPCSTR pszName); 26 | static BOOL FindImport (HMODULE hModule, LPCSTR pszName); 27 | static PVOID* FindImportEx (HMODULE hModule, LPCSTR pszName); 28 | 29 | private: 30 | template 31 | static void InvokeDetourFunc(F pDetourFunc, const std::pair... pairFucs) 32 | { 33 | DetourTransactionBegin(); 34 | DetourUpdateThread(GetCurrentThread()); 35 | (..., pDetourFunc(reinterpret_cast(pairFucs.first), reinterpret_cast(pairFucs.second))); 36 | DetourTransactionCommit(); 37 | } 38 | 39 | struct FindExportContext 40 | { 41 | LPCSTR pszName; 42 | PVOID pvFunc; 43 | }; 44 | 45 | struct FindImportContext 46 | { 47 | LPCSTR pszName; 48 | PVOID* ppvFunc; 49 | }; 50 | 51 | static BOOL CALLBACK CheckExport (PVOID pContext, DWORD nOrdinal, LPCSTR pszName, PVOID pvFunc); 52 | static BOOL CALLBACK CheckImport (PVOID pContext, DWORD nOrdinal, LPCSTR pszName, PVOID* ppvFunc); 53 | }; 54 | -------------------------------------------------------------------------------- /Detours/DetoursHelper.cpp: -------------------------------------------------------------------------------- 1 | #include "DetoursHelper.h" 2 | 3 | BOOL DetoursHelper::FindExport(HMODULE hModule, LPCSTR pszName) 4 | { 5 | return FindExportEx(hModule, pszName) != nullptr; 6 | } 7 | 8 | PVOID DetoursHelper::FindExportEx(HMODULE hModule, LPCSTR pszName) 9 | { 10 | if (pszName == nullptr) 11 | return nullptr; 12 | 13 | FindExportContext findExportContext 14 | { 15 | .pszName = pszName 16 | }; 17 | DetourEnumerateExports(hModule, &findExportContext, CheckExport); 18 | 19 | return findExportContext.pvFunc; 20 | } 21 | 22 | BOOL DetoursHelper::FindImport(HMODULE hModule, LPCSTR pszName) 23 | { 24 | return FindImportEx(hModule, pszName) != nullptr; 25 | } 26 | 27 | PVOID* DetoursHelper::FindImportEx(HMODULE hModule, LPCSTR pszName) 28 | { 29 | if (pszName == nullptr) 30 | return nullptr; 31 | 32 | FindImportContext findImportContext 33 | { 34 | .pszName = pszName 35 | }; 36 | DetourEnumerateImportsEx(hModule, &findImportContext, nullptr, CheckImport); 37 | 38 | return findImportContext.ppvFunc; 39 | } 40 | 41 | BOOL DetoursHelper::CheckExport(PVOID pContext, DWORD nOrdinal, LPCSTR pszName, PVOID pvFunc) 42 | { 43 | if (const auto pFindExportContext = static_cast(pContext); pszName != nullptr && strcmp(pFindExportContext->pszName, pszName) == 0) 44 | { 45 | pFindExportContext->pvFunc = pvFunc; 46 | return FALSE; 47 | } 48 | return TRUE; 49 | } 50 | 51 | BOOL DetoursHelper::CheckImport(PVOID pContext, DWORD nOrdinal, LPCSTR pszName, PVOID* ppvFunc) 52 | { 53 | if (const auto pFindImportContext = static_cast(pContext); pszName != nullptr && strcmp(pFindImportContext->pszName, pszName) == 0) 54 | { 55 | pFindImportContext->ppvFunc = ppvFunc; 56 | return FALSE; 57 | } 58 | return TRUE; 59 | } 60 | -------------------------------------------------------------------------------- /Compiler/CallingConvention/ThiscallToCdeclAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class ThiscallToCdeclAdapterBase 5 | { 6 | static_assert(sizeof...(TArgs) > 0); 7 | 8 | public: 9 | static TResult Call(TArgs...); 10 | 11 | private: 12 | static constexpr auto FuncPtrPtr = TFuncPtrPtr + TFuncPtrIndex; 13 | 14 | static constexpr size_t NumThiscallStackArgs = sizeof...(TArgs) - 1; 15 | static constexpr size_t ThiscallStackArgsSize = NumThiscallStackArgs * 4; 16 | 17 | static constexpr size_t NumCdeclStackArgs = sizeof...(TArgs); 18 | static constexpr size_t CdeclStackArgsSize = NumCdeclStackArgs * 4; 19 | }; 20 | 21 | template 22 | __declspec(naked) TResult ThiscallToCdeclAdapterBase::Call(TArgs...) 23 | { 24 | __asm 25 | { 26 | mov ecx, [esp + 4] 27 | } 28 | if constexpr (sizeof...(TArgs) > 1) 29 | { 30 | __asm 31 | { 32 | mov eax, NumThiscallStackArgs 33 | lea edx, [esp + 8 + 4 * eax] 34 | 35 | nextStackArg: 36 | sub edx, 4 37 | push dword ptr[edx] 38 | dec eax 39 | jnz nextStackArg 40 | } 41 | } 42 | __asm 43 | { 44 | mov eax, FuncPtrPtr 45 | call dword ptr[eax] 46 | ret 47 | } 48 | } 49 | 50 | template 51 | class ThiscallToCdeclAdapter; 52 | 53 | template 54 | class ThiscallToCdeclAdapter : public ThiscallToCdeclAdapterBase {}; 55 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatchStream.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #ifdef _MSC_VER 4 | #pragma warning(disable : 4244) 5 | #endif 6 | 7 | tjs_uint64 KrkrPatchStream::Seek(tjs_int64 offset, tjs_int whence) 8 | { 9 | switch (whence) 10 | { 11 | case SEEK_SET: 12 | pos = offset; 13 | break; 14 | case SEEK_CUR: 15 | pos += offset; 16 | break; 17 | case SEEK_END: 18 | pos = data.size() + offset; 19 | break; 20 | default: 21 | break; 22 | } 23 | return pos; 24 | } 25 | 26 | tjs_uint KrkrPatchStream::Read(void* buffer, tjs_uint read_size) 27 | { 28 | read_size = min(read_size, data.size() - pos); 29 | 30 | memcpy(buffer, data.data() + pos, read_size); 31 | pos += read_size; 32 | 33 | return read_size; 34 | } 35 | 36 | tjs_uint KrkrPatchStream::Write(const void* buffer, tjs_uint write_size) 37 | { 38 | throw std::exception("Not implemented!"); 39 | } 40 | 41 | void KrkrPatchStream::SetEndOfStorage() 42 | { 43 | throw std::exception("Not implemented!"); 44 | } 45 | 46 | tjs_uint64 KrkrPatchStream::GetSize() 47 | { 48 | return data.size(); 49 | } 50 | 51 | KrkrPatchSigStream::KrkrPatchSigStream() 52 | { 53 | static constexpr auto SIG_SKIP = "skip!"; 54 | data = std::vector(SIG_SKIP, SIG_SKIP + strlen(SIG_SKIP)); 55 | } 56 | 57 | KrkrPatchArcStream::KrkrPatchArcStream(const std::wstring& patchArc, const XP3ArchiveSegment* segment) 58 | { 59 | data.resize(segment->OrgSize); 60 | 61 | const FileStream fs(patchArc, L"rb"); 62 | fs.SetPos(segment->Start); 63 | 64 | if (segment->IsCompressed) 65 | { 66 | std::vector compressedData(segment->ArcSize); 67 | fs.ReadBytes(compressedData.data(), compressedData.size()); 68 | 69 | DWORD originalSize = data.size(); 70 | ZLIB_uncompress(data.data(), &originalSize, compressedData.data(), compressedData.size()); 71 | } 72 | else 73 | { 74 | fs.ReadBytes(data.data(), data.size()); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /WafflePatch/WafflePatcher.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #ifdef PROTECTED_EXE 4 | struct MemoryPatch 5 | { 6 | DWORD rva; 7 | DWORD chk; 8 | std::vector val; 9 | }; 10 | 11 | void WafflePatcher::PatchProtectedExeEncoding() 12 | { 13 | // TODO Replace specific addresses with signature. 14 | static std::vector sPatches = 15 | { 16 | // encoding 17 | {0x000D6D24, 0x00008068, {0x68, 0x86}}, 18 | // boundary 19 | {0x0005BB6A, 0x06769F3C, {0x3C, 0xFE}}, 20 | // font 21 | {0x0027EE34, 0x72826C82, {0x4C, 0x58, 0x47, 0x57, 0x20, 0x57, 0x65, 0x6E, 0x4B, 0x61, 0x69, 0x00, 0x00}}, 22 | // heart 23 | {0x002836E4, 0x00009F81, {0xA1, 0xF4}} 24 | }; 25 | 26 | static const auto ImageBase = Pe::GetOptionalHeader()->ImageBase; 27 | std::erase_if(sPatches, [](const MemoryPatch& patch) 28 | { 29 | if (const auto addr = reinterpret_cast(ImageBase + patch.rva); *addr == patch.chk) 30 | { 31 | MemoryUtil::Write(addr, patch.val); 32 | return true; 33 | } 34 | return false; 35 | }); 36 | } 37 | #endif 38 | 39 | void WafflePatcher::PatchGetTextCrash() 40 | { 41 | if (OriginalGetTextExtentPoint32A != nullptr) 42 | return; 43 | 44 | OriginalGetTextExtentPoint32A = GetTextExtentPoint32A; 45 | DetoursHelper::Hook(std::pair(&OriginalGetTextExtentPoint32A, PatchGetTextExtentPoint32A)); 46 | } 47 | 48 | void WafflePatcher::Unpatch() 49 | { 50 | if (OriginalGetTextExtentPoint32A == nullptr) 51 | return; 52 | 53 | DetoursHelper::Unhook(std::pair(&OriginalGetTextExtentPoint32A, PatchGetTextExtentPoint32A)); 54 | OriginalGetTextExtentPoint32A = nullptr; 55 | } 56 | 57 | BOOL WafflePatcher::PatchGetTextExtentPoint32A(HDC hdc, LPCSTR lpString, int c, LPSIZE lpsz) 58 | { 59 | if (strcmp(lpString, "\t") == 0) 60 | { 61 | LOG(L"WafflePatch: Found tab character!"); 62 | lpString = " "; 63 | } 64 | 65 | return OriginalGetTextExtentPoint32A(hdc, lpString, c, lpsz); 66 | } 67 | -------------------------------------------------------------------------------- /Compiler/CallingConvention/CdeclToThiscallAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class CdeclToThiscallAdapterBase 5 | { 6 | static_assert(sizeof...(TArgs) > 0); 7 | 8 | public: 9 | static void Call(); 10 | 11 | private: 12 | static constexpr auto FuncPtrPtr = TFuncPtrPtr + TFuncPtrIndex; 13 | 14 | static constexpr size_t NumCdeclStackArgs = sizeof...(TArgs); 15 | static constexpr size_t CdeclStackArgsSize = NumCdeclStackArgs * 4; 16 | 17 | static constexpr size_t NumThiscallStackArgs = sizeof...(TArgs) - 1; 18 | static constexpr size_t ThiscallStackArgsSize = NumThiscallStackArgs * 4; 19 | }; 20 | 21 | template 22 | __declspec(naked) void CdeclToThiscallAdapterBase::Call() 23 | { 24 | if constexpr (sizeof...(TArgs) > 1) 25 | { 26 | __asm 27 | { 28 | mov eax, NumThiscallStackArgs 29 | lea edx, [esp + 4 + 4 * eax] 30 | 31 | nextStackArg: 32 | sub edx, 4 33 | push dword ptr[edx] 34 | dec eax 35 | jnz nextStackArg 36 | } 37 | } 38 | __asm 39 | { 40 | push ecx 41 | mov eax, FuncPtrPtr 42 | call dword ptr[eax] 43 | add esp, CdeclStackArgsSize 44 | } 45 | 46 | if constexpr (sizeof...(TArgs) > 1) 47 | { 48 | __asm 49 | { 50 | pop edx 51 | add esp, ThiscallStackArgsSize 52 | jmp edx 53 | } 54 | } 55 | else 56 | { 57 | __asm 58 | { 59 | ret 60 | } 61 | } 62 | } 63 | 64 | template 65 | class CdeclToThiscallAdapter; 66 | 67 | template 68 | class CdeclToThiscallAdapter : public CdeclToThiscallAdapterBase {}; 69 | -------------------------------------------------------------------------------- /Compiler/CallingConvention/BorlandToCdeclAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class BorlandToCdeclAdapterBase 5 | { 6 | public: 7 | static TResult Call(TArgs...); 8 | 9 | private: 10 | static constexpr auto FuncPtrPtr = TFuncPtrPtr + TFuncPtrIndex; 11 | 12 | static constexpr size_t NumBorlandStackArgs = sizeof...(TArgs) > 3 ? sizeof...(TArgs) - 3 : 0; 13 | static constexpr size_t BorlandStackArgsSize = NumBorlandStackArgs * 4; 14 | 15 | static constexpr size_t NumCdeclStackArgs = sizeof...(TArgs); 16 | static constexpr size_t CdeclStackArgsSize = NumCdeclStackArgs * 4; 17 | }; 18 | 19 | template 20 | __declspec(naked) TResult BorlandToCdeclAdapterBase::Call(TArgs...) 21 | { 22 | __asm 23 | { 24 | push esi 25 | push edi 26 | } 27 | if constexpr (sizeof...(TArgs) > 0) 28 | { 29 | __asm mov eax, [esp + 8 + 4] 30 | } 31 | if constexpr (sizeof...(TArgs) > 1) 32 | { 33 | __asm mov edx, [esp + 8 + 8] 34 | } 35 | if constexpr (sizeof...(TArgs) > 2) 36 | { 37 | __asm mov ecx, [esp + 8 + 0xC] 38 | } 39 | if constexpr (sizeof...(TArgs) > 3) 40 | { 41 | __asm 42 | { 43 | lea esi, [esp + 8 + 0x10] 44 | mov edi, NumBorlandStackArgs 45 | 46 | nextStackArg : 47 | push dword ptr[esi] 48 | add esi, 4 49 | dec edi 50 | jnz nextStackArg 51 | } 52 | } 53 | __asm 54 | { 55 | mov edi, FuncPtrPtr 56 | call dword ptr[edi] 57 | pop edi 58 | pop esi 59 | ret 60 | } 61 | } 62 | 63 | template 64 | class BorlandToCdeclAdapter; 65 | 66 | template 67 | class BorlandToCdeclAdapter : public BorlandToCdeclAdapterBase {}; 68 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatch.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | Source Files 55 | 56 | 57 | Source Files 58 | 59 | 60 | -------------------------------------------------------------------------------- /Compiler/CallingConvention/ThiscallToBorlandAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class ThiscallToBorlandAdapterBase 5 | { 6 | static_assert(sizeof...(TArgs) > 0); 7 | 8 | public: 9 | static void Call(); 10 | 11 | private: 12 | static constexpr auto FuncPtrPtr = TFuncPtrPtr + TFuncPtrIndex; 13 | 14 | static constexpr size_t NumThiscallStackArgs = sizeof...(TArgs) - 1; 15 | static constexpr size_t ThiscallStackArgsSize = NumThiscallStackArgs * 4; 16 | 17 | static constexpr size_t NumBorlandStackArgs = sizeof...(TArgs) > 3 ? sizeof...(TArgs) - 3 : 0; 18 | static constexpr size_t BorlandStackArgsSize = NumBorlandStackArgs * 4; 19 | }; 20 | 21 | template 22 | __declspec(naked) void ThiscallToBorlandAdapterBase::Call() 23 | { 24 | __asm 25 | { 26 | push esi 27 | push edi 28 | } 29 | if constexpr (sizeof...(TArgs) > 3) 30 | { 31 | __asm 32 | { 33 | lea esi, [esp + 8 + 4] 34 | mov edi, NumBorlandStackArgs 35 | 36 | nextStackArg : 37 | push dword ptr[esi] 38 | add esi, 4 39 | dec edi 40 | jnz nextStackArg 41 | } 42 | } 43 | if constexpr (sizeof...(TArgs) > 2) 44 | { 45 | __asm push ecx 46 | } 47 | if constexpr (sizeof...(TArgs) > 1) 48 | { 49 | __asm push edx 50 | } 51 | __asm 52 | { 53 | mov ecx, eax 54 | mov edi, FuncPtrPtr 55 | call dword ptr[edi] 56 | pop edi 57 | pop esi 58 | } 59 | if constexpr (sizeof...(TArgs) > 3) 60 | { 61 | __asm 62 | { 63 | pop edx 64 | add esp, BorlandStackArgsSize 65 | jmp edx 66 | } 67 | } 68 | else 69 | { 70 | __asm 71 | { 72 | ret 73 | } 74 | } 75 | } 76 | 77 | template 78 | class ThiscallToBorlandAdapter; 79 | 80 | template 81 | class ThiscallToBorlandAdapter : public ThiscallToBorlandAdapterBase {}; 82 | -------------------------------------------------------------------------------- /Compiler/CallingConvention/CdeclToBorlandAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class CdeclToBorlandAdapterBase 5 | { 6 | public: 7 | static void Call(); 8 | 9 | private: 10 | static constexpr auto FuncPtrPtr = TFuncPtrPtr + TFuncPtrIndex; 11 | 12 | static constexpr size_t NumCdeclStackArgs = sizeof...(TArgs); 13 | static constexpr size_t CdeclStackArgsSize = NumCdeclStackArgs * 4; 14 | 15 | static constexpr size_t NumBorlandStackArgs = sizeof...(TArgs) > 3 ? sizeof...(TArgs) - 3 : 0; 16 | static constexpr size_t BorlandStackArgsSize = NumBorlandStackArgs * 4; 17 | }; 18 | 19 | template 20 | __declspec(naked) void CdeclToBorlandAdapterBase::Call() 21 | { 22 | __asm 23 | { 24 | push esi 25 | push edi 26 | } 27 | if constexpr (sizeof...(TArgs) > 3) 28 | { 29 | __asm 30 | { 31 | lea esi, [esp + 8 + 4] 32 | mov edi, NumBorlandStackArgs 33 | 34 | nextStackArg : 35 | push dword ptr[esi] 36 | add esi, 4 37 | dec edi 38 | jnz nextStackArg 39 | } 40 | } 41 | if constexpr (sizeof...(TArgs) > 2) 42 | { 43 | __asm push ecx 44 | } 45 | if constexpr (sizeof...(TArgs) > 1) 46 | { 47 | __asm push edx 48 | } 49 | if constexpr (sizeof...(TArgs) > 0) 50 | { 51 | __asm push eax 52 | } 53 | __asm 54 | { 55 | mov edi, FuncPtrPtr 56 | call dword ptr[edi] 57 | } 58 | if constexpr (sizeof...(TArgs) > 0) 59 | { 60 | __asm add esp, CdeclStackArgsSize 61 | } 62 | __asm 63 | { 64 | pop edi 65 | pop esi 66 | } 67 | if constexpr (sizeof...(TArgs) > 3) 68 | { 69 | __asm 70 | { 71 | pop edx 72 | add esp, BorlandStackArgsSize 73 | jmp edx 74 | } 75 | } 76 | else 77 | { 78 | __asm 79 | { 80 | ret 81 | } 82 | } 83 | } 84 | 85 | template 86 | class CdeclToBorlandAdapter; 87 | 88 | template 89 | class CdeclToBorlandAdapter : public CdeclToBorlandAdapterBase {}; 90 | -------------------------------------------------------------------------------- /Pe/Pe.cpp: -------------------------------------------------------------------------------- 1 | #include "Pe.h" 2 | 3 | PIMAGE_DOS_HEADER Pe::GetDosHeader(HMODULE hModule) 4 | { 5 | return reinterpret_cast(hModule); 6 | } 7 | 8 | PIMAGE_NT_HEADERS Pe::GetNtHeaders(HMODULE hModule) 9 | { 10 | const auto pDosHeader = GetDosHeader(hModule); 11 | return reinterpret_cast(reinterpret_cast(pDosHeader) + pDosHeader->e_lfanew); 12 | } 13 | 14 | PIMAGE_OPTIONAL_HEADER Pe::GetOptionalHeader(HMODULE hModule) 15 | { 16 | return &GetNtHeaders(hModule)->OptionalHeader; 17 | } 18 | 19 | PVOID Pe::FindData(LPCSTR lpPattern, size_t patternLen, BOOL onlyOnce) 20 | { 21 | return FindData(GetModuleHandle(nullptr), lpPattern, patternLen, onlyOnce); 22 | } 23 | 24 | PVOID Pe::FindData(HMODULE hModule, LPCSTR lpPattern, size_t patternLen, BOOL onlyOnce) 25 | { 26 | for (const auto& section : GetSections(hModule)) 27 | { 28 | if (const auto found = FindData(section, lpPattern, patternLen); found != nullptr) 29 | return found; 30 | 31 | if (onlyOnce) 32 | break; 33 | } 34 | return nullptr; 35 | } 36 | 37 | std::vector Pe::GetSections(HMODULE hModule) 38 | { 39 | const auto pNtHeaders = GetNtHeaders(hModule); 40 | const auto pSectionHeaders = IMAGE_FIRST_SECTION(pNtHeaders); 41 | 42 | std::vector
sections; 43 | for (int i = 0; i < pNtHeaders->FileHeader.NumberOfSections; i++) 44 | { 45 | Section section 46 | { 47 | .address = reinterpret_cast(hModule) + pSectionHeaders[i].VirtualAddress, 48 | .size = pSectionHeaders[i].SizeOfRawData, 49 | .characteristics = pSectionHeaders[i].Characteristics 50 | }; 51 | memcpy(section.name, pSectionHeaders[i].Name, IMAGE_SIZEOF_SHORT_NAME); 52 | sections.emplace_back(section); 53 | } 54 | return sections; 55 | } 56 | 57 | PVOID Pe::FindData(const Section& section, LPCSTR lpPattern, size_t patternLen) 58 | { 59 | auto addr = section.address; 60 | for (const auto end = addr + section.size - patternLen; addr <= end; addr++) 61 | { 62 | BOOL failed = FALSE; 63 | for (size_t offset = 0; offset < patternLen; offset++) 64 | { 65 | if (const auto code = *reinterpret_cast(addr + offset); lpPattern[offset] != 0x2A && lpPattern[offset] != code) 66 | { 67 | failed = TRUE; 68 | break; 69 | } 70 | } 71 | if (failed) 72 | continue; 73 | 74 | return reinterpret_cast(addr); 75 | } 76 | return nullptr; 77 | } 78 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrDefinitions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class tTJSBinaryStream 4 | { 5 | public: 6 | virtual tjs_uint64 TJS_INTF_METHOD Seek (tjs_int64 offset, tjs_int whence) = 0; 7 | virtual tjs_uint TJS_INTF_METHOD Read ( void* buffer, tjs_uint read_size) = 0; 8 | virtual tjs_uint TJS_INTF_METHOD Write (const void* buffer, tjs_uint write_size) = 0; 9 | virtual void TJS_INTF_METHOD SetEndOfStorage () = 0; 10 | virtual tjs_uint64 TJS_INTF_METHOD GetSize () = 0; 11 | 12 | virtual ~tTJSBinaryStream() = default; 13 | 14 | using VType = CompilerHelper::VType; 15 | static tTJSBinaryStream* ApplyWrapVTable(tTJSBinaryStream* pStream) 16 | { 17 | return CompilerHelper::ApplyWrapVTable 18 | 24 | (pStream); 25 | } 26 | }; 27 | 28 | struct XP3ArchiveSegment 29 | { 30 | tjs_uint64 Start; 31 | tjs_uint64 Offset; 32 | tjs_uint64 OrgSize; 33 | tjs_uint64 ArcSize; 34 | bool IsCompressed; 35 | }; 36 | 37 | #pragma pack(push, 4) 38 | class tTVPXP3ArchiveStreamBorland : public tTJSBinaryStream 39 | { 40 | public: 41 | void* Owner; 42 | tjs_int StorageIndex; 43 | std::vector* Segments; 44 | tTJSBinaryStream* Stream; 45 | tjs_uint64 OrgSize; 46 | tjs_int CurSegmentNum; 47 | XP3ArchiveSegment* CurSegment; 48 | tjs_int LastOpenedSegmentNum; 49 | tjs_uint64 CurPos; 50 | tjs_uint64 SegmentRemain; 51 | tjs_uint64 SegmentPos; 52 | void* SegmentData; 53 | bool SegmentOpened; 54 | }; 55 | #pragma pack(pop) 56 | 57 | class tTVPXP3ArchiveStreamMsvc : public tTJSBinaryStream 58 | { 59 | public: 60 | void* Owner; 61 | tjs_int StorageIndex; 62 | std::vector* Segments; 63 | tTJSBinaryStream* Stream; 64 | tjs_uint64 OrgSize; 65 | tjs_int CurSegmentNum; 66 | XP3ArchiveSegment* CurSegment; 67 | tjs_int LastOpenedSegmentNum; 68 | tjs_uint64 CurPos; 69 | tjs_uint64 SegmentRemain; 70 | tjs_uint64 SegmentPos; 71 | void* SegmentData; 72 | bool SegmentOpened; 73 | }; 74 | -------------------------------------------------------------------------------- /Hijacker/Version/Version.cpp: -------------------------------------------------------------------------------- 1 | #ifdef VERSION 2 | 3 | #include 4 | 5 | #include "Version.h" 6 | 7 | void Hijacker::Hijack(LPCTSTR lpSrc) 8 | { 9 | Core::Hijack(_T("version.dll"), lpSrc); 10 | 11 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoA) 12 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoByHandle) 13 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoExA) 14 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoExW) 15 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoSizeA) 16 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoSizeExA) 17 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoSizeExW) 18 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoSizeW) 19 | RESOLVE_ORIGINAL_FUNC(GetFileVersionInfoW) 20 | RESOLVE_ORIGINAL_FUNC(VerFindFileA) 21 | RESOLVE_ORIGINAL_FUNC(VerFindFileW) 22 | RESOLVE_ORIGINAL_FUNC(VerInstallFileA) 23 | RESOLVE_ORIGINAL_FUNC(VerInstallFileW) 24 | RESOLVE_ORIGINAL_FUNC(VerLanguageNameA) 25 | RESOLVE_ORIGINAL_FUNC(VerLanguageNameW) 26 | RESOLVE_ORIGINAL_FUNC(VerQueryValueA) 27 | RESOLVE_ORIGINAL_FUNC(VerQueryValueW) 28 | } 29 | 30 | void Hijacker::Release() 31 | { 32 | Core::Release(); 33 | } 34 | 35 | #define DECLARE_FAKE_FUNC_SIMPLIFY(fn) DECLARE_FAKE_FUNC(fn, Hijacker) 36 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoA) 37 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoByHandle) 38 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoExA) 39 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoExW) 40 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoSizeA) 41 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoSizeExA) 42 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoSizeExW) 43 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoSizeW) 44 | DECLARE_FAKE_FUNC_SIMPLIFY(GetFileVersionInfoW) 45 | DECLARE_FAKE_FUNC_SIMPLIFY(VerFindFileA) 46 | DECLARE_FAKE_FUNC_SIMPLIFY(VerFindFileW) 47 | DECLARE_FAKE_FUNC_SIMPLIFY(VerInstallFileA) 48 | DECLARE_FAKE_FUNC_SIMPLIFY(VerInstallFileW) 49 | DECLARE_FAKE_FUNC_SIMPLIFY(VerLanguageNameA) 50 | DECLARE_FAKE_FUNC_SIMPLIFY(VerLanguageNameW) 51 | DECLARE_FAKE_FUNC_SIMPLIFY(VerQueryValueA) 52 | DECLARE_FAKE_FUNC_SIMPLIFY(VerQueryValueW) 53 | #undef DECLARE_FAKE_FUNC_SIMPLIFY 54 | 55 | EXPORT_FAKE_FUNC(GetFileVersionInfoA, 1) 56 | EXPORT_FAKE_FUNC(GetFileVersionInfoByHandle, 2) 57 | EXPORT_FAKE_FUNC(GetFileVersionInfoExA, 3) 58 | EXPORT_FAKE_FUNC(GetFileVersionInfoExW, 4) 59 | EXPORT_FAKE_FUNC(GetFileVersionInfoSizeA, 5) 60 | EXPORT_FAKE_FUNC(GetFileVersionInfoSizeExA, 6) 61 | EXPORT_FAKE_FUNC(GetFileVersionInfoSizeExW, 7) 62 | EXPORT_FAKE_FUNC(GetFileVersionInfoSizeW, 8) 63 | EXPORT_FAKE_FUNC(GetFileVersionInfoW, 9) 64 | EXPORT_FAKE_FUNC(VerFindFileA, 10) 65 | EXPORT_FAKE_FUNC(VerFindFileW, 11) 66 | EXPORT_FAKE_FUNC(VerInstallFileA, 12) 67 | EXPORT_FAKE_FUNC(VerInstallFileW, 13) 68 | EXPORT_FAKE_FUNC(VerLanguageNameA, 14) 69 | EXPORT_FAKE_FUNC(VerLanguageNameW, 15) 70 | EXPORT_FAKE_FUNC(VerQueryValueA, 16) 71 | EXPORT_FAKE_FUNC(VerQueryValueW, 17) 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /LoadLib/LoadLibHooker.cpp: -------------------------------------------------------------------------------- 1 | #include "LoadLibHooker.h" 2 | #include "DetoursHelper.h" 3 | 4 | void LoadLibHooker::Hook(const std::function& callback) 5 | { 6 | if (callback != nullptr) 7 | Callbacks.emplace_back(callback); 8 | 9 | if (OriginalLoadLibraryA != nullptr) 10 | return; 11 | 12 | OriginalLoadLibraryA = LoadLibraryA; 13 | OriginalLoadLibraryW = LoadLibraryW; 14 | OriginalLoadLibraryExA = LoadLibraryExA; 15 | OriginalLoadLibraryExW = LoadLibraryExW; 16 | 17 | DetoursHelper::Hook 18 | ( 19 | std::pair(&OriginalLoadLibraryA, HookLoadLibraryA), 20 | std::pair(&OriginalLoadLibraryW, HookLoadLibraryW), 21 | std::pair(&OriginalLoadLibraryExA, HookLoadLibraryExA), 22 | std::pair(&OriginalLoadLibraryExW, HookLoadLibraryExW) 23 | ); 24 | } 25 | 26 | void LoadLibHooker::Unhook(const std::function& callback) 27 | { 28 | if (OriginalLoadLibraryA == nullptr) 29 | return; 30 | 31 | if (callback != nullptr) 32 | std::erase_if(Callbacks, [callback](const std::function& it) 33 | { 34 | return *it.target() == *callback.target(); 35 | }); 36 | else 37 | Callbacks.clear(); 38 | 39 | if (!Callbacks.empty()) 40 | return; 41 | 42 | DetoursHelper::Unhook 43 | ( 44 | std::pair(&OriginalLoadLibraryA, HookLoadLibraryA), 45 | std::pair(&OriginalLoadLibraryW, HookLoadLibraryW), 46 | std::pair(&OriginalLoadLibraryExA, HookLoadLibraryExA), 47 | std::pair(&OriginalLoadLibraryExW, HookLoadLibraryExW) 48 | ); 49 | 50 | OriginalLoadLibraryA = nullptr; 51 | OriginalLoadLibraryW = nullptr; 52 | OriginalLoadLibraryExA = nullptr; 53 | OriginalLoadLibraryExW = nullptr; 54 | } 55 | 56 | HMODULE LoadLibHooker::HookLoadLibraryA(LPCSTR lpLibFileName) 57 | { 58 | const auto hModule = OriginalLoadLibraryA(lpLibFileName); 59 | InvokeCallbacks(hModule); 60 | return hModule; 61 | } 62 | 63 | HMODULE LoadLibHooker::HookLoadLibraryW(LPCWSTR lpLibFileName) 64 | { 65 | const auto hModule = OriginalLoadLibraryW(lpLibFileName); 66 | InvokeCallbacks(hModule); 67 | return hModule; 68 | } 69 | 70 | HMODULE LoadLibHooker::HookLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) 71 | { 72 | const auto hModule = OriginalLoadLibraryExA(lpLibFileName, hFile, dwFlags); 73 | InvokeCallbacks(hModule); 74 | return hModule; 75 | } 76 | 77 | HMODULE LoadLibHooker::HookLoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) 78 | { 79 | const auto hModule = OriginalLoadLibraryExW(lpLibFileName, hFile, dwFlags); 80 | InvokeCallbacks(hModule); 81 | return hModule; 82 | } 83 | 84 | void LoadLibHooker::InvokeCallbacks(HMODULE hModule) 85 | { 86 | for (const auto& callback : Callbacks) 87 | callback(hModule); 88 | } 89 | -------------------------------------------------------------------------------- /GalPatch.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.8.34511.84 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hijacker", "Hijacker\Hijacker.vcxitems", "{D5F916DC-4659-44BB-82B5-4E1227C04AC7}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Detours", "Detours\Detours.vcxitems", "{AA355A01-4E65-420D-96DC-2497033C5FE2}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LoadLib", "LoadLib\LoadLib.vcxitems", "{A59B30BD-A94D-4F62-8C81-52D8FDFCDE91}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pe", "Pe\Pe.vcxitems", "{C760FB7A-DE55-4578-9B29-4ABD2BF9770D}" 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Compiler", "Compiler\Compiler.vcxitems", "{6D23E64F-7611-47D8-94B3-7F00C252C953}" 15 | EndProject 16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Common\Common.vcxitems", "{BF6DD8EF-C0AB-449C-B58E-A66BF73E300C}" 17 | EndProject 18 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KrkrPatch", "KrkrPatch\KrkrPatch.vcxproj", "{378B59BC-5957-4E2D-8A30-EE8C659021CD}" 19 | EndProject 20 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WafflePatch", "WafflePatch\WafflePatch.vcxproj", "{9CA7B27F-EDED-4ECA-BEDE-E7865FACCCD1}" 21 | EndProject 22 | Global 23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 24 | Debug|x86 = Debug|x86 25 | Release|x86 = Release|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {378B59BC-5957-4E2D-8A30-EE8C659021CD}.Debug|x86.ActiveCfg = Debug|Win32 29 | {378B59BC-5957-4E2D-8A30-EE8C659021CD}.Debug|x86.Build.0 = Debug|Win32 30 | {378B59BC-5957-4E2D-8A30-EE8C659021CD}.Release|x86.ActiveCfg = Release|Win32 31 | {378B59BC-5957-4E2D-8A30-EE8C659021CD}.Release|x86.Build.0 = Release|Win32 32 | {9CA7B27F-EDED-4ECA-BEDE-E7865FACCCD1}.Debug|x86.ActiveCfg = Debug|Win32 33 | {9CA7B27F-EDED-4ECA-BEDE-E7865FACCCD1}.Debug|x86.Build.0 = Debug|Win32 34 | {9CA7B27F-EDED-4ECA-BEDE-E7865FACCCD1}.Release|x86.ActiveCfg = Release|Win32 35 | {9CA7B27F-EDED-4ECA-BEDE-E7865FACCCD1}.Release|x86.Build.0 = Release|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {467838FA-F0B0-48D6-91D2-C1B3D61D8EB2} 42 | EndGlobalSection 43 | GlobalSection(SharedMSBuildProjectFiles) = preSolution 44 | Common\Common.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 45 | Compiler\Compiler.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 46 | Detours\Detours.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 47 | Hijacker\Hijacker.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 48 | LoadLib\LoadLib.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 49 | Pe\Pe.vcxitems*{378b59bc-5957-4e2d-8a30-ee8c659021cd}*SharedItemsImports = 4 50 | Compiler\Compiler.vcxitems*{6d23e64f-7611-47d8-94b3-7f00c252c953}*SharedItemsImports = 9 51 | Common\Common.vcxitems*{9ca7b27f-eded-4eca-bede-e7865facccd1}*SharedItemsImports = 4 52 | Detours\Detours.vcxitems*{9ca7b27f-eded-4eca-bede-e7865facccd1}*SharedItemsImports = 4 53 | Hijacker\Hijacker.vcxitems*{9ca7b27f-eded-4eca-bede-e7865facccd1}*SharedItemsImports = 4 54 | LoadLib\LoadLib.vcxitems*{9ca7b27f-eded-4eca-bede-e7865facccd1}*SharedItemsImports = 4 55 | Pe\Pe.vcxitems*{9ca7b27f-eded-4eca-bede-e7865facccd1}*SharedItemsImports = 4 56 | LoadLib\LoadLib.vcxitems*{a59b30bd-a94d-4f62-8c81-52d8fdfcde91}*SharedItemsImports = 9 57 | Detours\Detours.vcxitems*{aa355a01-4e65-420d-96dc-2497033c5fe2}*SharedItemsImports = 9 58 | Common\Common.vcxitems*{bf6dd8ef-c0ab-449c-b58e-a66bf73e300c}*SharedItemsImports = 9 59 | Pe\Pe.vcxitems*{c760fb7a-de55-4578-9b29-4abd2bf9770d}*SharedItemsImports = 9 60 | Hijacker\Hijacker.vcxitems*{d5f916dc-4659-44bb-82b5-4e1227c04ac7}*SharedItemsImports = 9 61 | EndGlobalSection 62 | EndGlobal 63 | -------------------------------------------------------------------------------- /Compiler/CompilerHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "CallingConvention/BorlandToCdeclAdapter.h" 10 | #include "CallingConvention/CdeclToBorlandAdapter.h" 11 | #include "CallingConvention/CdeclToThiscallAdapter.h" 12 | #include "CallingConvention/ThiscallToBorlandAdapter.h" 13 | #include "CallingConvention/ThiscallToCdeclAdapter.h" 14 | #include "CompilerType.h" 15 | 16 | class CompilerHelper final 17 | { 18 | public: 19 | static void Analyze (); 20 | 21 | static inline auto CompilerType = CompilerType::Unknown; 22 | 23 | template 24 | static decltype(TFuncPtr) WrapAsStaticFunc () 25 | { 26 | static auto* funcPtr = TFuncPtr; 27 | switch (CompilerType) 28 | { 29 | case CompilerType::Borland: 30 | return reinterpret_cast(CdeclToBorlandAdapter::Call); 31 | 32 | case CompilerType::Msvc: 33 | return TFuncPtr; 34 | 35 | default: 36 | throw std::exception("Unsupported compiler type!"); 37 | } 38 | } 39 | 40 | template 41 | static decltype(TFuncPtr) WrapAsInstanceFunc () 42 | { 43 | static auto* funcPtr = TFuncPtr; 44 | switch (CompilerType) 45 | { 46 | case CompilerType::Borland: 47 | return reinterpret_cast(CdeclToBorlandAdapter::Call); 48 | 49 | case CompilerType::Msvc: 50 | return reinterpret_cast(CdeclToThiscallAdapter::Call); 51 | 52 | default: 53 | throw std::exception("Unsupported compiler type!"); 54 | } 55 | } 56 | 57 | template 58 | static TResult CallStaticFunc (TArgs... args) 59 | { 60 | switch (CompilerType) 61 | { 62 | case CompilerType::Borland: 63 | return BorlandToCdeclAdapter::Call(args...); 64 | 65 | case CompilerType::Msvc: 66 | return (*TFuncPtrPtr)(args...); 67 | 68 | default: 69 | throw std::exception("Unsupported compiler type!"); 70 | } 71 | } 72 | 73 | template 74 | static TResult CallInstanceFunc (TArgs... args) 75 | { 76 | switch (CompilerType) 77 | { 78 | case CompilerType::Borland: 79 | return BorlandToCdeclAdapter::Call(args...); 80 | 81 | case CompilerType::Msvc: 82 | return ThiscallToCdeclAdapter::Call(args...); 83 | 84 | default: 85 | throw std::exception("Unsupported compiler type!"); 86 | } 87 | } 88 | 89 | enum class VType : uint8_t 90 | { 91 | Member, 92 | Destructor 93 | }; 94 | 95 | template 96 | static T* ApplyWrapVTable (T* pObj) 97 | { 98 | *reinterpret_cast(pObj) = WrapVTable(*reinterpret_cast(pObj)); 99 | return pObj; 100 | } 101 | 102 | private: 103 | template 104 | static PVOID WrapVTable (PVOID pVTable) 105 | { 106 | switch (CompilerType) 107 | { 108 | case CompilerType::Borland: 109 | return VTableAdapter::AdaptThiscallToBorland(pVTable); 110 | 111 | case CompilerType::Msvc: 112 | return pVTable; 113 | 114 | default: 115 | throw std::exception("Unsupported compiler type!"); 116 | } 117 | } 118 | 119 | template 120 | class VTableAdapter 121 | { 122 | public: 123 | static PVOID AdaptThiscallToBorland(PVOID pVTable) 124 | { 125 | return AdaptThiscallToBorland(pVTable, std::make_index_sequence()); 126 | } 127 | 128 | private: 129 | template 130 | static PVOID AdaptThiscallToBorland(PVOID pVTable, std::index_sequence indexes) 131 | { 132 | static PVOID pCopyVTable[sizeof...(VTypes)]; 133 | if (pCopyVTable[0] == nullptr) 134 | memcpy(pCopyVTable, pVTable, sizeof(pCopyVTable)); 135 | 136 | static PVOID pNewVTable[] = 137 | { 138 | CallingAdapter::AdaptThiscallToBorland()... 139 | }; 140 | return pNewVTable; 141 | } 142 | }; 143 | 144 | template 145 | class CallingAdapter 146 | { 147 | public: 148 | static constexpr PVOID AdaptThiscallToBorland() 149 | { 150 | if constexpr (VType == VType::Member) 151 | return *(PPVTable + VIndex); 152 | 153 | if constexpr (VType == VType::Destructor) 154 | return reinterpret_cast(ThiscallToBorlandAdapter::Call); 155 | 156 | throw std::exception("Unsupported virtual function type!"); 157 | } 158 | }; 159 | }; 160 | -------------------------------------------------------------------------------- /WafflePatch/WafflePatch.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 17.0 15 | Win32Proj 16 | {9ca7b27f-eded-4eca-bede-e7865facccd1} 17 | WafflePatch 18 | 10.0 19 | 20 | 21 | 22 | DynamicLibrary 23 | true 24 | v143 25 | Unicode 26 | 27 | 28 | DynamicLibrary 29 | false 30 | v143 31 | true 32 | Unicode 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | version 53 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\ 54 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\Objs\ 55 | 56 | 57 | version 58 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\ 59 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\Objs\ 60 | 61 | 62 | true 63 | 64 | 65 | true 66 | 67 | 68 | true 69 | 70 | 71 | 72 | Level3 73 | true 74 | VERSION;WIN32;_DEBUG;WAFFLEPATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 75 | true 76 | Use 77 | pch.h 78 | stdcpplatest 79 | AnySuitable 80 | 81 | 82 | Windows 83 | true 84 | false 85 | 86 | 87 | 88 | 89 | Level3 90 | true 91 | true 92 | true 93 | VERSION;WIN32;NDEBUG;WAFFLEPATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 94 | true 95 | Use 96 | pch.h 97 | stdcpplatest 98 | AnySuitable 99 | Speed 100 | 101 | 102 | Windows 103 | true 104 | true 105 | true 106 | false 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | Create 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatch.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 17.0 15 | Win32Proj 16 | {378b59bc-5957-4e2d-8a30-ee8c659021cd} 17 | KrkrPatch 18 | 10.0 19 | 20 | 21 | 22 | DynamicLibrary 23 | true 24 | v143 25 | Unicode 26 | 27 | 28 | DynamicLibrary 29 | false 30 | v143 31 | true 32 | Unicode 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | version 54 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\ 55 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\Objs\ 56 | 57 | 58 | version 59 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\ 60 | $(SolutionDir)build\$(ProjectName)\$(Configuration)\Objs\ 61 | 62 | 63 | true 64 | 65 | 66 | true 67 | 68 | 69 | true 70 | 71 | 72 | 73 | Level3 74 | true 75 | VERSION;WIN32;_DEBUG;KRKRPATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 76 | true 77 | Use 78 | pch.h 79 | stdcpplatest 80 | AnySuitable 81 | 82 | 83 | Windows 84 | true 85 | false 86 | 87 | 88 | 89 | 90 | Level3 91 | true 92 | true 93 | true 94 | VERSION;WIN32;NDEBUG;KRKRPATCH_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 95 | true 96 | Use 97 | pch.h 98 | stdcpplatest 99 | AnySuitable 100 | Speed 101 | 102 | 103 | Windows 104 | true 105 | true 106 | true 107 | false 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | NotUsing 126 | 127 | 128 | Create 129 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /Hijacker/Winmm/Winmm.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef WINMM 4 | 5 | #define WIN32_LEAN_AND_MEAN 6 | 7 | #include 8 | 9 | #include "Core/Core.h" 10 | 11 | class Hijacker final : Core 12 | { 13 | public: 14 | static void Hijack(LPCTSTR lpSrc); 15 | static void Release(); 16 | 17 | private: 18 | DECLARE_ORIGINAL_FUNC(CloseDriver) 19 | DECLARE_ORIGINAL_FUNC(DefDriverProc) 20 | DECLARE_ORIGINAL_FUNC(DriverCallback) 21 | DECLARE_ORIGINAL_FUNC(DrvGetModuleHandle) 22 | DECLARE_ORIGINAL_FUNC(GetDriverModuleHandle) 23 | DECLARE_ORIGINAL_FUNC(OpenDriver) 24 | DECLARE_ORIGINAL_FUNC(PlaySound) 25 | DECLARE_ORIGINAL_FUNC(PlaySoundA) 26 | DECLARE_ORIGINAL_FUNC(PlaySoundW) 27 | DECLARE_ORIGINAL_FUNC(SendDriverMessage) 28 | DECLARE_ORIGINAL_FUNC(WOWAppExit) 29 | DECLARE_ORIGINAL_FUNC(auxGetDevCapsA) 30 | DECLARE_ORIGINAL_FUNC(auxGetDevCapsW) 31 | DECLARE_ORIGINAL_FUNC(auxGetNumDevs) 32 | DECLARE_ORIGINAL_FUNC(auxGetVolume) 33 | DECLARE_ORIGINAL_FUNC(auxOutMessage) 34 | DECLARE_ORIGINAL_FUNC(auxSetVolume) 35 | DECLARE_ORIGINAL_FUNC(joyConfigChanged) 36 | DECLARE_ORIGINAL_FUNC(joyGetDevCapsA) 37 | DECLARE_ORIGINAL_FUNC(joyGetDevCapsW) 38 | DECLARE_ORIGINAL_FUNC(joyGetNumDevs) 39 | DECLARE_ORIGINAL_FUNC(joyGetPos) 40 | DECLARE_ORIGINAL_FUNC(joyGetPosEx) 41 | DECLARE_ORIGINAL_FUNC(joyGetThreshold) 42 | DECLARE_ORIGINAL_FUNC(joyReleaseCapture) 43 | DECLARE_ORIGINAL_FUNC(joySetCapture) 44 | DECLARE_ORIGINAL_FUNC(joySetThreshold) 45 | DECLARE_ORIGINAL_FUNC(mciDriverNotify) 46 | DECLARE_ORIGINAL_FUNC(mciDriverYield) 47 | DECLARE_ORIGINAL_FUNC(mciExecute) 48 | DECLARE_ORIGINAL_FUNC(mciFreeCommandResource) 49 | DECLARE_ORIGINAL_FUNC(mciGetCreatorTask) 50 | DECLARE_ORIGINAL_FUNC(mciGetDeviceIDA) 51 | DECLARE_ORIGINAL_FUNC(mciGetDeviceIDFromElementIDA) 52 | DECLARE_ORIGINAL_FUNC(mciGetDeviceIDFromElementIDW) 53 | DECLARE_ORIGINAL_FUNC(mciGetDeviceIDW) 54 | DECLARE_ORIGINAL_FUNC(mciGetDriverData) 55 | DECLARE_ORIGINAL_FUNC(mciGetErrorStringA) 56 | DECLARE_ORIGINAL_FUNC(mciGetErrorStringW) 57 | DECLARE_ORIGINAL_FUNC(mciGetYieldProc) 58 | DECLARE_ORIGINAL_FUNC(mciLoadCommandResource) 59 | DECLARE_ORIGINAL_FUNC(mciSendCommandA) 60 | DECLARE_ORIGINAL_FUNC(mciSendCommandW) 61 | DECLARE_ORIGINAL_FUNC(mciSendStringA) 62 | DECLARE_ORIGINAL_FUNC(mciSendStringW) 63 | DECLARE_ORIGINAL_FUNC(mciSetDriverData) 64 | DECLARE_ORIGINAL_FUNC(mciSetYieldProc) 65 | DECLARE_ORIGINAL_FUNC(midiConnect) 66 | DECLARE_ORIGINAL_FUNC(midiDisconnect) 67 | DECLARE_ORIGINAL_FUNC(midiInAddBuffer) 68 | DECLARE_ORIGINAL_FUNC(midiInClose) 69 | DECLARE_ORIGINAL_FUNC(midiInGetDevCapsA) 70 | DECLARE_ORIGINAL_FUNC(midiInGetDevCapsW) 71 | DECLARE_ORIGINAL_FUNC(midiInGetErrorTextA) 72 | DECLARE_ORIGINAL_FUNC(midiInGetErrorTextW) 73 | DECLARE_ORIGINAL_FUNC(midiInGetID) 74 | DECLARE_ORIGINAL_FUNC(midiInGetNumDevs) 75 | DECLARE_ORIGINAL_FUNC(midiInMessage) 76 | DECLARE_ORIGINAL_FUNC(midiInOpen) 77 | DECLARE_ORIGINAL_FUNC(midiInPrepareHeader) 78 | DECLARE_ORIGINAL_FUNC(midiInReset) 79 | DECLARE_ORIGINAL_FUNC(midiInStart) 80 | DECLARE_ORIGINAL_FUNC(midiInStop) 81 | DECLARE_ORIGINAL_FUNC(midiInUnprepareHeader) 82 | DECLARE_ORIGINAL_FUNC(midiOutCacheDrumPatches) 83 | DECLARE_ORIGINAL_FUNC(midiOutCachePatches) 84 | DECLARE_ORIGINAL_FUNC(midiOutClose) 85 | DECLARE_ORIGINAL_FUNC(midiOutGetDevCapsA) 86 | DECLARE_ORIGINAL_FUNC(midiOutGetDevCapsW) 87 | DECLARE_ORIGINAL_FUNC(midiOutGetErrorTextA) 88 | DECLARE_ORIGINAL_FUNC(midiOutGetErrorTextW) 89 | DECLARE_ORIGINAL_FUNC(midiOutGetID) 90 | DECLARE_ORIGINAL_FUNC(midiOutGetNumDevs) 91 | DECLARE_ORIGINAL_FUNC(midiOutGetVolume) 92 | DECLARE_ORIGINAL_FUNC(midiOutLongMsg) 93 | DECLARE_ORIGINAL_FUNC(midiOutMessage) 94 | DECLARE_ORIGINAL_FUNC(midiOutOpen) 95 | DECLARE_ORIGINAL_FUNC(midiOutPrepareHeader) 96 | DECLARE_ORIGINAL_FUNC(midiOutReset) 97 | DECLARE_ORIGINAL_FUNC(midiOutSetVolume) 98 | DECLARE_ORIGINAL_FUNC(midiOutShortMsg) 99 | DECLARE_ORIGINAL_FUNC(midiOutUnprepareHeader) 100 | DECLARE_ORIGINAL_FUNC(midiStreamClose) 101 | DECLARE_ORIGINAL_FUNC(midiStreamOpen) 102 | DECLARE_ORIGINAL_FUNC(midiStreamOut) 103 | DECLARE_ORIGINAL_FUNC(midiStreamPause) 104 | DECLARE_ORIGINAL_FUNC(midiStreamPosition) 105 | DECLARE_ORIGINAL_FUNC(midiStreamProperty) 106 | DECLARE_ORIGINAL_FUNC(midiStreamRestart) 107 | DECLARE_ORIGINAL_FUNC(midiStreamStop) 108 | DECLARE_ORIGINAL_FUNC(mixerClose) 109 | DECLARE_ORIGINAL_FUNC(mixerGetControlDetailsA) 110 | DECLARE_ORIGINAL_FUNC(mixerGetControlDetailsW) 111 | DECLARE_ORIGINAL_FUNC(mixerGetDevCapsA) 112 | DECLARE_ORIGINAL_FUNC(mixerGetDevCapsW) 113 | DECLARE_ORIGINAL_FUNC(mixerGetID) 114 | DECLARE_ORIGINAL_FUNC(mixerGetLineControlsA) 115 | DECLARE_ORIGINAL_FUNC(mixerGetLineControlsW) 116 | DECLARE_ORIGINAL_FUNC(mixerGetLineInfoA) 117 | DECLARE_ORIGINAL_FUNC(mixerGetLineInfoW) 118 | DECLARE_ORIGINAL_FUNC(mixerGetNumDevs) 119 | DECLARE_ORIGINAL_FUNC(mixerMessage) 120 | DECLARE_ORIGINAL_FUNC(mixerOpen) 121 | DECLARE_ORIGINAL_FUNC(mixerSetControlDetails) 122 | DECLARE_ORIGINAL_FUNC(mmDrvInstall) 123 | DECLARE_ORIGINAL_FUNC(mmGetCurrentTask) 124 | DECLARE_ORIGINAL_FUNC(mmTaskBlock) 125 | DECLARE_ORIGINAL_FUNC(mmTaskCreate) 126 | DECLARE_ORIGINAL_FUNC(mmTaskSignal) 127 | DECLARE_ORIGINAL_FUNC(mmTaskYield) 128 | DECLARE_ORIGINAL_FUNC(mmioAdvance) 129 | DECLARE_ORIGINAL_FUNC(mmioAscend) 130 | DECLARE_ORIGINAL_FUNC(mmioClose) 131 | DECLARE_ORIGINAL_FUNC(mmioCreateChunk) 132 | DECLARE_ORIGINAL_FUNC(mmioDescend) 133 | DECLARE_ORIGINAL_FUNC(mmioFlush) 134 | DECLARE_ORIGINAL_FUNC(mmioGetInfo) 135 | DECLARE_ORIGINAL_FUNC(mmioInstallIOProcA) 136 | DECLARE_ORIGINAL_FUNC(mmioInstallIOProcW) 137 | DECLARE_ORIGINAL_FUNC(mmioOpenA) 138 | DECLARE_ORIGINAL_FUNC(mmioOpenW) 139 | DECLARE_ORIGINAL_FUNC(mmioRead) 140 | DECLARE_ORIGINAL_FUNC(mmioRenameA) 141 | DECLARE_ORIGINAL_FUNC(mmioRenameW) 142 | DECLARE_ORIGINAL_FUNC(mmioSeek) 143 | DECLARE_ORIGINAL_FUNC(mmioSendMessage) 144 | DECLARE_ORIGINAL_FUNC(mmioSetBuffer) 145 | DECLARE_ORIGINAL_FUNC(mmioSetInfo) 146 | DECLARE_ORIGINAL_FUNC(mmioStringToFOURCCA) 147 | DECLARE_ORIGINAL_FUNC(mmioStringToFOURCCW) 148 | DECLARE_ORIGINAL_FUNC(mmioWrite) 149 | DECLARE_ORIGINAL_FUNC(mmsystemGetVersion) 150 | DECLARE_ORIGINAL_FUNC(sndPlaySoundA) 151 | DECLARE_ORIGINAL_FUNC(sndPlaySoundW) 152 | DECLARE_ORIGINAL_FUNC(timeBeginPeriod) 153 | DECLARE_ORIGINAL_FUNC(timeEndPeriod) 154 | DECLARE_ORIGINAL_FUNC(timeGetDevCaps) 155 | DECLARE_ORIGINAL_FUNC(timeGetSystemTime) 156 | DECLARE_ORIGINAL_FUNC(timeGetTime) 157 | DECLARE_ORIGINAL_FUNC(timeKillEvent) 158 | DECLARE_ORIGINAL_FUNC(timeSetEvent) 159 | DECLARE_ORIGINAL_FUNC(waveInAddBuffer) 160 | DECLARE_ORIGINAL_FUNC(waveInClose) 161 | DECLARE_ORIGINAL_FUNC(waveInGetDevCapsA) 162 | DECLARE_ORIGINAL_FUNC(waveInGetDevCapsW) 163 | DECLARE_ORIGINAL_FUNC(waveInGetErrorTextA) 164 | DECLARE_ORIGINAL_FUNC(waveInGetErrorTextW) 165 | DECLARE_ORIGINAL_FUNC(waveInGetID) 166 | DECLARE_ORIGINAL_FUNC(waveInGetNumDevs) 167 | DECLARE_ORIGINAL_FUNC(waveInGetPosition) 168 | DECLARE_ORIGINAL_FUNC(waveInMessage) 169 | DECLARE_ORIGINAL_FUNC(waveInOpen) 170 | DECLARE_ORIGINAL_FUNC(waveInPrepareHeader) 171 | DECLARE_ORIGINAL_FUNC(waveInReset) 172 | DECLARE_ORIGINAL_FUNC(waveInStart) 173 | DECLARE_ORIGINAL_FUNC(waveInStop) 174 | DECLARE_ORIGINAL_FUNC(waveInUnprepareHeader) 175 | DECLARE_ORIGINAL_FUNC(waveOutBreakLoop) 176 | DECLARE_ORIGINAL_FUNC(waveOutClose) 177 | DECLARE_ORIGINAL_FUNC(waveOutGetDevCapsA) 178 | DECLARE_ORIGINAL_FUNC(waveOutGetDevCapsW) 179 | DECLARE_ORIGINAL_FUNC(waveOutGetErrorTextA) 180 | DECLARE_ORIGINAL_FUNC(waveOutGetErrorTextW) 181 | DECLARE_ORIGINAL_FUNC(waveOutGetID) 182 | DECLARE_ORIGINAL_FUNC(waveOutGetNumDevs) 183 | DECLARE_ORIGINAL_FUNC(waveOutGetPitch) 184 | DECLARE_ORIGINAL_FUNC(waveOutGetPlaybackRate) 185 | DECLARE_ORIGINAL_FUNC(waveOutGetPosition) 186 | DECLARE_ORIGINAL_FUNC(waveOutGetVolume) 187 | DECLARE_ORIGINAL_FUNC(waveOutMessage) 188 | DECLARE_ORIGINAL_FUNC(waveOutOpen) 189 | DECLARE_ORIGINAL_FUNC(waveOutPause) 190 | DECLARE_ORIGINAL_FUNC(waveOutPrepareHeader) 191 | DECLARE_ORIGINAL_FUNC(waveOutReset) 192 | DECLARE_ORIGINAL_FUNC(waveOutRestart) 193 | DECLARE_ORIGINAL_FUNC(waveOutSetPitch) 194 | DECLARE_ORIGINAL_FUNC(waveOutSetPlaybackRate) 195 | DECLARE_ORIGINAL_FUNC(waveOutSetVolume) 196 | DECLARE_ORIGINAL_FUNC(waveOutUnprepareHeader) 197 | DECLARE_ORIGINAL_FUNC(waveOutWrite) 198 | }; 199 | 200 | #endif 201 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPatcher.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | BOOL KrkrPatcher::PatchSignVerify(HMODULE hModule) 4 | { 5 | switch (CompilerHelper::CompilerType) 6 | { 7 | case CompilerType::Msvc: 8 | { 9 | if (OriginalSignVerifyMsvc == nullptr) 10 | { 11 | static constexpr auto PATTERN_SIGN_VERIFY_MSVC = "\x57\x8B\xF9\x8B\x8F\x80\x2A\x2A\x2A\x85\xC9\x75\x2A\x68\x2A\x2A\x2A\x2A\x8B\xCF\xE8\x2A\x2A\x2A\x2A\x5F\xC3"; 12 | 13 | OriginalSignVerifyMsvc = reinterpret_cast(Pe::FindData(hModule, PATTERN_SIGN_VERIFY_MSVC, strlen(PATTERN_SIGN_VERIFY_MSVC))); 14 | if (OriginalSignVerifyMsvc != nullptr) 15 | { 16 | LOG(L"KrkrPatch: PatchSignVerify Msvc success!"); 17 | 18 | DetoursHelper::Hook(std::pair(&OriginalSignVerifyMsvc, PatchSignVerifyMsvc)); 19 | return TRUE; 20 | } 21 | } 22 | } 23 | return FALSE; 24 | default: 25 | return TRUE; 26 | } 27 | } 28 | 29 | void KrkrPatcher::PatchCreateStream() 30 | { 31 | switch (CompilerHelper::CompilerType) 32 | { 33 | case CompilerType::Borland: 34 | { 35 | static constexpr auto PATTERN_CREATE_STREAM_BORLAND = "\x55\x8B\xEC\x81\xC4\x60\xFF\xFF\xFF\x53\x56\x57\x89\x95\x6C\xFF\xFF\xFF\x89\x85\x70\xFF\xFF\xFF\xB8\x2A\x2A\x2A\x2A\xC7\x85\x7C\xFF\xFF\xFF\x2A\x2A\x2A\x2A\x89\x65\x80\x89\x85\x78\xFF\xFF\xFF\x66\xC7\x45\x84\x2A\x2A\x33\xD2\x89\x55\x90\x64\x8B\x0D\x2A\x2A\x2A\x2A\x89\x8D\x74\xFF\xFF\xFF\x8D\x85\x74\xFF\xFF\xFF\x64\xA3\x2A\x2A\x2A\x2A\x66\xC7\x45\x84\x08\x2A\x8B\x95\x6C\xFF\xFF\xFF\x8B\x85\x70\xFF\xFF\xFF\xE8\x2A\x2A\x2A\x2A\x8B\x95\x74\xFF\xFF\xFF\x64\x89\x15\x2A\x2A\x2A\x2A\xE9\x2A\x06\x2A\x2A"; 36 | 37 | OriginalCreateStreamBorland = reinterpret_cast(Pe::FindData(PATTERN_CREATE_STREAM_BORLAND, strlen(PATTERN_CREATE_STREAM_BORLAND))); 38 | if (OriginalCreateStreamBorland != nullptr) 39 | { 40 | LOG(L"KrkrPatch: PatchCreateStream Borland success!"); 41 | 42 | DetoursHelper::Hook(std::pair(&OriginalCreateStreamBorland, CompilerHelper::WrapAsStaticFunc())); 43 | return; 44 | } 45 | 46 | throw std::exception("PatchCreateStream Borland fail!"); 47 | } 48 | case CompilerType::Msvc: 49 | { 50 | static constexpr auto PATTERN_CREATE_STREAM_MSVC = "\x55\x8B\xEC\x6A\xFF\x68\x2A\x2A\x2A\x2A\x64\xA1\x2A\x2A\x2A\x2A\x50\x83\xEC\x5C\x53\x56\x57\xA1\x2A\x2A\x2A\x2A\x33\xC5\x50\x8D\x45\xF4\x64\xA3\x2A\x2A\x2A\x2A\x89\x65\xF0\x89\x4D\xEC\xC7\x45\xFC\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x8B\x4D\xF4\x64\x89\x0D\x2A\x2A\x2A\x2A\x59\x5F\x5E\x5B\x8B\xE5\x5D\xC3"; 51 | 52 | OriginalCreateStreamMsvc = reinterpret_cast(Pe::FindData(PATTERN_CREATE_STREAM_MSVC, strlen(PATTERN_CREATE_STREAM_MSVC))); 53 | if (OriginalCreateStreamMsvc != nullptr) 54 | { 55 | LOG(L"KrkrPatch: PatchCreateStream Msvc success!"); 56 | 57 | DetoursHelper::Hook(std::pair(&OriginalCreateStreamMsvc, PatchCreateStreamMsvc)); 58 | return; 59 | } 60 | 61 | throw std::exception("PatchCreateStream Msvc fail!"); 62 | } 63 | default: 64 | break; 65 | } 66 | } 67 | 68 | void KrkrPatcher::Unpatch() 69 | { 70 | if (OriginalSignVerifyMsvc != nullptr) 71 | { 72 | DetoursHelper::Unhook(std::pair(&OriginalSignVerifyMsvc, PatchSignVerifyMsvc)); 73 | OriginalSignVerifyMsvc = nullptr; 74 | } 75 | 76 | if (OriginalCreateStreamBorland != nullptr) 77 | { 78 | DetoursHelper::Unhook(std::pair(&OriginalCreateStreamBorland, PatchCreateStreamBorland)); 79 | OriginalCreateStreamBorland = nullptr; 80 | } 81 | 82 | if (OriginalCreateStreamMsvc != nullptr) 83 | { 84 | DetoursHelper::Unhook(std::pair(&OriginalCreateStreamMsvc, PatchCreateStreamMsvc)); 85 | OriginalCreateStreamMsvc = nullptr; 86 | } 87 | } 88 | 89 | BOOL KrkrPatcher::PatchSignVerifyMsvc(HMODULE hModule) 90 | { 91 | return TRUE; 92 | } 93 | 94 | tTJSBinaryStream* KrkrPatcher::PatchCreateStreamBorland(const ttstr& name, tjs_uint32 flags) 95 | { 96 | return PatchCreateStream(name, flags); 97 | } 98 | 99 | tTJSBinaryStream* KrkrPatcher::PatchCreateStreamMsvc(const ttstr& name, tjs_uint32 flags) 100 | { 101 | return PatchCreateStream(name, flags); 102 | } 103 | 104 | template 105 | tTJSBinaryStream* KrkrPatcher::PatchCreateStream(const ttstr& name, tjs_uint32 flags) 106 | { 107 | if (std::wstring(name.c_str()).ends_with(L".sig")) 108 | return tTJSBinaryStream::ApplyWrapVTable(new KrkrPatchSigStream()); 109 | 110 | const auto [patchUrl, patchArc] = PatchUrl(name, flags); 111 | const auto patchUrlStream = CompilerHelper::CallStaticFunc(patchUrl.c_str(), flags); 112 | 113 | if (!patchArc.empty()) 114 | return tTJSBinaryStream::ApplyWrapVTable(new KrkrPatchArcStream(patchArc, reinterpret_cast(patchUrlStream)->CurSegment)); 115 | 116 | return patchUrlStream; 117 | } 118 | 119 | std::pair KrkrPatcher::PatchUrl(const ttstr& name, tjs_uint32 flags) 120 | { 121 | if (flags == TJS_BS_READ) 122 | { 123 | const auto nsname = TVPNormalizeStorageName(name); 124 | LOG(L"KrkrPatch: PatchUrl direct {}", nsname.c_str()); 125 | 126 | if (const auto patchName = PatchName(nsname); !patchName.empty()) 127 | { 128 | static const auto [PatchDirs, PatchArcs] = ListPatches(); 129 | 130 | for (auto& patchDir : PatchDirs) 131 | { 132 | if (const auto patchUrl = patchDir + L"\\" + patchName; TVPIsExistentStorageNoSearch(patchUrl.c_str())) 133 | { 134 | LOG(L"KrkrPatch: PatchUrl redirect {}", patchUrl); 135 | return {patchUrl, L""}; 136 | } 137 | } 138 | 139 | for (auto& patchArc : PatchArcs) 140 | { 141 | if (const auto patchUrl = patchArc + L">" + patchName; TVPIsExistentStorageNoSearch(patchUrl.c_str())) 142 | { 143 | LOG(L"KrkrPatch: PatchUrl redirect {}", patchUrl); 144 | return {patchUrl, patchArc}; 145 | } 146 | } 147 | 148 | // temp for test 149 | /*LOG(L"KrkrPatch: PatchUrl org {}", name.c_str()); 150 | std::wstring a = name.c_str(); 151 | if (a.starts_with(L"arc://./") || !a.starts_with(L"file://./")) 152 | { 153 | const auto stream = CompilerHelper::CallStaticFunc(name.c_str(), flags); 154 | const auto b = PatchName(name); 155 | 156 | std::vector data; 157 | data.resize(stream->GetSize()); 158 | stream->Read(data.data(), data.size()); 159 | stream->Seek(0, SEEK_SET); 160 | 161 | decrypt(stream, data); 162 | 163 | const auto filePath = PathUtil::GetAppPath() + L"dump\\" + b; 164 | 165 | LOG(L"KrkrPatch: PatchUrl dump {}", filePath); 166 | 167 | FileStream fileStream(filePath, L"wb+"); 168 | fileStream.WriteBytes(data.data(), data.size()); 169 | }*/ 170 | } 171 | } 172 | 173 | return {name.c_str(), L""}; 174 | } 175 | 176 | // temp for test 177 | //void KrkrPatcher::decrypt(tTJSBinaryStream* stream, std::vector& output) 178 | //{ 179 | // try 180 | // { 181 | // uint8_t mark[2]; 182 | // 183 | // memset(mark, 0, sizeof(mark)); 184 | // stream->Read(mark, 2); 185 | // 186 | // if (mark[0] == 0xfe && mark[1] == 0xfe) 187 | // { 188 | // uint8_t mode; 189 | // 190 | // stream->Read(&mode, 1); 191 | // 192 | // if (mode != 0 && mode != 1 && mode != 2) 193 | // { 194 | // return; 195 | // } 196 | // 197 | // memset(mark, 0, sizeof(mark)); 198 | // stream->Read(mark, 2); 199 | // 200 | // if (mark[0] != 0xff || mark[1] != 0xfe) 201 | // { 202 | // return; 203 | // } 204 | // 205 | // if (mode == 2) 206 | // { 207 | // tjs_int64 compressed = 0; 208 | // tjs_int64 uncompressed = 0; 209 | // 210 | // stream->Read(&compressed, sizeof(tjs_int64)); 211 | // stream->Read(&uncompressed, sizeof(tjs_int64)); 212 | // 213 | // if (compressed <= 0 || compressed >= INT_MAX || uncompressed <= 0 || uncompressed >= INT_MAX) 214 | // { 215 | // return; 216 | // } 217 | // 218 | // std::vector data((size_t)compressed); 219 | // 220 | // if (stream->Read(data.data(), (tjs_uint)compressed) != compressed) 221 | // { 222 | // return; 223 | // } 224 | // 225 | // size_t count = (size_t)uncompressed; 226 | // 227 | // std::vector buffer(count + 2); 228 | // 229 | // buffer[0] = mark[0]; 230 | // buffer[1] = mark[1]; 231 | // 232 | // BYTE* dest = buffer.data() + 2; 233 | // DWORD destLen = uncompressed; 234 | // 235 | // int result = 0; 236 | // 237 | // try 238 | // { 239 | // result = ZLIB_uncompress(dest, &destLen, data.data(), (LONG64)compressed); 240 | // } 241 | // catch (...) 242 | // { 243 | // return; 244 | // } 245 | // 246 | // if (result != 0 || destLen != uncompressed) 247 | // { 248 | // return; 249 | // } 250 | // 251 | // output = std::move(buffer); 252 | // } 253 | // else 254 | // { 255 | // tjs_int64 startpos = (tjs_int64)stream->Seek(0, TJS_BS_SEEK_CUR); 256 | // tjs_int64 endpos = (tjs_int64)stream->Seek(0, TJS_BS_SEEK_END); 257 | // 258 | // stream->Seek(startpos, TJS_BS_SEEK_SET); 259 | // 260 | // tjs_int64 size = endpos - startpos; 261 | // 262 | // if (size <= 0 || size >= INT_MAX) 263 | // { 264 | // return; 265 | // } 266 | // 267 | // size_t count = (size_t)(size / sizeof(tjs_char)); 268 | // 269 | // if (count == 0) 270 | // { 271 | // return; 272 | // } 273 | // 274 | // std::vector buffer(count); 275 | // 276 | // tjs_uint sizeToRead = (tjs_uint)size; 277 | // 278 | // stream->Read(buffer.data(), sizeToRead); 279 | // 280 | // if (mode == 0) 281 | // { 282 | // for (size_t i = 0; i < count; i++) 283 | // { 284 | // tjs_char ch = buffer[i]; 285 | // if (ch >= 0x20) buffer[i] = ch ^ (((ch & 0xfe) << 8) ^ 1); 286 | // } 287 | // } 288 | // else if (mode == 1) 289 | // { 290 | // for (size_t i = 0; i < count; i++) 291 | // { 292 | // tjs_char ch = buffer[i]; 293 | // ch = ((ch & 0xaaaaaaaa) >> 1) | ((ch & 0x55555555) << 1); 294 | // buffer[i] = ch; 295 | // } 296 | // } 297 | // 298 | // size_t sizeToCopy = count * sizeof(tjs_char); 299 | // 300 | // output.resize(sizeToCopy + 2); 301 | // 302 | // output[0] = mark[0]; 303 | // output[1] = mark[1]; 304 | // 305 | // memcpy(output.data() + 2, buffer.data(), sizeToCopy); 306 | // } 307 | // } 308 | // } 309 | // catch (...) 310 | // { 311 | // } 312 | //} 313 | 314 | std::wstring KrkrPatcher::PatchName(const ttstr& name) 315 | { 316 | std::wstring patchName = name.c_str(); 317 | 318 | auto pos = std::wstring::npos; 319 | if (patchName.starts_with(L"archive://./") || patchName.starts_with(L"arc://./")) 320 | pos = patchName.find_last_of(L'/') + 1; 321 | else if (patchName.starts_with(L"file://./") && patchName.contains(L".xp3>")) 322 | pos = patchName.find_last_of(L"/>") + 1; 323 | 324 | patchName.erase(0, pos); 325 | return patchName; 326 | } 327 | 328 | std::tuple, std::vector> KrkrPatcher::ListPatches() 329 | { 330 | const auto appPath = PathUtil::GetAppPath(); 331 | 332 | std::vector patchDirs; 333 | std::vector patchArcs; 334 | 335 | static constexpr auto PATCH_COUNT = 9; 336 | for (int num = PATCH_COUNT; num > 0; --num) 337 | { 338 | const auto patchPrefix = appPath + L"unencrypted" + (num == 1 ? L"" : std::to_wstring(num)); 339 | 340 | if (const auto patchDir = patchPrefix + L"\\"; GetFileAttributes(patchDir.c_str()) == FILE_ATTRIBUTE_DIRECTORY) 341 | patchDirs.emplace_back(patchDir); 342 | 343 | if (const auto patchArc = patchPrefix + L".xp3"; GetFileAttributes(patchArc.c_str()) == FILE_ATTRIBUTE_ARCHIVE) 344 | patchArcs.emplace_back(patchArc); 345 | } 346 | 347 | return {patchDirs, patchArcs}; 348 | } 349 | -------------------------------------------------------------------------------- /Hijacker/Winmm/Winmm.cpp: -------------------------------------------------------------------------------- 1 | #ifdef WINMM 2 | 3 | #include 4 | 5 | #include "Winmm.h" 6 | 7 | void Hijacker::Hijack(LPCTSTR lpSrc) 8 | { 9 | Core::Hijack(_T("winmm.dll"), lpSrc); 10 | 11 | RESOLVE_ORIGINAL_FUNC(CloseDriver) 12 | RESOLVE_ORIGINAL_FUNC(DefDriverProc) 13 | RESOLVE_ORIGINAL_FUNC(DriverCallback) 14 | RESOLVE_ORIGINAL_FUNC(DrvGetModuleHandle) 15 | RESOLVE_ORIGINAL_FUNC(GetDriverModuleHandle) 16 | RESOLVE_ORIGINAL_FUNC(OpenDriver) 17 | RESOLVE_ORIGINAL_FUNC(PlaySound) 18 | RESOLVE_ORIGINAL_FUNC(PlaySoundA) 19 | RESOLVE_ORIGINAL_FUNC(PlaySoundW) 20 | RESOLVE_ORIGINAL_FUNC(SendDriverMessage) 21 | RESOLVE_ORIGINAL_FUNC(WOWAppExit) 22 | RESOLVE_ORIGINAL_FUNC(auxGetDevCapsA) 23 | RESOLVE_ORIGINAL_FUNC(auxGetDevCapsW) 24 | RESOLVE_ORIGINAL_FUNC(auxGetNumDevs) 25 | RESOLVE_ORIGINAL_FUNC(auxGetVolume) 26 | RESOLVE_ORIGINAL_FUNC(auxOutMessage) 27 | RESOLVE_ORIGINAL_FUNC(auxSetVolume) 28 | RESOLVE_ORIGINAL_FUNC(joyConfigChanged) 29 | RESOLVE_ORIGINAL_FUNC(joyGetDevCapsA) 30 | RESOLVE_ORIGINAL_FUNC(joyGetDevCapsW) 31 | RESOLVE_ORIGINAL_FUNC(joyGetNumDevs) 32 | RESOLVE_ORIGINAL_FUNC(joyGetPos) 33 | RESOLVE_ORIGINAL_FUNC(joyGetPosEx) 34 | RESOLVE_ORIGINAL_FUNC(joyGetThreshold) 35 | RESOLVE_ORIGINAL_FUNC(joyReleaseCapture) 36 | RESOLVE_ORIGINAL_FUNC(joySetCapture) 37 | RESOLVE_ORIGINAL_FUNC(joySetThreshold) 38 | RESOLVE_ORIGINAL_FUNC(mciDriverNotify) 39 | RESOLVE_ORIGINAL_FUNC(mciDriverYield) 40 | RESOLVE_ORIGINAL_FUNC(mciExecute) 41 | RESOLVE_ORIGINAL_FUNC(mciFreeCommandResource) 42 | RESOLVE_ORIGINAL_FUNC(mciGetCreatorTask) 43 | RESOLVE_ORIGINAL_FUNC(mciGetDeviceIDA) 44 | RESOLVE_ORIGINAL_FUNC(mciGetDeviceIDFromElementIDA) 45 | RESOLVE_ORIGINAL_FUNC(mciGetDeviceIDFromElementIDW) 46 | RESOLVE_ORIGINAL_FUNC(mciGetDeviceIDW) 47 | RESOLVE_ORIGINAL_FUNC(mciGetDriverData) 48 | RESOLVE_ORIGINAL_FUNC(mciGetErrorStringA) 49 | RESOLVE_ORIGINAL_FUNC(mciGetErrorStringW) 50 | RESOLVE_ORIGINAL_FUNC(mciGetYieldProc) 51 | RESOLVE_ORIGINAL_FUNC(mciLoadCommandResource) 52 | RESOLVE_ORIGINAL_FUNC(mciSendCommandA) 53 | RESOLVE_ORIGINAL_FUNC(mciSendCommandW) 54 | RESOLVE_ORIGINAL_FUNC(mciSendStringA) 55 | RESOLVE_ORIGINAL_FUNC(mciSendStringW) 56 | RESOLVE_ORIGINAL_FUNC(mciSetDriverData) 57 | RESOLVE_ORIGINAL_FUNC(mciSetYieldProc) 58 | RESOLVE_ORIGINAL_FUNC(midiConnect) 59 | RESOLVE_ORIGINAL_FUNC(midiDisconnect) 60 | RESOLVE_ORIGINAL_FUNC(midiInAddBuffer) 61 | RESOLVE_ORIGINAL_FUNC(midiInClose) 62 | RESOLVE_ORIGINAL_FUNC(midiInGetDevCapsA) 63 | RESOLVE_ORIGINAL_FUNC(midiInGetDevCapsW) 64 | RESOLVE_ORIGINAL_FUNC(midiInGetErrorTextA) 65 | RESOLVE_ORIGINAL_FUNC(midiInGetErrorTextW) 66 | RESOLVE_ORIGINAL_FUNC(midiInGetID) 67 | RESOLVE_ORIGINAL_FUNC(midiInGetNumDevs) 68 | RESOLVE_ORIGINAL_FUNC(midiInMessage) 69 | RESOLVE_ORIGINAL_FUNC(midiInOpen) 70 | RESOLVE_ORIGINAL_FUNC(midiInPrepareHeader) 71 | RESOLVE_ORIGINAL_FUNC(midiInReset) 72 | RESOLVE_ORIGINAL_FUNC(midiInStart) 73 | RESOLVE_ORIGINAL_FUNC(midiInStop) 74 | RESOLVE_ORIGINAL_FUNC(midiInUnprepareHeader) 75 | RESOLVE_ORIGINAL_FUNC(midiOutCacheDrumPatches) 76 | RESOLVE_ORIGINAL_FUNC(midiOutCachePatches) 77 | RESOLVE_ORIGINAL_FUNC(midiOutClose) 78 | RESOLVE_ORIGINAL_FUNC(midiOutGetDevCapsA) 79 | RESOLVE_ORIGINAL_FUNC(midiOutGetDevCapsW) 80 | RESOLVE_ORIGINAL_FUNC(midiOutGetErrorTextA) 81 | RESOLVE_ORIGINAL_FUNC(midiOutGetErrorTextW) 82 | RESOLVE_ORIGINAL_FUNC(midiOutGetID) 83 | RESOLVE_ORIGINAL_FUNC(midiOutGetNumDevs) 84 | RESOLVE_ORIGINAL_FUNC(midiOutGetVolume) 85 | RESOLVE_ORIGINAL_FUNC(midiOutLongMsg) 86 | RESOLVE_ORIGINAL_FUNC(midiOutMessage) 87 | RESOLVE_ORIGINAL_FUNC(midiOutOpen) 88 | RESOLVE_ORIGINAL_FUNC(midiOutPrepareHeader) 89 | RESOLVE_ORIGINAL_FUNC(midiOutReset) 90 | RESOLVE_ORIGINAL_FUNC(midiOutSetVolume) 91 | RESOLVE_ORIGINAL_FUNC(midiOutShortMsg) 92 | RESOLVE_ORIGINAL_FUNC(midiOutUnprepareHeader) 93 | RESOLVE_ORIGINAL_FUNC(midiStreamClose) 94 | RESOLVE_ORIGINAL_FUNC(midiStreamOpen) 95 | RESOLVE_ORIGINAL_FUNC(midiStreamOut) 96 | RESOLVE_ORIGINAL_FUNC(midiStreamPause) 97 | RESOLVE_ORIGINAL_FUNC(midiStreamPosition) 98 | RESOLVE_ORIGINAL_FUNC(midiStreamProperty) 99 | RESOLVE_ORIGINAL_FUNC(midiStreamRestart) 100 | RESOLVE_ORIGINAL_FUNC(midiStreamStop) 101 | RESOLVE_ORIGINAL_FUNC(mixerClose) 102 | RESOLVE_ORIGINAL_FUNC(mixerGetControlDetailsA) 103 | RESOLVE_ORIGINAL_FUNC(mixerGetControlDetailsW) 104 | RESOLVE_ORIGINAL_FUNC(mixerGetDevCapsA) 105 | RESOLVE_ORIGINAL_FUNC(mixerGetDevCapsW) 106 | RESOLVE_ORIGINAL_FUNC(mixerGetID) 107 | RESOLVE_ORIGINAL_FUNC(mixerGetLineControlsA) 108 | RESOLVE_ORIGINAL_FUNC(mixerGetLineControlsW) 109 | RESOLVE_ORIGINAL_FUNC(mixerGetLineInfoA) 110 | RESOLVE_ORIGINAL_FUNC(mixerGetLineInfoW) 111 | RESOLVE_ORIGINAL_FUNC(mixerGetNumDevs) 112 | RESOLVE_ORIGINAL_FUNC(mixerMessage) 113 | RESOLVE_ORIGINAL_FUNC(mixerOpen) 114 | RESOLVE_ORIGINAL_FUNC(mixerSetControlDetails) 115 | RESOLVE_ORIGINAL_FUNC(mmDrvInstall) 116 | RESOLVE_ORIGINAL_FUNC(mmGetCurrentTask) 117 | RESOLVE_ORIGINAL_FUNC(mmTaskBlock) 118 | RESOLVE_ORIGINAL_FUNC(mmTaskCreate) 119 | RESOLVE_ORIGINAL_FUNC(mmTaskSignal) 120 | RESOLVE_ORIGINAL_FUNC(mmTaskYield) 121 | RESOLVE_ORIGINAL_FUNC(mmioAdvance) 122 | RESOLVE_ORIGINAL_FUNC(mmioAscend) 123 | RESOLVE_ORIGINAL_FUNC(mmioClose) 124 | RESOLVE_ORIGINAL_FUNC(mmioCreateChunk) 125 | RESOLVE_ORIGINAL_FUNC(mmioDescend) 126 | RESOLVE_ORIGINAL_FUNC(mmioFlush) 127 | RESOLVE_ORIGINAL_FUNC(mmioGetInfo) 128 | RESOLVE_ORIGINAL_FUNC(mmioInstallIOProcA) 129 | RESOLVE_ORIGINAL_FUNC(mmioInstallIOProcW) 130 | RESOLVE_ORIGINAL_FUNC(mmioOpenA) 131 | RESOLVE_ORIGINAL_FUNC(mmioOpenW) 132 | RESOLVE_ORIGINAL_FUNC(mmioRead) 133 | RESOLVE_ORIGINAL_FUNC(mmioRenameA) 134 | RESOLVE_ORIGINAL_FUNC(mmioRenameW) 135 | RESOLVE_ORIGINAL_FUNC(mmioSeek) 136 | RESOLVE_ORIGINAL_FUNC(mmioSendMessage) 137 | RESOLVE_ORIGINAL_FUNC(mmioSetBuffer) 138 | RESOLVE_ORIGINAL_FUNC(mmioSetInfo) 139 | RESOLVE_ORIGINAL_FUNC(mmioStringToFOURCCA) 140 | RESOLVE_ORIGINAL_FUNC(mmioStringToFOURCCW) 141 | RESOLVE_ORIGINAL_FUNC(mmioWrite) 142 | RESOLVE_ORIGINAL_FUNC(mmsystemGetVersion) 143 | RESOLVE_ORIGINAL_FUNC(sndPlaySoundA) 144 | RESOLVE_ORIGINAL_FUNC(sndPlaySoundW) 145 | RESOLVE_ORIGINAL_FUNC(timeBeginPeriod) 146 | RESOLVE_ORIGINAL_FUNC(timeEndPeriod) 147 | RESOLVE_ORIGINAL_FUNC(timeGetDevCaps) 148 | RESOLVE_ORIGINAL_FUNC(timeGetSystemTime) 149 | RESOLVE_ORIGINAL_FUNC(timeGetTime) 150 | RESOLVE_ORIGINAL_FUNC(timeKillEvent) 151 | RESOLVE_ORIGINAL_FUNC(timeSetEvent) 152 | RESOLVE_ORIGINAL_FUNC(waveInAddBuffer) 153 | RESOLVE_ORIGINAL_FUNC(waveInClose) 154 | RESOLVE_ORIGINAL_FUNC(waveInGetDevCapsA) 155 | RESOLVE_ORIGINAL_FUNC(waveInGetDevCapsW) 156 | RESOLVE_ORIGINAL_FUNC(waveInGetErrorTextA) 157 | RESOLVE_ORIGINAL_FUNC(waveInGetErrorTextW) 158 | RESOLVE_ORIGINAL_FUNC(waveInGetID) 159 | RESOLVE_ORIGINAL_FUNC(waveInGetNumDevs) 160 | RESOLVE_ORIGINAL_FUNC(waveInGetPosition) 161 | RESOLVE_ORIGINAL_FUNC(waveInMessage) 162 | RESOLVE_ORIGINAL_FUNC(waveInOpen) 163 | RESOLVE_ORIGINAL_FUNC(waveInPrepareHeader) 164 | RESOLVE_ORIGINAL_FUNC(waveInReset) 165 | RESOLVE_ORIGINAL_FUNC(waveInStart) 166 | RESOLVE_ORIGINAL_FUNC(waveInStop) 167 | RESOLVE_ORIGINAL_FUNC(waveInUnprepareHeader) 168 | RESOLVE_ORIGINAL_FUNC(waveOutBreakLoop) 169 | RESOLVE_ORIGINAL_FUNC(waveOutClose) 170 | RESOLVE_ORIGINAL_FUNC(waveOutGetDevCapsA) 171 | RESOLVE_ORIGINAL_FUNC(waveOutGetDevCapsW) 172 | RESOLVE_ORIGINAL_FUNC(waveOutGetErrorTextA) 173 | RESOLVE_ORIGINAL_FUNC(waveOutGetErrorTextW) 174 | RESOLVE_ORIGINAL_FUNC(waveOutGetID) 175 | RESOLVE_ORIGINAL_FUNC(waveOutGetNumDevs) 176 | RESOLVE_ORIGINAL_FUNC(waveOutGetPitch) 177 | RESOLVE_ORIGINAL_FUNC(waveOutGetPlaybackRate) 178 | RESOLVE_ORIGINAL_FUNC(waveOutGetPosition) 179 | RESOLVE_ORIGINAL_FUNC(waveOutGetVolume) 180 | RESOLVE_ORIGINAL_FUNC(waveOutMessage) 181 | RESOLVE_ORIGINAL_FUNC(waveOutOpen) 182 | RESOLVE_ORIGINAL_FUNC(waveOutPause) 183 | RESOLVE_ORIGINAL_FUNC(waveOutPrepareHeader) 184 | RESOLVE_ORIGINAL_FUNC(waveOutReset) 185 | RESOLVE_ORIGINAL_FUNC(waveOutRestart) 186 | RESOLVE_ORIGINAL_FUNC(waveOutSetPitch) 187 | RESOLVE_ORIGINAL_FUNC(waveOutSetPlaybackRate) 188 | RESOLVE_ORIGINAL_FUNC(waveOutSetVolume) 189 | RESOLVE_ORIGINAL_FUNC(waveOutUnprepareHeader) 190 | RESOLVE_ORIGINAL_FUNC(waveOutWrite) 191 | } 192 | 193 | void Hijacker::Release() 194 | { 195 | Core::Release(); 196 | } 197 | 198 | #define DECLARE_FAKE_FUNC_SIMPLIFY(fn) DECLARE_FAKE_FUNC(fn, Hijacker) 199 | DECLARE_FAKE_FUNC_SIMPLIFY(CloseDriver) 200 | DECLARE_FAKE_FUNC_SIMPLIFY(DefDriverProc) 201 | DECLARE_FAKE_FUNC_SIMPLIFY(DriverCallback) 202 | DECLARE_FAKE_FUNC_SIMPLIFY(DrvGetModuleHandle) 203 | DECLARE_FAKE_FUNC_SIMPLIFY(GetDriverModuleHandle) 204 | DECLARE_FAKE_FUNC_SIMPLIFY(OpenDriver) 205 | DECLARE_FAKE_FUNC_SIMPLIFY(PlaySound) 206 | DECLARE_FAKE_FUNC_SIMPLIFY(PlaySoundA) 207 | DECLARE_FAKE_FUNC_SIMPLIFY(PlaySoundW) 208 | DECLARE_FAKE_FUNC_SIMPLIFY(SendDriverMessage) 209 | DECLARE_FAKE_FUNC_SIMPLIFY(WOWAppExit) 210 | DECLARE_FAKE_FUNC_SIMPLIFY(auxGetDevCapsA) 211 | DECLARE_FAKE_FUNC_SIMPLIFY(auxGetDevCapsW) 212 | DECLARE_FAKE_FUNC_SIMPLIFY(auxGetNumDevs) 213 | DECLARE_FAKE_FUNC_SIMPLIFY(auxGetVolume) 214 | DECLARE_FAKE_FUNC_SIMPLIFY(auxOutMessage) 215 | DECLARE_FAKE_FUNC_SIMPLIFY(auxSetVolume) 216 | DECLARE_FAKE_FUNC_SIMPLIFY(joyConfigChanged) 217 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetDevCapsA) 218 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetDevCapsW) 219 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetNumDevs) 220 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetPos) 221 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetPosEx) 222 | DECLARE_FAKE_FUNC_SIMPLIFY(joyGetThreshold) 223 | DECLARE_FAKE_FUNC_SIMPLIFY(joyReleaseCapture) 224 | DECLARE_FAKE_FUNC_SIMPLIFY(joySetCapture) 225 | DECLARE_FAKE_FUNC_SIMPLIFY(joySetThreshold) 226 | DECLARE_FAKE_FUNC_SIMPLIFY(mciDriverNotify) 227 | DECLARE_FAKE_FUNC_SIMPLIFY(mciDriverYield) 228 | DECLARE_FAKE_FUNC_SIMPLIFY(mciExecute) 229 | DECLARE_FAKE_FUNC_SIMPLIFY(mciFreeCommandResource) 230 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetCreatorTask) 231 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetDeviceIDA) 232 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetDeviceIDFromElementIDA) 233 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetDeviceIDFromElementIDW) 234 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetDeviceIDW) 235 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetDriverData) 236 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetErrorStringA) 237 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetErrorStringW) 238 | DECLARE_FAKE_FUNC_SIMPLIFY(mciGetYieldProc) 239 | DECLARE_FAKE_FUNC_SIMPLIFY(mciLoadCommandResource) 240 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSendCommandA) 241 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSendCommandW) 242 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSendStringA) 243 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSendStringW) 244 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSetDriverData) 245 | DECLARE_FAKE_FUNC_SIMPLIFY(mciSetYieldProc) 246 | DECLARE_FAKE_FUNC_SIMPLIFY(midiConnect) 247 | DECLARE_FAKE_FUNC_SIMPLIFY(midiDisconnect) 248 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInAddBuffer) 249 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInClose) 250 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetDevCapsA) 251 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetDevCapsW) 252 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetErrorTextA) 253 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetErrorTextW) 254 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetID) 255 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInGetNumDevs) 256 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInMessage) 257 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInOpen) 258 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInPrepareHeader) 259 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInReset) 260 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInStart) 261 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInStop) 262 | DECLARE_FAKE_FUNC_SIMPLIFY(midiInUnprepareHeader) 263 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutCacheDrumPatches) 264 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutCachePatches) 265 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutClose) 266 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetDevCapsA) 267 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetDevCapsW) 268 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetErrorTextA) 269 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetErrorTextW) 270 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetID) 271 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetNumDevs) 272 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutGetVolume) 273 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutLongMsg) 274 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutMessage) 275 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutOpen) 276 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutPrepareHeader) 277 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutReset) 278 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutSetVolume) 279 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutShortMsg) 280 | DECLARE_FAKE_FUNC_SIMPLIFY(midiOutUnprepareHeader) 281 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamClose) 282 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamOpen) 283 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamOut) 284 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamPause) 285 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamPosition) 286 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamProperty) 287 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamRestart) 288 | DECLARE_FAKE_FUNC_SIMPLIFY(midiStreamStop) 289 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerClose) 290 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetControlDetailsA) 291 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetControlDetailsW) 292 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetDevCapsA) 293 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetDevCapsW) 294 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetID) 295 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetLineControlsA) 296 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetLineControlsW) 297 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetLineInfoA) 298 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetLineInfoW) 299 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerGetNumDevs) 300 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerMessage) 301 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerOpen) 302 | DECLARE_FAKE_FUNC_SIMPLIFY(mixerSetControlDetails) 303 | DECLARE_FAKE_FUNC_SIMPLIFY(mmDrvInstall) 304 | DECLARE_FAKE_FUNC_SIMPLIFY(mmGetCurrentTask) 305 | DECLARE_FAKE_FUNC_SIMPLIFY(mmTaskBlock) 306 | DECLARE_FAKE_FUNC_SIMPLIFY(mmTaskCreate) 307 | DECLARE_FAKE_FUNC_SIMPLIFY(mmTaskSignal) 308 | DECLARE_FAKE_FUNC_SIMPLIFY(mmTaskYield) 309 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioAdvance) 310 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioAscend) 311 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioClose) 312 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioCreateChunk) 313 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioDescend) 314 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioFlush) 315 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioGetInfo) 316 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioInstallIOProcA) 317 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioInstallIOProcW) 318 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioOpenA) 319 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioOpenW) 320 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioRead) 321 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioRenameA) 322 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioRenameW) 323 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioSeek) 324 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioSendMessage) 325 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioSetBuffer) 326 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioSetInfo) 327 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioStringToFOURCCA) 328 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioStringToFOURCCW) 329 | DECLARE_FAKE_FUNC_SIMPLIFY(mmioWrite) 330 | DECLARE_FAKE_FUNC_SIMPLIFY(mmsystemGetVersion) 331 | DECLARE_FAKE_FUNC_SIMPLIFY(sndPlaySoundA) 332 | DECLARE_FAKE_FUNC_SIMPLIFY(sndPlaySoundW) 333 | DECLARE_FAKE_FUNC_SIMPLIFY(timeBeginPeriod) 334 | DECLARE_FAKE_FUNC_SIMPLIFY(timeEndPeriod) 335 | DECLARE_FAKE_FUNC_SIMPLIFY(timeGetDevCaps) 336 | DECLARE_FAKE_FUNC_SIMPLIFY(timeGetSystemTime) 337 | DECLARE_FAKE_FUNC_SIMPLIFY(timeGetTime) 338 | DECLARE_FAKE_FUNC_SIMPLIFY(timeKillEvent) 339 | DECLARE_FAKE_FUNC_SIMPLIFY(timeSetEvent) 340 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInAddBuffer) 341 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInClose) 342 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetDevCapsA) 343 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetDevCapsW) 344 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetErrorTextA) 345 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetErrorTextW) 346 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetID) 347 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetNumDevs) 348 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInGetPosition) 349 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInMessage) 350 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInOpen) 351 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInPrepareHeader) 352 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInReset) 353 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInStart) 354 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInStop) 355 | DECLARE_FAKE_FUNC_SIMPLIFY(waveInUnprepareHeader) 356 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutBreakLoop) 357 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutClose) 358 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetDevCapsA) 359 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetDevCapsW) 360 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetErrorTextA) 361 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetErrorTextW) 362 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetID) 363 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetNumDevs) 364 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetPitch) 365 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetPlaybackRate) 366 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetPosition) 367 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutGetVolume) 368 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutMessage) 369 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutOpen) 370 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutPause) 371 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutPrepareHeader) 372 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutReset) 373 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutRestart) 374 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutSetPitch) 375 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutSetPlaybackRate) 376 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutSetVolume) 377 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutUnprepareHeader) 378 | DECLARE_FAKE_FUNC_SIMPLIFY(waveOutWrite) 379 | #undef DECLARE_FAKE_FUNC_SIMPLIFY 380 | 381 | EXPORT_FAKE_FUNC(CloseDriver, 1) 382 | EXPORT_FAKE_FUNC(DefDriverProc, 2) 383 | EXPORT_FAKE_FUNC(DriverCallback, 3) 384 | EXPORT_FAKE_FUNC(DrvGetModuleHandle, 4) 385 | EXPORT_FAKE_FUNC(GetDriverModuleHandle, 5) 386 | EXPORT_FAKE_FUNC(OpenDriver, 6) 387 | EXPORT_FAKE_FUNC(PlaySound, 7) 388 | EXPORT_FAKE_FUNC(PlaySoundA, 8) 389 | EXPORT_FAKE_FUNC(PlaySoundW, 9) 390 | EXPORT_FAKE_FUNC(SendDriverMessage, 10) 391 | EXPORT_FAKE_FUNC(WOWAppExit, 11) 392 | EXPORT_FAKE_FUNC(auxGetDevCapsA, 12) 393 | EXPORT_FAKE_FUNC(auxGetDevCapsW, 13) 394 | EXPORT_FAKE_FUNC(auxGetNumDevs, 14) 395 | EXPORT_FAKE_FUNC(auxGetVolume, 15) 396 | EXPORT_FAKE_FUNC(auxOutMessage, 16) 397 | EXPORT_FAKE_FUNC(auxSetVolume, 17) 398 | EXPORT_FAKE_FUNC(joyConfigChanged, 18) 399 | EXPORT_FAKE_FUNC(joyGetDevCapsA, 19) 400 | EXPORT_FAKE_FUNC(joyGetDevCapsW, 20) 401 | EXPORT_FAKE_FUNC(joyGetNumDevs, 21) 402 | EXPORT_FAKE_FUNC(joyGetPos, 22) 403 | EXPORT_FAKE_FUNC(joyGetPosEx, 23) 404 | EXPORT_FAKE_FUNC(joyGetThreshold, 24) 405 | EXPORT_FAKE_FUNC(joyReleaseCapture, 25) 406 | EXPORT_FAKE_FUNC(joySetCapture, 26) 407 | EXPORT_FAKE_FUNC(joySetThreshold, 27) 408 | EXPORT_FAKE_FUNC(mciDriverNotify, 28) 409 | EXPORT_FAKE_FUNC(mciDriverYield, 29) 410 | EXPORT_FAKE_FUNC(mciExecute, 30) 411 | EXPORT_FAKE_FUNC(mciFreeCommandResource, 31) 412 | EXPORT_FAKE_FUNC(mciGetCreatorTask, 32) 413 | EXPORT_FAKE_FUNC(mciGetDeviceIDA, 33) 414 | EXPORT_FAKE_FUNC(mciGetDeviceIDFromElementIDA, 34) 415 | EXPORT_FAKE_FUNC(mciGetDeviceIDFromElementIDW, 35) 416 | EXPORT_FAKE_FUNC(mciGetDeviceIDW, 36) 417 | EXPORT_FAKE_FUNC(mciGetDriverData, 37) 418 | EXPORT_FAKE_FUNC(mciGetErrorStringA, 38) 419 | EXPORT_FAKE_FUNC(mciGetErrorStringW, 39) 420 | EXPORT_FAKE_FUNC(mciGetYieldProc, 40) 421 | EXPORT_FAKE_FUNC(mciLoadCommandResource, 41) 422 | EXPORT_FAKE_FUNC(mciSendCommandA, 42) 423 | EXPORT_FAKE_FUNC(mciSendCommandW, 43) 424 | EXPORT_FAKE_FUNC(mciSendStringA, 44) 425 | EXPORT_FAKE_FUNC(mciSendStringW, 45) 426 | EXPORT_FAKE_FUNC(mciSetDriverData, 46) 427 | EXPORT_FAKE_FUNC(mciSetYieldProc, 47) 428 | EXPORT_FAKE_FUNC(midiConnect, 48) 429 | EXPORT_FAKE_FUNC(midiDisconnect, 49) 430 | EXPORT_FAKE_FUNC(midiInAddBuffer, 50) 431 | EXPORT_FAKE_FUNC(midiInClose, 51) 432 | EXPORT_FAKE_FUNC(midiInGetDevCapsA, 52) 433 | EXPORT_FAKE_FUNC(midiInGetDevCapsW, 53) 434 | EXPORT_FAKE_FUNC(midiInGetErrorTextA, 54) 435 | EXPORT_FAKE_FUNC(midiInGetErrorTextW, 55) 436 | EXPORT_FAKE_FUNC(midiInGetID, 56) 437 | EXPORT_FAKE_FUNC(midiInGetNumDevs, 57) 438 | EXPORT_FAKE_FUNC(midiInMessage, 58) 439 | EXPORT_FAKE_FUNC(midiInOpen, 59) 440 | EXPORT_FAKE_FUNC(midiInPrepareHeader, 60) 441 | EXPORT_FAKE_FUNC(midiInReset, 61) 442 | EXPORT_FAKE_FUNC(midiInStart, 62) 443 | EXPORT_FAKE_FUNC(midiInStop, 63) 444 | EXPORT_FAKE_FUNC(midiInUnprepareHeader, 64) 445 | EXPORT_FAKE_FUNC(midiOutCacheDrumPatches, 65) 446 | EXPORT_FAKE_FUNC(midiOutCachePatches, 66) 447 | EXPORT_FAKE_FUNC(midiOutClose, 67) 448 | EXPORT_FAKE_FUNC(midiOutGetDevCapsA, 68) 449 | EXPORT_FAKE_FUNC(midiOutGetDevCapsW, 69) 450 | EXPORT_FAKE_FUNC(midiOutGetErrorTextA, 70) 451 | EXPORT_FAKE_FUNC(midiOutGetErrorTextW, 71) 452 | EXPORT_FAKE_FUNC(midiOutGetID, 72) 453 | EXPORT_FAKE_FUNC(midiOutGetNumDevs, 73) 454 | EXPORT_FAKE_FUNC(midiOutGetVolume, 74) 455 | EXPORT_FAKE_FUNC(midiOutLongMsg, 75) 456 | EXPORT_FAKE_FUNC(midiOutMessage, 76) 457 | EXPORT_FAKE_FUNC(midiOutOpen, 77) 458 | EXPORT_FAKE_FUNC(midiOutPrepareHeader, 78) 459 | EXPORT_FAKE_FUNC(midiOutReset, 79) 460 | EXPORT_FAKE_FUNC(midiOutSetVolume, 80) 461 | EXPORT_FAKE_FUNC(midiOutShortMsg, 81) 462 | EXPORT_FAKE_FUNC(midiOutUnprepareHeader, 82) 463 | EXPORT_FAKE_FUNC(midiStreamClose, 83) 464 | EXPORT_FAKE_FUNC(midiStreamOpen, 84) 465 | EXPORT_FAKE_FUNC(midiStreamOut, 85) 466 | EXPORT_FAKE_FUNC(midiStreamPause, 86) 467 | EXPORT_FAKE_FUNC(midiStreamPosition, 87) 468 | EXPORT_FAKE_FUNC(midiStreamProperty, 88) 469 | EXPORT_FAKE_FUNC(midiStreamRestart, 89) 470 | EXPORT_FAKE_FUNC(midiStreamStop, 90) 471 | EXPORT_FAKE_FUNC(mixerClose, 91) 472 | EXPORT_FAKE_FUNC(mixerGetControlDetailsA, 92) 473 | EXPORT_FAKE_FUNC(mixerGetControlDetailsW, 93) 474 | EXPORT_FAKE_FUNC(mixerGetDevCapsA, 94) 475 | EXPORT_FAKE_FUNC(mixerGetDevCapsW, 95) 476 | EXPORT_FAKE_FUNC(mixerGetID, 96) 477 | EXPORT_FAKE_FUNC(mixerGetLineControlsA, 97) 478 | EXPORT_FAKE_FUNC(mixerGetLineControlsW, 98) 479 | EXPORT_FAKE_FUNC(mixerGetLineInfoA, 99) 480 | EXPORT_FAKE_FUNC(mixerGetLineInfoW, 100) 481 | EXPORT_FAKE_FUNC(mixerGetNumDevs, 101) 482 | EXPORT_FAKE_FUNC(mixerMessage, 102) 483 | EXPORT_FAKE_FUNC(mixerOpen, 103) 484 | EXPORT_FAKE_FUNC(mixerSetControlDetails, 104) 485 | EXPORT_FAKE_FUNC(mmDrvInstall, 105) 486 | EXPORT_FAKE_FUNC(mmGetCurrentTask, 106) 487 | EXPORT_FAKE_FUNC(mmTaskBlock, 107) 488 | EXPORT_FAKE_FUNC(mmTaskCreate, 108) 489 | EXPORT_FAKE_FUNC(mmTaskSignal, 109) 490 | EXPORT_FAKE_FUNC(mmTaskYield, 110) 491 | EXPORT_FAKE_FUNC(mmioAdvance, 111) 492 | EXPORT_FAKE_FUNC(mmioAscend, 112) 493 | EXPORT_FAKE_FUNC(mmioClose, 113) 494 | EXPORT_FAKE_FUNC(mmioCreateChunk, 114) 495 | EXPORT_FAKE_FUNC(mmioDescend, 115) 496 | EXPORT_FAKE_FUNC(mmioFlush, 116) 497 | EXPORT_FAKE_FUNC(mmioGetInfo, 117) 498 | EXPORT_FAKE_FUNC(mmioInstallIOProcA, 118) 499 | EXPORT_FAKE_FUNC(mmioInstallIOProcW, 119) 500 | EXPORT_FAKE_FUNC(mmioOpenA, 120) 501 | EXPORT_FAKE_FUNC(mmioOpenW, 121) 502 | EXPORT_FAKE_FUNC(mmioRead, 122) 503 | EXPORT_FAKE_FUNC(mmioRenameA, 123) 504 | EXPORT_FAKE_FUNC(mmioRenameW, 124) 505 | EXPORT_FAKE_FUNC(mmioSeek, 125) 506 | EXPORT_FAKE_FUNC(mmioSendMessage, 126) 507 | EXPORT_FAKE_FUNC(mmioSetBuffer, 127) 508 | EXPORT_FAKE_FUNC(mmioSetInfo, 128) 509 | EXPORT_FAKE_FUNC(mmioStringToFOURCCA, 129) 510 | EXPORT_FAKE_FUNC(mmioStringToFOURCCW, 130) 511 | EXPORT_FAKE_FUNC(mmioWrite, 131) 512 | EXPORT_FAKE_FUNC(mmsystemGetVersion, 132) 513 | EXPORT_FAKE_FUNC(sndPlaySoundA, 133) 514 | EXPORT_FAKE_FUNC(sndPlaySoundW, 134) 515 | EXPORT_FAKE_FUNC(timeBeginPeriod, 135) 516 | EXPORT_FAKE_FUNC(timeEndPeriod, 136) 517 | EXPORT_FAKE_FUNC(timeGetDevCaps, 137) 518 | EXPORT_FAKE_FUNC(timeGetSystemTime, 138) 519 | EXPORT_FAKE_FUNC(timeGetTime, 139) 520 | EXPORT_FAKE_FUNC(timeKillEvent, 140) 521 | EXPORT_FAKE_FUNC(timeSetEvent, 141) 522 | EXPORT_FAKE_FUNC(waveInAddBuffer, 142) 523 | EXPORT_FAKE_FUNC(waveInClose, 143) 524 | EXPORT_FAKE_FUNC(waveInGetDevCapsA, 144) 525 | EXPORT_FAKE_FUNC(waveInGetDevCapsW, 145) 526 | EXPORT_FAKE_FUNC(waveInGetErrorTextA, 146) 527 | EXPORT_FAKE_FUNC(waveInGetErrorTextW, 147) 528 | EXPORT_FAKE_FUNC(waveInGetID, 148) 529 | EXPORT_FAKE_FUNC(waveInGetNumDevs, 149) 530 | EXPORT_FAKE_FUNC(waveInGetPosition, 150) 531 | EXPORT_FAKE_FUNC(waveInMessage, 151) 532 | EXPORT_FAKE_FUNC(waveInOpen, 152) 533 | EXPORT_FAKE_FUNC(waveInPrepareHeader, 153) 534 | EXPORT_FAKE_FUNC(waveInReset, 154) 535 | EXPORT_FAKE_FUNC(waveInStart, 155) 536 | EXPORT_FAKE_FUNC(waveInStop, 156) 537 | EXPORT_FAKE_FUNC(waveInUnprepareHeader, 157) 538 | EXPORT_FAKE_FUNC(waveOutBreakLoop, 158) 539 | EXPORT_FAKE_FUNC(waveOutClose, 159) 540 | EXPORT_FAKE_FUNC(waveOutGetDevCapsA, 160) 541 | EXPORT_FAKE_FUNC(waveOutGetDevCapsW, 161) 542 | EXPORT_FAKE_FUNC(waveOutGetErrorTextA, 162) 543 | EXPORT_FAKE_FUNC(waveOutGetErrorTextW, 163) 544 | EXPORT_FAKE_FUNC(waveOutGetID, 164) 545 | EXPORT_FAKE_FUNC(waveOutGetNumDevs, 165) 546 | EXPORT_FAKE_FUNC(waveOutGetPitch, 166) 547 | EXPORT_FAKE_FUNC(waveOutGetPlaybackRate, 167) 548 | EXPORT_FAKE_FUNC(waveOutGetPosition, 168) 549 | EXPORT_FAKE_FUNC(waveOutGetVolume, 169) 550 | EXPORT_FAKE_FUNC(waveOutMessage, 170) 551 | EXPORT_FAKE_FUNC(waveOutOpen, 171) 552 | EXPORT_FAKE_FUNC(waveOutPause, 172) 553 | EXPORT_FAKE_FUNC(waveOutPrepareHeader, 173) 554 | EXPORT_FAKE_FUNC(waveOutReset, 174) 555 | EXPORT_FAKE_FUNC(waveOutRestart, 175) 556 | EXPORT_FAKE_FUNC(waveOutSetPitch, 176) 557 | EXPORT_FAKE_FUNC(waveOutSetPlaybackRate, 177) 558 | EXPORT_FAKE_FUNC(waveOutSetVolume, 178) 559 | EXPORT_FAKE_FUNC(waveOutUnprepareHeader, 179) 560 | EXPORT_FAKE_FUNC(waveOutWrite, 180) 561 | 562 | #endif 563 | -------------------------------------------------------------------------------- /KrkrPatch/KrkrPlugin/tp_stub.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | TVP2 ( T Visual Presenter 2 ) A script authoring tool 4 | Copyright (C) 2000-2009 W.Dee and contributors 5 | 6 | See details of license at "license.txt" 7 | */ 8 | /* This file is always generated by makestub.pl . */ 9 | /* Modification by hand will be lost. */ 10 | 11 | #include 12 | #include "tp_stub.h" 13 | 14 | #define TVP_IN_PLUGIN_STUB 15 | 16 | tjs_int TVPPluginGlobalRefCount = 0; 17 | 18 | //--------------------------------------------------------------------------- 19 | // stubs 20 | //--------------------------------------------------------------------------- 21 | //--------------------------------------------------------------------------- 22 | // Stub library setup 23 | //--------------------------------------------------------------------------- 24 | 25 | static iTVPFunctionExporter * TVPFunctionExporter = NULL; 26 | 27 | void * TVPGetImportFuncPtr(const char *name) 28 | { 29 | void *ptr; 30 | if(TVPFunctionExporter->QueryFunctionsByNarrowString(&name, &ptr, 1)) 31 | { 32 | // succeeded 33 | } 34 | else 35 | { 36 | // failed 37 | static const char *funcname = "void ::TVPThrowPluginUnboundFunctionError(const char *)"; 38 | if(!TVPFunctionExporter->QueryFunctionsByNarrowString(&funcname, &ptr, 1)) 39 | { 40 | *(int*)0 = 0; // causes an error 41 | } 42 | typedef void (__stdcall * __functype)(const char *); 43 | ((__functype)(ptr))(name); 44 | } 45 | return ptr; 46 | } 47 | 48 | /* TVPInitImportStub : stub initialization */ 49 | bool TVPInitImportStub(iTVPFunctionExporter * exporter) 50 | { 51 | // set TVPFunctionExporter 52 | TVPFunctionExporter = exporter; 53 | return true; 54 | } 55 | 56 | /* TVPUninitImportStub : stub uninitialization */ 57 | void TVPUninitImportStub() 58 | { 59 | } 60 | 61 | 62 | 63 | void * TVPImportFuncPtr3d4b725f0b4234d79524822e7c34486b = NULL; 64 | void * TVPImportFuncPtr3fc0c32ee41ea0c515f8fbb681e37982 = NULL; 65 | void * TVPImportFuncPtre8dbd4fe012262d9da831e0735aa33b3 = NULL; 66 | void * TVPImportFuncPtrace6cce1353865d7376caca1f2124216 = NULL; 67 | void * TVPImportFuncPtr5055344aa8055bc238b79e5f88fc3300 = NULL; 68 | void * TVPImportFuncPtr8238c542b814acf1a83c00cced57ba26 = NULL; 69 | void * TVPImportFuncPtrbd2a14ca8c345fd7f151b08d1792fb60 = NULL; 70 | void * TVPImportFuncPtr16d432f9f86738a7688cbfc9b12441ec = NULL; 71 | void * TVPImportFuncPtr6dac00582b8ba529e548ef058c4e869e = NULL; 72 | void * TVPImportFuncPtr9193ae470b5efdfe617b5e94cd8f5da6 = NULL; 73 | void * TVPImportFuncPtrec455b6ef0f5da178063db3875973260 = NULL; 74 | void * TVPImportFuncPtra56aaf685bd171b63b0ef3c894d80ecf = NULL; 75 | void * TVPImportFuncPtr9a5fe199cebb9841f94ac0bb7a4a3b6a = NULL; 76 | void * TVPImportFuncPtr2acb76a1f86e34afc5fe934d406c6c4c = NULL; 77 | void * TVPImportFuncPtr3a4d914ca7d24989c236ad223c002d49 = NULL; 78 | void * TVPImportFuncPtr8fca7d3a123df1eacf228ba89f6a02ff = NULL; 79 | void * TVPImportFuncPtr58be195f96a36c158d638e3b0c79308b = NULL; 80 | void * TVPImportFuncPtreaa4d5b1d186a807a63311ab6d5e16e4 = NULL; 81 | void * TVPImportFuncPtr246f30d208c1d3a4e2b558090f403734 = NULL; 82 | void * TVPImportFuncPtr3206ef9b7a8013d6572decdea49e7e2e = NULL; 83 | void * TVPImportFuncPtrc5a30d297c3a121879b1392bc6c604ef = NULL; 84 | void * TVPImportFuncPtre398f5aef0ab92bc1323f3b094722fb1 = NULL; 85 | void * TVPImportFuncPtr0733b0ac80880897d327dc6f3b04ea9e = NULL; 86 | void * TVPImportFuncPtr4cb055ed9d8ef71d1af10898965c940c = NULL; 87 | void * TVPImportFuncPtref8d198596b7d3143d02ed4450ccefa1 = NULL; 88 | void * TVPImportFuncPtrd48ea419e040ffe8c20c1e86d80c9a5f = NULL; 89 | void * TVPImportFuncPtr679b215ff76a269871d5f325b981e561 = NULL; 90 | void * TVPImportFuncPtr1039eff4a4443f9238438485a35a93a7 = NULL; 91 | void * TVPImportFuncPtr2f873b0ee1c6591ba28bc4b9c0e4c954 = NULL; 92 | void * TVPImportFuncPtra583ffb56cdb2ede691e15053a8a165a = NULL; 93 | void * TVPImportFuncPtre09ed277802c1b117e1908421448886d = NULL; 94 | void * TVPImportFuncPtre76dfb9e00f4a9d491117d815f30db7f = NULL; 95 | void * TVPImportFuncPtrb000dd8934508d8ec6d6ef976a6ff49b = NULL; 96 | void * TVPImportFuncPtrd98ab5c968ebfde4e924901d09190774 = NULL; 97 | void * TVPImportFuncPtr661e8c10d5d477e6823a840244937cd8 = NULL; 98 | void * TVPImportFuncPtr6b39e70ea89c4f883689f51289029b69 = NULL; 99 | void * TVPImportFuncPtr4a18b1c0afe37b84e2b35a7fc07c4e0f = NULL; 100 | void * TVPImportFuncPtr48b85c8774d91ca40b2992f0e452f19e = NULL; 101 | void * TVPImportFuncPtr5ea8db9a9193fe6bab53baf2bee06b6b = NULL; 102 | void * TVPImportFuncPtr46b92626ff6894e993c4f193a129540b = NULL; 103 | void * TVPImportFuncPtr6efc1d1f66f0e01a81faf767d7576816 = NULL; 104 | void * TVPImportFuncPtr4ededf58eae77c320b4a6f5f701acafb = NULL; 105 | void * TVPImportFuncPtr028d5fda2f4568f6ab14b49d89650a4d = NULL; 106 | void * TVPImportFuncPtr11912984b8c094d2df26bf3c3677d096 = NULL; 107 | void * TVPImportFuncPtr6c0df790c33142e286aea9af6993d931 = NULL; 108 | void * TVPImportFuncPtrc27d85b695cd6e144210785bdfd446ce = NULL; 109 | void * TVPImportFuncPtr8422ef7f42009be0ad58a09d64149051 = NULL; 110 | void * TVPImportFuncPtree07e6522577952453206ede39cdf54c = NULL; 111 | void * TVPImportFuncPtr786a65424247e711f6ca31f0a10603d7 = NULL; 112 | void * TVPImportFuncPtr995a222f2038dd2007f2c1f6429bd19e = NULL; 113 | void * TVPImportFuncPtrda8c6e750d6a9c0557a56ef7f7fd8e88 = NULL; 114 | void * TVPImportFuncPtr9cf7b0f119bcf3fa4564837ae25429b3 = NULL; 115 | void * TVPImportFuncPtr17cbcacad2ed350215d7d700c676ea40 = NULL; 116 | void * TVPImportFuncPtr2bd375c0598e9148d88579a51b2f07a8 = NULL; 117 | void * TVPImportFuncPtr4d2c157f8b0b49e57c3e9b5abc9deb0f = NULL; 118 | void * TVPImportFuncPtr4b7eaccf64af0f3a4c4fe64f4e2dd3fd = NULL; 119 | void * TVPImportFuncPtr3a4d2602c392a8d1f4c38d537a8c95e0 = NULL; 120 | void * TVPImportFuncPtr8d915d35ef8e857f245c5d46798618e4 = NULL; 121 | void * TVPImportFuncPtr1e463482afa8ca30f5fa7bea4fa5741d = NULL; 122 | void * TVPImportFuncPtrfdf270e4080c986abd1649fa9fffdeab = NULL; 123 | void * TVPImportFuncPtr972e0f9a6ec4648a9fb82bcf5d9095ff = NULL; 124 | void * TVPImportFuncPtr9d76731c37c4664d654db026644c64b4 = NULL; 125 | void * TVPImportFuncPtr4f1620cb699874b9c8cedf6e321c606e = NULL; 126 | void * TVPImportFuncPtref1c6b2b601d1b0ff70272a4d447aa3c = NULL; 127 | void * TVPImportFuncPtr9b7872860c95cfdafb056ab30318e99c = NULL; 128 | void * TVPImportFuncPtr53360f194a04fc142ddae2b9a3ab4c92 = NULL; 129 | void * TVPImportFuncPtrce1dcb05e5e7c4cafbc4ed37f63b256e = NULL; 130 | void * TVPImportFuncPtr841ce4492b37321eea0c1b500de9b352 = NULL; 131 | void * TVPImportFuncPtr61785de870894968cd9d95e17e88eafc = NULL; 132 | void * TVPImportFuncPtrad3236e727398311c3b8e1ddd5f4b293 = NULL; 133 | void * TVPImportFuncPtr80e0b7be488545ff9b8bc52c9ab5fba5 = NULL; 134 | void * TVPImportFuncPtr4eaa3e4efb319707db6ef81db1c6f147 = NULL; 135 | void * TVPImportFuncPtr693a0152f098caee7fc77f545dd3e954 = NULL; 136 | void * TVPImportFuncPtr42840710f5fba9bb32b95290b1796a55 = NULL; 137 | void * TVPImportFuncPtradec3f9ef429aa9a284081f0fc6a1b5b = NULL; 138 | void * TVPImportFuncPtr674a7948152a1d7a49050b9d98796403 = NULL; 139 | void * TVPImportFuncPtraa6f132b2031c83062f6149c90f2df5f = NULL; 140 | void * TVPImportFuncPtrb52f446e22bb92d495f7e65ac71c9bf9 = NULL; 141 | void * TVPImportFuncPtrd4899fd4a8beb06f192dcb1d300e3319 = NULL; 142 | void * TVPImportFuncPtrd3f5ec78464d29ee6988a1f90c2e3e1b = NULL; 143 | void * TVPImportFuncPtra463ad6a757c3f04e09a72e288737d06 = NULL; 144 | void * TVPImportFuncPtr27857bb89d35113183b682c3917d6c7a = NULL; 145 | void * TVPImportFuncPtra5f80951cfb882ac6a3e06c0b9a95807 = NULL; 146 | void * TVPImportFuncPtr35aadb63079c8bd84ebc0389bae306e0 = NULL; 147 | void * TVPImportFuncPtrfb6573df5887c2020ae58136f8342ed4 = NULL; 148 | void * TVPImportFuncPtr86c67d2197c46824ab10f59e568ad13a = NULL; 149 | void * TVPImportFuncPtr263a0c5b335b2c4d5bc1f55b51b8315e = NULL; 150 | void * TVPImportFuncPtr975c1099e57ab67122ddef0f44fd7dd5 = NULL; 151 | void * TVPImportFuncPtr04493e5237a7ca97afd391cb7e831ba0 = NULL; 152 | void * TVPImportFuncPtr9996100acc7705cb2b0c904d6bad4401 = NULL; 153 | void * TVPImportFuncPtr5d91cff3b2a26ff7c0543e0f6d737117 = NULL; 154 | void * TVPImportFuncPtref1dedc2cb58dc4e1afc14238b6fc518 = NULL; 155 | void * TVPImportFuncPtrf18397fe81c043ba2346e31b359f6a73 = NULL; 156 | void * TVPImportFuncPtr2ee45ad60b0c06a8d0feebc3a6aad9e7 = NULL; 157 | void * TVPImportFuncPtr44500491c57e17032951fe6ed268ff1d = NULL; 158 | void * TVPImportFuncPtr056f5d278c75750df792bf8b081fbf7d = NULL; 159 | void * TVPImportFuncPtr04233bc4f7d4df92c260d23110320afe = NULL; 160 | void * TVPImportFuncPtrcdc475c4419e77c22508e337428c4074 = NULL; 161 | void * TVPImportFuncPtr06bacb2910308a47bbe27ff7efa1226d = NULL; 162 | void * TVPImportFuncPtr521e053199a4aeb4e0f24d9f4a6cc682 = NULL; 163 | void * TVPImportFuncPtr02164e6fb4c925843ac774ec1e4c6e5d = NULL; 164 | void * TVPImportFuncPtr5110cbbcddbd9688281ee5418e3f9023 = NULL; 165 | void * TVPImportFuncPtr1db54b61f00bf931452218c4a39e79ef = NULL; 166 | void * TVPImportFuncPtr9d0edd8f51f155767301017bd3d256da = NULL; 167 | void * TVPImportFuncPtr8f744c5aa8df5471939b960bc759f12b = NULL; 168 | void * TVPImportFuncPtrba7ff7b0b4192bd2cc7f49c7b688ad57 = NULL; 169 | void * TVPImportFuncPtr7773ac921bb82c85de3be69ef86265fd = NULL; 170 | void * TVPImportFuncPtr114a781ed71edace31abb352a2671f41 = NULL; 171 | void * TVPImportFuncPtr2bc5f4a97decfa82c625430479ec512b = NULL; 172 | void * TVPImportFuncPtr066fb79f94523d95d12480f23c58cc8e = NULL; 173 | void * TVPImportFuncPtr803906b8de16ff825d4e69e1952d872f = NULL; 174 | void * TVPImportFuncPtr34cc96a5118ee1e12b0750ea64d40b1f = NULL; 175 | void * TVPImportFuncPtrdbe821fb8b651d42a9c8e730517c408c = NULL; 176 | void * TVPImportFuncPtr8970ba46068ac74746c3e84299937d8f = NULL; 177 | void * TVPImportFuncPtr438e27dcbb077284213eb4d7dcd43f8f = NULL; 178 | void * TVPImportFuncPtra98d712ca19a49afe07d0a7c5d064cef = NULL; 179 | void * TVPImportFuncPtr08aef69683bcfe2a5c63d4c7866de8e9 = NULL; 180 | void * TVPImportFuncPtrdbc9bc2e27068c8426b1c6a7f89424e0 = NULL; 181 | void * TVPImportFuncPtr5eeb98ca016123f57966457533bb639e = NULL; 182 | void * TVPImportFuncPtr98fdc846d0b4a83412f3521f65bb98b4 = NULL; 183 | void * TVPImportFuncPtr3309591d3c7f6f688e81588f169dba21 = NULL; 184 | void * TVPImportFuncPtrd83a866389246d824efcc83303a04484 = NULL; 185 | void * TVPImportFuncPtr6cf6f332a6a14a15e8dce62301f5c840 = NULL; 186 | void * TVPImportFuncPtr566eeea3c5f009b0fc6fa123ba30f496 = NULL; 187 | void * TVPImportFuncPtr88806e38e35c73b36acadd4061a4fe0b = NULL; 188 | void * TVPImportFuncPtr3bb69d3886159aaecc333b6ff17287bf = NULL; 189 | void * TVPImportFuncPtr3e36278551a9c8b29cb2e8017db6af0d = NULL; 190 | void * TVPImportFuncPtr5de99d84f3dc902cb0812fb85a7d5c88 = NULL; 191 | void * TVPImportFuncPtr31e85cbc73f8fbd4cea895a751480059 = NULL; 192 | void * TVPImportFuncPtr6ae29e405ede762f1a89a9dd526cb36e = NULL; 193 | void * TVPImportFuncPtrc95bd66d95c153cdac41b5243e555f5f = NULL; 194 | void * TVPImportFuncPtr72a67e9c52fd27dbb66eded47efeea74 = NULL; 195 | void * TVPImportFuncPtrfb13e41bda53e4e59403e3e14effccd6 = NULL; 196 | void * TVPImportFuncPtr9a5c710e620e47f105752453ad5d6ab1 = NULL; 197 | void * TVPImportFuncPtr18f1ad16c11429707cbf8ea4d1d4a21e = NULL; 198 | void * TVPImportFuncPtr550f317b573a1256af00586890ae82f1 = NULL; 199 | void * TVPImportFuncPtrcd50da721dfb63f36c1ebb1226830428 = NULL; 200 | void * TVPImportFuncPtrfbba3dd6a087599d1277ae58f6cec18e = NULL; 201 | void * TVPImportFuncPtr43cc5b5a61a6090af83333d115b5b868 = NULL; 202 | void * TVPImportFuncPtr616fb5060d81eb5bab58647596582df4 = NULL; 203 | void * TVPImportFuncPtr168cf4c1b9ef70b98f2e0ab3695a4f3b = NULL; 204 | void * TVPImportFuncPtr314573cca30a7c2aecc9166fbf5400c9 = NULL; 205 | void * TVPImportFuncPtr03da356426c038fad663c836c3e330ef = NULL; 206 | void * TVPImportFuncPtr31dbebdedc08d75e34a2cd564ce60586 = NULL; 207 | void * TVPImportFuncPtrd9224ad7a0de743a7eea15fdb2c5f934 = NULL; 208 | void * TVPImportFuncPtrc01b0720b49ce4f792446d8965d2c31f = NULL; 209 | void * TVPImportFuncPtr4af47e46a11e1357cb994f405289d13e = NULL; 210 | void * TVPImportFuncPtr25b6dafa19bfa5bde1a8b519da248f82 = NULL; 211 | void * TVPImportFuncPtr72425405819c900aec719491cbd90c6d = NULL; 212 | void * TVPImportFuncPtra79942af73f33bff6e432c9fd808e469 = NULL; 213 | void * TVPImportFuncPtrdf106470a4141ebc7eda22160859ffdc = NULL; 214 | void * TVPImportFuncPtr469bc225b0ecd9561aae5a46b85ded42 = NULL; 215 | void * TVPImportFuncPtra6663c078b3aa79b39ee2d09f3875765 = NULL; 216 | void * TVPImportFuncPtrefbe634ce4f13633e220cae167cf63fb = NULL; 217 | void * TVPImportFuncPtr57f4147bcc09e4e4442ffc9b0895727e = NULL; 218 | void * TVPImportFuncPtr1fb2d2e44cf83aebef7b26fd6b20bc2b = NULL; 219 | void * TVPImportFuncPtrbd6aa777bac947f5cffd891e9c724794 = NULL; 220 | void * TVPImportFuncPtr83c662330b75d616cdc8a4e11d7ababa = NULL; 221 | void * TVPImportFuncPtrbbde02fe30c8a6cadb7073174ea3a874 = NULL; 222 | void * TVPImportFuncPtrcc1c14f63867f90bc883de03e9212cbc = NULL; 223 | void * TVPImportFuncPtr236e007b32bc2631b5f6dc1eda6be0a9 = NULL; 224 | void * TVPImportFuncPtrcfbb9809e0e6d954b2652856e935ced9 = NULL; 225 | void * TVPImportFuncPtr60ee96ae4a7704340bef20fb35ba6ade = NULL; 226 | void * TVPImportFuncPtr564b37278b50f4e5597dff6540868d49 = NULL; 227 | void * TVPImportFuncPtr890b3a4831b824653e919b4a5197358d = NULL; 228 | void * TVPImportFuncPtr2dfa6c77c5051d160b8a06f540e0d68b = NULL; 229 | void * TVPImportFuncPtr05f88567d510fd84659ccbf493f647ed = NULL; 230 | void * TVPImportFuncPtr7166b8f7bb9688c980e4fa172f06f30c = NULL; 231 | void * TVPImportFuncPtrb9456ecba8b7898d80d2e5caa64035c9 = NULL; 232 | void * TVPImportFuncPtrdd44464bd8430a5be5fef0cffcd97117 = NULL; 233 | void * TVPImportFuncPtra57696ca0c157cd7d3cd4e58c1df957c = NULL; 234 | void * TVPImportFuncPtr1aea9f8a38bbb875b6d052f330da9178 = NULL; 235 | void * TVPImportFuncPtr2d3b3d6e22ee139cda9eee47dc031945 = NULL; 236 | void * TVPImportFuncPtr8ff49e56c3c4c566561dcdd5c9ecc4db = NULL; 237 | void * TVPImportFuncPtr490b547e93e40082d0b83312467104f9 = NULL; 238 | void * TVPImportFuncPtr2c1ef06748df47df52b586ac0fbc6a34 = NULL; 239 | void * TVPImportFuncPtrb6b2a03160b88239eccd18d89b1537d3 = NULL; 240 | void * TVPImportFuncPtr8becefbd52c76c7ecb0ea7b7f50b7915 = NULL; 241 | void * TVPImportFuncPtr74b9687a3bfd3b2c7abe226efc4225c1 = NULL; 242 | void * TVPImportFuncPtr7cafc2bf5965b594e60830e3057bbd58 = NULL; 243 | void * TVPImportFuncPtr80f111939c5694cbf43d07cf0ad1726c = NULL; 244 | void * TVPImportFuncPtr8dc9cef84191f79b38403a2070952fd4 = NULL; 245 | void * TVPImportFuncPtr1d42bd1e659b36886c20567497b7ee96 = NULL; 246 | void * TVPImportFuncPtr0848fbdc7eeddb12c80bcd9c31383a64 = NULL; 247 | void * TVPImportFuncPtr1f1123c906c28ab6d16b6bef3f7ae978 = NULL; 248 | void * TVPImportFuncPtrb84394e20cc73a90349cf5be4e783111 = NULL; 249 | void * TVPImportFuncPtr76e0db3797851fe8ff90cf84780c50ad = NULL; 250 | void * TVPImportFuncPtr6616241156c22bced42cd9f2f647677e = NULL; 251 | void * TVPImportFuncPtr1ace346a3dd546c66ad115a33d8cf693 = NULL; 252 | void * TVPImportFuncPtr96fb9bbe33531d4268573355c658e165 = NULL; 253 | void * TVPImportFuncPtrc90b5737134c76f9ed0bb5da7cfaad8c = NULL; 254 | void * TVPImportFuncPtr070ed05259a265cabdd82bfedabdd638 = NULL; 255 | void * TVPImportFuncPtr008b7e3a4c5bb23ee991f684a5064737 = NULL; 256 | void * TVPImportFuncPtrb64741dc4544ed43c44ddb6d0eb838ea = NULL; 257 | void * TVPImportFuncPtr5b83e28b2d9ab0f75d7c7f6f61b5ded6 = NULL; 258 | void * TVPImportFuncPtrb948c9f43837efa489b0b91f3f675710 = NULL; 259 | void * TVPImportFuncPtreb83216f6f718245468ef48b97ab4c2d = NULL; 260 | void * TVPImportFuncPtrc66ab4868b743de9c0ba8b26c67b23da = NULL; 261 | void * TVPImportFuncPtr586e16d502a6ad98b08161bdb090f8b6 = NULL; 262 | void * TVPImportFuncPtrd8bc9c71c80b200c39b29167d795cad0 = NULL; 263 | void * TVPImportFuncPtr85df4beb87f6503891e116ce046353c3 = NULL; 264 | void * TVPImportFuncPtr35b6a7e1c73f257aae91e05fa9826e84 = NULL; 265 | void * TVPImportFuncPtra25b46701e25030af1ed847e0df229eb = NULL; 266 | void * TVPImportFuncPtrc8906bf1efa5e86f9fddfab55a01c8f6 = NULL; 267 | void * TVPImportFuncPtr8141059f613820f694608af28e20cbad = NULL; 268 | void * TVPImportFuncPtrcf2690e47099ac6378ed50df4a8a8e90 = NULL; 269 | void * TVPImportFuncPtr810c7054e44f535cf250f00707105417 = NULL; 270 | void * TVPImportFuncPtr52a9af7905ddc71d8b4e0ef7366eebdd = NULL; 271 | void * TVPImportFuncPtr1635dbae2d91b338ddfd0430f8aa7f10 = NULL; 272 | void * TVPImportFuncPtr30df0c29ad8f672f7fe0742b4b11cd7f = NULL; 273 | void * TVPImportFuncPtr61c82dec644c58290a25f34a69478870 = NULL; 274 | void * TVPImportFuncPtrf08e347d2d47dc5fc9a3cb59355b4fbb = NULL; 275 | void * TVPImportFuncPtr5c62e59c2062f658d4c79d5257a9a586 = NULL; 276 | void * TVPImportFuncPtr259c72d8bfed1210ca71c54f24cacc7a = NULL; 277 | void * TVPImportFuncPtr801a92ace08eb7ed001406869a39a75f = NULL; 278 | void * TVPImportFuncPtre22e647af4ded8e51b1e76c845b4c8e2 = NULL; 279 | void * TVPImportFuncPtr12902221314df9bcf7f7cb74a5242fe0 = NULL; 280 | void * TVPImportFuncPtrb10feea1619ba8ac11237c12002cdb3e = NULL; 281 | void * TVPImportFuncPtr19755b50d241edcb477bdcac22663778 = NULL; 282 | void * TVPImportFuncPtr040a0ecf46963e094ee8ec32ab3f1962 = NULL; 283 | void * TVPImportFuncPtr525c529dc687b5d86424d775d00bdfce = NULL; 284 | void * TVPImportFuncPtrc96107b91e2a215f560a2612c6e85931 = NULL; 285 | void * TVPImportFuncPtrb8788eaa2ca495263c6ea2df264af5f5 = NULL; 286 | void * TVPImportFuncPtr4c6494008c520d896d699f82aca30b25 = NULL; 287 | void * TVPImportFuncPtr7d8f8d5e0832ecf248b19a89801ead0e = NULL; 288 | void * TVPImportFuncPtr70849965060a6402f41b0b11ec2bb3a7 = NULL; 289 | void * TVPImportFuncPtrc72efa6b4efaa6664ae637a03e98e866 = NULL; 290 | void * TVPImportFuncPtra250e46575d0df1166e1542613218a5c = NULL; 291 | void * TVPImportFuncPtra7bcff67b8d380c225b9d0d83921b3ae = NULL; 292 | void * TVPImportFuncPtrfb68a3aa16bd2eb7d7550283170321bf = NULL; 293 | void * TVPImportFuncPtr35b4299ede11f511b331b713ba9f38a8 = NULL; 294 | void * TVPImportFuncPtrefe52691cff20b2dfaa16e8e16caac0a = NULL; 295 | void * TVPImportFuncPtr38eed43ef69251c34dc45695b8cf35c0 = NULL; 296 | void * TVPImportFuncPtr2058b65abdfb7598910f0d584d40a19d = NULL; 297 | void * TVPImportFuncPtr1ebecaefe2ffdc811fccbac42e67e544 = NULL; 298 | void * TVPImportFuncPtr09e0f0912f8d758d3736ece9478c2686 = NULL; 299 | void * TVPImportFuncPtr23d61eda3959b087b618e348471e2c36 = NULL; 300 | void * TVPImportFuncPtre99b22c79b5bf04f3382f959c7bb69ca = NULL; 301 | void * TVPImportFuncPtr9c4bb9ebee4db0fcebeae11c34950f97 = NULL; 302 | void * TVPImportFuncPtr505a9563aeb1b0255cfcc8197bee7d9e = NULL; 303 | void * TVPImportFuncPtrf5ab80fc67ee04570330b9035144e760 = NULL; 304 | void * TVPImportFuncPtraf50188bbaa019ee88b19ecd931f7cce = NULL; 305 | void * TVPImportFuncPtr268c452e85a6ac75301a6132f4f5e38b = NULL; 306 | void * TVPImportFuncPtr646770a19b1768b372c9991ef0d3de85 = NULL; 307 | void * TVPImportFuncPtr5ec88e04fcb8e1877752281e172173ed = NULL; 308 | void * TVPImportFuncPtr923f8161f2d2ba0e883bc4edc2901960 = NULL; 309 | void * TVPImportFuncPtr6f70cdb7586cbe571204f286f43c9780 = NULL; 310 | void * TVPImportFuncPtr9a4eaa6a627038799015c093609bdde7 = NULL; 311 | void * TVPImportFuncPtrc8bb6590f4a7adc906d7b3e42d907267 = NULL; 312 | void * TVPImportFuncPtr8323d57f26876d87271dbfa257b7f7e2 = NULL; 313 | void * TVPImportFuncPtr4d6f148e8997e1ae0cc0006ec1bd9618 = NULL; 314 | void * TVPImportFuncPtr7f03a4ddb254d0518642d15513eaea85 = NULL; 315 | void * TVPImportFuncPtr4add3926c72ba9df9259be58b680de0d = NULL; 316 | void * TVPImportFuncPtr075d42cff8dc0c1fbd99c7459a63e526 = NULL; 317 | void * TVPImportFuncPtrb6bc45b28e194c7ac98bfdea88edee36 = NULL; 318 | void * TVPImportFuncPtr6dff6abb075da1a304520e60c011ef7b = NULL; 319 | void * TVPImportFuncPtr892ffbdb8375851fc557e4abe9589b77 = NULL; 320 | void * TVPImportFuncPtrb2f3538284fc2adda2a43272ee654a96 = NULL; 321 | void * TVPImportFuncPtre0ff899ea4a9cc49a0e3b38deaf93b45 = NULL; 322 | void * TVPImportFuncPtr4b9c9ac2aafad07af4b16f34e9d4bba2 = NULL; 323 | void * TVPImportFuncPtrc2e423356d9ca3f26f9c1d294ee9b742 = NULL; 324 | void * TVPImportFuncPtrc07314686fdf5815ce9b058020da942b = NULL; 325 | void * TVPImportFuncPtr4a197be1985d45ee86d5672d24134560 = NULL; 326 | void * TVPImportFuncPtrdec720a9c3cd2b378f195cf71a9ff8b0 = NULL; 327 | void * TVPImportFuncPtr5726a5c7af641ebaa504dc9ec8380938 = NULL; 328 | void * TVPImportFuncPtr1c53bc96ac9dfd483c2227bc5fa44825 = NULL; 329 | void * TVPImportFuncPtr1940c8fa03145aa029d0b7718ce0c809 = NULL; 330 | void * TVPImportFuncPtrb37f047c0f9bd143b34a2fc87ce5f16e = NULL; 331 | void * TVPImportFuncPtrdec35fbd2a24fc32e5c220174d864cf4 = NULL; 332 | void * TVPImportFuncPtr86fd45a126296891aee413388597203e = NULL; 333 | void * TVPImportFuncPtr603243e54f3508c37d993e8359b735dc = NULL; 334 | void * TVPImportFuncPtrc3eadbd75b32dabe6faecebf492eb486 = NULL; 335 | void * TVPImportFuncPtr725e49de1d970ef04b179776666f2c34 = NULL; 336 | void * TVPImportFuncPtr55a9b73f877bfd4c6d8157e7b1c458df = NULL; 337 | void * TVPImportFuncPtrd070209f152dd22087e6e996e02c85cf = NULL; 338 | void * TVPImportFuncPtr308f905626bc51c7ef9b65b2c0ca34b2 = NULL; 339 | void * TVPImportFuncPtr95aab2a1ac9491e8026f4977e0918760 = NULL; 340 | void * TVPImportFuncPtre0ac94325eb783ca2fe7856a54444c90 = NULL; 341 | void * TVPImportFuncPtr0c99a79e866f08b4df3914e83fc203dc = NULL; 342 | void * TVPImportFuncPtrf2de531a016173057ff3540e47fed4e6 = NULL; 343 | void * TVPImportFuncPtr4224a9066d8d13d6d7e12f1ace6a5beb = NULL; 344 | void * TVPImportFuncPtr900476efbc2031e643c042ca8e63a3d7 = NULL; 345 | void * TVPImportFuncPtr07dfce61d490cf671a2d5359d713d64a = NULL; 346 | void * TVPImportFuncPtr52d30ac8479ef7e870b5aff076482799 = NULL; 347 | void * TVPImportFuncPtr8e4d0392ed46e87f94e5fcf675a124a1 = NULL; 348 | void * TVPImportFuncPtr73f46e08d17e707725f433b454f05a89 = NULL; 349 | void * TVPImportFuncPtr80d60e682fa72973071e335db272a2a2 = NULL; 350 | void * TVPImportFuncPtr6bd6262185fa0b9cf1750f6a525d893a = NULL; 351 | void * TVPImportFuncPtrcf29f737d4eb450b26789d421d0ec69a = NULL; 352 | void * TVPImportFuncPtr13c0e371c08fd1b9da2f0c103d01c59a = NULL; 353 | void * TVPImportFuncPtr82693e38df8f033ea98f9b7969d66d7b = NULL; 354 | void * TVPImportFuncPtr6e3f8a3b18f55dae6153a889f00a3e87 = NULL; 355 | void * TVPImportFuncPtrefe14a197131b4813656d6669cc3475b = NULL; 356 | void * TVPImportFuncPtrba4ecf60f872f757b69c84f457b3e941 = NULL; 357 | void * TVPImportFuncPtrdffedabe32ce886e3b7e695b44ad3547 = NULL; 358 | void * TVPImportFuncPtrf518c60b165658d19a0fadd8f69586aa = NULL; 359 | void * TVPImportFuncPtr6fefcb1c2ca01a876c301ab41dbdab9f = NULL; 360 | void * TVPImportFuncPtrdf55083347df0483b4ca6ba1e4f0b9a0 = NULL; 361 | void * TVPImportFuncPtrd8d28310f702714733c4c5dc850058df = NULL; 362 | void * TVPImportFuncPtr52d24c38b05be174bc5c4fdcf02e9b9f = NULL; 363 | void * TVPImportFuncPtrf27f455c8f30cbaf1706faac3c7b8e02 = NULL; 364 | void * TVPImportFuncPtr78ec453a50b2800bb01347e8ebbac000 = NULL; 365 | void * TVPImportFuncPtr0936d0f6fc53339d255893e58bcc6699 = NULL; 366 | void * TVPImportFuncPtrf4f7181b7fd679784c50b0cc7ba4c60e = NULL; 367 | void * TVPImportFuncPtr79816d7e5741c2416fefe2c2a8baef00 = NULL; 368 | void * TVPImportFuncPtr42a3d248fab928f16555abcceca62834 = NULL; 369 | void * TVPImportFuncPtr926d6212b8b1b238e7bef9b17a3ee643 = NULL; 370 | void * TVPImportFuncPtr236e3d626784d80ca2cc5b2fe14cd9c6 = NULL; 371 | void * TVPImportFuncPtr1bfac11a5f95c842f97a8bb57d4019de = NULL; 372 | void * TVPImportFuncPtr198ce21c54b0cea4c1bf5eeba35349ab = NULL; 373 | void * TVPImportFuncPtr590a1ec7f64904eaa32b5c771bb5f8cd = NULL; 374 | void * TVPImportFuncPtrdd13d4bc2b48540a92f047bf015b829b = NULL; 375 | void * TVPImportFuncPtr0ff502d492598d2211405180bfb4d1e1 = NULL; 376 | void * TVPImportFuncPtrcf5401746759bfe38918087aaab6c57b = NULL; 377 | void * TVPImportFuncPtr04e84aa7d8cf0477d55c700164544b38 = NULL; 378 | void * TVPImportFuncPtr449039d3afbfbd52a63130a3b227a490 = NULL; 379 | void * TVPImportFuncPtr347a4fa85af84e223c4b61d33ead694a = NULL; 380 | void * TVPImportFuncPtr4ad1dd24b3b4769ee10149eea006af7a = NULL; 381 | void * TVPImportFuncPtrb246b17b62d273bdc04e9d9e827f5c74 = NULL; 382 | void * TVPImportFuncPtr9974ebc6296f925cff55d8bcb2d52ce9 = NULL; 383 | void * TVPImportFuncPtr0e0c9d9107d8c56b8bc4d4198ae9208a = NULL; 384 | void * TVPImportFuncPtrc23ece207f6ec2dd7c76ef873047aee3 = NULL; 385 | void * TVPImportFuncPtr81507020bc646be2f53ab95b9430ba27 = NULL; 386 | void * TVPImportFuncPtracc0d3861d1b971abcbdda1c075dd681 = NULL; 387 | void * TVPImportFuncPtrff2dccead1b31e3f34e8be3e2ba5bbf1 = NULL; 388 | void * TVPImportFuncPtre17db0d4f69625c61aba7fffe540dded = NULL; 389 | void * TVPImportFuncPtr5bbc872e7bba5b761c509d31116e4460 = NULL; 390 | void * TVPImportFuncPtr4adf361303eae78829250c7b732a5722 = NULL; 391 | void * TVPImportFuncPtrbf172364c57c1aa561b145fd5cacda0c = NULL; 392 | void * TVPImportFuncPtrd7687aa80dac10f88deac7aa7e70538a = NULL; 393 | void * TVPImportFuncPtrb18b7259f98029f745c75291d6855ab1 = NULL; 394 | void * TVPImportFuncPtrb79e5d877116025576ca1f76af124009 = NULL; 395 | void * TVPImportFuncPtr8aea098dfe8a36c705cc2a9e1a189b84 = NULL; 396 | void * TVPImportFuncPtr4ccd3f6ab60d61be6dbfc59e8e3d1726 = NULL; 397 | void * TVPImportFuncPtr3d70bb72a7d7765c7e8ea580079ab7e9 = NULL; 398 | void * TVPImportFuncPtreba9b272d78a4b0cd7f9212e29a58607 = NULL; 399 | void * TVPImportFuncPtrcfbe8ee9d43aa64ae4190eac91f7c55f = NULL; 400 | void * TVPImportFuncPtra4308a386968ef5d23025ab8a9e8c6db = NULL; 401 | void * TVPImportFuncPtr5a4fcbe1e398e3d9690d571acbbbae9f = NULL; 402 | void * TVPImportFuncPtr5b62f504fe6d22428d7518d6c52d775d = NULL; 403 | void * TVPImportFuncPtrfb3b405f8747b54f26c332b9e6af81cd = NULL; 404 | void * TVPImportFuncPtrb7ccd11d130f186883c109d2ba17b598 = NULL; 405 | void * TVPImportFuncPtrcf8ab6c24f25993ccc7663e572ac2991 = NULL; 406 | void * TVPImportFuncPtrba40ffbca76695b54a02aa8c1f1e047b = NULL; 407 | void * TVPImportFuncPtrc97720e639e95ba5130ce9dd78d30403 = NULL; 408 | void * TVPImportFuncPtrc5557ac5391b1b831a22e64b65d1746c = NULL; 409 | void * TVPImportFuncPtr3243a4c32d4f674f1bbc8d3895257568 = NULL; 410 | void * TVPImportFuncPtr78390a3d08879903ee9558e9df68db4d = NULL; 411 | void * TVPImportFuncPtr58e9454d7096a52808f9a83b9ce25ff0 = NULL; 412 | void * TVPImportFuncPtrcdefadd0c3bf15b4639b2f0338a40585 = NULL; 413 | void * TVPImportFuncPtr4bf80e9bac16b9e3f9bf385b2fbce657 = NULL; 414 | void * TVPImportFuncPtr51aeacf2b6ef9deb01c3b3db201d6bf9 = NULL; 415 | void * TVPImportFuncPtr9ed5432d73448da47991df9577ee97bc = NULL; 416 | void * TVPImportFuncPtrcf1d02d1cc1aff0aae6c038c95dac80f = NULL; 417 | void * TVPImportFuncPtrddb0e05c72c0692e78af885ac7ec82dc = NULL; 418 | void * TVPImportFuncPtra3029db6292616cd16c228b91dc4af13 = NULL; 419 | void * TVPImportFuncPtr2d90871c6bc15a9e8d97d24c29e78e3b = NULL; 420 | void * TVPImportFuncPtr0af6744e35e38276d6a98c1f382b1519 = NULL; 421 | void * TVPImportFuncPtrad40567a051208757642e5e087f3e741 = NULL; 422 | void * TVPImportFuncPtr6a15185daab9b274963fe5ef46305775 = NULL; 423 | void * TVPImportFuncPtr073a2332a8ab3ed31ab81daea3d3f2c4 = NULL; 424 | void * TVPImportFuncPtr01216e91225e06c7422bef0c2febc0cc = NULL; 425 | void * TVPImportFuncPtr16ce22ad500a5bdfd5d5743c847a28b6 = NULL; 426 | void * TVPImportFuncPtr59251c4104f736fa2690c5f77fb0a908 = NULL; 427 | void * TVPImportFuncPtrf923750e0fdb51a6fc6c304832cb3dd3 = NULL; 428 | void * TVPImportFuncPtrbc77a1e312ff7827d90387fb92f0f5b0 = NULL; 429 | void * TVPImportFuncPtr2090afd7ae8bcb021ec4d04947d0d845 = NULL; 430 | void * TVPImportFuncPtr3a0f858bdf86199dc2d00b583a3b915f = NULL; 431 | void * TVPImportFuncPtr0d316a141f7a502ff8d9ffe2d38d25a8 = NULL; 432 | void * TVPImportFuncPtrb31ff64ae2d8f93dbf28161d5080b295 = NULL; 433 | void * TVPImportFuncPtrd9b1c73516daea6a9c6564e2b731615a = NULL; 434 | void * TVPImportFuncPtr003f9d3de568fcd71dd532f33d38839c = NULL; 435 | void * TVPImportFuncPtr5da29a19bbe279a89be00e16c59d7641 = NULL; 436 | void * TVPImportFuncPtrc1b52e8f3578d11f369552a887e13c5b = NULL; 437 | void * TVPImportFuncPtrb94ead6de9316bc65758c5aefb564078 = NULL; 438 | void * TVPImportFuncPtr8a35be936d2aca049e398a081e511c97 = NULL; 439 | void * TVPImportFuncPtr5b1fa785e397e643dd09cb43c2f2f4db = NULL; 440 | void * TVPImportFuncPtr29af78765c764c566e6adc77e0ea7041 = NULL; 441 | void * TVPImportFuncPtr9e0df54e4c24ee28d5517c1743faa3a3 = NULL; 442 | void * TVPImportFuncPtrd3aaa55d66777d7308ffa7a348c84841 = NULL; 443 | void * TVPImportFuncPtrb426fbfb6ccb4e89c252b6af566995b8 = NULL; 444 | void * TVPImportFuncPtrc145419db7b63f7488ea05a2a8826c1d = NULL; 445 | void * TVPImportFuncPtrd795cd5ebfb6ca6f1b91bafbe66d7a65 = NULL; 446 | void * TVPImportFuncPtr4564a3ce5cf48cb47e63a3948cef03be = NULL; 447 | void * TVPImportFuncPtrbee2775f2e4042043b7cb08056d2ae5c = NULL; 448 | void * TVPImportFuncPtr5fd8dfd2816a2cfd4a51cab41053d575 = NULL; 449 | void * TVPImportFuncPtr9982ebedc12d343cb098e2a7b25bdef1 = NULL; 450 | void * TVPImportFuncPtr81eeacbed5ee6129bef4b370e28b5d10 = NULL; 451 | void * TVPImportFuncPtr6ed1088905d99012d2fb5827ea19527e = NULL; 452 | void * TVPImportFuncPtrb4d6c64cc0004ffaba804f0e8f02ab9b = NULL; 453 | void * TVPImportFuncPtr2c3e08b8df93ec50451edd916c707030 = NULL; 454 | void * TVPImportFuncPtreba070d1583ca5f5d02630ba33a5504b = NULL; 455 | void * TVPImportFuncPtree474537852ce5eb165cb1761950faba = NULL; 456 | void * TVPImportFuncPtreed221c603243522667e2f1c6ace3ba4 = NULL; 457 | void * TVPImportFuncPtr1f973c5e3cfaf00fa752b7e22d7ba481 = NULL; 458 | void * TVPImportFuncPtrb9d5260bba9edd7503f1adf882218979 = NULL; 459 | void * TVPImportFuncPtraedbd2eda61145de808e295331884245 = NULL; 460 | void * TVPImportFuncPtrce0f184e84752eb279e4f900d8b53c18 = NULL; 461 | void * TVPImportFuncPtr0217d49393163b80897d044c1d93092f = NULL; 462 | void * TVPImportFuncPtr5bbd9d5b364840e9615af35a62f69d7d = NULL; 463 | void * TVPImportFuncPtr2b2837e81fcaeec35f61a2a3ecf2fb2d = NULL; 464 | void * TVPImportFuncPtrbb0706a78e9066944bfbffd1406be2d4 = NULL; 465 | void * TVPImportFuncPtr770e67c91215292980b88cc6efb9f2a5 = NULL; 466 | void * TVPImportFuncPtr068ab11f05731f2c2e9ea8c5fdb16a9f = NULL; 467 | void * TVPImportFuncPtrb9873a0ad2653952cb2948b817e786e4 = NULL; 468 | void * TVPImportFuncPtr11d9804ae4db32d731af69c397769cbf = NULL; 469 | void * TVPImportFuncPtr421f5aa6dbaaaf946f74942c77aac9bc = NULL; 470 | void * TVPImportFuncPtr563ee9dcb14a2914fc246e64679f42b5 = NULL; 471 | void * TVPImportFuncPtre23a54b6b80bd03111a40f669524724f = NULL; 472 | void * TVPImportFuncPtrc90c8bbd18a7190636ae4269c36ad005 = NULL; 473 | void * TVPImportFuncPtr03c54a8e8c86e171f868a624e490691f = NULL; 474 | void * TVPImportFuncPtr30b63f3cc59b39f1a71829bbbdf6e45d = NULL; 475 | void * TVPImportFuncPtr705bcc30a0561ec679c2267e1a573b23 = NULL; 476 | void * TVPImportFuncPtr5c627d080007e455b0393a9b4457cd4d = NULL; 477 | void * TVPImportFuncPtr72a64cecd44d80f95fc93faf0d239e32 = NULL; 478 | void * TVPImportFuncPtref838904712bfdc614dbc689fbe7fb18 = NULL; 479 | void * TVPImportFuncPtracc97936adc40656e824cfdf7a34e20c = NULL; 480 | void * TVPImportFuncPtr5ea1ba3602f9d9fee344de6c3406d7a3 = NULL; 481 | void * TVPImportFuncPtrd25f0771b8fc7715d69f01d950463a49 = NULL; 482 | void * TVPImportFuncPtrf8ab11c930782ce058e517d0440ec87f = NULL; 483 | void * TVPImportFuncPtrb8157e369d53c2d944b76494980ced7b = NULL; 484 | void * TVPImportFuncPtraba94f656b4c1de827d11c72b36a5e9c = NULL; 485 | void * TVPImportFuncPtr0656942f5a95783a4de73ca6e654d3b5 = NULL; 486 | void * TVPImportFuncPtr5c2b7d12713dd5a94ef8e6eff1f79752 = NULL; 487 | void * TVPImportFuncPtr6f1d30ac7e812cc5a059459c47638cd0 = NULL; 488 | void * TVPImportFuncPtr1d51684322635e7848ef53f7f6be8a1e = NULL; 489 | void * TVPImportFuncPtra1f2d56d138a4038fe1678328910a81d = NULL; 490 | void * TVPImportFuncPtrc135ef491b533febfd49696d22a1dd3d = NULL; 491 | void * TVPImportFuncPtr579117a873b466d78bf93e49c4a078da = NULL; 492 | void * TVPImportFuncPtrec8fa08705639eb7ae5d44ab63dea5e8 = NULL; 493 | void * TVPImportFuncPtrb49dc1cda6109256815dae7b4293725d = NULL; 494 | void * TVPImportFuncPtr912a670f56707ac70f2fee13660c2af8 = NULL; 495 | void * TVPImportFuncPtrd0159986645df76b8c66fdb662efffde = NULL; 496 | void * TVPImportFuncPtrcd7a2e6f91bf8d2daa3e28139d7d9f5c = NULL; 497 | void * TVPImportFuncPtr676004ca892b2bfee6859d0bb132fdd7 = NULL; 498 | void * TVPImportFuncPtrd4b161d8a745baa5e2113669773a758f = NULL; 499 | void * TVPImportFuncPtref7537293f6e3b6127480f6c5fd018a1 = NULL; 500 | void * TVPImportFuncPtr6f6f73b75cffe40a28566d1832ae1224 = NULL; 501 | void * TVPImportFuncPtr7adc5aad39e459e01543d07c239efe57 = NULL; 502 | void * TVPImportFuncPtr3ff6b480097eec3f5fdb7bfad685fd2a = NULL; 503 | void * TVPImportFuncPtrb2c50c3a1dfea7e9d05fed69818bafc3 = NULL; 504 | void * TVPImportFuncPtr8024df9077e2c85b5b718ad2c87e57e7 = NULL; 505 | void * TVPImportFuncPtr989769d4eb8e42e9c9bbe721b296406c = NULL; 506 | void * TVPImportFuncPtrcc1ac928b5c31570dfba7ed8f565be4b = NULL; 507 | void * TVPImportFuncPtr62931efed5729a332e60bd1f7c7cecdf = NULL; 508 | void * TVPImportFuncPtr53c18160b157088f72a9afd79737b48b = NULL; 509 | void * TVPImportFuncPtr48135697fd7f4df87402a7dd4d761555 = NULL; 510 | void * TVPImportFuncPtre2c71cf04e876069eb7315c800a96898 = NULL; 511 | void * TVPImportFuncPtr1f63c018cf805ca1168af192cf8a4b41 = NULL; 512 | void * TVPImportFuncPtr704a9574dafd3669e10d546549948e03 = NULL; 513 | void * TVPImportFuncPtr97905c510b9502c20c9322c9f5fb4188 = NULL; 514 | void * TVPImportFuncPtrb23e84230c4736667279c7a71f4ca53e = NULL; 515 | void * TVPImportFuncPtreb41fc900b0a6e3aba9d531f266137f1 = NULL; 516 | void * TVPImportFuncPtr5bd02c627b74bbb22d5a525b8bcbbd27 = NULL; 517 | void * TVPImportFuncPtrcc82e6a6b31ea743b9ebbdeed1ddedc3 = NULL; 518 | void * TVPImportFuncPtr247b25d497e48bc0191fdb2ac530f4ca = NULL; 519 | void * TVPImportFuncPtr6bbea3af36c35631641cc8356ff65475 = NULL; 520 | void * TVPImportFuncPtrcac02dfd62ba94abf6a346bef0bf3ab9 = NULL; 521 | void * TVPImportFuncPtr68eeb36d76d88ff00014f04b23454254 = NULL; 522 | void * TVPImportFuncPtr65e03b1c849b6e9cb5c478024aa9a5b7 = NULL; 523 | void * TVPImportFuncPtr7670c0c5630625ee6a73b7b9ee093650 = NULL; 524 | void * TVPImportFuncPtr68a0abce6eefa08e74353ec48c4c87a8 = NULL; 525 | void * TVPImportFuncPtrccb6e098b9a0791a0f20e9f1af55e341 = NULL; 526 | void * TVPImportFuncPtr0f817efe47b451fd719c05a104c2b803 = NULL; 527 | void * TVPImportFuncPtrefad1a3d774747bd2b5adb221ede2678 = NULL; 528 | void * TVPImportFuncPtr563285ed004ddd2945f91db7b5347d3c = NULL; 529 | void * TVPImportFuncPtr4c032260ef83d44bfe05fdc16843a8f9 = NULL; 530 | void * TVPImportFuncPtr96fd614457f06499a430b0c6e0e8a941 = NULL; 531 | void * TVPImportFuncPtrd6e36d304ff7253088ab4bc1aaf13a98 = NULL; 532 | void * TVPImportFuncPtreddacf49735189e23d9d49831851ffdb = NULL; 533 | void * TVPImportFuncPtr20275a5de4aef464b85d3f6db2800063 = NULL; 534 | void * TVPImportFuncPtr872d1c626e6d4e3d5e86a257f0b14536 = NULL; 535 | void * TVPImportFuncPtra7ebb70cdec339f26c2ea7fd9a471b88 = NULL; 536 | void * TVPImportFuncPtrd748ffef5cde2a6a3333e75b7fa3fb49 = NULL; 537 | void * TVPImportFuncPtr15e1fe0e6230e7b60e216e266f927f7b = NULL; 538 | void * TVPImportFuncPtrf8179eafd0cbe8116874310519207dc0 = NULL; 539 | void * TVPImportFuncPtraccbc3bed3223d552de2723366cfc2b6 = NULL; 540 | void * TVPImportFuncPtre2c3e74d2a20a601c1f393348f58aeb2 = NULL; 541 | void * TVPImportFuncPtre0163a6ca3397c2e71715132cccefa1d = NULL; 542 | void * TVPImportFuncPtr2c3ea1ea88799dfde81025bf1959333a = NULL; 543 | void * TVPImportFuncPtra6bb56b3f4b7a89fe78d63956a0f444c = NULL; 544 | void * TVPImportFuncPtr09a81ac18a121d8fbb67285a081bf9c6 = NULL; 545 | void * TVPImportFuncPtr46fdfe0f5369bf234c3ed60a43947d9d = NULL; 546 | void * TVPImportFuncPtrd866cb6c8a47444bbac60eeffbfc6d96 = NULL; 547 | void * TVPImportFuncPtr7b5718fc67458089c685dbb900126890 = NULL; 548 | void * TVPImportFuncPtr5713dfe9525662357d3819229e0204c2 = NULL; 549 | void * TVPImportFuncPtr8954a6b4a7f8b378c2af16a00d5059b0 = NULL; 550 | void * TVPImportFuncPtr2ed4faa38db6f3dee0dea18ebe973d35 = NULL; 551 | void * TVPImportFuncPtrd0338dedb0af532d22f2075a85373548 = NULL; 552 | void * TVPImportFuncPtr583d57c3bb9491f8f9904c266d3f52e8 = NULL; 553 | void * TVPImportFuncPtr8ac206da43e322eb8e34fce2b0959656 = NULL; 554 | void * TVPImportFuncPtr14f5f97d90bd8da89b68d035367f4ba4 = NULL; 555 | void * TVPImportFuncPtrac3b21181ef4c1be73cf5e0edb4e1a8f = NULL; 556 | void * TVPImportFuncPtr1d7d97509292a4ca9269f2539dcc70fd = NULL; 557 | void * TVPImportFuncPtrc4033f54a99517783b8d6ad23c90aeed = NULL; 558 | void * TVPImportFuncPtrf19e38d48755c971fc35408ac65562fa = NULL; 559 | void * TVPImportFuncPtre01204e226d8aa9520b3620b68da6196 = NULL; 560 | void * TVPImportFuncPtrb50000da98f1257cf789fc63fb1fda02 = NULL; 561 | void * TVPImportFuncPtrc55f38b1a7623646aa5cc45d4f4f479b = NULL; 562 | void * TVPImportFuncPtr983d270549ec0e83e2a863b43e1e6f70 = NULL; 563 | void * TVPImportFuncPtrb48d779dc6a881c67c5f8fa12655aa28 = NULL; 564 | void * TVPImportFuncPtrd3967c6e24d0c4ad107a03c1cadd57b1 = NULL; 565 | void * TVPImportFuncPtr6b6f416b5725a7cafb4774ffc3a00f10 = NULL; 566 | void * TVPImportFuncPtrbc7fc5dfa228152a09d2230823c2fe71 = NULL; 567 | void * TVPImportFuncPtra1cb941317b947beb88e29fa8d46a2be = NULL; 568 | void * TVPImportFuncPtr8e185e82bb27a7fb40f0b08f560a57e9 = NULL; 569 | void * TVPImportFuncPtr4b7b264b61ee0eea68213934217f5865 = NULL; 570 | void * TVPImportFuncPtre872f12593d6853ebdffebbb5d003c10 = NULL; 571 | void * TVPImportFuncPtre86fcf60fa658129d937de3728d3c432 = NULL; 572 | void * TVPImportFuncPtr350741a7398a187628866f5b397c7a99 = NULL; 573 | void * TVPImportFuncPtr3b5a3e187077b0b5eac9a040c99dd9e7 = NULL; 574 | void * TVPImportFuncPtr2d9b2bb2cd57220048fe170f1e960cb7 = NULL; 575 | void * TVPImportFuncPtr260624e275a20115e8861eb7b0383971 = NULL; 576 | void * TVPImportFuncPtr15b31724287dbbecb775b2e46dc35fb9 = NULL; 577 | void * TVPImportFuncPtrff652293eef07b5a7ec4f372e5504e2c = NULL; 578 | void * TVPImportFuncPtr99b773033e9a2c631b483d4d0e3881f8 = NULL; 579 | void * TVPImportFuncPtr3787960fc29b8545629d894ff46d4641 = NULL; 580 | void * TVPImportFuncPtr3fc76257bb1639de4bfa0c0fcedf9c4a = NULL; 581 | void * TVPImportFuncPtr292ee2eeb8131e34368ba9ee144b737a = NULL; 582 | void * TVPImportFuncPtrec144655bc61bfa2c6e9505cc1a0a298 = NULL; 583 | void * TVPImportFuncPtr230218bdabfc34178a8306a54276a3c8 = NULL; 584 | void * TVPImportFuncPtr617dfb046aaf40078ee76715fa4756af = NULL; 585 | void * TVPImportFuncPtr8116bb2b26dcafd9fefca76e9f1d9b24 = NULL; 586 | void * TVPImportFuncPtr12962f857563cd39b3cb1f9894775cc7 = NULL; 587 | void * TVPImportFuncPtr50c0d25cd9af311a5fb0aca78f691c3b = NULL; 588 | void * TVPImportFuncPtr6c37a1ccda816c4fbab4f0117ca75e8a = NULL; 589 | void * TVPImportFuncPtre21c21762dd0e36d6f7d2cedaac97383 = NULL; 590 | void * TVPImportFuncPtr487ee86557f94113db9a981e08d29caa = NULL; 591 | void * TVPImportFuncPtrdfdfe0e494845bf484612cc97145f85c = NULL; 592 | void * TVPImportFuncPtre74dc11dbd56fb450eed1388a65d3102 = NULL; 593 | void * TVPImportFuncPtr6981c02247de5799ea7dfbd79fdc208d = NULL; 594 | void * TVPImportFuncPtr7c559043315f6ecd7a86ec7d8d820f6d = NULL; 595 | void * TVPImportFuncPtr3a8b6aca73c83d6fc9ce813661ec734d = NULL; 596 | void * TVPImportFuncPtr20d7ce65e240b745b10616bb5da1f897 = NULL; 597 | void * TVPImportFuncPtrf4d1217249674ac9274d358c381afc0b = NULL; 598 | void * TVPImportFuncPtrca77323bbe361f88f68536018fa94c50 = NULL; 599 | void * TVPImportFuncPtr17983ecc7e7fe370bce664281a84c948 = NULL; 600 | void * TVPImportFuncPtr61a2f61030362903d00ba21a3cebecdd = NULL; 601 | void * TVPImportFuncPtre9f985403dbd18540d8230a2af6ed76b = NULL; 602 | void * TVPImportFuncPtrbe0523c9a72ba26cb4bfa3cb188cacf6 = NULL; 603 | void * TVPImportFuncPtr8ac7cf651223c8ba53df90cf4f3d3bbc = NULL; 604 | void * TVPImportFuncPtr873e73aa35096ad4c684d394a10135a6 = NULL; 605 | void * TVPImportFuncPtr3342548f105147c86019ae31ece01d4e = NULL; 606 | void * TVPImportFuncPtr607ee0956cbb16b2afb7cb2227aa6267 = NULL; 607 | void * TVPImportFuncPtr816d84c86e86d5e7c0018d551e741e4f = NULL; 608 | void * TVPImportFuncPtr985fcda0141eb3b4c6bd8342e947f130 = NULL; 609 | void * TVPImportFuncPtrd00e4f9e493334d2f65ea379ff03d717 = NULL; 610 | void * TVPImportFuncPtr0c246e6c7c8798e4c10d2bbfc66326c9 = NULL; 611 | void * TVPImportFuncPtr501015843a83368b3ff1c7c9ef5f3bcb = NULL; 612 | void * TVPImportFuncPtr61d5fc5a060f346752a3a8b6886d17bc = NULL; 613 | void * TVPImportFuncPtr0debe3e1caf0f57572a59917851676d3 = NULL; 614 | void * TVPImportFuncPtree3a36682f48639166ba04a19fe1b332 = NULL; 615 | void * TVPImportFuncPtr4d99b9e38121251b40a90cd2bd5fea63 = NULL; 616 | void * TVPImportFuncPtrf1509827696ebf5627bee1a45d675fb8 = NULL; 617 | void * TVPImportFuncPtrbbb625e23229350453161810c41419dd = NULL; 618 | void * TVPImportFuncPtr489a6aae30de0feff5d3c5fbd42ae325 = NULL; 619 | void * TVPImportFuncPtr6b9a349305f8c689dcfdbcea2566769c = NULL; 620 | void * TVPImportFuncPtr6320d208ce1a570aca52c3cdf7421f7c = NULL; 621 | void * TVPImportFuncPtr0f83f0459badd1cd352041b9243d712f = NULL; 622 | void * TVPImportFuncPtr186a94b2fed609ed2d2a7ac1a2bed87f = NULL; 623 | void * TVPImportFuncPtrbde8efb9971664f2b52fe912745e2791 = NULL; 624 | void * TVPImportFuncPtr386d6fa5cb73e3519b62d20470e5414b = NULL; 625 | void * TVPImportFuncPtrc61f97ec3d99bdbb23afe93870001bbf = NULL; 626 | void * TVPImportFuncPtrf92821f2b23662c6f1256511a626cd3f = NULL; 627 | void * TVPImportFuncPtr76b0732e3e2886897d5f26b4b0545dee = NULL; 628 | void * TVPImportFuncPtr903ed11ef3863850e837bd4b3b1d61a1 = NULL; 629 | void * TVPImportFuncPtr2661124b39595ffafe2fb0bfb7bd2efc = NULL; 630 | void * TVPImportFuncPtrd0b7170e54398c2f9d27dcc513c4cf46 = NULL; 631 | void * TVPImportFuncPtr31bdd2a1eed3785c1422fab5ea6b3ce7 = NULL; 632 | void * TVPImportFuncPtrdbc300d1dadc1a60cb0dcadfb92f1aee = NULL; 633 | void * TVPImportFuncPtr1d4d9f8bdf55bd4c78abd90656af0364 = NULL; 634 | void * TVPImportFuncPtr5c7049e712e84b40ac05942421202de5 = NULL; 635 | void * TVPImportFuncPtr5dca8992bb340d70ba65ddab65c28371 = NULL; 636 | void * TVPImportFuncPtr85f1f38f783ebfcf638f3c443bc9b204 = NULL; 637 | void * TVPImportFuncPtr7d61d143884bfa4b6c50dae11c2b659f = NULL; 638 | void * TVPImportFuncPtr793a2ad7ad3411be3670576a8e6ddcf8 = NULL; 639 | void * TVPImportFuncPtr68d8eec33254f1684e53bbc0aa8b2466 = NULL; 640 | void * TVPImportFuncPtrb09652d2197b29f7d38aff0298c69f17 = NULL; 641 | void * TVPImportFuncPtrbe7db03ddcf1886cb7233e58f19c8c77 = NULL; 642 | void * TVPImportFuncPtrb4c8fedc1ffbe30d9703cb2b8d3c0e7b = NULL; 643 | void * TVPImportFuncPtr77efef3b4ffc0cb577b76304e06e39f3 = NULL; 644 | void * TVPImportFuncPtr0e55187bde599d6585eaabd2c4ac3f02 = NULL; 645 | void * TVPImportFuncPtrf72e3fc3b97a9141b6f516f5e53bf9b8 = NULL; 646 | void * TVPImportFuncPtre7a1ac237f00bb6320d0e0ac7e6d51c6 = NULL; 647 | void * TVPImportFuncPtrd87682f6d691350878077bd101b7f0fc = NULL; 648 | void * TVPImportFuncPtrd7ae155eaabd8e65d6b4d356fe4af496 = NULL; 649 | void * TVPImportFuncPtrbe3a1844ea6af533bd4e7b0a76c826a1 = NULL; 650 | void * TVPImportFuncPtraa531d2c3c87f456e48a14722faa1c1f = NULL; 651 | void * TVPImportFuncPtr6889cd886e1c2e7faf541528636c16c3 = NULL; 652 | void * TVPImportFuncPtr5d9266e6a8a154fe4ba80b0995e109ab = NULL; 653 | void * TVPImportFuncPtra7dc19b023737979ad1ae1ae01d560d2 = NULL; 654 | void * TVPImportFuncPtrd20444b7a6243d668a0d3956d95af510 = NULL; 655 | void * TVPImportFuncPtr1458dec9eee36816c8002d4049840355 = NULL; 656 | void * TVPImportFuncPtr21137ff5351245b1611852301b7f5796 = NULL; 657 | void * TVPImportFuncPtrc07fc4e45fc2dc44d839c5e012d0be60 = NULL; 658 | void * TVPImportFuncPtr6815b962a3122ae967284239932cc656 = NULL; 659 | void * TVPImportFuncPtre96cccbe1f16b0fb74673f2ec3343ff8 = NULL; 660 | void * TVPImportFuncPtre8cd7494f919b18a992cb8c2722b2bf0 = NULL; 661 | void * TVPImportFuncPtr990fdefcafc0de5e8e1f502c1b341e44 = NULL; 662 | void * TVPImportFuncPtrde5d83ba307e822825062377fb76c2ba = NULL; 663 | void * TVPImportFuncPtr5e28bcc0f5ad6a038eb5a6535b56386c = NULL; 664 | void * TVPImportFuncPtre33419e8ede4bb501ab1787cf17c7ca5 = NULL; 665 | void * TVPImportFuncPtr1cd7cb9580c0cf723dea402b85a720b1 = NULL; 666 | void * TVPImportFuncPtrd18ca17fad389ff60ce3caa769083798 = NULL; 667 | void * TVPImportFuncPtr0a959a5ff02530a8eb122e7e1f8ceed3 = NULL; 668 | void * TVPImportFuncPtra4774ea559e64b4667b3845f8540d207 = NULL; 669 | void * TVPImportFuncPtr52eae3e8106494bfa604c15492ecb9f4 = NULL; 670 | void * TVPImportFuncPtr882f458df5e05bb9ab2222e79f6c81cf = NULL; 671 | void * TVPImportFuncPtr6069a18bf7d3f394c230cdcf2f574ef4 = NULL; 672 | void * TVPImportFuncPtr75b60565caf44027cc52b2b5cf6b0ea3 = NULL; 673 | void * TVPImportFuncPtr9d735149c3ad586363895f76645abf2e = NULL; 674 | void * TVPImportFuncPtrea5168fae254acdd8c8db6f1f3d2da03 = NULL; 675 | void * TVPImportFuncPtrf5a42bd5239e1a0be29f92eb838d2c8c = NULL; 676 | void * TVPImportFuncPtr7cc8cd9f415b183b42c546635aeade7f = NULL; 677 | void * TVPImportFuncPtrad2fefa53e05528f9c1fe29d27db0f37 = NULL; 678 | void * TVPImportFuncPtrf3e06fed4c82a9bd1b53252abaf50847 = NULL; 679 | void * TVPImportFuncPtr960db7ea36202bf7ec3bf6b767cc045e = NULL; 680 | void * TVPImportFuncPtr7bf5d357eb52dd206a269b54c8136e0e = NULL; 681 | void * TVPImportFuncPtrba1c9b771c5cdb725128de684af3c9ca = NULL; 682 | void * TVPImportFuncPtr69cc6311196adc134fd153c4c5346bc5 = NULL; 683 | void * TVPImportFuncPtr8ed68f8e79efe1c767f92e7d92eb8b54 = NULL; 684 | void * TVPImportFuncPtr60da1e9ec15b251ff18ddcdf8a3e93e0 = NULL; 685 | void * TVPImportFuncPtref47304bad87a036e38f0319b48c1f6e = NULL; 686 | void * TVPImportFuncPtr182d19020e4e2d5cd1462d7c8ef24d1f = NULL; 687 | void * TVPImportFuncPtr9e1fa429a92a5c99d397a06c20fd6705 = NULL; 688 | void * TVPImportFuncPtr74ac7c291299eb928aa4c2899df5567e = NULL; 689 | void * TVPImportFuncPtrfb645d9ec0ef3fd2aba2b762ef6b9a15 = NULL; 690 | void * TVPImportFuncPtrf988626275257574050ac789f9060a3b = NULL; 691 | void * TVPImportFuncPtr1831064ed23493cef407648763ba4d69 = NULL; 692 | void * TVPImportFuncPtr305390c94750daa7124db3ff6e77931c = NULL; 693 | void * TVPImportFuncPtr4fb384a391bfcf6a3a2932661d3051aa = NULL; 694 | void * TVPImportFuncPtr305537c4820e23cf217a15efb56dba1c = NULL; 695 | void * TVPImportFuncPtraacf83677ca7df75117f7bafa7a53791 = NULL; 696 | void * TVPImportFuncPtrd14b922fefc6c07aa536b94762579fe5 = NULL; 697 | void * TVPImportFuncPtr00fd650a79c603bdeb2f8e36f667a782 = NULL; 698 | void * TVPImportFuncPtra36ee133c07c30185b0bbc6375954e88 = NULL; 699 | void * TVPImportFuncPtrdc657ecacf8e578870314427216864d9 = NULL; 700 | void * TVPImportFuncPtre79d02b58a8bfdee439bc0694d7edd6d = NULL; 701 | void * TVPImportFuncPtr6b7537b66b71d27384bea45bc2bf24b4 = NULL; 702 | void * TVPImportFuncPtrb3456dbad652b52f5bce1889b6f4d0ef = NULL; 703 | void * TVPImportFuncPtr9a50803a03e1ccb60120dff8b92ecdcd = NULL; 704 | void * TVPImportFuncPtr0f6b3940dc72e3e56cd15216b53b9126 = NULL; 705 | void * TVPImportFuncPtr23b647f1c825e214a7465de3ebe9968d = NULL; 706 | void * TVPImportFuncPtr8ec96bc7b777180f23e1a2e43bf9a413 = NULL; 707 | void * TVPImportFuncPtrcffd45014652659638d59abe11daf3be = NULL; 708 | void * TVPImportFuncPtra784285a35b1bc76bb367305b5099e35 = NULL; 709 | void * TVPImportFuncPtr03773751329896facf2003ab79bbc475 = NULL; 710 | void * TVPImportFuncPtr923884216edf134d07d8e70f8f57e827 = NULL; 711 | void * TVPImportFuncPtre48798dc69498f80b6633bb405eda6eb = NULL; 712 | void * TVPImportFuncPtr998a5e1aa5cd85689795348fc540a655 = NULL; 713 | void * TVPImportFuncPtr5f6d263c0d48d03f6eb0dc44c9dd0be2 = NULL; 714 | void * TVPImportFuncPtrbf363ba3d5b54df9d6df35a518deb6b0 = NULL; 715 | void * TVPImportFuncPtr6cc8a24cc7ce23179d1d4ccab7a8c97b = NULL; 716 | 717 | //--------------------------------------------------------------------------- 718 | // tTJSDispatch 719 | //--------------------------------------------------------------------------- 720 | tTJSDispatch::tTJSDispatch() 721 | { 722 | BeforeDestructionCalled = false; 723 | RefCount = 1; 724 | #ifdef TVP_IN_PLUGIN_STUB // TVP plug-in support 725 | TVPPluginGlobalRefCount++; 726 | #endif 727 | } 728 | //--------------------------------------------------------------------------- 729 | tTJSDispatch::~tTJSDispatch() 730 | { 731 | if(!BeforeDestructionCalled) 732 | { 733 | BeforeDestructionCalled = true; 734 | BeforeDestruction(); 735 | } 736 | } 737 | //--------------------------------------------------------------------------- 738 | tjs_uint TJS_INTF_METHOD tTJSDispatch::AddRef(void) 739 | { 740 | #ifdef TVP_IN_PLUGIN_STUB // TVP plug-in support 741 | TVPPluginGlobalRefCount++; 742 | #endif 743 | return ++RefCount; 744 | } 745 | //--------------------------------------------------------------------------- 746 | tjs_uint TJS_INTF_METHOD tTJSDispatch::Release(void) 747 | { 748 | #ifdef TVP_IN_PLUGIN_STUB // TVP plug-in support 749 | TVPPluginGlobalRefCount--; 750 | #endif 751 | if(RefCount == 1) // avoid to call "BeforeDestruction" with RefCount == 0 752 | { 753 | // object destruction 754 | if(!BeforeDestructionCalled) 755 | { 756 | BeforeDestructionCalled = true; 757 | BeforeDestruction(); 758 | } 759 | 760 | if(RefCount == 1) // really ready to destruct ? 761 | { 762 | delete this; 763 | return 0; 764 | } 765 | } 766 | return --RefCount; 767 | } 768 | //--------------------------------------------------------------------------- 769 | tjs_error TJS_INTF_METHOD 770 | tTJSDispatch::FuncCallByNum( 771 | tjs_uint32 flag, 772 | tjs_int num, 773 | tTJSVariant *result, 774 | tjs_int numparams, 775 | tTJSVariant **param, 776 | iTJSDispatch2 *objthis 777 | ) 778 | { 779 | tjs_char buf[34]; 780 | TJS_int_to_str(num, buf); 781 | return FuncCall(flag, buf, NULL, result, numparams, param, objthis); 782 | } 783 | //--------------------------------------------------------------------------- 784 | tjs_error TJS_INTF_METHOD 785 | tTJSDispatch::PropGetByNum( 786 | tjs_uint32 flag, 787 | tjs_int num, 788 | tTJSVariant *result, 789 | iTJSDispatch2 *objthis 790 | ) 791 | { 792 | tjs_char buf[34]; 793 | TJS_int_to_str(num, buf); 794 | return PropGet(flag, buf, NULL, result, objthis); 795 | } 796 | //--------------------------------------------------------------------------- 797 | tjs_error TJS_INTF_METHOD 798 | tTJSDispatch::PropSetByNum( 799 | tjs_uint32 flag, 800 | tjs_int num, 801 | const tTJSVariant *param, 802 | iTJSDispatch2 *objthis 803 | ) 804 | { 805 | tjs_char buf[34]; 806 | TJS_int_to_str(num, buf); 807 | return PropSet(flag, buf, NULL, param, objthis); 808 | } 809 | //--------------------------------------------------------------------------- 810 | tjs_error TJS_INTF_METHOD 811 | tTJSDispatch::GetCountByNum( 812 | tjs_int *result, 813 | tjs_int num, 814 | iTJSDispatch2 *objthis 815 | ) 816 | { 817 | tjs_char buf[34]; 818 | TJS_int_to_str(num, buf); 819 | return GetCount(result, buf, NULL, objthis); 820 | } 821 | //--------------------------------------------------------------------------- 822 | tjs_error TJS_INTF_METHOD 823 | tTJSDispatch::DeleteMemberByNum( 824 | tjs_uint32 flag, 825 | tjs_int num, 826 | iTJSDispatch2 *objthis 827 | ) 828 | { 829 | tjs_char buf[34]; 830 | TJS_int_to_str(num, buf); 831 | return DeleteMember(flag, buf, NULL, objthis); 832 | } 833 | //--------------------------------------------------------------------------- 834 | tjs_error TJS_INTF_METHOD 835 | tTJSDispatch::InvalidateByNum( 836 | tjs_uint32 flag, 837 | tjs_int num, 838 | iTJSDispatch2 *objthis 839 | ) 840 | { 841 | tjs_char buf[34]; 842 | TJS_int_to_str(num, buf); 843 | return Invalidate(flag, buf, NULL, objthis); 844 | } 845 | //--------------------------------------------------------------------------- 846 | tjs_error TJS_INTF_METHOD 847 | tTJSDispatch::IsValidByNum( 848 | tjs_uint32 flag, 849 | tjs_int num, 850 | iTJSDispatch2 *objthis 851 | ) 852 | { 853 | tjs_char buf[34]; 854 | TJS_int_to_str(num, buf); 855 | return IsValid(flag, buf, NULL, objthis); 856 | } 857 | //--------------------------------------------------------------------------- 858 | tjs_error TJS_INTF_METHOD 859 | tTJSDispatch::CreateNewByNum( 860 | tjs_uint32 flag, 861 | tjs_int num, 862 | iTJSDispatch2 **result, 863 | tjs_int numparams, 864 | tTJSVariant **param, 865 | iTJSDispatch2 *objthis 866 | ) 867 | { 868 | tjs_char buf[34]; 869 | TJS_int_to_str(num, buf); 870 | return CreateNew(flag, buf, NULL, result, numparams, param, objthis); 871 | } 872 | //--------------------------------------------------------------------------- 873 | tjs_error TJS_INTF_METHOD 874 | tTJSDispatch::IsInstanceOfByNum( 875 | tjs_uint32 flag, 876 | tjs_int num, 877 | const tjs_char *classname, 878 | iTJSDispatch2 *objthis 879 | ) 880 | { 881 | tjs_char buf[34]; 882 | TJS_int_to_str(num, buf); 883 | return IsInstanceOf(flag, buf, NULL, classname, objthis); 884 | } 885 | //--------------------------------------------------------------------------- 886 | tjs_error TJS_INTF_METHOD 887 | tTJSDispatch::OperationByNum( 888 | tjs_uint32 flag, 889 | tjs_int num, 890 | tTJSVariant *result, 891 | const tTJSVariant *param, 892 | iTJSDispatch2 *objthis 893 | ) 894 | { 895 | tjs_char buf[34]; 896 | TJS_int_to_str(num, buf); 897 | return Operation(flag, buf, NULL, result, param, objthis); 898 | } 899 | //--------------------------------------------------------------------------- 900 | tjs_error TJS_INTF_METHOD 901 | tTJSDispatch::Operation( 902 | tjs_uint32 flag, 903 | const tjs_char *membername, 904 | tjs_uint32 *hint, 905 | tTJSVariant *result, 906 | const tTJSVariant *param, 907 | iTJSDispatch2 *objthis 908 | ) 909 | { 910 | tjs_uint32 op = flag & TJS_OP_MASK; 911 | 912 | if(op!=TJS_OP_INC && op!=TJS_OP_DEC && param == NULL) 913 | return TJS_E_INVALIDPARAM; 914 | 915 | if(opTJS_OP_MAX) 916 | return TJS_E_INVALIDPARAM; 917 | 918 | tTJSVariant tmp; 919 | tjs_error hr; 920 | hr = PropGet(0, membername, hint, &tmp, objthis); 921 | if(TJS_FAILED(hr)) return hr; 922 | 923 | TJSDoVariantOperation(op, tmp, param); 924 | 925 | hr = PropSet(0, membername, hint, &tmp, objthis); 926 | if(TJS_FAILED(hr)) return hr; 927 | 928 | if(result) result->CopyRef(tmp); 929 | 930 | return TJS_S_OK; 931 | } 932 | //--------------------------------------------------------------------------- 933 | 934 | //--------------------------------------------------------------------------- 935 | // exception protected function stub 936 | //--------------------------------------------------------------------------- 937 | 938 | 939 | static bool TJS_USERENTRY _CatchFuncCall(void *data, const tTVPExceptionDesc & desc) 940 | { 941 | throw desc; 942 | } 943 | struct t_iTJSDispatch2_AddRef 944 | { 945 | tjs_uint _ret; 946 | iTJSDispatch2 * _this; 947 | t_iTJSDispatch2_AddRef( 948 | iTJSDispatch2 * _this_ 949 | ) : 950 | _this(_this_) {;} 951 | 952 | }; 953 | static void TJS_USERENTRY _Try_iTJSDispatch2_AddRef(void *data) 954 | { 955 | t_iTJSDispatch2_AddRef * arg = (t_iTJSDispatch2_AddRef *)data; 956 | arg->_ret = 957 | arg->_this->AddRef( 958 | 959 | ); 960 | } 961 | tjs_uint Try_iTJSDispatch2_AddRef(iTJSDispatch2 * _this) 962 | { 963 | t_iTJSDispatch2_AddRef arg( 964 | _this 965 | ); 966 | TVPDoTryBlock(_Try_iTJSDispatch2_AddRef, _CatchFuncCall, NULL, &arg); 967 | return arg._ret; 968 | } 969 | struct t_iTJSDispatch2_Release 970 | { 971 | tjs_uint _ret; 972 | iTJSDispatch2 * _this; 973 | t_iTJSDispatch2_Release( 974 | iTJSDispatch2 * _this_ 975 | ) : 976 | _this(_this_) {;} 977 | 978 | }; 979 | static void TJS_USERENTRY _Try_iTJSDispatch2_Release(void *data) 980 | { 981 | t_iTJSDispatch2_Release * arg = (t_iTJSDispatch2_Release *)data; 982 | arg->_ret = 983 | arg->_this->Release( 984 | 985 | ); 986 | } 987 | tjs_uint Try_iTJSDispatch2_Release(iTJSDispatch2 * _this) 988 | { 989 | t_iTJSDispatch2_Release arg( 990 | _this 991 | ); 992 | TVPDoTryBlock(_Try_iTJSDispatch2_Release, _CatchFuncCall, NULL, &arg); 993 | return arg._ret; 994 | } 995 | struct t_iTJSDispatch2_FuncCall 996 | { 997 | tjs_error _ret; 998 | iTJSDispatch2 * _this; 999 | tjs_uint32 flag; 1000 | const tjs_char * membername; 1001 | tjs_uint32 *hint; 1002 | tTJSVariant *result; 1003 | tjs_int numparams; 1004 | tTJSVariant **param; 1005 | iTJSDispatch2 *objthis; 1006 | t_iTJSDispatch2_FuncCall( 1007 | iTJSDispatch2 * _this_, 1008 | tjs_uint32 flag_, 1009 | const tjs_char * membername_, 1010 | tjs_uint32 *hint_, 1011 | tTJSVariant *result_, 1012 | tjs_int numparams_, 1013 | tTJSVariant **param_, 1014 | iTJSDispatch2 *objthis_ 1015 | ) : 1016 | _this(_this_), 1017 | flag(flag_), 1018 | membername(membername_), 1019 | hint(hint_), 1020 | result(result_), 1021 | numparams(numparams_), 1022 | param(param_), 1023 | objthis(objthis_) {;} 1024 | 1025 | }; 1026 | static void TJS_USERENTRY _Try_iTJSDispatch2_FuncCall(void *data) 1027 | { 1028 | t_iTJSDispatch2_FuncCall * arg = (t_iTJSDispatch2_FuncCall *)data; 1029 | arg->_ret = 1030 | arg->_this->FuncCall( 1031 | arg->flag, 1032 | arg->membername, 1033 | arg->hint, 1034 | arg->result, 1035 | arg->numparams, 1036 | arg->param, 1037 | arg->objthis 1038 | ); 1039 | } 1040 | tjs_error Try_iTJSDispatch2_FuncCall(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char * membername, tjs_uint32 *hint, tTJSVariant *result, tjs_int numparams, tTJSVariant **param, iTJSDispatch2 *objthis) 1041 | { 1042 | t_iTJSDispatch2_FuncCall arg( 1043 | _this, 1044 | flag, 1045 | membername, 1046 | hint, 1047 | result, 1048 | numparams, 1049 | param, 1050 | objthis 1051 | ); 1052 | TVPDoTryBlock(_Try_iTJSDispatch2_FuncCall, _CatchFuncCall, NULL, &arg); 1053 | return arg._ret; 1054 | } 1055 | struct t_iTJSDispatch2_FuncCallByNum 1056 | { 1057 | tjs_error _ret; 1058 | iTJSDispatch2 * _this; 1059 | tjs_uint32 flag; 1060 | tjs_int num; 1061 | tTJSVariant *result; 1062 | tjs_int numparams; 1063 | tTJSVariant **param; 1064 | iTJSDispatch2 *objthis; 1065 | t_iTJSDispatch2_FuncCallByNum( 1066 | iTJSDispatch2 * _this_, 1067 | tjs_uint32 flag_, 1068 | tjs_int num_, 1069 | tTJSVariant *result_, 1070 | tjs_int numparams_, 1071 | tTJSVariant **param_, 1072 | iTJSDispatch2 *objthis_ 1073 | ) : 1074 | _this(_this_), 1075 | flag(flag_), 1076 | num(num_), 1077 | result(result_), 1078 | numparams(numparams_), 1079 | param(param_), 1080 | objthis(objthis_) {;} 1081 | 1082 | }; 1083 | static void TJS_USERENTRY _Try_iTJSDispatch2_FuncCallByNum(void *data) 1084 | { 1085 | t_iTJSDispatch2_FuncCallByNum * arg = (t_iTJSDispatch2_FuncCallByNum *)data; 1086 | arg->_ret = 1087 | arg->_this->FuncCallByNum( 1088 | arg->flag, 1089 | arg->num, 1090 | arg->result, 1091 | arg->numparams, 1092 | arg->param, 1093 | arg->objthis 1094 | ); 1095 | } 1096 | tjs_error Try_iTJSDispatch2_FuncCallByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, tTJSVariant *result, tjs_int numparams, tTJSVariant **param, iTJSDispatch2 *objthis) 1097 | { 1098 | t_iTJSDispatch2_FuncCallByNum arg( 1099 | _this, 1100 | flag, 1101 | num, 1102 | result, 1103 | numparams, 1104 | param, 1105 | objthis 1106 | ); 1107 | TVPDoTryBlock(_Try_iTJSDispatch2_FuncCallByNum, _CatchFuncCall, NULL, &arg); 1108 | return arg._ret; 1109 | } 1110 | struct t_iTJSDispatch2_PropGet 1111 | { 1112 | tjs_error _ret; 1113 | iTJSDispatch2 * _this; 1114 | tjs_uint32 flag; 1115 | const tjs_char * membername; 1116 | tjs_uint32 *hint; 1117 | tTJSVariant *result; 1118 | iTJSDispatch2 *objthis; 1119 | t_iTJSDispatch2_PropGet( 1120 | iTJSDispatch2 * _this_, 1121 | tjs_uint32 flag_, 1122 | const tjs_char * membername_, 1123 | tjs_uint32 *hint_, 1124 | tTJSVariant *result_, 1125 | iTJSDispatch2 *objthis_ 1126 | ) : 1127 | _this(_this_), 1128 | flag(flag_), 1129 | membername(membername_), 1130 | hint(hint_), 1131 | result(result_), 1132 | objthis(objthis_) {;} 1133 | 1134 | }; 1135 | static void TJS_USERENTRY _Try_iTJSDispatch2_PropGet(void *data) 1136 | { 1137 | t_iTJSDispatch2_PropGet * arg = (t_iTJSDispatch2_PropGet *)data; 1138 | arg->_ret = 1139 | arg->_this->PropGet( 1140 | arg->flag, 1141 | arg->membername, 1142 | arg->hint, 1143 | arg->result, 1144 | arg->objthis 1145 | ); 1146 | } 1147 | tjs_error Try_iTJSDispatch2_PropGet(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char * membername, tjs_uint32 *hint, tTJSVariant *result, iTJSDispatch2 *objthis) 1148 | { 1149 | t_iTJSDispatch2_PropGet arg( 1150 | _this, 1151 | flag, 1152 | membername, 1153 | hint, 1154 | result, 1155 | objthis 1156 | ); 1157 | TVPDoTryBlock(_Try_iTJSDispatch2_PropGet, _CatchFuncCall, NULL, &arg); 1158 | return arg._ret; 1159 | } 1160 | struct t_iTJSDispatch2_PropGetByNum 1161 | { 1162 | tjs_error _ret; 1163 | iTJSDispatch2 * _this; 1164 | tjs_uint32 flag; 1165 | tjs_int num; 1166 | tTJSVariant *result; 1167 | iTJSDispatch2 *objthis; 1168 | t_iTJSDispatch2_PropGetByNum( 1169 | iTJSDispatch2 * _this_, 1170 | tjs_uint32 flag_, 1171 | tjs_int num_, 1172 | tTJSVariant *result_, 1173 | iTJSDispatch2 *objthis_ 1174 | ) : 1175 | _this(_this_), 1176 | flag(flag_), 1177 | num(num_), 1178 | result(result_), 1179 | objthis(objthis_) {;} 1180 | 1181 | }; 1182 | static void TJS_USERENTRY _Try_iTJSDispatch2_PropGetByNum(void *data) 1183 | { 1184 | t_iTJSDispatch2_PropGetByNum * arg = (t_iTJSDispatch2_PropGetByNum *)data; 1185 | arg->_ret = 1186 | arg->_this->PropGetByNum( 1187 | arg->flag, 1188 | arg->num, 1189 | arg->result, 1190 | arg->objthis 1191 | ); 1192 | } 1193 | tjs_error Try_iTJSDispatch2_PropGetByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, tTJSVariant *result, iTJSDispatch2 *objthis) 1194 | { 1195 | t_iTJSDispatch2_PropGetByNum arg( 1196 | _this, 1197 | flag, 1198 | num, 1199 | result, 1200 | objthis 1201 | ); 1202 | TVPDoTryBlock(_Try_iTJSDispatch2_PropGetByNum, _CatchFuncCall, NULL, &arg); 1203 | return arg._ret; 1204 | } 1205 | struct t_iTJSDispatch2_PropSet 1206 | { 1207 | tjs_error _ret; 1208 | iTJSDispatch2 * _this; 1209 | tjs_uint32 flag; 1210 | const tjs_char *membername; 1211 | tjs_uint32 *hint; 1212 | const tTJSVariant *param; 1213 | iTJSDispatch2 *objthis; 1214 | t_iTJSDispatch2_PropSet( 1215 | iTJSDispatch2 * _this_, 1216 | tjs_uint32 flag_, 1217 | const tjs_char *membername_, 1218 | tjs_uint32 *hint_, 1219 | const tTJSVariant *param_, 1220 | iTJSDispatch2 *objthis_ 1221 | ) : 1222 | _this(_this_), 1223 | flag(flag_), 1224 | membername(membername_), 1225 | hint(hint_), 1226 | param(param_), 1227 | objthis(objthis_) {;} 1228 | 1229 | }; 1230 | static void TJS_USERENTRY _Try_iTJSDispatch2_PropSet(void *data) 1231 | { 1232 | t_iTJSDispatch2_PropSet * arg = (t_iTJSDispatch2_PropSet *)data; 1233 | arg->_ret = 1234 | arg->_this->PropSet( 1235 | arg->flag, 1236 | arg->membername, 1237 | arg->hint, 1238 | arg->param, 1239 | arg->objthis 1240 | ); 1241 | } 1242 | tjs_error Try_iTJSDispatch2_PropSet(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, const tTJSVariant *param, iTJSDispatch2 *objthis) 1243 | { 1244 | t_iTJSDispatch2_PropSet arg( 1245 | _this, 1246 | flag, 1247 | membername, 1248 | hint, 1249 | param, 1250 | objthis 1251 | ); 1252 | TVPDoTryBlock(_Try_iTJSDispatch2_PropSet, _CatchFuncCall, NULL, &arg); 1253 | return arg._ret; 1254 | } 1255 | struct t_iTJSDispatch2_PropSetByNum 1256 | { 1257 | tjs_error _ret; 1258 | iTJSDispatch2 * _this; 1259 | tjs_uint32 flag; 1260 | tjs_int num; 1261 | const tTJSVariant *param; 1262 | iTJSDispatch2 *objthis; 1263 | t_iTJSDispatch2_PropSetByNum( 1264 | iTJSDispatch2 * _this_, 1265 | tjs_uint32 flag_, 1266 | tjs_int num_, 1267 | const tTJSVariant *param_, 1268 | iTJSDispatch2 *objthis_ 1269 | ) : 1270 | _this(_this_), 1271 | flag(flag_), 1272 | num(num_), 1273 | param(param_), 1274 | objthis(objthis_) {;} 1275 | 1276 | }; 1277 | static void TJS_USERENTRY _Try_iTJSDispatch2_PropSetByNum(void *data) 1278 | { 1279 | t_iTJSDispatch2_PropSetByNum * arg = (t_iTJSDispatch2_PropSetByNum *)data; 1280 | arg->_ret = 1281 | arg->_this->PropSetByNum( 1282 | arg->flag, 1283 | arg->num, 1284 | arg->param, 1285 | arg->objthis 1286 | ); 1287 | } 1288 | tjs_error Try_iTJSDispatch2_PropSetByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, const tTJSVariant *param, iTJSDispatch2 *objthis) 1289 | { 1290 | t_iTJSDispatch2_PropSetByNum arg( 1291 | _this, 1292 | flag, 1293 | num, 1294 | param, 1295 | objthis 1296 | ); 1297 | TVPDoTryBlock(_Try_iTJSDispatch2_PropSetByNum, _CatchFuncCall, NULL, &arg); 1298 | return arg._ret; 1299 | } 1300 | struct t_iTJSDispatch2_GetCount 1301 | { 1302 | tjs_error _ret; 1303 | iTJSDispatch2 * _this; 1304 | tjs_int *result; 1305 | const tjs_char *membername; 1306 | tjs_uint32 *hint; 1307 | iTJSDispatch2 *objthis; 1308 | t_iTJSDispatch2_GetCount( 1309 | iTJSDispatch2 * _this_, 1310 | tjs_int *result_, 1311 | const tjs_char *membername_, 1312 | tjs_uint32 *hint_, 1313 | iTJSDispatch2 *objthis_ 1314 | ) : 1315 | _this(_this_), 1316 | result(result_), 1317 | membername(membername_), 1318 | hint(hint_), 1319 | objthis(objthis_) {;} 1320 | 1321 | }; 1322 | static void TJS_USERENTRY _Try_iTJSDispatch2_GetCount(void *data) 1323 | { 1324 | t_iTJSDispatch2_GetCount * arg = (t_iTJSDispatch2_GetCount *)data; 1325 | arg->_ret = 1326 | arg->_this->GetCount( 1327 | arg->result, 1328 | arg->membername, 1329 | arg->hint, 1330 | arg->objthis 1331 | ); 1332 | } 1333 | tjs_error Try_iTJSDispatch2_GetCount(iTJSDispatch2 * _this, tjs_int *result, const tjs_char *membername, tjs_uint32 *hint, iTJSDispatch2 *objthis) 1334 | { 1335 | t_iTJSDispatch2_GetCount arg( 1336 | _this, 1337 | result, 1338 | membername, 1339 | hint, 1340 | objthis 1341 | ); 1342 | TVPDoTryBlock(_Try_iTJSDispatch2_GetCount, _CatchFuncCall, NULL, &arg); 1343 | return arg._ret; 1344 | } 1345 | struct t_iTJSDispatch2_GetCountByNum 1346 | { 1347 | tjs_error _ret; 1348 | iTJSDispatch2 * _this; 1349 | tjs_int *result; 1350 | tjs_int num; 1351 | iTJSDispatch2 *objthis; 1352 | t_iTJSDispatch2_GetCountByNum( 1353 | iTJSDispatch2 * _this_, 1354 | tjs_int *result_, 1355 | tjs_int num_, 1356 | iTJSDispatch2 *objthis_ 1357 | ) : 1358 | _this(_this_), 1359 | result(result_), 1360 | num(num_), 1361 | objthis(objthis_) {;} 1362 | 1363 | }; 1364 | static void TJS_USERENTRY _Try_iTJSDispatch2_GetCountByNum(void *data) 1365 | { 1366 | t_iTJSDispatch2_GetCountByNum * arg = (t_iTJSDispatch2_GetCountByNum *)data; 1367 | arg->_ret = 1368 | arg->_this->GetCountByNum( 1369 | arg->result, 1370 | arg->num, 1371 | arg->objthis 1372 | ); 1373 | } 1374 | tjs_error Try_iTJSDispatch2_GetCountByNum(iTJSDispatch2 * _this, tjs_int *result, tjs_int num, iTJSDispatch2 *objthis) 1375 | { 1376 | t_iTJSDispatch2_GetCountByNum arg( 1377 | _this, 1378 | result, 1379 | num, 1380 | objthis 1381 | ); 1382 | TVPDoTryBlock(_Try_iTJSDispatch2_GetCountByNum, _CatchFuncCall, NULL, &arg); 1383 | return arg._ret; 1384 | } 1385 | struct t_iTJSDispatch2_PropSetByVS 1386 | { 1387 | tjs_error _ret; 1388 | iTJSDispatch2 * _this; 1389 | tjs_uint32 flag; 1390 | tTJSVariantString *membername; 1391 | const tTJSVariant *param; 1392 | iTJSDispatch2 *objthis; 1393 | t_iTJSDispatch2_PropSetByVS( 1394 | iTJSDispatch2 * _this_, 1395 | tjs_uint32 flag_, 1396 | tTJSVariantString *membername_, 1397 | const tTJSVariant *param_, 1398 | iTJSDispatch2 *objthis_ 1399 | ) : 1400 | _this(_this_), 1401 | flag(flag_), 1402 | membername(membername_), 1403 | param(param_), 1404 | objthis(objthis_) {;} 1405 | 1406 | }; 1407 | static void TJS_USERENTRY _Try_iTJSDispatch2_PropSetByVS(void *data) 1408 | { 1409 | t_iTJSDispatch2_PropSetByVS * arg = (t_iTJSDispatch2_PropSetByVS *)data; 1410 | arg->_ret = 1411 | arg->_this->PropSetByVS( 1412 | arg->flag, 1413 | arg->membername, 1414 | arg->param, 1415 | arg->objthis 1416 | ); 1417 | } 1418 | tjs_error Try_iTJSDispatch2_PropSetByVS(iTJSDispatch2 * _this, tjs_uint32 flag, tTJSVariantString *membername, const tTJSVariant *param, iTJSDispatch2 *objthis) 1419 | { 1420 | t_iTJSDispatch2_PropSetByVS arg( 1421 | _this, 1422 | flag, 1423 | membername, 1424 | param, 1425 | objthis 1426 | ); 1427 | TVPDoTryBlock(_Try_iTJSDispatch2_PropSetByVS, _CatchFuncCall, NULL, &arg); 1428 | return arg._ret; 1429 | } 1430 | struct t_iTJSDispatch2_EnumMembers 1431 | { 1432 | tjs_error _ret; 1433 | iTJSDispatch2 * _this; 1434 | tjs_uint32 flag; 1435 | tTJSVariantClosure *callback; 1436 | iTJSDispatch2 *objthis; 1437 | t_iTJSDispatch2_EnumMembers( 1438 | iTJSDispatch2 * _this_, 1439 | tjs_uint32 flag_, 1440 | tTJSVariantClosure *callback_, 1441 | iTJSDispatch2 *objthis_ 1442 | ) : 1443 | _this(_this_), 1444 | flag(flag_), 1445 | callback(callback_), 1446 | objthis(objthis_) {;} 1447 | 1448 | }; 1449 | static void TJS_USERENTRY _Try_iTJSDispatch2_EnumMembers(void *data) 1450 | { 1451 | t_iTJSDispatch2_EnumMembers * arg = (t_iTJSDispatch2_EnumMembers *)data; 1452 | arg->_ret = 1453 | arg->_this->EnumMembers( 1454 | arg->flag, 1455 | arg->callback, 1456 | arg->objthis 1457 | ); 1458 | } 1459 | tjs_error Try_iTJSDispatch2_EnumMembers(iTJSDispatch2 * _this, tjs_uint32 flag, tTJSVariantClosure *callback, iTJSDispatch2 *objthis) 1460 | { 1461 | t_iTJSDispatch2_EnumMembers arg( 1462 | _this, 1463 | flag, 1464 | callback, 1465 | objthis 1466 | ); 1467 | TVPDoTryBlock(_Try_iTJSDispatch2_EnumMembers, _CatchFuncCall, NULL, &arg); 1468 | return arg._ret; 1469 | } 1470 | struct t_iTJSDispatch2_DeleteMember 1471 | { 1472 | tjs_error _ret; 1473 | iTJSDispatch2 * _this; 1474 | tjs_uint32 flag; 1475 | const tjs_char *membername; 1476 | tjs_uint32 *hint; 1477 | iTJSDispatch2 *objthis; 1478 | t_iTJSDispatch2_DeleteMember( 1479 | iTJSDispatch2 * _this_, 1480 | tjs_uint32 flag_, 1481 | const tjs_char *membername_, 1482 | tjs_uint32 *hint_, 1483 | iTJSDispatch2 *objthis_ 1484 | ) : 1485 | _this(_this_), 1486 | flag(flag_), 1487 | membername(membername_), 1488 | hint(hint_), 1489 | objthis(objthis_) {;} 1490 | 1491 | }; 1492 | static void TJS_USERENTRY _Try_iTJSDispatch2_DeleteMember(void *data) 1493 | { 1494 | t_iTJSDispatch2_DeleteMember * arg = (t_iTJSDispatch2_DeleteMember *)data; 1495 | arg->_ret = 1496 | arg->_this->DeleteMember( 1497 | arg->flag, 1498 | arg->membername, 1499 | arg->hint, 1500 | arg->objthis 1501 | ); 1502 | } 1503 | tjs_error Try_iTJSDispatch2_DeleteMember(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, iTJSDispatch2 *objthis) 1504 | { 1505 | t_iTJSDispatch2_DeleteMember arg( 1506 | _this, 1507 | flag, 1508 | membername, 1509 | hint, 1510 | objthis 1511 | ); 1512 | TVPDoTryBlock(_Try_iTJSDispatch2_DeleteMember, _CatchFuncCall, NULL, &arg); 1513 | return arg._ret; 1514 | } 1515 | struct t_iTJSDispatch2_DeleteMemberByNum 1516 | { 1517 | tjs_error _ret; 1518 | iTJSDispatch2 * _this; 1519 | tjs_uint32 flag; 1520 | tjs_int num; 1521 | iTJSDispatch2 *objthis; 1522 | t_iTJSDispatch2_DeleteMemberByNum( 1523 | iTJSDispatch2 * _this_, 1524 | tjs_uint32 flag_, 1525 | tjs_int num_, 1526 | iTJSDispatch2 *objthis_ 1527 | ) : 1528 | _this(_this_), 1529 | flag(flag_), 1530 | num(num_), 1531 | objthis(objthis_) {;} 1532 | 1533 | }; 1534 | static void TJS_USERENTRY _Try_iTJSDispatch2_DeleteMemberByNum(void *data) 1535 | { 1536 | t_iTJSDispatch2_DeleteMemberByNum * arg = (t_iTJSDispatch2_DeleteMemberByNum *)data; 1537 | arg->_ret = 1538 | arg->_this->DeleteMemberByNum( 1539 | arg->flag, 1540 | arg->num, 1541 | arg->objthis 1542 | ); 1543 | } 1544 | tjs_error Try_iTJSDispatch2_DeleteMemberByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, iTJSDispatch2 *objthis) 1545 | { 1546 | t_iTJSDispatch2_DeleteMemberByNum arg( 1547 | _this, 1548 | flag, 1549 | num, 1550 | objthis 1551 | ); 1552 | TVPDoTryBlock(_Try_iTJSDispatch2_DeleteMemberByNum, _CatchFuncCall, NULL, &arg); 1553 | return arg._ret; 1554 | } 1555 | struct t_iTJSDispatch2_Invalidate 1556 | { 1557 | tjs_error _ret; 1558 | iTJSDispatch2 * _this; 1559 | tjs_uint32 flag; 1560 | const tjs_char *membername; 1561 | tjs_uint32 *hint; 1562 | iTJSDispatch2 *objthis; 1563 | t_iTJSDispatch2_Invalidate( 1564 | iTJSDispatch2 * _this_, 1565 | tjs_uint32 flag_, 1566 | const tjs_char *membername_, 1567 | tjs_uint32 *hint_, 1568 | iTJSDispatch2 *objthis_ 1569 | ) : 1570 | _this(_this_), 1571 | flag(flag_), 1572 | membername(membername_), 1573 | hint(hint_), 1574 | objthis(objthis_) {;} 1575 | 1576 | }; 1577 | static void TJS_USERENTRY _Try_iTJSDispatch2_Invalidate(void *data) 1578 | { 1579 | t_iTJSDispatch2_Invalidate * arg = (t_iTJSDispatch2_Invalidate *)data; 1580 | arg->_ret = 1581 | arg->_this->Invalidate( 1582 | arg->flag, 1583 | arg->membername, 1584 | arg->hint, 1585 | arg->objthis 1586 | ); 1587 | } 1588 | tjs_error Try_iTJSDispatch2_Invalidate(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, iTJSDispatch2 *objthis) 1589 | { 1590 | t_iTJSDispatch2_Invalidate arg( 1591 | _this, 1592 | flag, 1593 | membername, 1594 | hint, 1595 | objthis 1596 | ); 1597 | TVPDoTryBlock(_Try_iTJSDispatch2_Invalidate, _CatchFuncCall, NULL, &arg); 1598 | return arg._ret; 1599 | } 1600 | struct t_iTJSDispatch2_InvalidateByNum 1601 | { 1602 | tjs_error _ret; 1603 | iTJSDispatch2 * _this; 1604 | tjs_uint32 flag; 1605 | tjs_int num; 1606 | iTJSDispatch2 *objthis; 1607 | t_iTJSDispatch2_InvalidateByNum( 1608 | iTJSDispatch2 * _this_, 1609 | tjs_uint32 flag_, 1610 | tjs_int num_, 1611 | iTJSDispatch2 *objthis_ 1612 | ) : 1613 | _this(_this_), 1614 | flag(flag_), 1615 | num(num_), 1616 | objthis(objthis_) {;} 1617 | 1618 | }; 1619 | static void TJS_USERENTRY _Try_iTJSDispatch2_InvalidateByNum(void *data) 1620 | { 1621 | t_iTJSDispatch2_InvalidateByNum * arg = (t_iTJSDispatch2_InvalidateByNum *)data; 1622 | arg->_ret = 1623 | arg->_this->InvalidateByNum( 1624 | arg->flag, 1625 | arg->num, 1626 | arg->objthis 1627 | ); 1628 | } 1629 | tjs_error Try_iTJSDispatch2_InvalidateByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, iTJSDispatch2 *objthis) 1630 | { 1631 | t_iTJSDispatch2_InvalidateByNum arg( 1632 | _this, 1633 | flag, 1634 | num, 1635 | objthis 1636 | ); 1637 | TVPDoTryBlock(_Try_iTJSDispatch2_InvalidateByNum, _CatchFuncCall, NULL, &arg); 1638 | return arg._ret; 1639 | } 1640 | struct t_iTJSDispatch2_IsValid 1641 | { 1642 | tjs_error _ret; 1643 | iTJSDispatch2 * _this; 1644 | tjs_uint32 flag; 1645 | const tjs_char *membername; 1646 | tjs_uint32 *hint; 1647 | iTJSDispatch2 *objthis; 1648 | t_iTJSDispatch2_IsValid( 1649 | iTJSDispatch2 * _this_, 1650 | tjs_uint32 flag_, 1651 | const tjs_char *membername_, 1652 | tjs_uint32 *hint_, 1653 | iTJSDispatch2 *objthis_ 1654 | ) : 1655 | _this(_this_), 1656 | flag(flag_), 1657 | membername(membername_), 1658 | hint(hint_), 1659 | objthis(objthis_) {;} 1660 | 1661 | }; 1662 | static void TJS_USERENTRY _Try_iTJSDispatch2_IsValid(void *data) 1663 | { 1664 | t_iTJSDispatch2_IsValid * arg = (t_iTJSDispatch2_IsValid *)data; 1665 | arg->_ret = 1666 | arg->_this->IsValid( 1667 | arg->flag, 1668 | arg->membername, 1669 | arg->hint, 1670 | arg->objthis 1671 | ); 1672 | } 1673 | tjs_error Try_iTJSDispatch2_IsValid(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, iTJSDispatch2 *objthis) 1674 | { 1675 | t_iTJSDispatch2_IsValid arg( 1676 | _this, 1677 | flag, 1678 | membername, 1679 | hint, 1680 | objthis 1681 | ); 1682 | TVPDoTryBlock(_Try_iTJSDispatch2_IsValid, _CatchFuncCall, NULL, &arg); 1683 | return arg._ret; 1684 | } 1685 | struct t_iTJSDispatch2_IsValidByNum 1686 | { 1687 | tjs_error _ret; 1688 | iTJSDispatch2 * _this; 1689 | tjs_uint32 flag; 1690 | tjs_int num; 1691 | iTJSDispatch2 *objthis; 1692 | t_iTJSDispatch2_IsValidByNum( 1693 | iTJSDispatch2 * _this_, 1694 | tjs_uint32 flag_, 1695 | tjs_int num_, 1696 | iTJSDispatch2 *objthis_ 1697 | ) : 1698 | _this(_this_), 1699 | flag(flag_), 1700 | num(num_), 1701 | objthis(objthis_) {;} 1702 | 1703 | }; 1704 | static void TJS_USERENTRY _Try_iTJSDispatch2_IsValidByNum(void *data) 1705 | { 1706 | t_iTJSDispatch2_IsValidByNum * arg = (t_iTJSDispatch2_IsValidByNum *)data; 1707 | arg->_ret = 1708 | arg->_this->IsValidByNum( 1709 | arg->flag, 1710 | arg->num, 1711 | arg->objthis 1712 | ); 1713 | } 1714 | tjs_error Try_iTJSDispatch2_IsValidByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, iTJSDispatch2 *objthis) 1715 | { 1716 | t_iTJSDispatch2_IsValidByNum arg( 1717 | _this, 1718 | flag, 1719 | num, 1720 | objthis 1721 | ); 1722 | TVPDoTryBlock(_Try_iTJSDispatch2_IsValidByNum, _CatchFuncCall, NULL, &arg); 1723 | return arg._ret; 1724 | } 1725 | struct t_iTJSDispatch2_CreateNew 1726 | { 1727 | tjs_error _ret; 1728 | iTJSDispatch2 * _this; 1729 | tjs_uint32 flag; 1730 | const tjs_char * membername; 1731 | tjs_uint32 *hint; 1732 | iTJSDispatch2 **result; 1733 | tjs_int numparams; 1734 | tTJSVariant **param; 1735 | iTJSDispatch2 *objthis; 1736 | t_iTJSDispatch2_CreateNew( 1737 | iTJSDispatch2 * _this_, 1738 | tjs_uint32 flag_, 1739 | const tjs_char * membername_, 1740 | tjs_uint32 *hint_, 1741 | iTJSDispatch2 **result_, 1742 | tjs_int numparams_, 1743 | tTJSVariant **param_, 1744 | iTJSDispatch2 *objthis_ 1745 | ) : 1746 | _this(_this_), 1747 | flag(flag_), 1748 | membername(membername_), 1749 | hint(hint_), 1750 | result(result_), 1751 | numparams(numparams_), 1752 | param(param_), 1753 | objthis(objthis_) {;} 1754 | 1755 | }; 1756 | static void TJS_USERENTRY _Try_iTJSDispatch2_CreateNew(void *data) 1757 | { 1758 | t_iTJSDispatch2_CreateNew * arg = (t_iTJSDispatch2_CreateNew *)data; 1759 | arg->_ret = 1760 | arg->_this->CreateNew( 1761 | arg->flag, 1762 | arg->membername, 1763 | arg->hint, 1764 | arg->result, 1765 | arg->numparams, 1766 | arg->param, 1767 | arg->objthis 1768 | ); 1769 | } 1770 | tjs_error Try_iTJSDispatch2_CreateNew(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char * membername, tjs_uint32 *hint, iTJSDispatch2 **result, tjs_int numparams, tTJSVariant **param, iTJSDispatch2 *objthis) 1771 | { 1772 | t_iTJSDispatch2_CreateNew arg( 1773 | _this, 1774 | flag, 1775 | membername, 1776 | hint, 1777 | result, 1778 | numparams, 1779 | param, 1780 | objthis 1781 | ); 1782 | TVPDoTryBlock(_Try_iTJSDispatch2_CreateNew, _CatchFuncCall, NULL, &arg); 1783 | return arg._ret; 1784 | } 1785 | struct t_iTJSDispatch2_CreateNewByNum 1786 | { 1787 | tjs_error _ret; 1788 | iTJSDispatch2 * _this; 1789 | tjs_uint32 flag; 1790 | tjs_int num; 1791 | iTJSDispatch2 **result; 1792 | tjs_int numparams; 1793 | tTJSVariant **param; 1794 | iTJSDispatch2 *objthis; 1795 | t_iTJSDispatch2_CreateNewByNum( 1796 | iTJSDispatch2 * _this_, 1797 | tjs_uint32 flag_, 1798 | tjs_int num_, 1799 | iTJSDispatch2 **result_, 1800 | tjs_int numparams_, 1801 | tTJSVariant **param_, 1802 | iTJSDispatch2 *objthis_ 1803 | ) : 1804 | _this(_this_), 1805 | flag(flag_), 1806 | num(num_), 1807 | result(result_), 1808 | numparams(numparams_), 1809 | param(param_), 1810 | objthis(objthis_) {;} 1811 | 1812 | }; 1813 | static void TJS_USERENTRY _Try_iTJSDispatch2_CreateNewByNum(void *data) 1814 | { 1815 | t_iTJSDispatch2_CreateNewByNum * arg = (t_iTJSDispatch2_CreateNewByNum *)data; 1816 | arg->_ret = 1817 | arg->_this->CreateNewByNum( 1818 | arg->flag, 1819 | arg->num, 1820 | arg->result, 1821 | arg->numparams, 1822 | arg->param, 1823 | arg->objthis 1824 | ); 1825 | } 1826 | tjs_error Try_iTJSDispatch2_CreateNewByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, iTJSDispatch2 **result, tjs_int numparams, tTJSVariant **param, iTJSDispatch2 *objthis) 1827 | { 1828 | t_iTJSDispatch2_CreateNewByNum arg( 1829 | _this, 1830 | flag, 1831 | num, 1832 | result, 1833 | numparams, 1834 | param, 1835 | objthis 1836 | ); 1837 | TVPDoTryBlock(_Try_iTJSDispatch2_CreateNewByNum, _CatchFuncCall, NULL, &arg); 1838 | return arg._ret; 1839 | } 1840 | struct t_iTJSDispatch2_Reserved1 1841 | { 1842 | tjs_error _ret; 1843 | iTJSDispatch2 * _this; 1844 | t_iTJSDispatch2_Reserved1( 1845 | iTJSDispatch2 * _this_ 1846 | ) : 1847 | _this(_this_) {;} 1848 | 1849 | }; 1850 | static void TJS_USERENTRY _Try_iTJSDispatch2_Reserved1(void *data) 1851 | { 1852 | t_iTJSDispatch2_Reserved1 * arg = (t_iTJSDispatch2_Reserved1 *)data; 1853 | arg->_ret = 1854 | arg->_this->Reserved1( 1855 | 1856 | ); 1857 | } 1858 | tjs_error Try_iTJSDispatch2_Reserved1(iTJSDispatch2 * _this) 1859 | { 1860 | t_iTJSDispatch2_Reserved1 arg( 1861 | _this 1862 | ); 1863 | TVPDoTryBlock(_Try_iTJSDispatch2_Reserved1, _CatchFuncCall, NULL, &arg); 1864 | return arg._ret; 1865 | } 1866 | struct t_iTJSDispatch2_IsInstanceOf 1867 | { 1868 | tjs_error _ret; 1869 | iTJSDispatch2 * _this; 1870 | tjs_uint32 flag; 1871 | const tjs_char *membername; 1872 | tjs_uint32 *hint; 1873 | const tjs_char *classname; 1874 | iTJSDispatch2 *objthis; 1875 | t_iTJSDispatch2_IsInstanceOf( 1876 | iTJSDispatch2 * _this_, 1877 | tjs_uint32 flag_, 1878 | const tjs_char *membername_, 1879 | tjs_uint32 *hint_, 1880 | const tjs_char *classname_, 1881 | iTJSDispatch2 *objthis_ 1882 | ) : 1883 | _this(_this_), 1884 | flag(flag_), 1885 | membername(membername_), 1886 | hint(hint_), 1887 | classname(classname_), 1888 | objthis(objthis_) {;} 1889 | 1890 | }; 1891 | static void TJS_USERENTRY _Try_iTJSDispatch2_IsInstanceOf(void *data) 1892 | { 1893 | t_iTJSDispatch2_IsInstanceOf * arg = (t_iTJSDispatch2_IsInstanceOf *)data; 1894 | arg->_ret = 1895 | arg->_this->IsInstanceOf( 1896 | arg->flag, 1897 | arg->membername, 1898 | arg->hint, 1899 | arg->classname, 1900 | arg->objthis 1901 | ); 1902 | } 1903 | tjs_error Try_iTJSDispatch2_IsInstanceOf(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, const tjs_char *classname, iTJSDispatch2 *objthis) 1904 | { 1905 | t_iTJSDispatch2_IsInstanceOf arg( 1906 | _this, 1907 | flag, 1908 | membername, 1909 | hint, 1910 | classname, 1911 | objthis 1912 | ); 1913 | TVPDoTryBlock(_Try_iTJSDispatch2_IsInstanceOf, _CatchFuncCall, NULL, &arg); 1914 | return arg._ret; 1915 | } 1916 | struct t_iTJSDispatch2_IsInstanceOfByNum 1917 | { 1918 | tjs_error _ret; 1919 | iTJSDispatch2 * _this; 1920 | tjs_uint32 flag; 1921 | tjs_int num; 1922 | const tjs_char *classname; 1923 | iTJSDispatch2 *objthis; 1924 | t_iTJSDispatch2_IsInstanceOfByNum( 1925 | iTJSDispatch2 * _this_, 1926 | tjs_uint32 flag_, 1927 | tjs_int num_, 1928 | const tjs_char *classname_, 1929 | iTJSDispatch2 *objthis_ 1930 | ) : 1931 | _this(_this_), 1932 | flag(flag_), 1933 | num(num_), 1934 | classname(classname_), 1935 | objthis(objthis_) {;} 1936 | 1937 | }; 1938 | static void TJS_USERENTRY _Try_iTJSDispatch2_IsInstanceOfByNum(void *data) 1939 | { 1940 | t_iTJSDispatch2_IsInstanceOfByNum * arg = (t_iTJSDispatch2_IsInstanceOfByNum *)data; 1941 | arg->_ret = 1942 | arg->_this->IsInstanceOfByNum( 1943 | arg->flag, 1944 | arg->num, 1945 | arg->classname, 1946 | arg->objthis 1947 | ); 1948 | } 1949 | tjs_error Try_iTJSDispatch2_IsInstanceOfByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, const tjs_char *classname, iTJSDispatch2 *objthis) 1950 | { 1951 | t_iTJSDispatch2_IsInstanceOfByNum arg( 1952 | _this, 1953 | flag, 1954 | num, 1955 | classname, 1956 | objthis 1957 | ); 1958 | TVPDoTryBlock(_Try_iTJSDispatch2_IsInstanceOfByNum, _CatchFuncCall, NULL, &arg); 1959 | return arg._ret; 1960 | } 1961 | struct t_iTJSDispatch2_Operation 1962 | { 1963 | tjs_error _ret; 1964 | iTJSDispatch2 * _this; 1965 | tjs_uint32 flag; 1966 | const tjs_char *membername; 1967 | tjs_uint32 *hint; 1968 | tTJSVariant *result; 1969 | const tTJSVariant *param; 1970 | iTJSDispatch2 *objthis; 1971 | t_iTJSDispatch2_Operation( 1972 | iTJSDispatch2 * _this_, 1973 | tjs_uint32 flag_, 1974 | const tjs_char *membername_, 1975 | tjs_uint32 *hint_, 1976 | tTJSVariant *result_, 1977 | const tTJSVariant *param_, 1978 | iTJSDispatch2 *objthis_ 1979 | ) : 1980 | _this(_this_), 1981 | flag(flag_), 1982 | membername(membername_), 1983 | hint(hint_), 1984 | result(result_), 1985 | param(param_), 1986 | objthis(objthis_) {;} 1987 | 1988 | }; 1989 | static void TJS_USERENTRY _Try_iTJSDispatch2_Operation(void *data) 1990 | { 1991 | t_iTJSDispatch2_Operation * arg = (t_iTJSDispatch2_Operation *)data; 1992 | arg->_ret = 1993 | arg->_this->Operation( 1994 | arg->flag, 1995 | arg->membername, 1996 | arg->hint, 1997 | arg->result, 1998 | arg->param, 1999 | arg->objthis 2000 | ); 2001 | } 2002 | tjs_error Try_iTJSDispatch2_Operation(iTJSDispatch2 * _this, tjs_uint32 flag, const tjs_char *membername, tjs_uint32 *hint, tTJSVariant *result, const tTJSVariant *param, iTJSDispatch2 *objthis) 2003 | { 2004 | t_iTJSDispatch2_Operation arg( 2005 | _this, 2006 | flag, 2007 | membername, 2008 | hint, 2009 | result, 2010 | param, 2011 | objthis 2012 | ); 2013 | TVPDoTryBlock(_Try_iTJSDispatch2_Operation, _CatchFuncCall, NULL, &arg); 2014 | return arg._ret; 2015 | } 2016 | struct t_iTJSDispatch2_OperationByNum 2017 | { 2018 | tjs_error _ret; 2019 | iTJSDispatch2 * _this; 2020 | tjs_uint32 flag; 2021 | tjs_int num; 2022 | tTJSVariant *result; 2023 | const tTJSVariant *param; 2024 | iTJSDispatch2 *objthis; 2025 | t_iTJSDispatch2_OperationByNum( 2026 | iTJSDispatch2 * _this_, 2027 | tjs_uint32 flag_, 2028 | tjs_int num_, 2029 | tTJSVariant *result_, 2030 | const tTJSVariant *param_, 2031 | iTJSDispatch2 *objthis_ 2032 | ) : 2033 | _this(_this_), 2034 | flag(flag_), 2035 | num(num_), 2036 | result(result_), 2037 | param(param_), 2038 | objthis(objthis_) {;} 2039 | 2040 | }; 2041 | static void TJS_USERENTRY _Try_iTJSDispatch2_OperationByNum(void *data) 2042 | { 2043 | t_iTJSDispatch2_OperationByNum * arg = (t_iTJSDispatch2_OperationByNum *)data; 2044 | arg->_ret = 2045 | arg->_this->OperationByNum( 2046 | arg->flag, 2047 | arg->num, 2048 | arg->result, 2049 | arg->param, 2050 | arg->objthis 2051 | ); 2052 | } 2053 | tjs_error Try_iTJSDispatch2_OperationByNum(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int num, tTJSVariant *result, const tTJSVariant *param, iTJSDispatch2 *objthis) 2054 | { 2055 | t_iTJSDispatch2_OperationByNum arg( 2056 | _this, 2057 | flag, 2058 | num, 2059 | result, 2060 | param, 2061 | objthis 2062 | ); 2063 | TVPDoTryBlock(_Try_iTJSDispatch2_OperationByNum, _CatchFuncCall, NULL, &arg); 2064 | return arg._ret; 2065 | } 2066 | struct t_iTJSDispatch2_NativeInstanceSupport 2067 | { 2068 | tjs_error _ret; 2069 | iTJSDispatch2 * _this; 2070 | tjs_uint32 flag; 2071 | tjs_int32 classid; 2072 | iTJSNativeInstance **pointer; 2073 | t_iTJSDispatch2_NativeInstanceSupport( 2074 | iTJSDispatch2 * _this_, 2075 | tjs_uint32 flag_, 2076 | tjs_int32 classid_, 2077 | iTJSNativeInstance **pointer_ 2078 | ) : 2079 | _this(_this_), 2080 | flag(flag_), 2081 | classid(classid_), 2082 | pointer(pointer_) {;} 2083 | 2084 | }; 2085 | static void TJS_USERENTRY _Try_iTJSDispatch2_NativeInstanceSupport(void *data) 2086 | { 2087 | t_iTJSDispatch2_NativeInstanceSupport * arg = (t_iTJSDispatch2_NativeInstanceSupport *)data; 2088 | arg->_ret = 2089 | arg->_this->NativeInstanceSupport( 2090 | arg->flag, 2091 | arg->classid, 2092 | arg->pointer 2093 | ); 2094 | } 2095 | tjs_error Try_iTJSDispatch2_NativeInstanceSupport(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_int32 classid, iTJSNativeInstance **pointer) 2096 | { 2097 | t_iTJSDispatch2_NativeInstanceSupport arg( 2098 | _this, 2099 | flag, 2100 | classid, 2101 | pointer 2102 | ); 2103 | TVPDoTryBlock(_Try_iTJSDispatch2_NativeInstanceSupport, _CatchFuncCall, NULL, &arg); 2104 | return arg._ret; 2105 | } 2106 | struct t_iTJSDispatch2_ClassInstanceInfo 2107 | { 2108 | tjs_error _ret; 2109 | iTJSDispatch2 * _this; 2110 | tjs_uint32 flag; 2111 | tjs_uint num; 2112 | tTJSVariant *value; 2113 | t_iTJSDispatch2_ClassInstanceInfo( 2114 | iTJSDispatch2 * _this_, 2115 | tjs_uint32 flag_, 2116 | tjs_uint num_, 2117 | tTJSVariant *value_ 2118 | ) : 2119 | _this(_this_), 2120 | flag(flag_), 2121 | num(num_), 2122 | value(value_) {;} 2123 | 2124 | }; 2125 | static void TJS_USERENTRY _Try_iTJSDispatch2_ClassInstanceInfo(void *data) 2126 | { 2127 | t_iTJSDispatch2_ClassInstanceInfo * arg = (t_iTJSDispatch2_ClassInstanceInfo *)data; 2128 | arg->_ret = 2129 | arg->_this->ClassInstanceInfo( 2130 | arg->flag, 2131 | arg->num, 2132 | arg->value 2133 | ); 2134 | } 2135 | tjs_error Try_iTJSDispatch2_ClassInstanceInfo(iTJSDispatch2 * _this, tjs_uint32 flag, tjs_uint num, tTJSVariant *value) 2136 | { 2137 | t_iTJSDispatch2_ClassInstanceInfo arg( 2138 | _this, 2139 | flag, 2140 | num, 2141 | value 2142 | ); 2143 | TVPDoTryBlock(_Try_iTJSDispatch2_ClassInstanceInfo, _CatchFuncCall, NULL, &arg); 2144 | return arg._ret; 2145 | } 2146 | struct t_iTJSDispatch2_Reserved2 2147 | { 2148 | tjs_error _ret; 2149 | iTJSDispatch2 * _this; 2150 | t_iTJSDispatch2_Reserved2( 2151 | iTJSDispatch2 * _this_ 2152 | ) : 2153 | _this(_this_) {;} 2154 | 2155 | }; 2156 | static void TJS_USERENTRY _Try_iTJSDispatch2_Reserved2(void *data) 2157 | { 2158 | t_iTJSDispatch2_Reserved2 * arg = (t_iTJSDispatch2_Reserved2 *)data; 2159 | arg->_ret = 2160 | arg->_this->Reserved2( 2161 | 2162 | ); 2163 | } 2164 | tjs_error Try_iTJSDispatch2_Reserved2(iTJSDispatch2 * _this) 2165 | { 2166 | t_iTJSDispatch2_Reserved2 arg( 2167 | _this 2168 | ); 2169 | TVPDoTryBlock(_Try_iTJSDispatch2_Reserved2, _CatchFuncCall, NULL, &arg); 2170 | return arg._ret; 2171 | } 2172 | struct t_iTJSDispatch2_Reserved3 2173 | { 2174 | tjs_error _ret; 2175 | iTJSDispatch2 * _this; 2176 | t_iTJSDispatch2_Reserved3( 2177 | iTJSDispatch2 * _this_ 2178 | ) : 2179 | _this(_this_) {;} 2180 | 2181 | }; 2182 | static void TJS_USERENTRY _Try_iTJSDispatch2_Reserved3(void *data) 2183 | { 2184 | t_iTJSDispatch2_Reserved3 * arg = (t_iTJSDispatch2_Reserved3 *)data; 2185 | arg->_ret = 2186 | arg->_this->Reserved3( 2187 | 2188 | ); 2189 | } 2190 | tjs_error Try_iTJSDispatch2_Reserved3(iTJSDispatch2 * _this) 2191 | { 2192 | t_iTJSDispatch2_Reserved3 arg( 2193 | _this 2194 | ); 2195 | TVPDoTryBlock(_Try_iTJSDispatch2_Reserved3, _CatchFuncCall, NULL, &arg); 2196 | return arg._ret; 2197 | } 2198 | --------------------------------------------------------------------------------