Hooking DirectX9

  Рет қаралды 35,789

CasualGamer

CasualGamer

4 жыл бұрын

Display Internal Hack Menu by hooking DirectX9.
Support the channel:
- www.paypal.com/cgi-bin/webscr...
Code: pastebin.com/wBAdbH9t
Get Detour Files here: www.unknowncheats.me/forum/do...
Music: Deep Water - Alchemorph
Community Discord: / discord
There are many menus available. GH for instance is always a nice resource:
guidedhacking.com/threads/the...

Пікірлер: 133
@giacomoarienti
@giacomoarienti 4 жыл бұрын
I fall in love with your videos, they're just amazing.
@redwing8725
@redwing8725 2 жыл бұрын
this is amazing thank you! most tutorials on this subject don't properly explain the concepts, just tell you to copy and paste some 'magic' code
@arsiarskila
@arsiarskila 2 жыл бұрын
shitly explained
@finlayhutchinson7370
@finlayhutchinson7370 Жыл бұрын
You are so good at giving tutorials. This was very helpful.
@casualgamer1791
@casualgamer1791 Жыл бұрын
My pleasure :)
@TheKapei22
@TheKapei22 3 ай бұрын
I tried this tutorial last year to no avail. Gave a break and tried it today. Works like a charm. Thanks a lot.
@KickAssRedBeard
@KickAssRedBeard 4 жыл бұрын
I cannot express the amount of pride I had creating this and typing in the code myself. The first time I copied to see if it was even working which it obviously did. and then I watched 4 more times to fully understand what was actually happening and I'm so impressed that an 8 minute video taught me so much! However thats what I also didnt like about the video, the shear speed of it. I had to watch multiple times to really grasp it and maybe thats my fault, but the video did teach me; I just wish it was a bit more in depth with the 'why this is happening' insted of just the 'how we make it happen'
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Thank you for that :) makes me very happy when my videos actually have the desired effect. And noted i will try to go into more detail in the future
@casualgamer1791
@casualgamer1791 3 жыл бұрын
I noticed that as well. Thb so far I just could not help it -.- but ill try
@KickAssRedBeard
@KickAssRedBeard 3 жыл бұрын
@ocinR_ I can keep up with that just fine. I just personally wanted more fleshed out explinations on how and why it works so in the future if I run across a problem with this I can logically solve it myself. But I also understand that some people just wanna create an esp and be done with it, so its just hard to balance.
@jamesking2439
@jamesking2439 3 жыл бұрын
This is really cool! I used your hooking technique to make a texture extraction tool.
@jamesthomas6984
@jamesthomas6984 3 жыл бұрын
Giant dad lives in my heart
@aronkovacs7515
@aronkovacs7515 3 жыл бұрын
Hey! I downloaded DirectX and my d3dx9 file missing. Help please!
@alieeeeennnnnn
@alieeeeennnnnn 4 жыл бұрын
Hey, mate, you are back, and the video is good, useful for some games
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Hey :) yea i felt bad for a while already not posting anything... finally made time for it.
@matt2517
@matt2517 2 жыл бұрын
This tutorial was really useful for me, thank you
@nyatsuri
@nyatsuri 3 жыл бұрын
how to know if a game is using directx 9 or other engine??
@f41nT
@f41nT 2 жыл бұрын
Hook is successfully done but I can't see the drawing on my screen. I debugged the code and everything works fine, but as I said no graphics. Any idea why?
@Aedcre
@Aedcre 3 жыл бұрын
Thanks man awesome tutorial works fine :)
@Underkirby
@Underkirby Жыл бұрын
Where can I go to reinstall the Microsoft Visual C++ 2010 Redistributable
@coldblackice
@coldblackice Жыл бұрын
AWESOME tutorial! Major props for actually explaining the nitty-gritty of things, including the "Why"s of what you're doing. So many other KZbin tutorial channels don't do this, they just silently record themselves typing code, or even worse, copying and pasting. Those kind of tutorials are *useless* for anyone wanting to actually learn about this vs. just looking for a quickie copy/paste end result. You have a great talent as a teacher. Awesome job!
@casualgamer1791
@casualgamer1791 Жыл бұрын
Thank you for the kind words. That is exactly the goal. Who if not us should realy understand what's going on below the surface.
@cybersec0x004
@cybersec0x004 3 жыл бұрын
Holy shit, great tutorial
@alphahex99
@alphahex99 3 ай бұрын
How do I prevent the game from crashing when I resize it in Windowed mode after injecting DLL? This resize crashing persists even after the DLL is unloaded with Numpad0.
@SF-eg3fq
@SF-eg3fq 3 жыл бұрын
Hi, whats the differences between an external and an internal "hook"? in both scenarios we are injecting a dll into the process to "execute" our functions.
@casualgamer1791
@casualgamer1791 3 жыл бұрын
External referns to a standalone application used to read/manipulate the game memory usually using RPM and WPM. Internal means using a dll injected into the process
@tunguyen-wt5ck
@tunguyen-wt5ck 2 жыл бұрын
i tried void** vTable = *reinterpret_cast(pDevice) and it still work but if i close my app it still remain in task list. what is the diffrent between (void**)(pTable) and (void***)(pTable)
@SophiaNhya
@SophiaNhya 8 ай бұрын
Wow! Such a great tutorial tbh
@stellar4677
@stellar4677 2 жыл бұрын
is there any way to draw like on the go? because it seems like you can only draw whats in the function and the only way to communicate between that function and the main cheat is through variables with a scope that reaches both... i'd like to make a function like DrawBox() or something so i can just draw boxes wherever i want (and call that function inside the main cheat and not the hookedEndScene func) but im not really too sure about how to do that ..
@casualgamer1791
@casualgamer1791 2 жыл бұрын
short answer: No. Longer: The drawing needs to happen inside the EndSceene hook but you can get creative ofc. you can create and call functions/classes wich will lead to drawing outside the hook.
@birdhunyar2327
@birdhunyar2327 2 жыл бұрын
and what if a game runs on dirext8?
@CrashedCrash
@CrashedCrash 4 жыл бұрын
Ur tutorials are one point 👌🏻 maybe a combination with a ring0 driver?
@overkiller1373
@overkiller1373 Жыл бұрын
I wrote everthing the same like you did and even copied the source code but still getting error... I even changed DetourFunction and DetourFunction to DetourAttach and DetourDetatch but now I got an error that the arguement ""PBYTE"" is incompatible with ""PVOID*"" Edit: I gotta try the old detour files you have linked
@Jerryyyy
@Jerryyyy 2 жыл бұрын
Can I use this tutorial w DirectX11 games also? What is needed to change?
@keyboardk9
@keyboardk9 4 жыл бұрын
quick question for some reason when i try to include d3dx9.h, it cant open the source file even though i have the include and library directories set. screenshot: prnt.sc/t13z5x any tips? edit: i have the version of the sdk found in the video, and can even find the d3dx9 header file in the include file through windows explorer prnt.sc/t146h2, but for some reason, it still won't allow me to include it into the project.
@casualgamer1791
@casualgamer1791 4 жыл бұрын
In the Project Setting > VC++ Directories > Include Directories. The path has to be wrong/missing
@TukeShark
@TukeShark 4 жыл бұрын
AYYYY he is back
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Hey :) Yea ... sorry about the long break. ll try to stay more consistent
@TukeShark
@TukeShark 4 жыл бұрын
CasualGamer no problem sorry for my late response lmfao
@yanis_9267
@yanis_9267 4 жыл бұрын
700th subscribers BEST TUTORIALS
@casualgamer1791
@casualgamer1791 4 жыл бұрын
welcome and ty :)
@nkroggames7459
@nkroggames7459 4 жыл бұрын
i have 2 error E0020 identifier "DetourFunction" is undefined and Severity cannot open source file "detours.h"
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Severity is an IDE? Must be a linker issue. Make sure the detours file is linked properly
@trippy9865
@trippy9865 3 жыл бұрын
Would this get us VAC banned?
@stryder12345
@stryder12345 4 жыл бұрын
Hi, could you explain how to set rectangle in the right bottom of corner?
@casualgamer1791
@casualgamer1791 4 жыл бұрын
you just have to change the values of these coordinates: rectx1, rectx2, recty1, recty2, (depending on the window size of the game)
@alphahex99
@alphahex99 2 жыл бұрын
07:55 If anyone's return value isn't matching the function type (E0120) be sure to change __stdcall* to __stdcall That was a pretty sneaky cut xd
@casualgamer1791
@casualgamer1791 2 жыл бұрын
U can always use the code linked in the desc. Sometimes I fk up while recording
@alphahex99
@alphahex99 2 жыл бұрын
@@casualgamer1791 Thanks. Awesome channel btw! Only a question of time before you hit 100k with quality like this ;)
@binaryteam5448
@binaryteam5448 4 жыл бұрын
dudeeee ur videossss are amazing by any chance could you do a tutorial with directx 11 imgui a hook and how we could draw an esp
@alexfallas3219
@alexfallas3219 2 жыл бұрын
The hook worked i believe, and pressing numpad closes it but its not beeing displayed. The Game is using DirectX7 but i read somewhere on GH that DirectX9 works also with lower versions. Ideas? The Game is a bit old so there is no fullscreen borderless but i still made it work and neither in window or borderless its displayed
@user-yc2ry2uz4h
@user-yc2ry2uz4h 4 жыл бұрын
How would it be like if you use latest version of MSDetour. DetourFunction is no longer valid, but there is DetourAttach instead. I tried to do so, but my game crashes everytime.
@casualgamer1791
@casualgamer1791 4 жыл бұрын
No clue :/ why use the latest version?
@Cr4ntz
@Cr4ntz 2 жыл бұрын
Did you use DetourTransactionBegin() before DetourAttach() and finally DetourTransactionCommit()? Otherwise it won't work. "The attach, detach, and thread operations do not take effect until the program commits the transaction using the DetourTransactionCommit or DetourTransactionCommitEx API. Alternatively, the program can abort the transaction using the DetourTransactionAbort API."
@user-yc2ry2uz4h
@user-yc2ry2uz4h 2 жыл бұрын
@@Cr4ntz Thanks for answering the question with well explanation. I've already figured it out and even replaced it with minhook in my hack. Ive been struggling with the assembly thesedays but it's another story... Anyway thank you so much. I appreciate your kindness! I would've been very happy if I got this answer at that time. Please help other people like me too!
@Cr4ntz
@Cr4ntz 2 жыл бұрын
@@user-yc2ry2uz4h No problem bro, remember, always read the documentation it's always worth your time (:
@apthecal2045
@apthecal2045 3 жыл бұрын
How can i inject it to a 64 bit game?
@zxcghoul1275
@zxcghoul1275 2 жыл бұрын
thank man, easy coding for use I would like to see more comments
@Cr4ntz
@Cr4ntz 2 жыл бұрын
Could someone explain the pointer hell going on at void ** vTable = *reinterpret_cast(pDevice);
@Cr4ntz
@Cr4ntz 2 жыл бұрын
Figured it out, The VMT is usually located at the start address of the created object. Another way of writing it: uintptr_t* vTable = (uintptr_t*)(*(uintptr_t*)pDevice) // basically just dereference the object pointer, Voila there's the VMT // and for EndScene: uintptr_t* EndScene = vTable + 168; // 42 x 4
@casualgamer1791
@casualgamer1791 2 жыл бұрын
@@Cr4ntz gj!
@zxcghoul1275
@zxcghoul1275 2 жыл бұрын
with your code made a hook to dx11 and it works
@zxcghoul1275
@zxcghoul1275 2 жыл бұрын
thx
@DeSibyl
@DeSibyl 3 жыл бұрын
Can you possible make a video on how to hook different versions of DirectX? Some games (most now-a-days) use Dx11... Also, is there any way to get this to work for 64bit dll's? I always get an error with Detours when I try it with 64bit
@casualgamer1791
@casualgamer1791 3 жыл бұрын
regarding X11: yes will do About 64bit dlls: I think the version I linked is 1.5 which does not support x64. Have a look at minhook
@DeSibyl
@DeSibyl 3 жыл бұрын
@@casualgamer1791 I tried minhook, but anytime I try and inject it says it fails to load minhook.64.dll or minhook.86.dll depending if I'm building 64 or 32... Apparently, minhook is broken or something... I even took the example project they provide and it fails to compile saying "failed to load minhook.lib"... If I manually add minhook.86.lib and minhook.64.lib then it says the respective dll's are missing. I add those, and it wont inject, probably because for whatever reason minhook wants to inject its minhook dll with the dll I'm trying to inject...
@casualgamer1791
@casualgamer1791 3 жыл бұрын
Sounds more like a project settings issue
@GatoLouco
@GatoLouco 3 жыл бұрын
For those who can't import d3dx9.h, follow this steps to solve: Include Directorie: C:\Program Files \Microsoft DirectX SDK June 2010 \Include Reference Directorie: C:\Program Files \Microsoft DirectX SDK June 2010\Lib\x64 Library Directorie: C:\Program Files \Microsoft DirectX SDK June 2010\Lib\x86 Don't forget to install DirectX SDK first: www.microsoft.com/en-us/download/details.aspx?id=6812 This took me a time to discovery, please let me know if I helped you!
@GatoLouco
@GatoLouco 3 жыл бұрын
the path C:\Program Files \Microsoft DirectX SDK June 2010\ may be other for you. see yours and change
@jorgemontecillo3715
@jorgemontecillo3715 3 жыл бұрын
Is it similar to dgvoodoo software?
@zxcghoul1275
@zxcghoul1275 2 жыл бұрын
how to clear drawing on every call so that memory does not clog? if(GetKeyState(VK_DOWN)) /* key switch color text font->DrawText(...); /* on */ /*memory clog*/ else font->DrawText(...) /* off */ /*memory clog*/
@zxcghoul1275
@zxcghoul1275 2 жыл бұрын
it's okay. Type: const D3DRECT* Pointer to an array of D3DRECT structures that describe the rectangles to clear. Set a rectangle to the dimensions of the rendering target to clear the entire surface. Each rectangle uses screen coordinates that correspond to points on the render target. Coordinates are clipped to the bounds of the viewport rectangle. To indicate that the entire viewport rectangle is to be cleared, set this parameter to NULL and Count to 0.
@casualgamer1791
@casualgamer1791 2 жыл бұрын
gj
@johndoe14988
@johndoe14988 4 жыл бұрын
awesome!
@lopo8000
@lopo8000 2 жыл бұрын
how in hell do u memorize all those inputs?
@CrazyBR
@CrazyBR 3 жыл бұрын
Nice intro man
@ajinkyax
@ajinkyax 3 жыл бұрын
subscribed :)
@mattrosette1494
@mattrosette1494 3 жыл бұрын
I love it
@kusczak3234
@kusczak3234 Жыл бұрын
I imagined if I can call from spesific NumVertices and primCount to load
@mac6417
@mac6417 3 жыл бұрын
every video i watch its like if u dont understand this watch this and this is like the 50th video ive had to watch to understand the first one lol, but its a process
@oraclematon9277
@oraclematon9277 3 жыл бұрын
d3d11 hook tutorial plz , there are no d3d11 tutorials on the internet
@ViralVibesReal
@ViralVibesReal 4 жыл бұрын
Ok so am an Android Hacker and now I want to learn PC game hacking too, where do I start/what do I do first? I have knowledge in Assembly Language, C++, Hex Patching, and some Smali. For PC, so far I know Cheat Engine, and Basic Read/Write Memory
@casualgamer1791
@casualgamer1791 4 жыл бұрын
hello :) this could be a starting point: guidedhacking.com/threads/start-here-beginners-guide-to-learning-game-hacking.5911/
@harliepole4862
@harliepole4862 2 жыл бұрын
Please I'm begging you🙏🙏 If possible could you make a content to show us how to make a d3d menu using memory addresses. If possible😭😭
@jaolmu
@jaolmu 4 жыл бұрын
the game crashes when i eject the dll, i assume its to do with the detour but i dont really know much about hooking as ive only just started coding internals, any idea why this could be? great video btw :)
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Your assumtion is correct i noticed this issue after releasing the video :/ one has to unhook the directX stuff. Ill see if i can find how to do that
@jaolmu
@jaolmu 4 жыл бұрын
@@casualgamer1791 okay cool, I'll look into it myself at some point, thanks!
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Here we go: DetourRemove((PBYTE)pEndScene, (PBYTE)hookedEndScene); Ima add it to the linked code aswell
@jaolmu
@jaolmu 4 жыл бұрын
@@casualgamer1791 great thanks! I took it upon myself to learn more about detours so I figured it out a while back. But thank you anyways!
@brendonbone1459
@brendonbone1459 4 жыл бұрын
do you have detours 1.5 .h and .lib for x64
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Solution ripped from UC: github.com/Microsoft/Detours/wiki/FAQ#where-can-i-find-detourslib-and-detoursh You have to build detours.lib from the source at: github.com/Microsoft/Detours/tree/master/src 1. Clone the Detours repo to your computer. 2. Open "x64 Native Tools Command Prompt" 3. Change directory to the src/ folder of the Detours repo 4. Enter "nmake" 5. The detours.lib should be in the ../lib.X64, one folder above the src/
@harliepole4862
@harliepole4862 2 жыл бұрын
Hi Bro, does making d3d menu required hooking directx?
@casualgamer1791
@casualgamer1791 2 жыл бұрын
Id recommend it. But tecnically not necessary. If you do not want to hook look at external overlay
@user-wg1re9wv2t
@user-wg1re9wv2t 3 жыл бұрын
is this hook hack can work in emulator like memu with freefire
@hieupc1307
@hieupc1307 2 жыл бұрын
How to make it working on the game does not supports DirectX?
@casualgamer1791
@casualgamer1791 2 жыл бұрын
You can only hook things that the game uses. Maybe it uses opengl? Then you gotta look into how to hook that. Whatever graphics lib it uses is the one u gotta hook.
@hieupc1307
@hieupc1307 2 жыл бұрын
@@casualgamer1791 thanks you
@user-os4yb9tg6w
@user-os4yb9tg6w 4 жыл бұрын
🙏 thank u
@-king1-rus210
@-king1-rus210 4 жыл бұрын
Hello, how do I add a menu open / close?
@casualgamer1791
@casualgamer1791 4 жыл бұрын
One option would be: 1. Add global variable: bool showMenu = false; 2. your main loop: while (true) { //code here if (GetAsyncKeyState(VK_NUMPAD1)) { showMenu = !showMenu; } //more code here } 3. in your hooked function put everything into a if: if (showMenu) { //your pDevice->Clear etc here }
@-king1-rus210
@-king1-rus210 4 жыл бұрын
@@casualgamer1791 Please help me! Did as you wrote, but when I press a key, the program shuts down
@casualgamer1791
@casualgamer1791 4 жыл бұрын
This code tested and working for me: pastebin.com/Tbr6FbaL
@-king1-rus210
@-king1-rus210 4 жыл бұрын
@@casualgamer1791 Thanks no longer needed, I did a great job! But I got another one, for some reason Ks go crashes
@-king1-rus210
@-king1-rus210 4 жыл бұрын
@@casualgamer1791 And it became crash after I wrote a function to draw text
@hundowayve
@hundowayve 4 жыл бұрын
hey man nice video do you think you can make a tutorial on drawing to a external transparent overlay
@casualgamer1791
@casualgamer1791 4 жыл бұрын
Thank you. Yes can and probably should do since that option works for all games
@hundowayve
@hundowayve 4 жыл бұрын
@@casualgamer1791 hey thanks man fr i been looking everywhere for a cpp overlay window hack tutorial do u think if u make the tutorial you can show us how to draw esp and a menu to the overlay because i am trying to make my own apex legends cheat out of all the tutorials i have watched if so that would be amazing thanks
@hundowayve
@hundowayve 4 жыл бұрын
@@casualgamer1791 and i subbed with notifs on btw
@casualgamer1791
@casualgamer1791 4 жыл бұрын
It will take a while until i'll have everything you are looking for. Here is some source code for an overlay which can be used for both esp and menu. guidedhacking.com/threads/direct2d-overlay-for-almost-any-application.8945/ I will cover all those things eventually but will take time Edit: you do have to register to download it but its free so w/e
@casualgamer1791
@casualgamer1791 4 жыл бұрын
I probably should also mention the tutorial series by the all mighty fleep ^^ kzbin.info/www/bejne/ZmezoXWKr7uBqtU
@Cat-wh6gm
@Cat-wh6gm 3 жыл бұрын
is this like how some cheats use discord overlay for their cheats?
@uwu-pq1om
@uwu-pq1om 2 жыл бұрын
what the...
@casualgamer1791
@casualgamer1791 2 жыл бұрын
Actually not a stupid question imo. Those cheats hook the discord overlay instead of creating their own
@anonymousk5899
@anonymousk5899 4 жыл бұрын
plz make video more i like this video
@kiminotoriko6178
@kiminotoriko6178 2 жыл бұрын
Can I have subtitle please
@_WitchKing_
@_WitchKing_ Жыл бұрын
So, does it work in fullscreen?
@casualgamer1791
@casualgamer1791 Жыл бұрын
Generally speaking yes it should
@_WitchKing_
@_WitchKing_ Жыл бұрын
@@casualgamer1791 thank U for the answer, im tryin to make an internal overlay to LoL, but first im learning diffrent options on a diffrent games ;)
@tiantian9074
@tiantian9074 3 жыл бұрын
thank u
@PubgGamer-sz1in
@PubgGamer-sz1in 2 ай бұрын
Unfortunately the code is giving me an erro "unresolved symblo external_Direct3DCreat9@4 and D3DXCreateFontA@48. I don't know why and I did everything correctly.Can someone help me here. Am actually a begginer but that much. Actually this video is the only video that explains everything very well for beginners. Anyways thumbs up my friend
@alisavitar2284
@alisavitar2284 Жыл бұрын
this is the most unfriendly video for people who have no idea how to make a cheat and want to start making one i understood nothing after downloading directx sdk
@wajidkhan-ns7ed
@wajidkhan-ns7ed 3 жыл бұрын
Bro make a video for ios pub g esp hack
@user-jf9bx
@user-jf9bx 4 жыл бұрын
Why are u using the light-theme for VS?! Are you the devil or something???
@casualgamer1791
@casualgamer1791 4 жыл бұрын
^^ never even considered changing it tbh. any theme you would recommend?
@TukeShark
@TukeShark 4 жыл бұрын
CasualGamer the dark theme one
@uliveulearnandregret
@uliveulearnandregret Жыл бұрын
anyone else get dllinject failed finding address of msvp140D!?cout@std@@3V?$basic_ostream@DU?$c...
Hooking DirectInput C++
14:03
CasualGamer
Рет қаралды 10 М.
BEST WAY to make Desktop Applications in C++
26:00
The Cherno
Рет қаралды 896 М.
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 33 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 61 МЛН
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
Simulate Keyboard In Games | C++ Game Hacking
5:23
CasualGamer
Рет қаралды 17 М.
Making My Own Programming Language and Coding a Game in It
10:19
AstroSam
Рет қаралды 1,2 МЛН
C# GAME ENGINE BY 16-YEAR-OLD! // Code Review
49:06
The Cherno
Рет қаралды 301 М.
How to make an ImGui Cheat Menu | CSGO
16:32
Cyborg Elf
Рет қаралды 125 М.
How to Hook Steam Overlay Tutorial - 64-bit IMGUI Hook
10:31
Guided Hacking
Рет қаралды 16 М.
Why You NEED a DRIVER (for hacking games)
8:03
cazz
Рет қаралды 444 М.
How To Hook DirectX 11
9:34
CasualGamer
Рет қаралды 17 М.
I Made a Graphics Engine
6:42
Zyger
Рет қаралды 245 М.
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 33 МЛН