{"id":22890067,"url":"https://github.com/adamhlt/d3d9-hook-imgui","last_synced_at":"2025-07-31T11:37:15.550Z","repository":{"id":132610061,"uuid":"427999429","full_name":"adamhlt/D3D9-Hook-ImGui","owner":"adamhlt","description":"D3D9 Hook with ImGui integration (x86 / x64) - Make D3D9 internal menu with ImGui (Resize \u0026 Fullscreen support)","archived":false,"fork":false,"pushed_at":"2024-11-02T17:27:06.000Z","size":27266,"stargazers_count":121,"open_issues_count":0,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-25T02:13:20.478Z","etag":null,"topics":["cpp","directx","directx-9","hook","imgui","ms-detours","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamhlt.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-14T17:49:48.000Z","updated_at":"2025-07-21T05:55:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"4de703d7-7cdf-4af2-b351-d2ea2f1281dd","html_url":"https://github.com/adamhlt/D3D9-Hook-ImGui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamhlt/D3D9-Hook-ImGui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FD3D9-Hook-ImGui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FD3D9-Hook-ImGui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FD3D9-Hook-ImGui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FD3D9-Hook-ImGui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamhlt","download_url":"https://codeload.github.com/adamhlt/D3D9-Hook-ImGui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FD3D9-Hook-ImGui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268031107,"owners_count":24184446,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","directx","directx-9","hook","imgui","ms-detours","windows"],"created_at":"2024-12-13T21:58:14.626Z","updated_at":"2025-07-31T11:37:14.231Z","avatar_url":"https://github.com/adamhlt.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n            ____ _____ ____  ____     __  __            __      ____          ______      _ \n           / __ \\__  // __ \\/ __ \\   / / / /___  ____  / /__   /  _/___ ___  / ____/_  __(_)\n          / / / //_ \u003c/ / / / /_/ /  / /_/ / __ \\/ __ \\/ //_/   / // __ `__ \\/ / __/ / / / /\n         / /_/ /__/ / /_/ /\\__, /  / __  / /_/ / /_/ / ,\u003c    _/ // / / / / / /_/ / /_/ / /\n        /_____/____/_____//____/  /_/ /_/\\____/\\____/_/|_|  /___/_/ /_/ /_/\\____/\\__,_/_/\n                                                                             \n                                                                           \n                            D3D9 Hook with ImGui integration (x86 / x64)  \n                             Make DirectX 9 internal menu with ImGui\n                                  (Resize \u0026 Fullscreen support)\n```\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/language-C%2B%2B-%23f34b7d.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"C++\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-Windows-0078d7.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"Windows\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/arch-x86-red.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"x86\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/arch-x64-green.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"x64\"\u003e\n\u003c/p\u003e\n\n## :open_book: Project Overview :\n\nD3D9 Hook with [ImGui](https://github.com/ocornut/imgui) integration written in C++, works on x86 and x64 with all librairies and includes.\n\n#### Features :\n\n- Handle window resize\n- DLL unload itself\n- Handler external unload\n- Handle fullscreen change\n\nThis use the [**dummy device technique**](https://guidedhacking.com/threads/get-direct3d9-and-direct3d11-devices-dummy-device-method.11867/) to retrieve the virtual method table of DirectX 9.\n\n#### Used librairies :\n\n- [MS Detours](https://www.microsoft.com/en-us/research/project/detours/)\n- [DirectX SDK](https://www.microsoft.com/en-us/download/details.aspx?id=6812)\n- [ImGui](https://github.com/ocornut/imgui)\n\n## :rocket: Getting Started\n\nThis project use [MS Detours](https://github.com/microsoft/Detours) library for hooking and obviously DirectX 9 SDK.\n\nMS Detours library is already include in the project folder, but if you don't have DirectX SDK you can download it [here](https://www.microsoft.com/en-us/download/details.aspx?id=6812).\n\n\u003e **Note** \u003cbr\u003e\n\u003e Make sure that **DXSDK_DIR** is declared in your environment variables.\n\nTo see your environment variables :\n\n\u003e **Settings --\u003e System --\u003e About --\u003e System Advanced Settings --\u003e Environment Variables**\n\n### Visual Studio :\n\n1. Open the solution file (.sln).\n2. Build the project in Release (x86 or x64)\n\nEvery configuration in x86 / x64 (Debug and Realese) are already configured with librairies and includes.\n\n## :hook: Hooking\n\nYou can hook every functions of DirectX 9 by changing the virtual function index (in Hook.cpp) :\n\nHere I hook EndScene Function.\n\n```\noEndScene = (tEndScene)d3d9Device[42];\n```\n\nAll functions index of DirectX 9 are [**here**](https://github.com/adamhlt/D3D9-Hook-ImGui/blob/main/Functions.md).\n\n## :test_tube: Example\n\nhttps://github.com/adamhlt/D3D9-Hook-ImGui/assets/48086737/08665cbd-0f4c-49bc-ae98-9c9fa3bc240b\n\n# Credits\n\n- [**@liyunlong23**](https://github.com/liyunlong23) - Fix crash when changing resolution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamhlt%2Fd3d9-hook-imgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamhlt%2Fd3d9-hook-imgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamhlt%2Fd3d9-hook-imgui/lists"}