{"id":13608607,"url":"https://github.com/Rebzzel/kiero","last_synced_at":"2025-04-12T17:32:15.098Z","repository":{"id":33863492,"uuid":"155570006","full_name":"Rebzzel/kiero","owner":"Rebzzel","description":"Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.","archived":false,"fork":false,"pushed_at":"2023-08-13T02:39:43.000Z","size":23,"stargazers_count":1028,"open_issues_count":10,"forks_count":219,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-11-07T14:41:32.548Z","etag":null,"topics":["d3d10","d3d11","d3d12","d3d9","hook","opengl","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rebzzel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-31T14:21:37.000Z","updated_at":"2024-11-04T19:51:21.000Z","dependencies_parsed_at":"2022-07-14T22:46:45.265Z","dependency_job_id":"265cafc7-24a8-41c4-9df2-cf48da773ab0","html_url":"https://github.com/Rebzzel/kiero","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebzzel%2Fkiero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebzzel%2Fkiero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebzzel%2Fkiero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rebzzel%2Fkiero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rebzzel","download_url":"https://codeload.github.com/Rebzzel/kiero/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605215,"owners_count":21132129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d3d10","d3d11","d3d12","d3d9","hook","opengl","vulkan"],"created_at":"2024-08-01T19:01:28.607Z","updated_at":"2025-04-12T17:32:10.077Z","avatar_url":"https://github.com/Rebzzel.png","language":"C++","funding_links":[],"categories":["C++","DirectX"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ekiero\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Rebzzel/kiero/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/Rebzzel/kiero.svg?style=flat-square\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/Rebzzel/kiero/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/Rebzzel/kiero.svg?style=flat-square\"/\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games\n\u003c/p\u003e\n\n### Requirement\n[Windows SDK](https://www.microsoft.com/en-us/download/details.aspx?id=8279) (For D3D9/D3D10/D3D11/OpenGL hook)\n\n[DirectX SDK](https://www.microsoft.com/en-us/download/details.aspx?id=4064) (For D3D9/D3D10/D3D11 hook)\n\n[Vulkan SDK](https://www.lunarg.com/vulkan-sdk) (For Vulkan hook)\n\n[MinHook](https://github.com/TsudaKageyu/minhook) (For kiero::bind function)\n\n### Example\nTo start, go to the kiero.h and select the desired hooks\n```C++\n// Example for D3D9 hook\n#define KIERO_INCLUDE_D3D9   1 // 1 if you need D3D9 hook\n#define KIERO_INCLUDE_D3D10  0 // 1 if you need D3D10 hook\n#define KIERO_INCLUDE_D3D11  0 // 1 if you need D3D11 hook\n#define KIERO_INCLUDE_D3D12  0 // 1 if you need D3D12 hook\n#define KIERO_INCLUDE_OPENGL 0 // 1 if you need OpenGL hook\n#define KIERO_INCLUDE_VULKAN 0 // 1 if you need Vulkan hook\n```\n\nThen proceed to the main work\n```C++\n// Example for D3D9 hook\n\n// Include required libraries\n#include \"kiero.h\"\n#include \u003cd3d9.h\u003e\n#include \u003cWindows.h\u003e\n\n// Create the type of function that we will hook\ntypedef long(__stdcall* EndScene)(LPDIRECT3DDEVICE9);\nstatic EndScene oEndScene = NULL;\n\n// Declare the detour function\nlong __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)\n{\n  // ... Your magic here ...\n  \n  // static bool init = false;\n  // if (!init)\n  // {\n  //  MessageBox(0, \"Boom! It's works!\", \"Kiero\", MB_OK);\n  //  init = true;\n  // }\n  \n  return oEndScene(pDevice);\n}\n\nint kieroExampleThread()\n{\n  if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)\n  // or\n  if (kiero::init(kiero::RenderType::Auto) == kiero::Status::Success)\n  {\n    // define KIERO_USE_MINHOOK must be 1\n    // the index of the required function can be found in the METHODSTABLE.txt\n    kiero::bind(42, (void**)\u0026oEndScene, hkEndScene);\n    \n    // If you just need to get the function address you can use the kiero::getMethodsTable function\n    oEndScene = (EndScene)kiero::getMethodsTable()[42];\n  }\n\n  return 0;\n}\n\nBOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID)\n{\n  DisableThreadLibraryCalls(hInstance);\n\n  switch (fdwReason)\n  {\n    case DLL_PROCESS_ATTACH:\n      CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)kieroExampleThread, NULL, 0, NULL);\n      break;\n  }\n\n  return TRUE;\n}\n\n```\n\n### License\n```\nMIT License\n\nCopyright (c) 2014-2021 Rebzzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRebzzel%2Fkiero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRebzzel%2Fkiero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRebzzel%2Fkiero/lists"}